]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/soc/soc-dapm.c
[ALSA] sound: fix export symbol typo
[linux-2.6-omap-h63xx.git] / sound / soc / soc-dapm.c
index abac6847ecad59e44985b8cf3c5781eef9de8072..c60200ccde60f83013a4caf1bd70bb39ee4d70af 100644 (file)
@@ -226,7 +226,7 @@ static int dapm_update_bits(struct snd_soc_dapm_widget *widget)
                snd_soc_write(codec, widget->reg, new);
                pop_wait(POP_TIME);
        }
-       dbg("reg old %x new %x change %d\n", old, new, change);
+       dbg("reg %x old %x new %x change %d\n", widget->reg, old, new, change);
        return change;
 }
 
@@ -1288,7 +1288,7 @@ int snd_soc_dapm_stream_event(struct snd_soc_codec *codec,
        mutex_unlock(&codec->mutex);
 
        dapm_power_widgets(codec, event);
-       dump_dapm(codec, __FUNCTION__);
+       dump_dapm(codec, __func__);
        return 0;
 }
 EXPORT_SYMBOL_GPL(snd_soc_dapm_stream_event);
@@ -1342,6 +1342,29 @@ int snd_soc_dapm_set_endpoint(struct snd_soc_codec *codec,
 }
 EXPORT_SYMBOL_GPL(snd_soc_dapm_set_endpoint);
 
+/**
+ * snd_soc_dapm_get_endpoint_status - get audio endpoint status
+ * @codec: audio codec
+ * @endpoint: audio signal endpoint (or start point)
+ *
+ * Get audio endpoint status - connected or disconnected.
+ *
+ * Returns status
+ */
+int snd_soc_dapm_get_endpoint_status(struct snd_soc_codec *codec,
+       char *endpoint)
+{
+       struct snd_soc_dapm_widget *w;
+
+       list_for_each_entry(w, &codec->dapm_widgets, list) {
+               if (!strcmp(w->name, endpoint))
+                       return w->connected;
+       }
+
+       return 0;
+}
+EXPORT_SYMBOL_GPL(snd_soc_dapm_get_endpoint_status);
+
 /**
  * snd_soc_dapm_free - free dapm resources
  * @socdev: SoC device