- backport from upstream tree: * lots of patches to support the new chmap API * fix segfault in rate plugin error path * add a couple of test programs * fix inifinte loop in htimestamp of dmix & co OBS-URL: https://build.opensuse.org/request/show/138456 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=113
31 lines
982 B
Diff
31 lines
982 B
Diff
From 5a2daef19225478df7e3c1f8c6c9cb847e574b44 Mon Sep 17 00:00:00 2001
|
|
From: Takashi Iwai <tiwai@suse.de>
|
|
Date: Thu, 20 Sep 2012 13:43:12 +0200
|
|
Subject: [PATCH 26/30] PCM: Fill SND_CHMAP_NA to silent channels in route
|
|
plugin
|
|
|
|
Instead of SND_CHMAP_UNKNOWN, fill SND_CHMAP_NA to the silent channels.
|
|
|
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
---
|
|
src/pcm/pcm_route.c | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
--- a/src/pcm/pcm_route.c
|
|
+++ b/src/pcm/pcm_route.c
|
|
@@ -720,11 +720,13 @@ static snd_pcm_chmap_t *snd_pcm_route_ge
|
|
return NULL;
|
|
}
|
|
map->channels = nsrcs;
|
|
+ for (src = 0; src < nsrcs; src++)
|
|
+ map->pos[src] = SND_CHMAP_NA;
|
|
for (dst = 0; dst < route->params.ndsts; dst++) {
|
|
snd_pcm_route_ttable_dst_t *d = &route->params.dsts[dst];
|
|
for (src = 0; src < d->nsrcs; src++) {
|
|
int c = d->srcs[src].channel;
|
|
- if (c < nsrcs && !map->pos[c])
|
|
+ if (c < nsrcs && map->pos[c] == SND_CHMAP_NA)
|
|
map->pos[c] = slave_map->pos[dst];
|
|
}
|
|
}
|