From: Clemens Ladisch Date: Thu, 24 Jan 2008 07:43:16 +0000 (+0100) Subject: [ALSA] oxygen: fix SPDIF input rates X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=33c646e4ffb1b48d67598fadf3323158f0cfd4b9;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [ALSA] oxygen: fix SPDIF input rates Fix up SPDIF input sample rates again: 32 kHz and 64 kHz are not supported. Signed-off-by: Clemens Ladisch Signed-off-by: Jaroslav Kysela --- diff --git a/sound/pci/oxygen/oxygen_pcm.c b/sound/pci/oxygen/oxygen_pcm.c index 272ef08f0a28..2785660957d0 100644 --- a/sound/pci/oxygen/oxygen_pcm.c +++ b/sound/pci/oxygen/oxygen_pcm.c @@ -119,6 +119,11 @@ static int oxygen_open(struct snd_pcm_substream *substream, runtime->private_data = (void *)(uintptr_t)channel; runtime->hw = *oxygen_hardware[channel]; + if (channel == PCM_C) { + runtime->hw.rates &= ~(SNDRV_PCM_RATE_32000 | + SNDRV_PCM_RATE_64000); + runtime->hw.rate_min = 44100; + } if (chip->model->pcm_hardware_filter) chip->model->pcm_hardware_filter(channel, &runtime->hw); err = snd_pcm_hw_constraint_step(runtime, 0,