]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[ALSA] oxygen: fix SPDIF input rates
authorClemens Ladisch <clemens@ladisch.de>
Thu, 24 Jan 2008 07:43:16 +0000 (08:43 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 31 Jan 2008 16:30:13 +0000 (17:30 +0100)
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>
sound/pci/oxygen/oxygen_pcm.c

index 272ef08f0a282cb78d92a20266d222ad5dc818ff..2785660957d01af00a63a05bcc254012bad88f82 100644 (file)
@@ -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,