[alsa-devel] Exposing the ThinkPad HW mute switch to ALSA?

Henrique de Moraes Holschuh hmh at hmh.eng.br
Mon Oct 6 21:09:42 CEST 2014


On Mon, 06 Oct 2014, Takashi Iwai wrote:
> > ThinkPads have an extra mute switch that's controlled by the embedded
> > controller.  There are some hardware buttons associated with it.
> > 
> > We (thinkpad-acpi) can be notified about state changes in the mute
> > switch, we can see presses of the hardware buttons and program them to
> > send KEY_MUTE or not as appropriate, and we can (optionally) change
> > the HW mute state.
> > 
> > However, I have no clue how to correctly expose the mute switch
> > through ALSA so that userspace will know what it controls.  It
> > currently shows up as its own sound card, which is ridiculous.
> > 
> > Can anyone give me any hints as to how to expose this bonus audio
> > control in a sensible manner?  I know essentially nothing about ALSA.
> > 
> > (Some older ThinkPads also have a hardware volume control with similar
> > behavior.)
> 
> It's a bit difficult issue, since this needs the weak module
> dependency.  And even worse, different sound drivers might be used for
> a single thinkpad_acpi.  So, from the programming POV, the individual
> sound card instance is the easiest approach.
> 
> Though, some HD-audio codec drivers already have a weak binding of
> thinkpad_acpi stuff for Mic-mute switch.  I guess we can move the
> handling of the master mute switch to the sound driver as well.
> 
> If doing so, each relevant sound driver needs to implement it.
> IIRC, snd-intel8x0 is used on old Thinkpads.  Any others?

As far as I know, all old ones use the snd-intel8x0 AC97 hba, but several
different codecs behind that.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh


More information about the Alsa-devel mailing list