From: Cezary Rojewski <cezary.rojewski@intel.com>
To: Jerome Brunet <jbrunet@baylibre.com>
Cc: <linux-sound@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<patches@opensource.cirrus.com>, <alsa-devel@alsa-project.org>,
<linux-arm-msm@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-sunxi@lists.linux.dev>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
David Rhodes <david.rhodes@cirrus.com>,
Richard Fitzgerald <rf@opensource.cirrus.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
Liam Girdwood <liam.r.girdwood@linux.intel.com>,
Peter Ujfalusi <peter.ujfalusi@linux.intel.com>,
Bard Liao <yung-chuan.liao@linux.intel.com>,
Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
Kai Vehmanen <kai.vehmanen@linux.intel.com>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Chen-Yu Tsai <wens@csie.org>,
"Jernej Skrabec" <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>
Subject: Re: [PATCH 09/13] ASoC: Intel: avs: drop SNDRV_PCM_RATE_KNOT
Date: Tue, 10 Sep 2024 09:47:59 +0200 [thread overview]
Message-ID: <011edf7b-5787-4e35-bf61-ebe356ccfe1a@intel.com> (raw)
In-Reply-To: <20240905-alsa-12-24-128-v1-9-8371948d3921@baylibre.com>
On 2024-09-05 4:13 PM, Jerome Brunet wrote:
> The custom rate constraint list was necessary to support 12kHz, 24kHz and
> 128kHz. These rates are now available through SNDRV_PCM_RATE_12000,
> SNDRV_PCM_RATE_24000 and SNDRV_PCM_RATE_128000.
>
> Use them and drop the custom rate constraint rule.
>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> ---
Thank you for this cleanup.
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
> sound/soc/intel/avs/pcm.c | 22 ++++++----------------
> 1 file changed, 6 insertions(+), 16 deletions(-)
>
> diff --git a/sound/soc/intel/avs/pcm.c b/sound/soc/intel/avs/pcm.c
> index c76b86254a8b..afc0fc74cf94 100644
> --- a/sound/soc/intel/avs/pcm.c
> +++ b/sound/soc/intel/avs/pcm.c
> @@ -471,16 +471,6 @@ static int hw_rule_param_size(struct snd_pcm_hw_params *params, struct snd_pcm_h
> static int avs_pcm_hw_constraints_init(struct snd_pcm_substream *substream)
> {
> struct snd_pcm_runtime *runtime = substream->runtime;
> - static const unsigned int rates[] = {
> - 8000, 11025, 12000, 16000,
> - 22050, 24000, 32000, 44100,
> - 48000, 64000, 88200, 96000,
> - 128000, 176400, 192000,
> - };
> - static const struct snd_pcm_hw_constraint_list rate_list = {
> - .count = ARRAY_SIZE(rates),
> - .list = rates,
> - };
> int ret;
>
> ret = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);
> @@ -492,10 +482,6 @@ static int avs_pcm_hw_constraints_init(struct snd_pcm_substream *substream)
> if (ret < 0)
> return ret;
>
> - ret = snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &rate_list);
> - if (ret < 0)
> - return ret;
> -
> /* Adjust buffer and period size based on the audio format. */
> snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, hw_rule_param_size, NULL,
> SNDRV_PCM_HW_PARAM_FORMAT, SNDRV_PCM_HW_PARAM_CHANNELS,
> @@ -1332,7 +1318,9 @@ static const struct snd_soc_dai_driver i2s_dai_template = {
> .channels_min = 1,
> .channels_max = 8,
> .rates = SNDRV_PCM_RATE_8000_192000 |
> - SNDRV_PCM_RATE_KNOT,
> + SNDRV_PCM_RATE_12000 |
> + SNDRV_PCM_RATE_24000 |
> + SNDRV_PCM_RATE_128000,
> .formats = SNDRV_PCM_FMTBIT_S16_LE |
> SNDRV_PCM_FMTBIT_S32_LE,
> .subformats = SNDRV_PCM_SUBFMTBIT_MSBITS_20 |
> @@ -1343,7 +1331,9 @@ static const struct snd_soc_dai_driver i2s_dai_template = {
> .channels_min = 1,
> .channels_max = 8,
> .rates = SNDRV_PCM_RATE_8000_192000 |
> - SNDRV_PCM_RATE_KNOT,
> + SNDRV_PCM_RATE_12000 |
> + SNDRV_PCM_RATE_24000 |
> + SNDRV_PCM_RATE_128000,
> .formats = SNDRV_PCM_FMTBIT_S16_LE |
> SNDRV_PCM_FMTBIT_S32_LE,
> .subformats = SNDRV_PCM_SUBFMTBIT_MSBITS_20 |
>
next prev parent reply other threads:[~2024-09-10 7:49 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-05 14:12 [PATCH 00/13] ALSA: update sample rate definitions Jerome Brunet
2024-09-05 14:12 ` [PATCH 01/13] ALSA: pcm: add more " Jerome Brunet
2024-09-09 16:30 ` Charles Keepax
2024-09-11 9:09 ` Pierre-Louis Bossart
2024-09-11 9:21 ` Takashi Iwai
2024-09-11 10:33 ` Péter Ujfalusi
2024-09-11 10:51 ` Takashi Iwai
2024-09-11 10:58 ` Jaroslav Kysela
2024-09-11 12:42 ` Takashi Iwai
2024-09-11 12:59 ` Jerome Brunet
2024-09-11 12:59 ` Jerome Brunet
2024-09-11 13:08 ` Takashi Iwai
2024-09-11 13:37 ` Amadeusz Sławiński
2024-09-11 12:55 ` Jerome Brunet
2024-09-11 12:59 ` Liao, Bard
2024-09-11 10:44 ` Takashi Iwai
2024-09-05 14:12 ` [PATCH 02/13] ALSA: cmipci: drop SNDRV_PCM_RATE_KNOT Jerome Brunet
2024-09-05 14:12 ` [PATCH 03/13] ALSA: emu10k1: " Jerome Brunet
2024-09-05 14:12 ` [PATCH 04/13] ALSA: hdsp: " Jerome Brunet
2024-09-05 14:12 ` [PATCH 05/13] ALSA: hdspm: " Jerome Brunet
2024-09-05 14:12 ` [PATCH 06/13] ASoC: cs35l36: " Jerome Brunet
2024-09-09 16:24 ` Charles Keepax
2024-09-05 14:12 ` [PATCH 07/13] ASoC: cs35l41: " Jerome Brunet
2024-09-09 16:24 ` Charles Keepax
2024-09-05 14:12 ` [PATCH 08/13] ASoC: cs53l30: " Jerome Brunet
2024-09-09 16:27 ` Charles Keepax
2024-09-05 14:13 ` [PATCH 09/13] ASoC: Intel: avs: " Jerome Brunet
2024-09-10 7:47 ` Cezary Rojewski [this message]
2024-09-05 14:13 ` [PATCH 10/13] ASoC: qcom: q6asm-dai: " Jerome Brunet
2024-09-05 14:13 ` [PATCH 11/13] ASoC: sunxi: sun4i-codec: " Jerome Brunet
2024-09-05 14:13 ` [PATCH 12/13] ASoC: cs35l34: drop useless rate contraint Jerome Brunet
2024-09-05 14:13 ` Jerome Brunet
2024-09-09 16:14 ` Charles Keepax
2024-09-05 14:13 ` [PATCH 13/13] ASoC: spdif: extend supported rates to 768kHz Jerome Brunet
2024-09-05 14:17 ` [PATCH 00/13] ALSA: update sample rate definitions Mark Brown
2024-09-05 14:49 ` Jaroslav Kysela
2024-09-05 17:24 ` Rhodes, David
2024-09-06 7:27 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=011edf7b-5787-4e35-bf61-ebe356ccfe1a@intel.com \
--to=cezary.rojewski@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=david.rhodes@cirrus.com \
--cc=jbrunet@baylibre.com \
--cc=jernej.skrabec@gmail.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=lgirdwood@gmail.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=patches@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=ranjani.sridharan@linux.intel.com \
--cc=rf@opensource.cirrus.com \
--cc=samuel@sholland.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=tiwai@suse.com \
--cc=wens@csie.org \
--cc=yung-chuan.liao@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.