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>
This commit is contained in:
parent
e1a4dca671
commit
1ca2f2ec9e
2 changed files with 47 additions and 21 deletions
|
@ -233,7 +233,8 @@ snd_ctl_add_slave_uncached(struct snd_kcontrol *master,
|
|||
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);
|
||||
void snd_ctl_sync_vmaster(struct snd_kcontrol *kctl, bool hook_only);
|
||||
#define snd_ctl_sync_vmaster_hook(kctl) snd_ctl_sync_vmaster(kctl, true)
|
||||
|
||||
/*
|
||||
* Helper functions for jack-detection controls
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue