summaryrefslogtreecommitdiffstats
path: root/core.h
diff options
context:
space:
mode:
authorMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-10-08 12:06:46 +1100
committerMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-10-26 17:27:39 +1100
commit1b8e8c7a0b998e9e458094e5f1b7b60bc1c4b297 (patch)
treeed61c88ecb60a872103d9d9bf153ba6532d0631f /core.h
parent85510ff4540c13609b3ec749a80638ae502fd098 (diff)
Refactor avirt_card_register, move PCM creation to it.
When creating the PCMs we need information regarding the stream's mapping. For the loopback, we need to add both playback and capture substreams. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'core.h')
-rw-r--r--core.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/core.h b/core.h
index b7c250a..bac4fc0 100644
--- a/core.h
+++ b/core.h
@@ -59,6 +59,7 @@ struct avirt_stream {
unsigned int channels; /* Stream channel count */
unsigned int device; /* Stream PCM device no. */
unsigned int direction; /* Stream direction */
+ struct snd_pcm *pcm; /* ALSA PCM */
struct config_item item; /* configfs item reference */
};
@@ -105,7 +106,7 @@ int avirt_stream_count(unsigned int direction);
* @return: The item's avirt_stream if successful, NULL otherwise
*/
static inline struct avirt_stream *
- avirt_stream_from_config_item(struct config_item *item)
+avirt_stream_from_config_item(struct config_item *item)
{
return item ? container_of(item, struct avirt_stream, item) : NULL;
}