From c22d65351d533a2077caae117e3baf5558d20963 Mon Sep 17 00:00:00 2001 From: Mark Farrugia Date: Wed, 27 Mar 2019 17:47:26 +1100 Subject: Rework routing system - Add 'route' to snd_avirt_stream, remove from audio path - Add route checking - ensure that source ap and ink ap have compatible hw params - Add private data support for both source and sink Audio Paths, to ensure that the PCM can hold multiple private data(s). - Add ability to use copy_kernel and exttriggers from AVIRT instead of from Audio Paths - Reintroduce pcm_trigger and pcm_prepare, so that they may be called appropriately from AVIRT, rather than child Audio Paths. Signed-off-by: Mark Farrugia --- core.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'core.h') diff --git a/core.h b/core.h index e4fb7a4..f915c04 100644 --- a/core.h +++ b/core.h @@ -127,6 +127,18 @@ struct snd_avirt_audiopath *snd_avirt_audiopath_get(const char *uid); */ struct snd_avirt_route *snd_avirt_route_create(const char *name, int direction); +/** + * snd_avirt_route_endpoint_pos - get route endpoint position for Audio Path + * @pcm: The PCM whose route to inspect. + * @ap_uid: The Audio Path UID to get + * @endpoint: The route position (SND_AVIRT_ROUTE_SOURCE or SND_AVIRT_ROUTE_SINK) + * of the Audio Path in it's route (if any). + * @return: 0 if an Audio Path is found in the route, -1 if there is no route, + * or -2 otherwise. + */ +int snd_avirt_route_endpoint_pos(struct snd_pcm *pcm, const char *ap_uid, + snd_avirt_route_endpoint *endpoint); + /** * snd_avirt_stream_from_config_item - Convert config_item to a snd_avirt_stream * @item: The config_item to convert from -- cgit 1.2.3-korg