diff options
Diffstat (limited to 'core.h')
-rw-r--r-- | core.h | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -23,6 +23,7 @@ struct snd_avirt_core { struct class *class; struct platform_device *plat_dev; struct config_group *stream_group; + struct config_group *route_group; unsigned int stream_count; bool streams_sealed; }; @@ -118,6 +119,15 @@ int snd_avirt_stream_set_map(struct snd_avirt_stream *stream, const char *map); struct snd_avirt_audiopath *snd_avirt_audiopath_get(const char *uid); /** + * snd_avirt_route_create - Create audio route + * @name: The name designated to the audio route + * @direction: The PCM direction (SNDRV_PCM_STREAM_PLAYBACK or + * SNDRV_PCM_STREAM_CAPTURE) + * @return: The newly created audio route if successful, or an error pointer + */ +struct snd_avirt_route *snd_avirt_route_create(const char *name, int direction); + +/** * snd_avirt_stream_from_config_item - Convert config_item to a snd_avirt_stream * @item: The config_item to convert from * @return: The item's snd_avirt_stream if successful, NULL otherwise @@ -128,4 +138,15 @@ snd_avirt_stream_from_config_item(struct config_item *item) return item ? container_of(item, struct snd_avirt_stream, item) : NULL; } +/** + * snd_avirt_route_from_config_item - Convert config_item to a snd_avirt_route + * @item: The config_item to convert from + * @return: The item's snd_avirt_stream if successful, NULL otherwise + */ +static inline struct snd_avirt_route * +snd_avirt_route_from_config_item(struct config_item *item) +{ + return item ? container_of(item, struct snd_avirt_route, item) : NULL; +} + #endif /* __SOUND_AVIRT_CORE_H */ |