diff options
author | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2019-01-04 18:22:35 +1100 |
---|---|---|
committer | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2019-01-04 18:23:17 +1100 |
commit | e423837602e5cdc11a0912f4bd27904d4e0c6946 (patch) | |
tree | ea020146810cf26499daded939fd8e608117f719 /configfs.c | |
parent | dbfb35abbe8548fe5e33763bcab5a5c04ade0d36 (diff) |
Create PCM devices as soon as the AVIRT map is setguppy_6.99.4guppy/6.99.46.99.4
We no longer need to wait until the card is sealed to create the PCM device. We can create it right away.
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'configfs.c')
-rw-r--r-- | configfs.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -49,6 +49,11 @@ static ssize_t cfg_snd_avirt_stream_map_store(struct 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; + return count; } CONFIGFS_ATTR(cfg_snd_avirt_stream_, map); |