diff options
author | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2019-04-01 11:58:08 +1100 |
---|---|---|
committer | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2019-04-01 11:58:33 +1100 |
commit | 9e19ac94121963f26f85df1685ac346cc698fe4b (patch) | |
tree | 84a3ed7c35bc70d0b04795e01d9710c5218452b0 /core.h | |
parent | 382476f00747316ee01dcc410a31cc27830c18ca (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.h | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -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. |