aboutsummaryrefslogtreecommitdiffstats
path: root/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'core.c')
-rw-r--r--core.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/core.c b/core.c
index 2fd416e..e431402 100644
--- a/core.c
+++ b/core.c
@@ -220,7 +220,7 @@ static void pcm_private_data_free(struct snd_pcm *pcm)
kfree(pcm->private_data);
}
-static struct snd_pcm *pcm_create(struct snd_avirt_stream *stream)
+struct snd_pcm *snd_avirt_pcm_create(struct snd_avirt_stream *stream)
{
struct snd_avirt_private_data *avirt_private_data;
struct snd_avirt_audiopath *audiopath;
@@ -270,8 +270,11 @@ static struct snd_pcm *pcm_create(struct snd_avirt_stream *stream)
err = snd_pcm_new(core.card, stream->name, stream->device, playback,
capture, &pcm);
- if (err < 0)
+ if (err < 0) {
+ D_ERRORK("Failed to create PCM device for stream: '%s'",
+ stream->name);
return ERR_PTR(err);
+ }
/** Register driver callbacks */
if (playback)
@@ -441,16 +444,6 @@ int snd_avirt_streams_seal(void)
return -1;
}
- list_for_each(entry, &core.stream_group->cg_children) {
- item = container_of(entry, struct config_item, ci_entry);
- stream = snd_avirt_stream_from_config_item(item);
- if (!stream)
- return -EFAULT;
- stream->pcm = pcm_create(stream);
- if (IS_ERR_OR_NULL(stream->pcm))
- return (PTR_ERR(stream->pcm));
- }
-
list_for_each_entry(ap_obj, &audiopath_list, list) {
D_INFOK("configure() AP uid: %s", ap_obj->path->uid);
for (i = 0; i < MAX_STREAMS; i++)