diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-03-12 07:18:37 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-03-12 08:58:54 -0400 |
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 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, | |||
227 | return _snd_ctl_add_slave(master, slave, SND_CTL_SLAVE_NEED_UPDATE); | 227 | return _snd_ctl_add_slave(master, slave, SND_CTL_SLAVE_NEED_UPDATE); |
228 | } | 228 | } |
229 | 229 | ||
230 | int snd_ctl_add_vmaster_hook(struct snd_kcontrol *kctl, | ||
231 | void (*hook)(void *private_data, int), | ||
232 | void *private_data); | ||
233 | void snd_ctl_sync_vmaster_hook(struct snd_kcontrol *kctl); | ||
234 | |||
230 | /* | 235 | /* |
231 | * Helper functions for jack-detection controls | 236 | * Helper functions for jack-detection controls |
232 | */ | 237 | */ |