diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-03-12 15:18:37 +0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-03-12 16:58:54 +0400 |
commit | 2ad787e9aae8bfac14fa96748c0f2b034577be6a (patch) | |
tree | e11195d3f00e2a84c9bd322b0c5b7b334ea8cb36 /include/sound | |
parent | 18478e8b626edc2d181dcb1b93e1f99ad72095e9 (diff) | |
download | linux-2ad787e9aae8bfac14fa96748c0f2b034577be6a.tar.xz |
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.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/sound/control.h b/include/sound/control.h index b2796e83c7ac..eff96dc7a278 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 */ |