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>
* 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;
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) {