At Mon, 6 Oct 2014 17:06:19 -0700, Andy Lutomirski wrote:
On Mon, Oct 6, 2014 at 12:09 PM, Henrique de Moraes Holschuh hmh@hmh.eng.br wrote:
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.
FWIW, I don't know whether any of the pre-hda thinkpads have the ACPI HAUM/SAUM mechanism, so I have no idea how good our support for the hardware mute switch and controls will ever be on those laptops.
IIRC, they have, and the mute worked completely independently from the onboard sound controller. But my memory is pretty vague.
Takashi