diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-03-12 12:18:37 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-03-12 13:58:54 +0100 |
commit | 2ad787e9aae8bfac14fa96748c0f2b034577be6a (patch) | |
tree | e11195d3f00e2a84c9bd322b0c5b7b334ea8cb36 /include/sound/control.h | |
parent | 18478e8b626edc2d181dcb1b93e1f99ad72095e9 (diff) |
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/control.h')
-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 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 */ |