Преглед изворни кода

[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 <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Clemens Ladisch пре 17 година
родитељ
комит
33c646e4ff
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5 0
      sound/pci/oxygen/oxygen_pcm.c

+ 5 - 0
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->private_data = (void *)(uintptr_t)channel;
 	runtime->hw = *oxygen_hardware[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)
 	if (chip->model->pcm_hardware_filter)
 		chip->model->pcm_hardware_filter(channel, &runtime->hw);
 		chip->model->pcm_hardware_filter(channel, &runtime->hw);
 	err = snd_pcm_hw_constraint_step(runtime, 0,
 	err = snd_pcm_hw_constraint_step(runtime, 0,