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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2014-08-19 at 17:05 +0200, David Henningsson wrote:
> 
> On 2014-08-19 12:09, Tanu Kaskinen wrote:
> > On Tue, 2014-08-19 at 07:47 +0200, David Henningsson wrote:
> >>
> >> On 2014-08-17 13:52, Tanu Kaskinen wrote:
> >>> 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.

> > "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".

> > "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".

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 that
assumption. If you think that the assumption is bad, I'd like you to
give an example where that assumption causes breakage.

-- 
Tanu



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux