Skip to content

Commit 7bc09f7

Browse files
jbrun3ttiwai
authored andcommitted
ASoC: cs35l34: drop useless rate contraint
The cs35l34 adds a useless rate constraint on startup. It does not set SNDRV_PCM_RATE_KNOT and the rates set are already a subset of the ones provided in the constraint list, so it is a no-op. >From the rest of the code, it is likely HW supports more than the 32, 44.1 and 48kHz listed in CS35L34_RATES but there is no way to know for sure without proper documentation. Keep the driver as it is for now and just drop the useless constraint. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Reviewed-by: David Rhodes <drhodes@opensource.cirrus.com> Acked-by: Mark Brown <broonie@kernel.org> Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20240905-alsa-12-24-128-v1-12-8371948d3921@baylibre.com
1 parent 9dc03a1 commit 7bc09f7

1 file changed

Lines changed: 0 additions & 21 deletions

File tree

sound/soc/codecs/cs35l34.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -562,26 +562,6 @@ static int cs35l34_pcm_hw_params(struct snd_pcm_substream *substream,
562562
return ret;
563563
}
564564

565-
static const unsigned int cs35l34_src_rates[] = {
566-
8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
567-
};
568-
569-
570-
static const struct snd_pcm_hw_constraint_list cs35l34_constraints = {
571-
.count = ARRAY_SIZE(cs35l34_src_rates),
572-
.list = cs35l34_src_rates,
573-
};
574-
575-
static int cs35l34_pcm_startup(struct snd_pcm_substream *substream,
576-
struct snd_soc_dai *dai)
577-
{
578-
579-
snd_pcm_hw_constraint_list(substream->runtime, 0,
580-
SNDRV_PCM_HW_PARAM_RATE, &cs35l34_constraints);
581-
return 0;
582-
}
583-
584-
585565
static int cs35l34_set_tristate(struct snd_soc_dai *dai, int tristate)
586566
{
587567

@@ -639,7 +619,6 @@ static int cs35l34_dai_set_sysclk(struct snd_soc_dai *dai,
639619
}
640620

641621
static const struct snd_soc_dai_ops cs35l34_ops = {
642-
.startup = cs35l34_pcm_startup,
643622
.set_tristate = cs35l34_set_tristate,
644623
.set_fmt = cs35l34_set_dai_fmt,
645624
.hw_params = cs35l34_pcm_hw_params,

0 commit comments

Comments
 (0)