mixer: add ability to update control list with new controls

New controls could appear during runtime, for example if a
new firmware is downloaded to a DSP. Since ALSA drivers are
not supposed to delete or renumber existing controls we can
assume that any new controls will be after any controls we
already know about. We can use this to enable extending our
current list of controls, which is more efficient than
closing the mixer session and recreating it.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
This commit is contained in:
Richard Fitzgerald
2014-09-09 17:14:09 +01:00
parent 15e6231a1b
commit fd3290357e
2 changed files with 127 additions and 41 deletions
+2
View File
@@ -69,6 +69,8 @@ struct mixer *mixer_open(unsigned int card);
void mixer_close(struct mixer *mixer);
int mixer_add_new_ctls(struct mixer *mixer);
const char *mixer_get_name(const struct mixer *mixer);
unsigned int mixer_get_num_ctls(const struct mixer *mixer);