summaryrefslogtreecommitdiffstats
path: root/dummy
diff options
context:
space:
mode:
authorMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-11-01 12:17:10 +1100
committerMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-11-01 14:57:07 +1100
commit52db7a23a234080d3a28dfe60191c239cc04613b (patch)
treea7b2332b51d6fee70f0f8cfec245fe4ca9e8d6dc /dummy
parent0765c6c497379a9f850d15be3b3cbdaba59fe7fc (diff)
Only expose streams mapped to audiopaths on configure() cb
When the configure() callback occurs for each audiopath, we only want those streams that are mapped to the given audiopath to be exposed to the audiopath. E.g. only streams mapped to loopback should be propagated to loopback via configure() callback, rather than all streams. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'dummy')
-rw-r--r--dummy/dummy.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/dummy/dummy.c b/dummy/dummy.c
index 7c85531..872ade9 100644
--- a/dummy/dummy.c
+++ b/dummy/dummy.c
@@ -240,17 +240,14 @@ static struct snd_pcm_ops dummyap_pcm_ops = {
* Dummy Audio Path AVIRT registration
******************************************************************************/
static int dummy_configure(struct snd_card *card,
- struct config_group *snd_avirt_stream_group,
- unsigned int stream_count)
+ struct snd_avirt_stream_array *stream_array)
{
// Do something with streams
+ int idx = 0;
+ struct snd_avirt_stream *stream;
- struct list_head *entry;
- list_for_each (entry, &snd_avirt_stream_group->cg_children) {
- struct config_item *item =
- container_of(entry, struct config_item, ci_entry);
- struct snd_avirt_stream *stream =
- snd_avirt_stream_from_config_item(item);
+ for (idx = 0; idx < stream_array->count; idx++) {
+ stream = stream_array->streams[idx];
AP_INFOK("stream name:%s device:%d channels:%d", stream->name,
stream->device, stream->channels);
}