[alsa-devel] Question about "957ce0c6b8a1 ASoC: soc-pcm: check symmetry after hw_params"
S.j. Wang
shengjiu.wang at nxp.com
Wed Oct 16 05:05:16 CEST 2019
Hi Jiada, Mark
After this commit
"957ce0c6b8a1 ASoC: soc-pcm: check symmetry after hw_params"
The soc_pcm_params_symmetry can't take effect, because its position
is after the change of cpu_dai->rate.
The code of soc_pcm_params_symmetry is:
static int soc_pcm_params_symmetry(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
...
if (symmetry && cpu_dai->rate && cpu_dai->rate != rate) {
dev_err(rtd->dev, "ASoC: unmatched rate symmetry: %d - %d\n",
cpu_dai->rate, rate);
return -EINVAL;
}
...
}
This code soc_pcm_hw_params of is:
static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
...
/* store the parameters for each DAIs */
cpu_dai->rate = params_rate(params);
cpu_dai->channels = params_channels(params);
cpu_dai->sample_bits =
snd_pcm_format_physical_width(params_format(params));
snd_soc_dapm_update_dai(substream, params, cpu_dai);
...
ret = soc_pcm_params_symmetry(substream, params);
if (ret)
goto component_err;
...
}
Is this an issue?
Best regards
Wang shengjiu
More information about the Alsa-devel
mailing list