ALSA: hdspm: drop SNDRV_PCM_RATE_KNOT
The custom rate constraint list was necessary to support 128kHz. This rate is now available through SNDRV_PCM_RATE_128000. Use it and drop the custom rate constraint rule. 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-5-8371948d3921@baylibre.com
This commit is contained in:
parent
3cc1e94dbc
commit
151d82f914
@ -6032,18 +6032,6 @@ static int snd_hdspm_hw_rule_out_channels(struct snd_pcm_hw_params *params,
|
|||||||
return snd_interval_list(c, 3, list, 0);
|
return snd_interval_list(c, 3, list, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static const unsigned int hdspm_aes32_sample_rates[] = {
|
|
||||||
32000, 44100, 48000, 64000, 88200, 96000, 128000, 176400, 192000
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct snd_pcm_hw_constraint_list
|
|
||||||
hdspm_hw_constraints_aes32_sample_rates = {
|
|
||||||
.count = ARRAY_SIZE(hdspm_aes32_sample_rates),
|
|
||||||
.list = hdspm_aes32_sample_rates,
|
|
||||||
.mask = 0
|
|
||||||
};
|
|
||||||
|
|
||||||
static int snd_hdspm_open(struct snd_pcm_substream *substream)
|
static int snd_hdspm_open(struct snd_pcm_substream *substream)
|
||||||
{
|
{
|
||||||
struct hdspm *hdspm = snd_pcm_substream_chip(substream);
|
struct hdspm *hdspm = snd_pcm_substream_chip(substream);
|
||||||
@ -6096,9 +6084,7 @@ static int snd_hdspm_open(struct snd_pcm_substream *substream)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (AES32 == hdspm->io_type) {
|
if (AES32 == hdspm->io_type) {
|
||||||
runtime->hw.rates |= SNDRV_PCM_RATE_KNOT;
|
runtime->hw.rates |= SNDRV_PCM_RATE_128000;
|
||||||
snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
|
|
||||||
&hdspm_hw_constraints_aes32_sample_rates);
|
|
||||||
} else {
|
} else {
|
||||||
snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
|
snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
|
||||||
(playback ?
|
(playback ?
|
||||||
|
Loading…
Reference in New Issue
Block a user