summaryrefslogtreecommitdiffstats
path: root/core.h
diff options
context:
space:
mode:
authorMark Farrugia <mark.farrugia@fiberdyne.com.au>2019-04-01 11:58:08 +1100
committerMark Farrugia <mark.farrugia@fiberdyne.com.au>2019-04-01 11:58:59 +1100
commit92c383e87fffd5fd22c553e30b9fc94f2cb5f9c0 (patch)
tree28d2621bb423b302ced5475514f03cb06b917715 /core.h
parentc22d65351d533a2077caae117e3baf5558d20963 (diff)
Add 'internal' streams for routing, revamp stream finalisation
Uses the ALSA internal PCM API to create streams purely used for internal routing purposes. Adds the 'try_complete' functions for both streams and routes in an attempt to standardize the finalization of a stream or route object. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'core.h')
-rw-r--r--core.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/core.h b/core.h
index f915c04..38fee35 100644
--- a/core.h
+++ b/core.h
@@ -99,10 +99,29 @@ struct snd_avirt_stream *snd_avirt_stream_find_by_device(unsigned int device);
* @name: The name designated to the audio stream
* @direction: The PCM direction (SNDRV_PCM_STREAM_PLAYBACK or
* SNDRV_PCM_STREAM_CAPTURE)
+ * @internal: Whether the PCM should be internal or not
* @return: The newly created audio stream if successful, or an error pointer
*/
struct snd_avirt_stream *snd_avirt_stream_create(const char *name,
- int direction);
+ int direction, bool internal);
+
+/**
+ * int snd_avirt_route_try_complete - Set up remaining parameters for a route.
+ * Channels, sink, and source Audio Paths
+ * should be set when calling this function.
+ * @stream: The route to attempt to finalize parameters for.
+ * @return: 0 on success, negative ERRNO on failure
+ */
+int snd_avirt_route_try_complete(struct snd_avirt_route *route);
+
+/**
+ * int snd_avirt_stream_try_complete - Set up remaining parameters for a stream.
+ * Channels and map should be set when
+ * calling this function.
+ * @stream: The stream to attempt to finalize parameters for.
+ * @return: 0 on success, negative ERRNO on failure
+ */
+int snd_avirt_stream_try_complete(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.