diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-06-24 09:51:54 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-06-24 09:51:54 -0400 |
commit | 1ca2f2ec9e74e9d6e398e09b6468b4462c6d6b6e (patch) | |
tree | 45abf24c4c67b427d1f0d5ed33c0279db29d3ca3 /include/sound | |
parent | e1a4dca6711c68b6fcc4a236b3475f25dbf227ae (diff) |
ALSA: vmaster: Add snd_ctl_sync_vmaster() helper function
Introduce a new helper function, snd_ctl_sync_vmaster(), which updates
the slave put callbacks forcibly as well as calling the hook. This
will be used in the upcoming patch in HD-audio codec driver for
toggling the mute in vmaster slaves.
Along with the new function, the old snd_ctl_sync_vmaster_hook() is
replaced as a macro calling with the argument hook_only=true.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/control.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/sound/control.h b/include/sound/control.h index 34bc93d80d55..5358892b1b39 100644 --- a/include/sound/control.h +++ b/include/sound/control.h | |||
@@ -233,7 +233,8 @@ snd_ctl_add_slave_uncached(struct snd_kcontrol *master, | |||
233 | int snd_ctl_add_vmaster_hook(struct snd_kcontrol *kctl, | 233 | int snd_ctl_add_vmaster_hook(struct snd_kcontrol *kctl, |
234 | void (*hook)(void *private_data, int), | 234 | void (*hook)(void *private_data, int), |
235 | void *private_data); | 235 | void *private_data); |
236 | void snd_ctl_sync_vmaster_hook(struct snd_kcontrol *kctl); | 236 | void snd_ctl_sync_vmaster(struct snd_kcontrol *kctl, bool hook_only); |
237 | #define snd_ctl_sync_vmaster_hook(kctl) snd_ctl_sync_vmaster(kctl, true) | ||
237 | 238 | ||
238 | /* | 239 | /* |
239 | * Helper functions for jack-detection controls | 240 | * Helper functions for jack-detection controls |