aboutsummaryrefslogtreecommitdiffstats
path: root/include/avirt/avirt.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/avirt/avirt.h')
-rw-r--r--include/avirt/avirt.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/include/avirt/avirt.h b/include/avirt/avirt.h
index 6dcd7b1..94f03c5 100644
--- a/include/avirt/avirt.h
+++ b/include/avirt/avirt.h
@@ -1,9 +1,9 @@
/*
* Application interface library for the AVIRT driver
- *
+ *
* avirt.h - AVIRT Application interface library header
*
- * Copyright (C) 2018 Fiberdyne Systems Pty Ltd
+ * Copyright (C) 2018, 2019 Fiberdyne Systems Pty Ltd
* Author: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
*
* This library is free software: you can redistribute it and/or modify
@@ -33,12 +33,10 @@
* (SND_PCM_STREAM_PLAYBACK or SND_PCM_STREAM_CAPTURE)
* @map: The audio path to map this stream to
* @return: 0 on success, negative ERRNO otherwise
- *
+ *
* Each stream creates a PCM device for the AVIRT sound card.
* Streams will not appear to the user-space until `snd_avirt_card_seal()`
* is called.
- *
- * NOTE: Once this function is called, no more streams may be added.
*/
int snd_avirt_stream_new(const char *name, unsigned int channels, int direction,
const char *map);
@@ -46,18 +44,24 @@ int snd_avirt_stream_new(const char *name, unsigned int channels, int direction,
/**
* snd_avirt_card_seal - Finalize AVIRT stream creation and register sound card
* @return: 0 on success, negative ERRNO otherwise
- *
+ *
* This should be called once all streams have been created via
* `snd_avirt_stream_new()`. Calling this function will register the AVIRT
* sound card to the user-space, and will configure all mapped lower-level
* Audio Paths for the given stream configuration.
- *
+ *
* NOTE: Once this function is called, no more streams may be added.
*/
int snd_avirt_card_seal();
/**
- * snd_avirt_pcm_info -
+ * snd_avirt_pcm_info - Get PCM info for a given PCM name
+ * @pcm_name: The PCM name of which to retrieve the PCM info
+ * @pcm_info: The PCM info struct to populate
+ * @return: 0 on success, negative ERRNO otherwise
+ *
+ * Can be used to retrieve a `snd_pcm_info_t` struct for a given PCM device from
+ * it's name. Useful for retrieving card index and PCM index for a PCM.
*/
int snd_avirt_pcm_info(const char *pcm_name, snd_pcm_info_t *pcm_info);