summaryrefslogtreecommitdiff
path: root/include/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-03-12 12:18:37 +0100
committerTakashi Iwai <tiwai@suse.de>2012-03-12 13:58:54 +0100
commit2ad787e9aae8bfac14fa96748c0f2b034577be6a (patch)
treee11195d3f00e2a84c9bd322b0c5b7b334ea8cb36 /include/sound
parent18478e8b626edc2d181dcb1b93e1f99ad72095e9 (diff)
downloadlinux-3.10-2ad787e9aae8bfac14fa96748c0f2b034577be6a.tar.gz
linux-3.10-2ad787e9aae8bfac14fa96748c0f2b034577be6a.tar.bz2
linux-3.10-2ad787e9aae8bfac14fa96748c0f2b034577be6a.zip
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 <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/control.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/sound/control.h b/include/sound/control.h
index b2796e83c7a..eff96dc7a27 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
*/