Question about "957ce0c6b8a1 ASoC: soc-pcm: check symmetry after hw_params"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux