aboutsummaryrefslogtreecommitdiff
path: root/mixer.c
diff options
context:
space:
mode:
authorSimon Wilson <simonwilson@google.com>2013-06-28 16:17:50 -0700
committerSimon Wilson <simonwilson@google.com>2013-06-28 16:17:53 -0700
commit710df882fa36faa045c1ed38e589f080eaf3a002 (patch)
treeb402e06df09fd98952c1834aab4533ce9a972e1b /mixer.c
parent38f87f3be4f397d796a558555ee3218e18cd793b (diff)
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.
Diffstat (limited to 'mixer.c')
-rw-r--r--mixer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mixer.c b/mixer.c
index 7419d3f..a413c60 100644
--- a/mixer.c
+++ b/mixer.c
@@ -195,6 +195,11 @@ struct mixer_ctl *mixer_get_ctl_by_name(struct mixer *mixer, const char *name)
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)