diff mbox

Regression for Lenovo X240 sound in 3.18

Message ID s5hr3vhgldi.wl-tiwai@suse.de (mailing list archive)
State New, archived
Headers show

Commit Message

Takashi Iwai Dec. 30, 2014, 4:20 p.m. UTC
At Tue, 30 Dec 2014 16:45:38 +0100,
Takashi Iwai wrote:
> 
> At Tue, 30 Dec 2014 16:30:39 +0100 (CET),
> Jan Engelhardt wrote:
> > 
> > [1  <text/plain; US-ASCII (7bit)>]
> > 
> > On Tuesday 2014-12-30 16:15, Takashi Iwai wrote:
> > >
> > >> - speakers do not output _any_ sound whatsoever anymore
> > >
> > >Are you using PulseAudio or without?  Try to check without PA at
> > >first.
> > 
> > I never use PA, so this is all with plain ALSA.
> > 
> > >In anyway, get alsa-info.sh outputs at the headphone plugged and
> > >unplugged on both 3.17.x and 3.18.x kernels.  Run the script with
> > >--no-upload option and attach them.
> 
> Please give both headphone plugged and unplugged for both kernels
> (total 4 states).

Ah, I see you disable the automute.  So the headphone plug shouldn't
matter.

Hm, then there is nothing obvious wrong there at a quick glance.
Maybe there is an implicit fixed connection between a DAC and a pin?
Try the patch below.


Takashi

---

Comments

Jan Engelhardt Dec. 30, 2014, 6:13 p.m. UTC | #1
On Tuesday 2014-12-30 17:20, Takashi Iwai wrote:
>
>Ah, I see you disable the automute.  So the headphone plug shouldn't
>matter.

Changing the "Auto-Mute" control does not do anything; the system always
exhibits Automute behavior (if that's a bug, it's one which I did not
care about so far).


>Hm, then there is nothing obvious wrong there at a quick glance.
>Maybe there is an implicit fixed connection between a DAC and a pin?
>Try the patch below.

With your patch, I get a system which still has two issues
that were not there in 3.17:
 - the "Headphone" control is present but has no volume bar
 - the "PCM" control does not affect the Speaker volume
Takashi Iwai Dec. 31, 2014, 8:51 a.m. UTC | #2
At Tue, 30 Dec 2014 19:13:14 +0100 (CET),
Jan Engelhardt wrote:
> 
> 
> On Tuesday 2014-12-30 17:20, Takashi Iwai wrote:
> >
> >Ah, I see you disable the automute.  So the headphone plug shouldn't
> >matter.
> 
> Changing the "Auto-Mute" control does not do anything; the system always
> exhibits Automute behavior (if that's a bug, it's one which I did not
> care about so far).

Oh, that's really interesting.  I didn't expect such a
hardware-controlled automute nowadays.  We need to investigate this
more.

Could you try hda_analyzer or hda-jack-retask (see HD-Audio.txt) to
change the control of pins 0x14 and 0x15 on the fly?  Do they
influence on the output for the speaker (0x14) and the headphone
(0x15)?  Also, check alsa-info.sh output (or alsactl store) whether
"Headphone Jack" gives the right value per the headphone jack plug
state.

> >Hm, then there is nothing obvious wrong there at a quick glance.
> >Maybe there is an implicit fixed connection between a DAC and a pin?
> >Try the patch below.
> 
> With your patch, I get a system which still has two issues
> that were not there in 3.17:
>  - the "Headphone" control is present but has no volume bar
>  - the "PCM" control does not affect the Speaker volume

These are expected behavior (side-effects).  It's because of the
shared volume control between the headpohne and the dock output.
On 3.18, "PCM" is assigned to this shared volume control as a
fallback.  In your case, "PCM" was used by alsa-lib softvol plugin,
and this is no longer taken when a hardware volume control is
present.  That's the reason for the second item.

On 3.19, this was renamed differently, so that "PCM" can appear again
by a softvol item like before.

In anyway, beware that changing "PCM" softvol volume isn't wise at
all.  Better to keep this as unmodified (0dB, 100%) and use only
"Master" volume so that you can avoid unnecessary sample manipulations
in software.


Takashi
diff mbox

Patch

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 65f1f4e18ea5..8b51772c7420 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5440,6 +5440,16 @@  static int patch_alc269(struct hda_codec *codec)
 		spec->init_hook = alc5505_dsp_init;
 	}
 
+	{ // XXX
+		static hda_nid_t preferred_pairs[] = {
+			0x14, 0x03,
+			0x15, 0x02,
+			0x16, 0x02,
+			0
+		};
+		spec->gen.preferred_dacs = preferred_pairs;
+	}
+
 	/* automatic parse from the BIOS config */
 	err = alc269_parse_auto_config(codec);
 	if (err < 0)