lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200210133416.GH7685@sirena.org.uk>
Date:   Mon, 10 Feb 2020 13:34:16 +0000
From:   Mark Brown <broonie@...nel.org>
To:     Adam Serbinski <adam@...binski.com>
Cc:     Srini Kandagatla <srinivas.kandagatla@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Andy Gross <agross@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Patrick Lai <plai@...eaurora.org>,
        Banajit Goswami <bgoswami@...eaurora.org>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org,
        linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [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.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