aboutsummaryrefslogtreecommitdiffstats
path: root/configfs.c
diff options
context:
space:
mode:
authorMark Farrugia <mark.farrugia@fiberdyne.com.au>2019-01-29 18:46:23 +1100
committerMark Farrugia <mark.farrugia@fiberdyne.com.au>2019-01-29 18:46:23 +1100
commit5e431d7a48d5e4ca0e2c040af1ef10dfaf0eba92 (patch)
tree118e99fba00e1e1aca2815aaaa0810be1ad1ff32 /configfs.c
parent2e1b1a2ec043a89d7720e9b9c00d4f783ce6a62b (diff)
Rework setting the AVIRT map, and stream creation
To ensure that a stream is able to change it's mapping (before card is sealed), we cannot create the stream PCM upon setting the mapping. This had to be reworked to allow multiple setting of the mapping if so required. The PCM ops table for a given stream is now allocated and stored in the snd_avirt_stream struct, to allow retrieval and manipulation upon mapping change. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'configfs.c')
-rw-r--r--configfs.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/configfs.c b/configfs.c
index c19c2b5..a22c75f 100644
--- a/configfs.c
+++ b/configfs.c
@@ -47,12 +47,7 @@ static ssize_t cfg_snd_avirt_stream_map_store(struct config_item *item,
snd_avirt_stream_from_config_item(item);
split = strsep((char **)&page, "\n");
- memcpy(stream->map, (char *)split, count);
-
- /* Create the PCM device now */
- stream->pcm = snd_avirt_pcm_create(stream);
- if (IS_ERROR_NULL(stream->pcm))
- return 0;
+ snd_avirt_stream_set_map(stream, split);
return count;
}