From 2ad787e9aae8bfac14fa96748c0f2b034577be6a Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 12 Mar 2012 12:18:37 +0100 Subject: ALSA: Add a hook capability to vmaster controls This patch adds a hook to vmaster control to be called at each time when the master value is changed. It'd be handy for an additional mute LED control following the Master switch, for example. Signed-off-by: Takashi Iwai --- include/sound/control.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/sound/control.h') diff --git a/include/sound/control.h b/include/sound/control.h index b2796e8..eff96dc 100644 --- a/include/sound/control.h +++ b/include/sound/control.h @@ -227,6 +227,11 @@ snd_ctl_add_slave_uncached(struct snd_kcontrol *master, return _snd_ctl_add_slave(master, slave, SND_CTL_SLAVE_NEED_UPDATE); } +int snd_ctl_add_vmaster_hook(struct snd_kcontrol *kctl, + void (*hook)(void *private_data, int), + void *private_data); +void snd_ctl_sync_vmaster_hook(struct snd_kcontrol *kctl); + /* * Helper functions for jack-detection controls */ -- cgit v1.1