AnsweredAssumed Answered

Why has noise when i use the asrc of fskl?

Question asked by 魏伟 魏 on Nov 13, 2016
Latest reply on Nov 14, 2016 by igorpadykov

The following code:

 

unsigned int rate = params_rate(params);
unsigned int channel = params_channels(params);
struct imx_pcm_runtime_data *iprtd =
substream->runtime->private_data;
struct asrc_config config = {0};
int ret = 0;

if ((channel != 2) && (channel != 4) && (channel != 6))
return -EINVAL;

//iprtd->asrc_index = 1;
ret = iprtd->asrc_pcm_p2p_ops_ko->
asrc_p2p_req_pair(channel, &iprtd->asrc_index);
if (ret < 0) {
pr_err("Fail to request asrc pair\n");
return -EINVAL;
}
printk("request asrc pair: asrc_index = %d\n",iprtd->asrc_index);
//iprtd->asrc_index = 1;
config.input_word_width = get_asrc_input_width(params);
config.output_word_width = iprtd->p2p->p2p_width;
config.pair = iprtd->asrc_index;
//config.channel_num = channel;
config.channel_num = 1;
//config.input_sample_rate = rate;
config.input_sample_rate = 44100;
config.output_sample_rate = iprtd->p2p->p2p_rate;
config.inclk = INCLK_NONE;

Outcomes