[pulseaudio-discuss] [PATCH] alsa-mixer: recognize Dock headphone jack

Raymond Yau superquad.vortex2 at gmail.com
Mon Sep 1 18:25:43 PDT 2014


> > >
> > > Recognize the Dock headphone jack in the same way the normal & front
> > > headphone jacks are detected.
> > > ---
> > >  src/modules/alsa/mixer/paths/analog-output-headphones.conf | 8
++++++++
> > >  src/modules/alsa/mixer/paths/analog-output-speaker.conf    | 4 ++++
> > >  2 files changed, 12 insertions(+)
> > >
> > > diff --git
a/src/modules/alsa/mixer/paths/analog-output-headphones.conf
> > b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
> > > index 89d794f..199b2c5 100644
> > > --- a/src/modules/alsa/mixer/paths/analog-output-headphones.conf
> > > +++ b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
> > > @@ -25,6 +25,14 @@ description-key = analog-output-headphones
> > >  [Properties]
> > >  device.icon_name = audio-headphones
> > >
> > > +[Jack Dock Headphone]
> > > +required-any = any
> >
> > As you assume dock headphone and headphone share the same headphone
volume
> > control
>
> The do on my machine indeed. For reference i've uploaded my alsa-info
> into:
>http://www.alsa-project.org/db/?f=5a1c208208ff33a2231d2d03d5bea5ec452dc24d

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda?id=88d5760649d9024a2a68e649909f522ab42d891c

[10.379527] sound hdaudioC0D0: CX20590: BIOS auto-probing.
[   10.381085] sound hdaudioC0D0: autoconfig: line_outs=1
(0x1f/0x0/0x0/0x0/0x0) type:speaker
[   10.381088] sound hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   10.381090] sound hdaudioC0D0:    hp_outs=2 (0x1c/0x19/0x0/0x0/0x0)
[   10.381092] sound hdaudioC0D0:    mono: mono_out=0x0
[   10.381093] sound hdaudioC0D0:    inputs:
[   10.381095] sound hdaudioC0D0:      Mic=0x1b
[   10.381096] sound hdaudioC0D0:      Internal Mic=0x23
[   10.381098] sound hdaudioC0D0:      Dock Mic=0x1a

Most notebook with dock station use 4 channel codec but there are three
outputs at different location

1) headphone, speaker, dock headphone
2) headphone, speaker, dock line out
3) headphone, speaker, dock speaker

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda?id=7bba2157c5d3ee7f076adfdfa96eec274801da8f

If the audio output node contain the volume control and switch , two
outputs need to share the volume control

The name of the shared volume control are different for the above three
cases as the parser put two speaker
pins and two headphone pins of different location

In your cases the headphone and dock headphone also share the same
headphone playback switch in addition the headphone playback volume

Node 0x11 [Audio Output] wcaps 0xc1d: 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: ofs=0x4a, nsteps=0x4a, stepsize=0x03, mute=1
  Amp-Out vals:  [0x3a 0x3a]
  Converter: stream=8, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 D3cold EPSS
  Power: setting=D0, actual=D0

Node 0x19 [Pin Complex] wcaps 0x400581: Stereo
  Control: name="Headphone Jack", index=0, device=0
  Pincap 0x0000001c: OUT HP Detect
  Pin Default 0x04211040: [Jack] HP Out at Ext Right
    Conn = 1/8, Color = Black
    DefAssociation = 0x4, Sequence = 0x0
  Pin-ctls: 0xc0: OUT HP
  Unsolicited: tag=02, enabled=1
  Power states:  D0 D1 D2 D3 D3cold EPSS
  Power: setting=D0, actual=D0
  Connection: 2
     0x10 0x11*

Node 0x1c [Pin Complex] wcaps 0x400581: Stereo
  Control: name="Dock Headphone Jack", index=0, device=0
  Pincap 0x00000014: OUT Detect
  Pin Default 0x6121401f: [N/A] HP Out at Sep Rear
    Conn = 1/8, Color = Green
    DefAssociation = 0x1, Sequence = 0xf
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=01, enabled=1
  Power states:  D0 D1 D2 D3 D3cold EPSS
  Power: setting=D0, actual=D0
  Connection: 2
     0x10 0x11*

>
> > Do you mean the current alsa driver support surround 40 for notebook
with
> > dock headphone is incorrect ?
>
> I don't really understand this question sorry.

Post output of pactl list

Can you select surround40 profile in sound preference ?

>
> > > +
> > > +[Jack Dock Headphone Phantom]
> > > +required-any = any
> > > +state.plugged = unknown
> > > +state.unplugged = unknown
> > > +
> >
> > Any specific reason to add phantom Jack ?
>
> Just following what all other jacks seem to do.. If it makes sense for
> the front jack why not for the dock ? :) (Honestly i don't know)
>

The front audio panel of some computer chassis does not support Jack
detection
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20140902/1d6d9481/attachment-0001.html>


More information about the pulseaudio-discuss mailing list