ALSA: hda: cs35l41: Support mute notifications for CS35L41 HDA
authorStefan Binding <sbinding@opensource.cirrus.com>
Thu, 21 Sep 2023 16:28:48 +0000 (17:28 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 22 Sep 2023 08:47:49 +0000 (10:47 +0200)
commit447106e92a0c86c332d40710436f38f64c322cd6
treeff67abc21dcddb74e243ef3c146d2f6bf7bbfde1
parent7ce669334c55c50ecc2909c42275a3eec0039799
ALSA: hda: cs35l41: Support mute notifications for CS35L41 HDA

Some laptops require a hardware based mute system, where when a hotkey
is pressed, it forces the amp to be muted.

For CS35L41, when the hotkey is pressed, an acpi notification is sent
to the CS35L41 Device Node. The driver needs to handle this notification
and call a _DSM function to retrieve the mute state.

Since the amp is only muted during playback, the driver will only mute
or unmute if playback is occurring, otherwise it will save the mute
state for when playback starts.

This uses the ACPI Notification mechanism, where a handler has been
registered in the component master, which notifies each amp through
the component binding.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230921162849.1988124-4-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/cs35l41_hda.c
sound/pci/hda/cs35l41_hda.h