[alsa-devel] [PATCH] ALSA: hda - Remove ignore_misc_bit

Takashi Iwai tiwai at suse.de
Tue Sep 18 10:58:01 CEST 2012

At Tue, 18 Sep 2012 10:40:19 +0200,
David Henningsson wrote:
> [removing CC to bug, since this has gone a bit offtopic]
> On 09/18/2012 10:26 AM, Takashi Iwai wrote:
> > At Mon, 17 Sep 2012 09:39:01 +0200,
> > David Henningsson wrote:
> >>
> >>> But the jack detection controls don't follow this yet.  Maybe we can
> >>> set such a jack control as inactive state when the jack detection is
> >>> disabled.
> >>>
> >>> (And this reminds me that we can cut off "Phantom" name hack by
> >>>    following the same rule -- just set the control inactive when it has
> >>>    no real detection.  But it still appears in control list.)
> >>
> >> Looking at the alsa-lib API, this seems doable. It seems possible to
> >> figure out using snd_hctl_elem_info and then
> >> snd_ctl_elem_info_is_inactive. If it is also runtime changeable (i e
> >> depending on some other mixer control), we need a callback to fire on
> >> the hctl.
> >
> > Why are you using snd_hctl?  For looking over jack controls, using
> > snd_ctl_* is more straightforward.
> Ehm, because I'm one of the confused users who doesn't know why there 
> are four different APIs (ctl, hctl, mixer, smixer) in the first place? 
> :-) And because I started with looking at the code to amixer. IIRC.

I also wonder.  It's Jaroslav's preference :)

I'm no big fan for this implementation, so I skipped the middle layers
in salsa-lib.

> > Also, which callback are you thinking of?  The phantom jack is
> > basically just a placeholder, so there should be no activity from
> > itself.
> You said something about the user telling the system to disable jack 
> detection - if so, (s)he will probably do so by changing a (new?) 
> kcontrol, which would then change the inactivity status of the jack 
> kcontrol, and then we need to pick that change up.

Ah, no, what I thought was not to use "Phantom" name but use the
normal jack name "Speaker Jack", but make it inactive, which indicates
the non-detectable jack.

But yes, it's also possible that the system enables/disables the jack
detection dynamically.  In that case, the inactive state change is
notified to snd_ctl.


More information about the Alsa-devel mailing list