mixer: add mixer_ctl_update() API
Some sound cards update their controls due to external
events, such as HDMI EDID byte data changing when an
HDMI cable is connected. This API allows the count of
elements to be updated.
diff --git a/mixer.c b/mixer.c
index 7419d3f..a413c60 100644
--- a/mixer.c
+++ b/mixer.c
@@ -195,6 +195,11 @@
return NULL;
}
+void mixer_ctl_update(struct mixer_ctl *ctl)
+{
+ ioctl(ctl->mixer->fd, SNDRV_CTL_IOCTL_ELEM_INFO, ctl->info);
+}
+
const char *mixer_ctl_get_name(struct mixer_ctl *ctl)
{
if (!ctl)