snd_ctl_replace — replace the control instance of the card
int fsfuncsnd_ctl_replace ( | struct snd_card * card, |
| struct snd_kcontrol * kcontrol, | |
bool add_on_replace); |
cardthe card instance
kcontrolthe control instance to replace
add_on_replaceadd the control if not already added
Replaces the given control. If the given control does not exist and the add_on_replace flag is set, the control is added. If the control exists, it is destroyed first.
Returns zero if successful, or a negative error code on failure.
It frees automatically the control which cannot be added or replaced.