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

Henrique de Moraes Holschuh hmh at hmh.eng.br
Tue Oct 7 15:19:51 CEST 2014


On Tue, 07 Oct 2014, Takashi Iwai wrote:
> At Tue, 7 Oct 2014 17:25:13 +1100,
> Grant Diffey wrote:
> > so I have a really dumb question.
> > 
> > Why can't the controls be mapped as HCI rather than a soundcard? given
> > there's no audio production capability here only a control capability.
> > 
> > Also this seems to be how they end up functioning on a modern system they
> > get bound to pulse which remaps them to whatever's 'active'
> > 
> > Why does everyone say that this is a soundcard when it's really a keyboard
> > (from my pov)
> 
> thinkpad_acpi actually mutes the sound on some models, at least the
> old ones, independently from the sound chip mute state.  That's why it
> was implemented as the sound card object initially.

That's how the hardware works, really.  One AC97 audio channel is routed to
a digital volume chip, and from there to the console headphone jack, and to
the built-in speakers.  line-out is not routed through this chip, and AFAIK
MIC/line-in is not routed through either this chip _or_ a separate mute
gate, either.

The EC controls this digital volume chip directly, it is independent from
the AC97 mixer.  The default behaviour cannot be changed in earlier
thinkpads, and trying to change it in later thinkpads (they're supposed to
have a legacy mode that is the same as the older models) doesn't work very
well.

Line-out and MIC are controlled only by the AC97 mixer in the older models
with digital volume control.

In newer-but-not-newest thinkpads, there are two mute gates, one for MIC,
and another for the speakers/headphones.  The EC controls those.  All volume
control is in the HDA mixer.

In the newest thinkpads, I think there's only a MIC mute gate controlled by
the EC, and everything else is in the HDA mixer.

And depeding on the EC operating mode and thinkpad model, the volume hotkeys
might interact with the mute state (unmuting on first press when it is
mute).

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