OSDN Git Service

added snd_hctl_ctl() function
[android-x86/external-alsa-lib.git] / src / control / hcontrol.c
index 889bde5..b1d5ac4 100644 (file)
@@ -89,7 +89,6 @@ int snd_hctl_open(snd_hctl_t **hctlp, const char *name, int mode)
 int snd_hctl_open_ctl(snd_hctl_t **hctlp, snd_ctl_t *ctl)
 {
        snd_hctl_t *hctl;
-       int err;
 
        assert(hctlp);
        *hctlp = NULL;
@@ -649,6 +648,16 @@ int snd_hctl_wait(snd_hctl_t *hctl, int timeout)
        return 0;
 }
 
+/**
+ * \brief Get a ctl handle associated to the given hctl handle
+ * \param hctl HCTL handle
+ * \return a ctl handle otherwise NULL
+ */
+snd_ctl_t *snd_hctl_ctl(snd_hctl_t *hctl)
+{
+       return hctl->ctl;
+}
+
 static int snd_hctl_handle_event(snd_hctl_t *hctl, snd_ctl_event_t *event)
 {
        snd_hctl_elem_t *elem;