From: Takashi Iwai Date: Thu, 20 Sep 2012 11:43:12 +0000 (+0200) Subject: PCM: Fill SND_CHMAP_NA to silent channels in route plugin X-Git-Tag: v1.0.27~38 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=5a2daef19225478df7e3c1f8c6c9cb847e574b44;p=alsa-lib.git 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 --- diff --git a/src/pcm/pcm_route.c b/src/pcm/pcm_route.c index a5c5b048..a3d1695e 100644 --- a/src/pcm/pcm_route.c +++ b/src/pcm/pcm_route.c @@ -720,11 +720,13 @@ static snd_pcm_chmap_t *snd_pcm_route_get_chmap(snd_pcm_t *pcm) 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]; } }