Audio: fix no sound for switching mat to pcm [1/1]

PD#SWPL-176561
PD#OTT-61559

Problem:
switch to pcm from auto,sometimes no sound.

Solution:
HDMITX not prepare/reset fifo/buffer for
this switching action, some sink device can‘t
parse these data that causes no sound.

Audio invoke callback to inform hdmitx prepare
for this case. That can resolve this issue.

Verify:
local coffey + S7D

Change-Id: I3b733c0d2946e10696d60318e900c9bf99ec9a08
Signed-off-by: chuntian.miao <chuntian.miao@amlogic.com>
This commit is contained in:
chuntian.miao
2024-07-08 11:26:39 +08:00
committed by gerrit autosubmit
parent 098b275ba5
commit c9e211fcdd
+8
View File
@@ -47,6 +47,14 @@ static int sharebuffer_spdifout_prepare(struct snd_pcm_substream *substream,
struct aud_para aud_param;
unsigned int l_src = 0;
pr_info("%s get_hdmitx_audio_src(rtd->card):%d spdif_id:%d\n", __func__,
get_hdmitx_audio_src(rtd->card), spdif_id);
/* switch TDM/mat to TDM/pcm, need to inform hdmitx to do prepare/reset action. */
if (get_hdmitx_audio_src(rtd->card) == spdif_id) {
/* to call hdmitx_audio_notify_callback of hdmitx_audio.c */
notify_hdmitx_to_prepare();
}
memset(&aud_param, 0, sizeof(aud_param));
bit_depth = snd_pcm_format_width(runtime->format);