aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/core
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <linux@treblig.org>2025-05-03 00:52:15 +0100
committerTakashi Iwai <tiwai@suse.de>2025-05-05 12:36:29 +0200
commit15b39ced6247666f616e3b0b8eeb42cd4a8a11f2 (patch)
tree7f81e55a2d24560cb2d698ddbebc5ae8de42f2bb /sound/core
parentALSA: hda/tas2781: Remove tas2781_spi_fwlib.c and leverage SND_SOC_TAS2781_FMWLIB (diff)
downloadwireguard-linux-15b39ced6247666f616e3b0b8eeb42cd4a8a11f2.tar.xz
wireguard-linux-15b39ced6247666f616e3b0b8eeb42cd4a8a11f2.zip
ALSA: pcm: Remove unused snd_pcm_rate_range_to_bits
The last use of snd_pcm_rate_range_to_bits() was removed in 2016 by commit b6b6e4d670c9 ("ASoC: topology: Fix setting of stream rates, rate_min and rate_max") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250502235219.1000429-2-linux@treblig.org
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/pcm_misc.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/sound/core/pcm_misc.c b/sound/core/pcm_misc.c
index d3a08e292072..71eec32a7a0a 100644
--- a/sound/core/pcm_misc.c
+++ b/sound/core/pcm_misc.c
@@ -586,33 +586,3 @@ unsigned int snd_pcm_rate_mask_intersect(unsigned int rates_a,
return rates_a & rates_b;
}
EXPORT_SYMBOL_GPL(snd_pcm_rate_mask_intersect);
-
-/**
- * snd_pcm_rate_range_to_bits - converts rate range to SNDRV_PCM_RATE_xxx bit
- * @rate_min: the minimum sample rate
- * @rate_max: the maximum sample rate
- *
- * This function has an implicit assumption: the rates in the given range have
- * only the pre-defined rates like 44100 or 16000.
- *
- * Return: The SNDRV_PCM_RATE_xxx flag that corresponds to the given rate range,
- * or SNDRV_PCM_RATE_KNOT for an unknown range.
- */
-unsigned int snd_pcm_rate_range_to_bits(unsigned int rate_min,
- unsigned int rate_max)
-{
- unsigned int rates = 0;
- int i;
-
- for (i = 0; i < snd_pcm_known_rates.count; i++) {
- if (snd_pcm_known_rates.list[i] >= rate_min
- && snd_pcm_known_rates.list[i] <= rate_max)
- rates |= 1 << i;
- }
-
- if (!rates)
- rates = SNDRV_PCM_RATE_KNOT;
-
- return rates;
-}
-EXPORT_SYMBOL_GPL(snd_pcm_rate_range_to_bits);