At Mon, 12 Mar 2012 15:57:35 +0100, David Henningsson wrote:
On 03/12/2012 03:28 PM, Takashi Iwai wrote:
This is yet another hack for HD-audio. Currently the mute-LED is controlled via abusing the powerstatus check callback for power-saving feature. Thus the mute-LED won't be enabled when user didn't build the driver with CONFIG_SND_HDA_POWER_SAVE=y. With this patchset, the driver will refer to only Master switch to follow the mute-LED status.
The first patch is to add a hook to vmaster control. It's simple and small. The rest are implementations of hooks and replacements of the existing codes with the vmaster hook. The last patch is the addition of the mute-EAPD support on Conexant codec. This was one of the major reason I wanted to implement before 3.4, since it's the biggest missing piece in Conexant auto-parser.
I've checked quickly on a few machines. The patches are found in my sound-unstable tree topic/cxt-fix branch, too. git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-unstable.git topic/cxt-fix
Let me know if you see any problems with this patchset.
I'm not really happy with it. Or rather, it does not solve my problem. I've heard people say "hmm, when I mute the internal speakers or headphones, the mute LED is lit, but not when I mute HDMI, what's the logic in that?". (And since HDMI might very well be on a separate card, checking all different codecs won't help.)
I believe you need to make the mute LED (and mic mute LED, if present) controllable by userspace. If you like it the way it is, I'm okay with making a kcontrol that has "On", "Off" and "Follow master mute" with the last one being the default.
It's a good point. Note that the patch isn't meant to solve such problems at all. It's rather a clean-up and improvement of the current code. In the current code, Conexant auto-paresr doesn't provide _any_ mute LED control. With this patch, it provides, at least, the compatible mute LED control like other static quirks. In other words, this is a regression fix.
About the user-space mute-LED: I'm fine to add an enum to change the mute-LED behavior. But also remember that this isn't always easy because the mute-LED and EAPD might be bound together in the hardware level (at least for Conexant). Thus it'd be possible that the speaker is suddenly turned on when you connect an HDMI if the mute-LED is controlled individually.
thanks,
Takashi