mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-server: use 8 channels internally for TrueHD and DTSHD
So that the stride is what the server side expects. See #2284
This commit is contained in:
parent
2307557652
commit
57e732cd27
1 changed files with 15 additions and 1 deletions
|
|
@ -480,9 +480,23 @@ int format_parse_param(const struct spa_pod *param, bool collect,
|
|||
|
||||
info.info.raw.format = SPA_AUDIO_FORMAT_S16;
|
||||
info.info.raw.rate = iec.rate;
|
||||
info.info.raw.channels = 2;
|
||||
info.info.raw.position[0] = SPA_AUDIO_CHANNEL_FL;
|
||||
info.info.raw.position[1] = SPA_AUDIO_CHANNEL_FR;
|
||||
switch (iec.codec) {
|
||||
case SPA_AUDIO_IEC958_CODEC_TRUEHD:
|
||||
case SPA_AUDIO_IEC958_CODEC_DTSHD:
|
||||
info.info.raw.channels = 8;
|
||||
info.info.raw.position[2] = SPA_AUDIO_CHANNEL_FC;
|
||||
info.info.raw.position[3] = SPA_AUDIO_CHANNEL_LFE;
|
||||
info.info.raw.position[4] = SPA_AUDIO_CHANNEL_SL;
|
||||
info.info.raw.position[5] = SPA_AUDIO_CHANNEL_SR;
|
||||
info.info.raw.position[6] = SPA_AUDIO_CHANNEL_RL;
|
||||
info.info.raw.position[7] = SPA_AUDIO_CHANNEL_RR;
|
||||
break;
|
||||
default:
|
||||
info.info.raw.channels = 2;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue