Bug 99681 - no sound after plugging in headphones/speakers, "Speaker+LO" volume is lowered to 0, on Fujitsu Lifebook E780
Summary: no sound after plugging in headphones/speakers, "Speaker+LO" volume is lowere...
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-09 04:14 UTC by Kamil Paral
Modified: 2015-06-29 07:52 UTC (History)
3 users (show)

See Also:
Kernel Version: kernel-4.0.4-202.fc21.x86_64
Subsystem:
Regression: No
Bisected commit-id:


Attachments
alsa-info output on HP probook 6470b (37.75 KB, application/octet-stream)
2015-06-13 23:32 UTC, Martin Erik Werner
Details
Test fix patch for Lifebook E780 (1.33 KB, patch)
2015-06-15 16:16 UTC, Takashi Iwai
Details | Diff

Description Kamil Paral 2015-06-09 04:14:13 UTC
After upgrading from PulseAudio 5.0 to PulseAudio 6.0 on Fedora 21, our family laptop can no longer play audio from headphones/speakers. Integrated speakers work fine.

After playing for a while with alsamixer, I figured out that every time I connect headphones/speakers, "Speaker+LO" bar is lowered to zero volume. If I manually increase it, headphones/speakers start to play fine. But I need to make this adjustment every single time I plug in headphones/speakers.

I reported this bug against PulseAudio here:
https://bugs.freedesktop.org/show_bug.cgi?id=90491
but they told me it's an alsa driver bug and I should report it here.

