diff options
author | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2018-12-17 12:06:24 +1100 |
---|---|---|
committer | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2018-12-17 12:07:45 +1100 |
commit | 31404f8a4c74acc2a7e8040bfcff543c1e2270a1 (patch) | |
tree | c66827cf033353575b24cb6e027bfd199d952293 | |
parent | e9a03571f6a889e69dadbb075494229cbcd7ba53 (diff) |
Make card discoverable at module loadflounder_6.0.5flounder_6.0.4flounder/6.0.5flounder/6.0.46.0.56.0.4flounder
We can achieve this using the snd_device_register function
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
-rw-r--r-- | core.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -287,6 +287,8 @@ static struct snd_pcm *pcm_create(struct snd_avirt_stream *stream) // Set the private free function for the private user data pcm->private_free = pcm_private_data_free; + snd_device_register(core.card, pcm); + return pcm; } @@ -458,12 +460,6 @@ int snd_avirt_streams_seal(void) ap_obj->path->configure(core.card, &stream_array); } - err = snd_card_register(core.card); - if (err < 0) { - D_ERRORK("Sound card registration failed!"); - snd_card_free(core.card); - } - core.streams_sealed = true; return err; @@ -573,6 +569,12 @@ static int __init snd_avirt_core_init(void) goto exit_class_container; } + err = snd_card_register(core.card); + if (err < 0) { + D_ERRORK("Sound card registration failed!"); + snd_card_free(core.card); + } + err = snd_avirt_configfs_init(&core); if (err < 0) goto exit_kset; |