On Sun, Feb 09, 2020 at 10:47:43AM -0500, Adam Serbinski wrote: > +static int q6pcm_hw_params(struct snd_pcm_substream *substream, > + struct snd_pcm_hw_params *params, > + struct snd_soc_dai *dai) > +{ > + struct q6afe_dai_data *dai_data = dev_get_drvdata(dai->dev); > + struct q6afe_pcm_cfg *pcm = &dai_data->port_config[dai->id].pcm_cfg; > + > + pcm->sample_rate = params_rate(params); > + This and set_fmt() don't do any validation of the value being set. > static const struct snd_soc_dai_ops q6tdm_ops = { > .prepare = q6afe_dai_prepare, > .shutdown = q6afe_dai_shutdown, > - .set_sysclk = q6afe_mi2s_set_sysclk, > + .set_sysclk = q6afe_tdm_set_sysclk, > .set_tdm_slot = q6tdm_set_tdm_slot, > .set_channel_map = q6tdm_set_channel_map, > .hw_params = q6tdm_hw_params, This looks like a separate bug fix that should be split out? > + }, { > + .playback = { > + .stream_name = "Primary PCM Playback", > + .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000, > + .formats = SNDRV_PCM_FMTBIT_S16_LE | > + SNDRV_PCM_FMTBIT_S24_LE, > + .rate_min = 8000, > + .rate_max = 16000, > + }, It is surprising to see rate_min and rate_max specified when we're not using _KNOT, and again there's weird formatting here with the tabs before the rate values.
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx https://mailman.alsa-project.org/mailman/listinfo/alsa-devel