summaryrefslogtreecommitdiffstats
path: root/utils.c
diff options
context:
space:
mode:
authorManuel Bachmann <manuel.bachmann@iot.bzh>2016-07-06 10:16:36 +0200
committerYannick Gicquel <yannick.gicquel@iot.bzh>2016-10-11 17:09:07 +0200
commit2478974dfde05063cbf0233e3d3c434ca2f46c7c (patch)
tree86395f3b4c2c35261e051c237d7ae17f9ca3994a /utils.c
parentf259ec53101a3754cd2da24a369ea48bb1947e62 (diff)
Map labels to classes, map routing groups to audio adapters
Change-Id: I563aa146eba8de594900c02b44f19f526a5cdc0e Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh>
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/utils.c b/utils.c
index 88425d2..9476c69 100644
--- a/utils.c
+++ b/utils.c
@@ -196,13 +196,31 @@ pa_sink *agl_utils_get_primary_alsa_sink (struct userdata *u)
pa_assert_se ((core = u->core));
PA_IDXSET_FOREACH(sink, core->sinks, idx) {
- if (sink->name && strstr (sink->name, "alsa_output"))
+ if (sink->name && strstr (sink->name, "alsa_output") && strstr (sink->name, "pci"))
return sink;
}
return NULL;
}
+pa_sink *agl_utils_get_alsa_sink (struct userdata *u, const char *name)
+{
+ pa_core *core;
+ pa_sink *sink;
+ int idx;
+
+ pa_assert (u);
+ pa_assert_se ((core = u->core));
+
+ PA_IDXSET_FOREACH(sink, core->sinks, idx) {
+ if (sink->name && strstr (sink->name, "alsa_output")
+ && strstr (sink->name, name))
+ return sink;
+ }
+
+ return NULL;
+}
+
void agl_utils_init_stamp (void)
{
stamp = 0;