[pulseaudio-discuss] [PATCH 2/2] alsa-mixer: Ignore some elements in the analog-output path

Raymond Yau superquad.vortex2 at gmail.com
Thu Aug 21 00:36:10 PDT 2014


> > >>> The analog-output path should be suppressed when there are more
> > >>> specific paths available. Currently that usually doesn't happen. The
> > >>> suppression can be done with the path subset detection, and this
patch
> > >>> makes that work (another approach would be to mark the elements as
> > >>> required-absent, like analog-input does, but I like the subset
> > >>> suppression more, because it requires less stuff in the
configuration
> > >>> files). The problem with listing the now-removed elements in
> > >>> analog-output.conf was that if the sound card had e.g. a Speaker
> > >>> element, then the switch behaviour was different between
analog-output
> > >>> and analog-output-speakers, so analog-output was not considered a
> > >>> subset of analog-output-speakers.
> > >>
> > >> Removing the "Jack" ones should be okay, because they're
required-any in
> > >> lineout.conf, so if these elements exist, there is always a "Line
Out".
> > >>
> > >> I'm not sure about removing the elements. Could there be hardware
where
> > >> we don't have anything making analog-output-speaker.conf show up,
and we
> > >> still want the control over the things you remove below in
> > >> analog-output.conf?
> > >
> > > Could you be more specific? If there's nothing that makes
> > > analog-output-speaker show up, then which of these do you think we
might
> > > want to control in analog-output: "Line HP Swap",
> >

> > Apparently added by myself in 2011, for a reason (needed by Dove
> > boards). So removing this one will regress that board. This one is quite
> > unusual so I bet keeping it wouldn't cause any unnecessary duplicates I
> > think.
>
> Can you elaborate, what regression will there be? It appears that "Line
> HP Swap" is needed for selecting between headphones and line-out. "Line
> HP Swap" isn't marked as "required-any" for analog-output-headphones or
> analog-output-lineout[1], but I'd guess that those Dove boards will have
> other elements that make analog-output-headphones and
> analog-output-lineout appear. And if analog-output-headphones and/or
> analog-output-lineout are available, then analog-output should be
> suppressed.
>
> [1] As I said in an earlier mail, I think analog-output-headphones and
> analog-output-lineout should mark "Line HP Swap" as "required-any". The
> reason is that even if that change doesn't make any difference in
> practice, in the theoretical case that no other elements exists but
> "Line HP Swap", the presence of that element signals that there are
> headphones and line-out outputs, otherwise there would be nothing to
> swap.

HP/Surround pin of ad1980 is connected to surround dac by default after
reset, the driver  need to switch the control if the pin is connected to
headphone which get signal from  mixer instead of surround DAC

>
> > > "Headphone",
> > > "Headphone2",
> >
> > Arun changed the behaviour of these in 2013, before they behaved the
> > same. I'm not really sure what to do here. It seems reasonable to keep
> > them enabled for analog-output and muted for analog-output-speaker.
>
> "Headphone" is a "required-any" element for analog-output-headphones, so
> if the element exists, then analog-output-headphone is available, and
> analog-output should be suppressed. Same thing with "Headphone2".
>

How do pulseaudio handle dual headphone jacks on those dell notebooks or
notebook with dock station    headphone/headset and dock headphone/headset
since you need to check  state of both headphone Jacks  to determine the
availability of the speaker path ?

> > > "Desktop Speaker"?
> >
> > AFAICR, I've never seen "Desktop Speaker". I think we can synchronise
> > the behavior so that it is the same on "analog-output" and
> > "analog-output-speaker".

https://launchpadlibrarian.net/175732178/AlsaInfo.txt

Thinkcenter is one of those business desktop with internal speaker, line
out and headphone

https://launchpadlibrarian.net/175732193/PulseList.txt

Seem pulseaudio cannot identify the line out path by name , the driver use
PCM as the name of the line out when it does not support multi channel

analog-output: Analoge Ausgabe (priority 9900, latency offset 0 usec,
available: unknown)
properties:

analog-output-speaker: Lautsprecher (priority 10000, latency offset 0 usec,
available: unknown)
properties:
device.icon_name = "audio-speakers"
analog-output-headphones: Analoge Kopfhörer (priority 9000, latency offset
0 usec, available: no)
properties:
device.icon_name = "audio-headphones"

>
> My patch is made with the assumption that analog-output should be
> suppressed always when there there are more specific paths available,
> with the exception of analog-output-mono (the patch removes also the
> "Master Mono" element from analog-output, but as I said earlier, that
> was a mistake). Based on this discussion, it seems that you either
> disagree with that basic assumption, or weren't properly aware of th

Master mono is mainly created by AC97 codec , just like the mono pin of hda
codec but most Intel AC97 controller does not support mono, for other AC97
controllers which support mono , stereo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20140821/bc3c9e38/attachment.html>


More information about the pulseaudio-discuss mailing list