[alsa-devel] Regression for Lenovo X240 sound in 3.18
I have a X240 (without any dock), and in Linux 3.17.4, I used to have - "Speaker" with switch and volume bar (in alsamixer), - "PCM" with switch and volume bar, - the headphone output volume would be controlled by both Master and PCM.
With 3.18.1, bisected down to below commit, this all went bonkers. - "Speaker" has only a switch but no volume bar, - speakers do not output _any_ sound whatsoever anymore - changing the PCM volume does not affect either Headphone or Speaker.
commit 7c21539c45eace48e9f6fbdd59347d8416960af5 Author: Lukas Bossard mr.bobukas@gmail.com Date: Wed Oct 29 18:31:07 2014 +0100
ALSA: hda - Add ultra dock support for Thinkpad X240.
Adding ultra doch support for Lenovo Thinkpad X240 (17aa:2214). [Actually replaced the entry with ALC292_FIXUP_TPT440_DOCK -- tiwai]
Reverting this commit on top of v3.18.1 restores the sought functionality.
At Mon, 29 Dec 2014 13:51:36 +0100 (CET), Jan Engelhardt wrote:
I have a X240 (without any dock), and in Linux 3.17.4, I used to have
- "Speaker" with switch and volume bar (in alsamixer),
- "PCM" with switch and volume bar,
- the headphone output volume would be controlled by both Master and PCM.
With 3.18.1, bisected down to below commit, this all went bonkers.
- "Speaker" has only a switch but no volume bar,
Some volume remapping is an expected side-effect as some outputs share the same DAC.
- speakers do not output _any_ sound whatsoever anymore
Are you using PulseAudio or without? Try to check without PA at first. Don't forget to raise / unmute all relevant volumes via "alsamixer -c0" (or -c1), then test with "aplay -Dplughw foo.wav" (or aplay -Dplughw:1 foo.wav)
There has been a known issue in the recent openSUSE pulseaudio package, so this might be it. In that case, try to upgrade pulseaudio and related packages from OBS multimedia:libs repo (if not done yet).
- changing the PCM volume does not affect either Headphone or Speaker.
The "PCM" is now an alsa-lib softvol mixer item that isn't used by PA. This is likely no bug.
commit 7c21539c45eace48e9f6fbdd59347d8416960af5 Author: Lukas Bossard mr.bobukas@gmail.com Date: Wed Oct 29 18:31:07 2014 +0100
ALSA: hda - Add ultra dock support for Thinkpad X240. Adding ultra doch support for Lenovo Thinkpad X240 (17aa:2214). [Actually replaced the entry with ALC292_FIXUP_TPT440_DOCK -- tiwai]
Reverting this commit on top of v3.18.1 restores the sought functionality.
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.
Takashi
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.
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).
Takashi
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
--- 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)
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
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
- 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.
If Combo audio connector does not support conventional microphone, this mean the driver should not create mic jack control for node 0x1a
http://support.lenovo.com/us/en/documents/pd029567
Connect headphones or a headset that has a 3.5-mm (0.14-inch), 4-pole plug to the combo audio connector to listen to the sound from the computer.
Notes : • If you are using a headset with a function switch, for example, a headset for an iPhone mobile digital device, do not press this switch while using the headset. If you press the switch, the headset microphone will be disabled, and the integrated microphones on the computer will be enabled instead.
• The combo audio connector does not support a conventional microphone.
participants (3)
-
Jan Engelhardt
-
Raymond Yau
-
Takashi Iwai