diff options
Diffstat (limited to 'core.c')
-rw-r--r-- | core.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -271,7 +271,7 @@ static int snd_avirt_streams_get(const char *map, } } - return 0; + return stream_array->count; } /** @@ -322,8 +322,8 @@ int snd_avirt_audiopath_register(struct snd_avirt_audiopath *audiopath) // If we have already sealed the streams, configure this AP if (core.streams_sealed) { stream_array.count = 0; - snd_avirt_streams_get(audiopath->uid, &stream_array); - audiopath->configure(core.card, &stream_array); + if (snd_avirt_streams_get(audiopath->uid, &stream_array) > 0) + audiopath->configure(core.card, &stream_array); } return 0; @@ -420,8 +420,8 @@ int snd_avirt_streams_seal(void) for (i = 0; i < MAX_STREAMS; i++) stream_array.streams[i] = NULL; stream_array.count = 0; - snd_avirt_streams_get(ap_obj->path->uid, &stream_array); - ap_obj->path->configure(core.card, &stream_array); + if (snd_avirt_streams_get(ap_obj->path->uid, &stream_array) > 0) + ap_obj->path->configure(core.card, &stream_array); } err = snd_card_register(core.card); |