diff options
author | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2019-04-03 17:41:32 +1100 |
---|---|---|
committer | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2019-04-03 17:41:32 +1100 |
commit | de95b5d9cb985acf9e28ea4e1a8592d335e601b1 (patch) | |
tree | af02bdc00e2c2dd0242e97fe1dc8002ca6df24ae /core.h | |
parent | e152900bc73f1f7d3b33aa5369c36da762b0b042 (diff) |
Introduce 'unconfigure' callback
The 'unconfigure' callback can be used to clean up the 'configured'
state of an Audio Path, for when it is desired to reset the streams,
and/or reload a different stream configuration.
To destroy the streams, we must attempt to force their PCMs
closed. Take note though, that if a PCM is being written to when
an unconfigure command is issued, system instability may occur.
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'core.h')
-rw-r--r-- | core.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -81,6 +81,8 @@ void snd_avirt_audiopath_destroy_obj(struct snd_avirt_audiopath_obj *p); */ int snd_avirt_streams_configure(void); +int snd_avirt_streams_unconfigure(void); + /** * snd_avirt_streams_configured - Check if streams have been configured or not * @return: true if configured, false otherwise @@ -122,6 +124,8 @@ int snd_avirt_route_try_complete(struct snd_avirt_route *route); * @return: 0 on success, negative ERRNO on failure */ int snd_avirt_stream_try_complete(struct snd_avirt_stream *stream); +void snd_avirt_stream_try_destroy(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. |