summaryrefslogtreecommitdiff
path: root/drivers/mxc/asrc
diff options
context:
space:
mode:
authorChen Liangjun <b36089@freescale.com>2012-07-18 11:11:39 +0800
committerTerry Lv <r65388@freescale.com>2012-07-25 13:11:06 +0800
commitb9ccbfeb48634f6ab4865faed4127661afe6ec79 (patch)
tree22a8b203e744ccbeda7c0ee72536ac9e37aa66d9 /drivers/mxc/asrc
parent64e252b87eaf8b5fd949464c61f3ab86df6987a0 (diff)
ENGR00217509 ASRC:Use ideal ratio mode for p2p playback
When use ESAI p2p playback, ASRC is configured no ratio mode. Due to an IC bug(TKT117009), user may hear noise sometimes. In this patch, use ideal ratio mode for ESAI p2p playback to avoid noise. Signed-off-by: Chen Liangjun <b36089@freescale.com>
Diffstat (limited to 'drivers/mxc/asrc')
-rw-r--r--drivers/mxc/asrc/mxc_asrc.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/mxc/asrc/mxc_asrc.c b/drivers/mxc/asrc/mxc_asrc.c
index db20cbf2971a..4ef31c8fd6db 100644
--- a/drivers/mxc/asrc/mxc_asrc.c
+++ b/drivers/mxc/asrc/mxc_asrc.c
@@ -583,6 +583,26 @@ int asrc_config_pair(struct asrc_config *config)
}
}
+ if ((config->inclk == INCLK_ASRCK1_CLK) &&
+ (config->outclk == OUTCLK_ESAI_TX)) {
+ reg = __raw_readl(g_asrc->vaddr + ASRC_ASRCTR_REG);
+ reg &= ~(1 << (20 + config->pair));
+ reg |= (0x03 << (13 + (config->pair << 1)));
+ __raw_writel(reg, g_asrc->vaddr + ASRC_ASRCTR_REG);
+ err = asrc_set_clock_ratio(config->pair,
+ config->input_sample_rate,
+ config->output_sample_rate);
+ if (err < 0)
+ return err;
+
+ err = asrc_set_process_configuration(config->pair,
+ config->input_sample_rate,
+ config->
+ output_sample_rate);
+ if (err < 0)
+ return err;
+ }
+
/* Config input and output wordwidth */
reg = __raw_readl(
g_asrc->vaddr + ASRC_ASRMCR1A_REG + (config->pair << 2));