audio: The c and lfe channel are reversed [1/1]
PD#SWPL-191036
Problem:
The c and lfe channel are reversed
Solution:
The two channels are swapped in audio-hal
Verify:
yocto
Change-Id: I7a8913fc4a6f0e3e6b3103de5e0e2e51ead27ecf
Signed-off-by: haiyang.ren <haiyang.ren@amlogic.com>
diff --git a/audio_hal/aml_audio_spdifout.c b/audio_hal/aml_audio_spdifout.c
index 0028f3f..dd315fe 100644
--- a/audio_hal/aml_audio_spdifout.c
+++ b/audio_hal/aml_audio_spdifout.c
@@ -441,12 +441,17 @@
goto error;
}
- } else if (TDM_DEVICE == device_id && eDolbyMS12Lib == aml_dev->dolby_lib_type) {
- /* MC PCM output from MS12 is hard coded to 8ch */
- if (spdif_config->data_ch == 8 && audio_is_linear_pcm(audio_format)) {
- phandle->post_process_type = MC_POST_PROCESS_COMPACT_CHANNEL;
+ } else if (TDM_DEVICE == device_id) {
+ if (8 == spdif_config->data_ch && audio_is_linear_pcm(audio_format)) {
+ /* MC PCM output from MS12 is hard coded to 8ch */
+ if (eDolbyMS12Lib == aml_dev->dolby_lib_type) {
+ phandle->post_process_type = MC_POST_PROCESS_COMPACT_CHANNEL;
+ } else {
+ phandle->post_process_type = MC_POST_PROCESS_SWAP_C_LFE;
+ }
}
}
+ AM_LOGI("device id: %d, data_ch: %d", device_id, spdif_config->data_ch);
stream_config.config.sample_rate = spdif_config->rate;
stream_config.config.format = spdif_config->audio_format;