Bug 1101386 - Thinkpad T440s dock - no audio
Thinkpad T440s dock - no audio
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 1312979
  Show dependency treegraph
 
Reported: 2014-05-27 01:22 EDT by Vít Ondruch
Modified: 2016-06-24 09:29 EDT (History)
27 users (show)

See Also:
Fixed In Version: kernel-3.15.9-200.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1312979 (view as bug list)
Environment:
Last Closed: 2014-08-15 20:34:41 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
output of alsa-info.sh --no-upload (40.83 KB, text/plain)
2014-05-27 06:30 EDT, Jonathan Wakely
no flags Details
Initial output of amixer -c0 (3.09 KB, text/plain)
2014-05-27 06:31 EDT, Jonathan Wakely
no flags Details
Output of amixer -c0 after adjusting mixer settings (3.09 KB, text/plain)
2014-05-27 06:32 EDT, Jonathan Wakely
no flags Details
[patch] ALSA: hda - Add dock pin setups for Thinkpad T440 (2.12 KB, patch)
2014-08-02 04:00 EDT, Jiri Pirko
no flags Details | Diff

  None (edit)
Description Vít Ondruch 2014-05-27 01:22:40 EDT
Description of problem:
If my Thinkpad T440s is connected with the docking station and the audio cable is plugged in the dock there is no audio output on the speakers. If I connect the audio cable directly with the Thinkpad I can here the audio output.

Version-Release number of selected component (if applicable):
$ rpm -q alsa-lib 
alsa-lib-1.0.27.2-2.fc20.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Plug the headphones into docking station => no audio
2.
3.

Actual results:
No audio from docking station.


Expected results:
Audio from docking station works.


Additional info:
http://www.alsa-project.org/db/?f=5538955eca5d1084ee1a590074105087501fd7e3
Comment 1 Jonathan Wakely 2014-05-27 06:14:45 EDT
I have the same problem with a T530 and dock. If I run alsamixer I can unmute the dock's headphone channel and get sound.

Unfortunately the KDE audio settings don't display anything at all for the dock's headphone socket, so I didn't know it even existed, let alone that it was muted.  Any change to the KDE sound settings seems to reset the dock output to muted and I have to run alsamixer again to get sound.
Comment 2 Jonathan Wakely 2014-05-27 06:30:21 EDT
Created attachment 899456 [details]
output of alsa-info.sh --no-upload

To be precise, I run alsamixer, then F6 and choose the "HDA Intel PCH" soundcard, then adjust the "Headphone" mixer control.

