summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMihai Serban <mihai.serban@nxp.com>2017-07-26 11:17:09 +0300
committerDong Aisheng <aisheng.dong@nxp.com>2019-11-25 15:48:29 +0800
commit77924f38da9d811ca20d393294e9d5be6a0150ed (patch)
treea2347ca793669d4e7db9de0e6472bb48c07a930d
parentc6b54c908e25ccef44353d49db273c50911250d4 (diff)
MLK-16007-2: ASoC: fsl_asrc: Enable automatic configuration for P2P
Use automatic selection of processing options and internal measured ratio for P2P conversions. The conversion done by ASRC depends on the IPG master clock frequency that can have any value between 130MHz and 200MHz. The documentation states that to support 10 channels with 192KHz sampling rate the master clock frequency must be at least 160MHz. When the master clock cannot be configured to faster frequencies the ASRC can still convert the samples but it have to be configured to automatically adjust the processing options and conversion ratio. Signed-off-by: Mihai Serban <mihai.serban@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
-rw-r--r--sound/soc/fsl/fsl_asrc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c
index cc7a239b22e0..5c2c5b0636db 100644
--- a/sound/soc/fsl/fsl_asrc.c
+++ b/sound/soc/fsl/fsl_asrc.c
@@ -379,7 +379,7 @@ static int fsl_asrc_config_pair(struct fsl_asrc_pair *pair, bool p2p_in, bool p2
* When M2M mode, output rate should also need to align with the out
* samplerate, but M2M must use less time to achieve good performance.
*/
- if (p2p_out)
+ if (p2p_out || p2p_in)
div[OUT] = clk_get_rate(clk) / outrate;
else
div[OUT] = clk_get_rate(clk) / IDEAL_RATIO_RATE;
@@ -584,7 +584,7 @@ static int fsl_asrc_dai_hw_params(struct snd_pcm_substream *substream,
config.pair = pair->index;
config.channel_num = channels;
- config.inclk = INCLK_NONE;
+ config.inclk = INCLK_ASRCK1_CLK;
config.outclk = OUTCLK_ASRCK1_CLK;
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {