summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_asrc.c
diff options
context:
space:
mode:
authorMihai Serban <mihai.serban@nxp.com>2017-07-26 11:17:09 +0300
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commit550b17b3e847e745b7c402475685678dc8b0b09e (patch)
tree65b496f450fa910c2df81fc328146d8de09b226a /sound/soc/fsl/fsl_asrc.c
parent70aa4cf1f7046614ec85c7547933e5a6182f1433 (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>
Diffstat (limited to 'sound/soc/fsl/fsl_asrc.c')
-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 53bc307960b5..d1290fb1b020 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;
@@ -573,7 +573,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) {