I'll attach my amixer output before/after.
Comment 3 Jonathan Wakely 2014-05-27 06:31:13 EDT
Created attachment 899457 [details]
Initial output of amixer -c0
Comment 4 Jonathan Wakely 2014-05-27 06:32:18 EDT
Created attachment 899458 [details]
Output of amixer -c0 after adjusting mixer settings
Comment 5 Vít Ondruch 2014-05-27 06:59:33 EDT
(In reply to Jonathan Wakely from comment #1)
> I have the same problem with a T530 and dock. If I run alsamixer I can
> unmute the dock's headphone channel and get sound.

This seems to be different problem. My "Headphone" mixer reacts appropriately, it (un)mutes if I (un)plug my headphones into laptop. But it has no influence on audio connector in docking station what so ever.
Comment 6 Jonathan Wakely 2014-05-27 07:09:48 EDT
Yes, that's the same here. THe Headphone mixer doesn't react when I plug speakers into the dock, but if I manually turn the volume up I get sound through the dock output. It reacts correctly when using the laptop's headphone socket.

So the bug seems to be that the sound profile(?) doesn't switch to Headphone mode when using the dock connector.
Comment 7 Vít Ondruch 2014-05-27 07:17:32 EDT
(In reply to Jonathan Wakely from comment #6)
> Yes, that's the same here. THe Headphone mixer doesn't react when I plug
> speakers into the dock, but if I manually turn the volume up I get sound
> through the dock output. It reacts correctly when using the laptop's
> headphone socket.
> 
> So the bug seems to be that the sound profile(?) doesn't switch to Headphone
> mode when using the dock connector.

But I have everything unmuted and 100% volume and there is no sound through dock output at all.
Comment 8 Raymond 2014-05-27 22:03:35 EDT
control.22 {
		iface CARD
		name 'Headphone Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.23 {
		iface CARD
		name 'Dock Headphone Jack'
		value true
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}


there is no dock headphone in

http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/analog-output-headphones.conf

but speaker can turn headphone off in

http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/analog-output-speaker.conf
Comment 9 Raymond 2014-05-27 22:03:50 EDT
control.22 {
		iface CARD
		name 'Headphone Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.23 {
		iface CARD
		name 'Dock Headphone Jack'
		value true
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}


there is no dock headphone in

http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/analog-output-headphones.conf

but speaker can turn headphone off in

http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/analog-output-speaker.conf
Comment 10 Vít Ondruch 2014-06-12 16:29:09 EDT
This goes into Kernel 3.16:

http://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/?id=1c37c22332a2d2c1b4ab32177a4f847c7fe06e38

May be it could be backported?
Comment 11 Jim Minter 2014-06-26 15:13:12 EDT
FYI the fixup in c10 can be applied to an older kernel at runtime as follows:

# cat <<EOF >/lib/firmware/t440s.fw
[codec]
0x10ec0292 0x17aa220c 0

[pincfg]
0x16 0x21211010
0x19 0x21a11010
EOF

# cat <<EOF >/etc/modprobe.d/hda-intel.conf
options snd-hda-intel patch=t440s.fw,t440s.fw,t440s.fw
EOF

Then rmmod/modprobe the snd-hda-intel kernel module, or just reboot.

This solves the issue for me with a T540p + dock using F20 (although for a T540p, the codec value needed in the configuration file is 0x17aa2210, not 0x17aa220c; for a T440p I suppose it's 0x17aa220e).
Comment 12 Jim Minter 2014-06-26 15:26:27 EDT
I've e-mailed alsa-devel with the information above and requested that the patch in c10 be amended for T540p users as well, i.e. by adding

+        SND_PCI_QUIRK(0x17aa, 0x2210, "Thinkpad T540p", ALC292_FIXUP_TPT440_DOCK),
Comment 14 Josh Boyer 2014-06-27 08:02:17 EDT
I'll get a scratch kernel built today that contains the two patches.
Comment 15 Josh Boyer 2014-06-27 08:18:35 EDT
Please test this kernel when it completes and let me know if it resolves the issues:

http://koji.fedoraproject.org/koji/taskinfo?taskID=7082741
Comment 16 Josh Boyer 2014-06-27 09:18:29 EDT
Sorry, please use this build instead:

http://koji.fedoraproject.org/koji/taskinfo?taskID=7082849
Comment 17 David Jaša 2014-07-10 03:53:04 EDT
RHEL 7 bug: bug 1100835
Comment 18 Vít Ondruch 2014-07-28 04:45:47 EDT
(In reply to Jim Minter from comment #11)
Thanks Jim, the workaround works for me.



(In reply to Josh Boyer from comment #16)
Josh, could you please do another scratch build. I obviously missed this one :/ Sorry for being late.
Comment 19 Josh Boyer 2014-07-28 08:33:56 EDT
(In reply to Vít Ondruch from comment #18)
> (In reply to Jim Minter from comment #11)
> Thanks Jim, the workaround works for me.
> 
> 
> 
> (In reply to Josh Boyer from comment #16)
> Josh, could you please do another scratch build. I obviously missed this one
> :/ Sorry for being late.

Um... if you're running a rawhide kernel (which is what this bug is reported against), both of the patches are already contained in that.

git describe --contains a12137e779e17413f87026202a890f8143858259
v3.16-rc4~8^2~2

git describe --contains 1c37c22332a2d2c1b4ab32177a4f847c7fe06e38
v3.16-rc1~12^2~66

Are you running a rawhide kernel, or some other version?
Comment 20 Vít Ondruch 2014-07-28 08:40:07 EDT
This is my current kernel:

$ uname -a
Linux unused-4-226.brq.redhat.com 3.15.6-200.fc20.x86_64 #1 SMP Fri Jul 18 02:36:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

I originally encountered the issue on my F20 and it still holds for F20. I was requesting the backport for F20 in comment #10, but it was probably not that clear. Sorry for the confusion.
Comment 21 Jiri Pirko 2014-08-02 04:00:42 EDT
Created attachment 923449 [details]
[patch] ALSA: hda - Add dock pin setups for Thinkpad T440

F20 backport of following upstream commit:

commit 1c37c22332a2d2c1b4ab32177a4f847c7fe06e38
Author: Takashi Iwai <tiwai@suse.de>
Date:   Tue May 6 17:34:42 2014 +0200

    ALSA: hda - Add dock pin setups for Thinkpad T440
    
    The headphone and mic jacks on Thinkpad T440 are assigned to pins NID
    0x16 and 0x19, respectively.  These need to be set up manually by a
    fixup.
    
    Reported-and-tested-by: Joschi Brauchle <joschi.brauchle@tum.de>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

Test build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=7225538

This fixed the issue for me and I am able to hear sound from speakers connected directly to dock.
Should I post this patch to fedora mailing list or is this enough? Thanks!
Comment 22 Josh Boyer 2014-08-02 08:08:01 EDT
Thanks, that's enough.  We're travelling today though, so it won't get committed until Monday most likely.
Comment 23 Josh Boyer 2014-08-02 10:03:18 EDT
Got to it sooner than I thought.  Also found the previous work I did to grab the two referenced commits, so I used that.  Thanks again everyone.  This should be fixed with the next official build.
Comment 24 Fedora Update System 2014-08-11 09:18:56 EDT
kernel-3.15.9-200.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/kernel-3.15.9-200.fc20
Comment 25 Fedora Update System 2014-08-14 22:40:23 EDT
Package kernel-3.15.9-200.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing kernel-3.15.9-200.fc20'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-9351/kernel-3.15.9-200.fc20
then log in and leave karma (feedback).
Comment 26 Fedora Update System 2014-08-15 20:34:41 EDT
kernel-3.15.9-200.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 27 Martin Bříza 2014-11-05 11:46:31 EST
Still not working with X240, maybe other compatible laptops, see Bug 1150594.
Comment 28 Slawomir Grodzki 2016-06-24 05:53:03 EDT
I have similar issue regarding Thinkpad T460 and Ultra Dock
Comment 29 Slawomir Grodzki 2016-06-24 06:47:59 EDT
I forgot to add I'm on kernel 4.6.2-1
Comment 30 Jaroslav Kysela 2016-06-24 09:16:58 EDT
Slawomir: https://bugzilla.kernel.org/show_bug.cgi?id=120961
Comment 31 Slawomir Grodzki 2016-06-24 09:29:40 EDT
Big thank you for Jaroslav help. Following his solution to adding options snd-hda-intel model=tpt460 in modprobe.d completely resolved my sound issue from Lenovo ThinkPad 460 over docking station.

echo "options snd-hda-intel model=tpt460" > /etc/modprobe.d/alsadock.conf

Note You need to log in before you can comment on or make changes to this bug.