From 66b5b9722b8743f83d4c3f11f39665f5f2c40b12 Mon Sep 17 00:00:00 2001 From: Dimitris Papastamos Date: Wed, 16 Mar 2011 12:16:39 +0000 Subject: ALSA: Add snd_ctl_replace() to dynamically replace a control Add a function to dynamically replace a given control. If the control does not already exist, a third parameter is used to determine whether to actually add that control. This is useful in cases where downloadable firmware at runtime can add or replace existing controls. A separate patch needs to be made to allow ALSA Mixer to render the replaced controls on the fly. Signed-off-by: Dimitris Papastamos Signed-off-by: Takashi Iwai --- include/sound/control.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/sound/control.h') diff --git a/include/sound/control.h b/include/sound/control.h index e67db286936..40423810985 100644 --- a/include/sound/control.h +++ b/include/sound/control.h @@ -113,6 +113,7 @@ struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new * kcontrolnew, v void snd_ctl_free_one(struct snd_kcontrol * kcontrol); int snd_ctl_add(struct snd_card * card, struct snd_kcontrol * kcontrol); int snd_ctl_remove(struct snd_card * card, struct snd_kcontrol * kcontrol); +int snd_ctl_replace(struct snd_card *card, struct snd_kcontrol *kcontrol, bool add_on_replace); int snd_ctl_remove_id(struct snd_card * card, struct snd_ctl_elem_id *id); int snd_ctl_rename_id(struct snd_card * card, struct snd_ctl_elem_id *src_id, struct snd_ctl_elem_id *dst_id); int snd_ctl_activate_id(struct snd_card *card, struct snd_ctl_elem_id *id, -- cgit v1.2.3-70-g09d2