aboutsummaryrefslogtreecommitdiffstats
path: root/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'core.c')
-rw-r--r--core.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/core.c b/core.c
index 8d73ed1..2fd416e 100644
--- a/core.c
+++ b/core.c
@@ -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;