From d6f30c1ebf4288ec4aafbbbcd902e5f319fff5e9 Mon Sep 17 00:00:00 2001 From: jian zhou Date: Thu, 15 Aug 2024 15:16:58 +0800 Subject: [PATCH] audio: fix sc2 eARC Rx ecc error [1/1] PD#SWPL-177517 Problem: pcpd detection hw is before ecc hw module, so we get wrong pcpd if ecc happened on pcpd position. Solution: if we receive ecc error interrupt, and detect the format is pause, we think it is ac3 format. Verify: SC2 Change-Id: I23965357eee81fc93f07e22a95d5e91249e978ab Signed-off-by: jian zhou (cherry picked from commit ba4e3bfac7e3f9d99299e70967630462045c9643) --- sound/soc/amlogic/auge/earc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sound/soc/amlogic/auge/earc.c b/sound/soc/amlogic/auge/earc.c index beb04b86f..2d5cb07c1 100644 --- a/sound/soc/amlogic/auge/earc.c +++ b/sound/soc/amlogic/auge/earc.c @@ -1911,6 +1911,13 @@ int earcrx_get_audio_coding_type(struct snd_kcontrol *kcontrol, coding_type = AUDIO_CODING_TYPE_AC3_LAYOUT_B; } + if (p_earc->bch_err) { + if (coding_type == AUDIO_CODING_TYPE_PAUSE) + coding_type = AUDIO_CODING_TYPE_AC3; + else if (coding_type == AUDIO_CODING_TYPE_PAUSE_LAYOUT_B) + coding_type = AUDIO_CODING_TYPE_AC3_LAYOUT_B; + } + ucontrol->value.integer.value[0] = coding_type; return 0;