summaryrefslogtreecommitdiffstats
path: root/core.h
diff options
context:
space:
mode:
authorMark Farrugia <mark.farrugia@fiberdyne.com.au>2019-01-29 18:46:23 +1100
committerMark Farrugia <mark.farrugia@fiberdyne.com.au>2019-01-29 18:46:23 +1100
commit5e431d7a48d5e4ca0e2c040af1ef10dfaf0eba92 (patch)
tree118e99fba00e1e1aca2815aaaa0810be1ad1ff32 /core.h
parent2e1b1a2ec043a89d7720e9b9c00d4f783ce6a62b (diff)
Rework setting the AVIRT map, and stream creation
To ensure that a stream is able to change it's mapping (before card is sealed), we cannot create the stream PCM upon setting the mapping. This had to be reworked to allow multiple setting of the mapping if so required. The PCM ops table for a given stream is now allocated and stored in the snd_avirt_stream struct, to allow retrieval and manipulation upon mapping change. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'core.h')
-rw-r--r--core.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/core.h b/core.h
index 5ea78cd..6dc3333 100644
--- a/core.h
+++ b/core.h
@@ -68,8 +68,13 @@ 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);
-
-struct snd_pcm *snd_avirt_pcm_create(struct snd_avirt_stream *stream);
+/**
+ * snd_avirt_stream_set_map - Set Audio Path mapping for a given stream
+ * @stream: The stream to assign the mapping to.
+ * @map: The Audio Path UID to map the stream to.
+ * @return: 0 on success, negative ERRNO on failure
+ */
+int snd_avirt_stream_set_map(struct snd_avirt_stream *stream, const char *map);
/**
* snd_avirt_audiopath_get - retrieves the Audio Path by it's UID