From 3ef4f478641e894314c68166261756a92904713d Mon Sep 17 00:00:00 2001 From: Xing Wang Date: Thu, 27 Dec 2018 20:58:52 +0800 Subject: [PATCH] audio: fix no sound when atv switch to other source [1/1] PD#SWPL-3440 Problem: ATV switch to other source, such as DTV/HDMI/AV, no sound Solution: ATV switch to other source, atv demond is disabled when audio is reading data, so it's blocked. In normal, ATV sends audio data to FRATV, then FRATV sends data to audio fifo, then to DDR. If ATV stops to send audio data, no interrupt from FRATV to fifo, no data is updated to DDR. When exit from audio atv patch, it's a block signal to wait in_read finished, but ATV is disabled TimeCheckThread will check any routine is blocked, if there is one, signal SIGABRT would rise and cause audio server restart So we make a delay before ATV is disabled to waiting audio data is readed. Verify: x301 Change-Id: I47dc88d2c8565c16c739ffea69a88152fa4d5f13 Signed-off-by: Xing Wang --- drivers/amlogic/atv_demod/atv_demod_ops.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/amlogic/atv_demod/atv_demod_ops.c b/drivers/amlogic/atv_demod/atv_demod_ops.c index c1e312c64608..2ae7ff082c1f 100644 --- a/drivers/amlogic/atv_demod/atv_demod_ops.c +++ b/drivers/amlogic/atv_demod/atv_demod_ops.c @@ -175,6 +175,8 @@ int atv_demod_leave_mode(struct dvb_frontend *fe) priv->state = ATVDEMOD_STATE_IDEL; priv->standby = true; + usleep_range(30 * 1000, 30 * 1000 + 100); + if (priv->afc.disable) priv->afc.disable(&priv->afc);