The PA bug report contains numerous logs and debug output from PA maintainers (most of which I don't understand), please consult it, I hope that helps with debugging. I can also try to gather any other required information, just please instruct me how.

I have retested the functionality with latest kernel in Fedora 21 (kernel-4.0.4-202.fc21.x86_64), the problem is still present.

kernel-4.0.4-202.fc21.x86_64
alsa-lib-1.0.28-2.fc21.x86_64
alsa-plugins-pulseaudio-1.0.28-3.fc21.x86_64
alsa-utils-1.0.28-2.fc21.x86_64
pulseaudio-6.0-2.fc21.1.x86_64
pulseaudio-gdm-hooks-6.0-2.fc21.1.x86_64
pulseaudio-libs-6.0-2.fc21.1.x86_64
pulseaudio-libs-glib2-6.0-2.fc21.1.x86_64
pulseaudio-module-bluetooth-6.0-2.fc21.1.x86_64
pulseaudio-module-x11-6.0-2.fc21.1.x86_64
pulseaudio-utils-6.0-2.fc21.1.x86_64

Thank you for your help.
Comment 1 Raymond 2015-06-10 23:32:10 UTC
https://bugzilla.kernel.org/show_bug.cgi?id=99721#c13

you need to fix the sequence of node 0x15 to 0xf to prevent auto parser change headphone jack to line out


Node 0x15 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
  Control: name="Line Out Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Headphone Jack", index=0, device=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0001001c: OUT HP EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x03211020: [Jack] HP Out at Ext Left
    Conn = 1/8, Color = Black
    DefAssociation = 0x2, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=02, enabled=1
  Connection: 2
     0x0c* 0x0d

Node 0x1a [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Control: name="Headphone Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Dock Headphone Jack", index=0, device=0
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0000373c: IN OUT HP Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x2121101f: [Jack] HP Out at Sep Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0x1, Sequence = 0xf
  Pin-ctls: 0xc0: OUT HP VREF_HIZ
  Unsolicited: tag=01, enabled=1
  Connection: 2
     0x0c 0x0d*
Comment 2 Raymond 2015-06-10 23:32:25 UTC
https://bugzilla.kernel.org/show_bug.cgi?id=99721#c13

you need to fix the sequence of node 0x15 to 0xf to prevent auto parser change headphone jack to line out


Node 0x15 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
  Control: name="Line Out Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Headphone Jack", index=0, device=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0001001c: OUT HP EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x03211020: [Jack] HP Out at Ext Left
    Conn = 1/8, Color = Black
    DefAssociation = 0x2, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=02, enabled=1
  Connection: 2
     0x0c* 0x0d

Node 0x1a [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Control: name="Headphone Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Dock Headphone Jack", index=0, device=0
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0000373c: IN OUT HP Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x2121101f: [Jack] HP Out at Sep Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0x1, Sequence = 0xf
  Pin-ctls: 0xc0: OUT HP VREF_HIZ
  Unsolicited: tag=01, enabled=1
  Connection: 2
     0x0c 0x0d*
Comment 3 Martin Erik Werner 2015-06-13 23:32:10 UTC
Created attachment 179881 [details]
alsa-info output on HP probook 6470b

I'm seeing a very similar issue currently on a HP probook 6470b and linux 4.0.0 with but in addition to zeroing the volume, Speaker+LO is also muted on plugging in headhones.

I've attached the alsa-info output. Is this the same issue as this one or should it be reported separately?
Comment 4 Raymond 2015-06-13 23:58:34 UTC
your case are different

it is pulseaudio bug since pulseaudio did not define dock-lineout.conf for Dock Line Out Jack

http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths


Node 0x0a [Pin Complex] wcaps 0x400583: Stereo Amp-In
  Control: name="Dock Line Out Jack", index=0, device=0
  Amp-In caps: N/A
  Amp-In vals:  [0x00 0x00]
  Pincap 0x0001173c: IN OUT HP EAPD Detect
    Vref caps: HIZ 50 GRD 80
  EAPD 0x2: EAPD
  Pin Default 0x21011030: [Jack] Line Out at Sep Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0x3, Sequence = 0x0
  Pin-ctls: 0x40: OUT VREF_HIZ
  Unsolicited: tag=02, enabled=1
  Power states: 
  Power: setting=D0, actual=D0
  Connection: 3
     0x13 0x14 0x1c*
Comment 5 Raymond 2015-06-14 01:13:23 UTC
(In reply to Martin Erik Werner from comment #3)
> Created attachment 179881 [details]
> alsa-info output on HP probook 6470b
> 
> I'm seeing a very similar issue currently on a HP probook 6470b and linux
> 4.0.0 with but in addition to zeroing the volume, Speaker+LO is also muted
> on plugging in headhones.
> 
> I've attached the alsa-info output. Is this the same issue as this one or
> should it be reported separately?

but headphone is not plugged

control.23 {
		iface CARD
		name 'Dock Line Out Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.24 {
		iface CARD
		name 'Headphone Jack'
		value false
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.25 {
		iface CARD
		name 'Speaker Phantom Jack'
		value true
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
Comment 6 Raymond 2015-06-14 01:27:28 UTC
both speaker and dock line out  are connected to mixer 0x1b which connected to audio output 0x13

idt codec output pin complex has no mute capability

user application (pulseaudio) have no way to mute  speaker only, it rely on the driver mute the widget by set pin-ctls to zero, change volume control to minimum is not the correct way since the original volume is lost when you unplug the headphone



Node 0x0d [Pin Complex] wcaps 0x400501: Stereo
  Control: name="Speaker Phantom Jack", index=0, device=0
  Pincap 0x00010050: OUT EAPD Balanced
  EAPD 0x2: EAPD
  Pin Default 0x90170110: [Fixed] Speaker at Int N/A
    Conn = Analog, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Power states: 
  Power: setting=D0, actual=D0
  Connection: 3
     0x13 0x14 0x1c*



Node 0x1b [Audio Mixer] wcaps 0x20050b: Stereo Amp-In
  Control: name="Mic Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Control: name="Mic Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Control: name="Line Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=2, ofs=0
  Control: name="Line Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=2, ofs=0
  Amp-In caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-In vals:  [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x17 0x17] [0x80 0x80] [0x80 0x80]
  Power states: 
  Power: setting=D0, actual=D0
  Connection: 6
     0x0c 0x0e 0x0f 0x13 0x14 0x0a
Node 0x1c [Audio Selector] wcaps 0x30050d: Stereo Amp-Out
  Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x1f 0x1f]
  Power states: 
  Power: setting=D0, actual=D0
  Connection: 1
     0x1b
Comment 7 Raymond 2015-06-14 01:41:50 UTC
Simple mixer control 'Loopback Mixing',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Enabled'


disable loopback mixing allow driver to power down audio mixer 0x1b if you don't need mic playback volume or line playback volume
Comment 8 Raymond 2015-06-14 01:47:05 UTC
auto mic select of notebook  force driver to disable stereo mix (select audio mixer 0x1b as input source)



Node 0x17 [Audio Selector] wcaps 0x300d0d: Stereo Amp-Out R/L
  Control: name="Capture Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Capture Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x0f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x0f 0x0f]
  Power states: 
  Power: setting=D0, actual=D0
  Connection: 7
     0x0c 0x0e 0x0f 0x1b 0x11* 0x12 0x0a
Comment 9 Raymond 2015-06-14 02:11:37 UTC
http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/modules/alsa/mixer/paths/analog-output-headphones.conf?id=594da41d07edcebc5fd319388852a66cc3f12ace

if pulseaudio put dock headphone jack in headohone.conf

you may try put dock line out jack in lineout.conf

you have to file pulseaudio if this method fail to work

https://bugs.freedesktop.org/enter_bug.cgi?product=PulseAudio
Comment 10 Martin Erik Werner 2015-06-14 02:44:32 UTC
(In reply to Raymond from comment #9)
> http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/modules/alsa/
> mixer/paths/analog-output-headphones.
> conf?id=594da41d07edcebc5fd319388852a66cc3f12ace
> 
> if pulseaudio put dock headphone jack in headohone.conf
> 
> you may try put dock line out jack in lineout.conf
> 
> you have to file pulseaudio if this method fail to work
> 
> https://bugs.freedesktop.org/enter_bug.cgi?product=PulseAudio

My version of pulseaudio (6.0) already have the above linked lines in /usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf

I have tried adding
[Jack Dock Line Out]
required-any = any

[Jack Dock Line Out Phantom]
required-any = any
state.plugged = unknown
state.unplugged = unknown

to /usr/share/pulseaudio/alsa-mixer/paths/analog-output-lineout.conf with no difference.

So then it is a pulseaudio issue?
Comment 11 Raymond 2015-06-14 04:30:28 UTC
try 

hdajacksensetest -a

when headphone is plugged or unplugged


ode 0x13 [Audio Output] wcaps 0xd0c45: Stereo Amp-Out R/L
  Control: name="Speaker+LO Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Speaker+LO Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Device: name="92HD81B1X5 Analog", type="Audio", device=0
  Amp-Out caps: N/A
  Amp-Out vals:  [0x7f 0x7f]
  Converter: stream=8, channel=0
  Power states: 
  Power: setting=D0, actual=D0
  Delay: 13 samples
  Processing caps: benign=0, ncoeff=0
Node 0x14 [Audio Output] wcaps 0xd0c45: Stereo Amp-Out R/L
  Control: name="Headphone Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Headphone Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: N/A
  Amp-Out vals:  [0x80 0x80]
  Converter: stream=8, channel=0
  Power states: 
  Power: setting=D3, actual=D3
  Delay: 13 samples
  Processing caps: benign=0, ncoeff=0


http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/modules/alsa/mixer/paths/analog-output-speaker.conf?id=22aac4e9fdb3786178f7815a0cb2150f588b1582

pulseaudio turn off headphone volume when headphone is not plugged



http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/modules/alsa/mixer/paths/analog-output-headphones.conf?id=aec811798cd883a454b9b5cd82c77831906bbd2d

pulseaudio turn speaker+lo playback volume when headphone is plugged
Comment 12 Raymond 2015-06-14 04:36:17 UTC
(In reply to Martin Erik Werner from comment #10)
> (In reply to Raymond from comment #9)
> > 
> 
> My version of pulseaudio (6.0) already have the above linked lines in
> /usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf
> 
> 
> [Jack Dock Line Out Phantom]
> required-any = any
> state.plugged = unknown
> state.unplugged = unknown
> 

you don't need this line since dock line out should support jack detection if speaker is auto muted when docked
Comment 13 Raymond 2015-06-14 04:46:09 UTC
control.3 {
		iface MIXER
		name 'Headphone Playback Volume'
		value.0 0
		value.1 0
		comment {
			access 'read write'
			type INTEGER
			count 2
			range '0 - 127'
			dbmin -9999999
			dbmax 0
			dbvalue.0 -9999999
			dbvalue.1 -9999999
		}
	}
	control.4 {
		iface MIXER
		name 'Headphone Playback Switch'
		value.0 false
		value.1 false
		comment {
			access 'read write'
			type BOOLEAN
			count 2
		}
	}


if driver assign headphone playback switch at audio output at node 0x14 

there is no point to set min dB of headphone playback volume to -99999.99 dB (-INF dB)

you shoul open another bug report
Comment 14 Raymond 2015-06-14 05:11:33 UTC
Default Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Default Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x02, mute=1
State of AFG node 0x01:


it is strange that driver don't use default amp out caps when audio out has no amp out cap

Amp-Out caps: N/A
Comment 15 Raymond 2015-06-14 05:30:39 UTC
http://www.temposemi.com/products/pclaptop-hd/92hd81b/

do it mean that driver cannot get amp out caps since datasheet widget diagram and node 0x13 and node 0x14 contain the step size and no of steps, zero offset ?
Comment 16 Raymond 2015-06-14 05:40:03 UTC
7.14.3.DAC0 (NID = 13h): OutAmpLeft

7.14.4.DAC0 (NID = 13h): OutAmpRight

7.15.3.DAC1 (NID = 14h): OutAmpLeft

7.15.4.DAC1 (NID = 14h): OutAmpRight



can you use hda-verb and the get verb defined in datasheet to get the amp out cap of dac0 and dac1
Comment 17 Raymond 2015-06-14 06:26:39 UTC
u32 query_amp_caps(struct hda_codec *codec, hda_nid_t nid, int direction)
{
	if (!(get_wcaps(codec, nid) & AC_WCAP_AMP_OVRD))
		nid = codec->core.afg;
	return snd_hda_param_read(codec, nid,
				  direction == HDA_OUTPUT ?
				  AC_PAR_AMP_OUT_CAP : AC_PAR_AMP_IN_CAP);
}

the driver is using snd_hda_param_read and AC_PAR_AMP_OUT_CAP to query amp out caps and this is difffere t from 92hd81 datasheet
Comment 18 Takashi Iwai 2015-06-14 07:33:25 UTC
(In reply to Raymond from comment #13)
> control.3 {
>               iface MIXER
>               name 'Headphone Playback Volume'
>               value.0 0
>               value.1 0
>               comment {
>                       access 'read write'
>                       type INTEGER
>                       count 2
>                       range '0 - 127'
>                       dbmin -9999999
>                       dbmax 0
>                       dbvalue.0 -9999999
>                       dbvalue.1 -9999999
>               }
>       }
>       control.4 {
>               iface MIXER
>               name 'Headphone Playback Switch'
>               value.0 false
>               value.1 false
>               comment {
>                       access 'read write'
>                       type BOOLEAN
>                       count 2
>               }
>       }
> 
> 
> if driver assign headphone playback switch at audio output at node 0x14 
> 
> there is no point to set min dB of headphone playback volume to -99999.99 dB
> (-INF dB)
> 
> you shoul open another bug report

This is no bug.  It means just that the value zero is mute on this codec.
Comment 19 Raymond 2015-06-14 08:57:02 UTC
Node 0x0a [Pin Complex] wcaps 0x400583: Stereo Amp-In
  Control: name="Dock Line Out Jack", index=0, device=0
  Amp-In caps: N/A
  Amp-In vals:  [0x00 0x00]
  Pincap 0x0001173c: IN OUT HP EAPD Detect
    Vref caps: HIZ 50 GRD 80
  EAPD 0x2: EAPD
  Pin Default 0x21011030: [Jack] Line Out at Sep Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0x3, Sequence = 0x0
  Pin-ctls: 0x40: OUT VREF_HIZ
  Unsolicited: tag=02, enabled=1
  Power states: 
  Power: setting=D0, actual=D0
  Connection: 3
     0x13 0x14 0x1c*
Node 0x0b [Pin Complex] wcaps 0x400581: Stereo
  Control: name="Headphone Jack", index=0, device=0
  Pincap 0x0001001c: OUT HP EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x0421101f: [Jack] HP Out at Ext Right
    Conn = 1/8, Color = Black
    DefAssociation = 0x1, Sequence = 0xf
  Pin-ctls: 0xc0: OUT HP
  Unsolicited: tag=01, enabled=1
  Power states: 
  Power: setting=D0, actual=D0
  Connection: 3
     0x13 0x14 0x1c*

this is because you enable loopback mixing . speaker, dock lineout and headphone only use node 0x13 volume control
Comment 20 Raymond 2015-06-14 09:23:54 UTC
the driver need to change amp in values so  that signal come from node 0x14  when headphone is plugged

Node 0x1b [Audio Mixer] wcaps 0x20050b: Stereo Amp-In

  Amp-In caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-In vals:  [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x17 0x17] [0x80 0x80] [0x80 0x80]
  Power states: 
  Power: setting=D0, actual=D0
  Connection: 6
     0x0c 0x0e 0x0f 0x13 0x14 0x0a
Comment 21 Kamil Paral 2015-06-15 09:23:33 UTC
If the problem mentioned from comment 3 onward is a different issue (possibly a pulseaudio one), maybe it could get filed in a separate report so that we don't mix it with my issue?
Comment 22 Takashi Iwai 2015-06-15 09:47:20 UTC
Yes, check whether you have "Dock Line Out Jack" control element in your alsa-info.sh output.  If there is, it's rather PA's issue.

OTOH, if "Dock Headphone Jack" is present instead of "Dock Line Out Jack", this is an issue of incosistency in the driver level, and this should be at first fixed in the driver, then eventually PA needs the same fix as the former.

In the former case: please double-check whether adding the following really works or not.

Add the below to /usr/share/pulseaudio/alsa-mixer/paths/analog-output-lineout.conf:

[Jack Dock Line Out]
required-any = any

and add the below to /usr/share/pulseaudio/alsa-mixer/paths/analog-output-speaker.conf:

[Jack Dock Line Out]
state.plugged = no
state.unplugged = unknown
Comment 23 Raymond 2015-06-15 16:00:41 UTC
according to the lifebook e780 specification 


one stereo headphone/line-out jack, 
one stereo, microphone/line-in jack, 
One Docking port (100-pin, to dock with port replicator)


according to

sp.ts.fujitsu.com/dmsp/Publications/public/ds-LIFEBOOK-E780.pdf

the are two port replicators with eu and gb cable kit

Port replicator/AC adapter/EU-cable kit
Port replicator/AC adapter/GB-cable kit


Port Replicator interfaces (optional)Port replicator/AC adapter/EU-cable kitPort replicator/AC adapter/GB-cable kit
DC-in1 (19V)1 (19V)1 (19V)
Power on switch111
Audio: headphone111
Audio: microphone11

seem not dock line out jack
Comment 24 Raymond 2015-06-15 16:08:56 UTC
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/Documentation/sound/alsa/HD-Audio.txt

- add_jack_modes (bool): add "xxx Jack Mode" enum controls to each
  I/O jack for allowing to change the headphone amp and mic bias VREF
  capabilities


this mean you need a customised version of add_jack_modes which only create xxx jack mode for jacks at notebook but excluding those two jacks at port replicator


one stereo headphone/line-out jack, 
one stereo, microphone/line-in jack
Comment 25 Takashi Iwai 2015-06-15 16:16:03 UTC
OK, finally found out alsa-info.sh output for Lifebook machine.  Please provide the full information to this bugzilla entry if you report here!

The problem of Lifebook E780 is that it sets one headphone pin with the association number 0x0f while other headphone with zero.  So, the driver tries to assign the latter as a line out, and this results in inconsistent jack detection / mixer ctl in the end.

Could you try the patch below?
Comment 26 Takashi Iwai 2015-06-15 16:16:23 UTC
Created attachment 179991 [details]
Test fix patch for Lifebook E780
Comment 27 Raymond 2015-06-15 23:25:00 UTC
do it mean that those dell notebook with dual headphone jacks need special fixup since they need to use sequence number to differentiate which jack is front and which is surround ?


http://en.community.dell.com/support-forums/laptop/f/3517/t/19440542
Comment 28 Raymond 2015-06-16 08:01:02 UTC
hda_codec: ALC269: BIOS auto-probing.
ALSA hda_codec.c: autoconfig: line_outs=1 (0x15/0x0/0x0/0x0/0x0) type:line
ALSA hda_codec.c:    speaker_outs=1 (0x14/0x0/0x0/0x0/0x0)
ALSA hda_codec.c:    hp_outs=1 (0x1a/0x0/0x0/0x0/0x0)
ALSA hda_codec.c:   mono: mono_out=0x0
ALSA hda_codec.c:    dig-out=0x1e/0x0
ALSA hda_codec.c:    inputs:
ALSA hda_codec.c:  Internal Mic=0x12
ALSA hda_codec.c:  Mic=0x18
ALSA hda_codec.c:  Rear Mic=0x1b


seem no dock mic, you have to find out which node 0x18 or 0x1b is your mic jack
Comment 29 Raymond 2015-06-17 03:40:47 UTC
http://lists.freedesktop.org/archives/pulseaudio-discuss/2015-April/023726.html

do your e780 has similar issue of Martin's e744 ?
Comment 30 Raymond 2015-06-18 23:28:55 UTC
for those notebook which have dual headphone jacks, the location of two pin complexes are the same 


https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1465167

some of them are using 4 channels codec like those note book with dock station

unlike headphone jack can mute dock headphone jack, the user expect they can use the headphone jacks at the same time

is it feasible to use the location instead of sequence number to determine whether only one headphone can be used in dock station case 



Node 0x14 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
   Control: name="Headphone Playback Switch", index=0, device=0
     ControlAmp: chs=3, dir=Out, idx=0, ofs=0
   Control: name="Headphone Jack", index=1, device=0
   Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
   Amp-In vals: [0x00 0x00]
   Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
   Amp-Out vals: [0x80 0x80]
   Pincap 0x0000003e: IN OUT HP Detect Trigger
   Pin Default 0x0421101f: [Jack] HP Out at Ext Right
     Conn = 1/8, Color = Black
     DefAssociation = 0x1, Sequence = 0xf
   Pin-ctls: 0xc0: OUT HP
   Unsolicited: tag=01, enabled=1
   Connection: 2
      0x0c 0x0d*
 Node 0x15 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
   Control: name="Line Out Playback Switch", index=0, device=0
     ControlAmp: chs=3, dir=Out, idx=0, ofs=0
   Control: name="Headphone Jack", index=0, device=0
   Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
   Amp-In vals: [0x00 0x00]
   Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
   Amp-Out vals: [0x00 0x00]
   Pincap 0x0000003e: IN OUT HP Detect Trigger
   Pin Default 0x042110f0: [Jack] HP Out at Ext Right
     Conn = 1/8, Color = Black
     DefAssociation = 0xf, Sequence = 0x0
   Pin-ctls: 0x40: OUT
   Unsolicited: tag=02, enabled=1
   Connection: 2
      0x0c* 0x0d
Comment 31 Raymond 2015-06-18 23:38:52 UTC
http://en.community.dell.com/support-forums/laptop/f/3517/t/19440542

for those notebook with dual headphone jacks with a 6 or more hannels codecs

the driver need the sequence number to determine the jacks for front speakers and surround speakers


5- Audio-out/Headphone connector — Connects to a pair of headphones or to a powered 
speaker or sound system.

6- Headphone/digital S/PDIF combo connector — Connects to amplifiers, speakers, or
TVs for digital audio output. Can also be used to connect to a pair of headphones.

NOTE: You must use a S/PDIF (mini-TOSLINK) adapter to connect a S/PDIF cable. The
S/PDIF (mini-TOSLINK) adapter does not ship with your computer and must be purchased
separately.

7 - Audio-in/Microphone connector — Connects to a microphone or inputs signal for
use with audio programs.

 You can set up 5.1 channel speakers by using the three audio connectors (5, 6, and 7
Comment 32 Raymond 2015-06-19 02:35:07 UTC
the other case is those dual headphone which one is retasked from mic

http://voices.canonical.com/david.henningsson/2011/11/29/turn-your-mic-jack-into-a-headphone-jack/

seem it does not use special sequence number
Comment 33 Kamil Paral 2015-06-19 07:30:09 UTC
(In reply to Takashi Iwai from comment #25)
> OK, finally found out alsa-info.sh output for Lifebook machine.  Please
> provide the full information to this bugzilla entry if you report here!
> 
> The problem of Lifebook E780 is that it sets one headphone pin with the
> association number 0x0f while other headphone with zero.  So, the driver
> tries to assign the latter as a line out, and this results in inconsistent
> jack detection / mixer ctl in the end.
> 
> Could you try the patch below?

I have built a patched kernel, but it will take a while until I can get my hands on the affected laptop again. Thanks for the patch, I'll definitely report back once I've tried it.
Comment 34 Kamil Paral 2015-06-28 08:51:13 UTC
(In reply to Takashi Iwai from comment #26)
> Created attachment 179991 [details]
> Test fix patch for Lifebook E780

I have it now confirmed that this patch works and fixes the problem, thank a lot Takashi. Could you please push this to vanilla kernel?
Comment 35 Takashi Iwai 2015-06-29 06:35:34 UTC
The fix for the mic was already included in for-linus branch.  Will be upstreamed in this week.
Comment 36 Takashi Iwai 2015-06-29 06:36:25 UTC
Sorry, a wrong bug number.  In anyway, the patch will be included to for-linus branch, too, and upstreamed in this week :)
Comment 37 Kamil Paral 2015-06-29 07:52:30 UTC
Thanks!

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