mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
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>
This commit is contained in:
parent
63f6f4a610
commit
5a2daef192
1 changed files with 3 additions and 1 deletions
|
|
@ -720,11 +720,13 @@ static snd_pcm_chmap_t *snd_pcm_route_get_chmap(snd_pcm_t *pcm)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
map->channels = nsrcs;
|
map->channels = nsrcs;
|
||||||
|
for (src = 0; src < nsrcs; src++)
|
||||||
|
map->pos[src] = SND_CHMAP_NA;
|
||||||
for (dst = 0; dst < route->params.ndsts; dst++) {
|
for (dst = 0; dst < route->params.ndsts; dst++) {
|
||||||
snd_pcm_route_ttable_dst_t *d = &route->params.dsts[dst];
|
snd_pcm_route_ttable_dst_t *d = &route->params.dsts[dst];
|
||||||
for (src = 0; src < d->nsrcs; src++) {
|
for (src = 0; src < d->nsrcs; src++) {
|
||||||
int c = d->srcs[src].channel;
|
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];
|
map->pos[c] = slave_map->pos[dst];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue