summaryrefslogtreecommitdiffstats
path: root/core.h
diff options
context:
space:
mode:
authorMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-11-01 12:17:10 +1100
committerMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-11-01 14:57:07 +1100
commit52db7a23a234080d3a28dfe60191c239cc04613b (patch)
treea7b2332b51d6fee70f0f8cfec245fe4ca9e8d6dc /core.h
parent0765c6c497379a9f850d15be3b3cbdaba59fe7fc (diff)
Only expose streams mapped to audiopaths on configure() cb
When the configure() callback occurs for each audiopath, we only want those streams that are mapped to the given audiopath to be exposed to the audiopath. E.g. only streams mapped to loopback should be propagated to loopback via configure() callback, rather than all streams. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'core.h')
-rw-r--r--core.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/core.h b/core.h
index 16f186a..8804573 100644
--- a/core.h
+++ b/core.h
@@ -68,4 +68,22 @@ struct snd_avirt_stream *snd_avirt_stream_find_by_device(unsigned int device);
struct snd_avirt_stream *snd_avirt_stream_create(const char *name,
int direction);
+/**
+ * snd_avirt_audiopath_get - retrieves the Audio Path by it's UID
+ * @uid: Unique ID for the Audio Path
+ * @return: Corresponding Audio Path
+ */
+struct snd_avirt_audiopath *snd_avirt_audiopath_get(const char *uid);
+
+/**
+ * snd_avirt_stream_from_config_item - Convert config_item to a snd_avirt_stream
+ * @item: The config_item to convert from
+ * @return: The item's snd_avirt_stream if successful, NULL otherwise
+ */
+static inline struct snd_avirt_stream *
+snd_avirt_stream_from_config_item(struct config_item *item)
+{
+ return item ? container_of(item, struct snd_avirt_stream, item) : NULL;
+}
+
#endif /* __SOUND_AVIRT_CORE_H */