mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-01 18:53:02 +09:00
audio: set hdmi format-check threshold by input samplerate [2/2]
PD#SWPL-6340 Problem: ddp audio input from hdmiin is not smooth Solution: set hdmiin format-check threshold by input sr Verify: Verified by x301. Change-Id: Idb8ffa616c3880b1c34d61ca4e8c2917343a9ffc Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
* such as fratv, frhdmirx
|
||||
*/
|
||||
|
||||
/*#define DEBUG*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/moduleparam.h>
|
||||
#include <linux/platform_device.h>
|
||||
@@ -134,6 +136,17 @@ static irqreturn_t extn_ddr_isr(int irq, void *devid)
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct device *dev = rtd->platform->dev;
|
||||
struct extn *p_extn = (struct extn *)dev_get_drvdata(dev);
|
||||
int timeout_thres = 5;
|
||||
|
||||
#ifdef CONFIG_AMLOGIC_MEDIA_TVIN_HDMI
|
||||
int sample_rate_index = get_hdmi_sample_rate_index();
|
||||
|
||||
/*192K audio*/
|
||||
if (sample_rate_index == 7)
|
||||
timeout_thres = 10;
|
||||
else
|
||||
timeout_thres = 5;
|
||||
#endif
|
||||
|
||||
if (!snd_pcm_running(substream))
|
||||
return IRQ_HANDLED;
|
||||
@@ -148,7 +161,7 @@ static irqreturn_t extn_ddr_isr(int irq, void *devid)
|
||||
|
||||
p_extn->frhdmirx_same_cnt++;
|
||||
|
||||
if (p_extn->frhdmirx_same_cnt > 5)
|
||||
if (p_extn->frhdmirx_same_cnt > timeout_thres)
|
||||
frhdmirx_nonpcm2pcm_clr_reset(p_extn);
|
||||
|
||||
if (p_extn->frhdmirx_cnt == 0)
|
||||
|
||||
Reference in New Issue
Block a user