lkml.org 
[lkml]   [2020]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 3/8] ASoC: qdsp6: q6afe-dai: add support to pcm port dais
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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-02-10 14:35    [W:0.134 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site