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 <jian.zhou@amlogic.com>
(cherry picked from commit ba4e3bfac7)
This commit is contained in:
jian zhou
2024-08-15 15:16:58 +08:00
committed by Jian Zhou
parent 82bd75e669
commit d6f30c1ebf
+7
View File
@@ -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;