aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/oxygen/oxygen_pcm.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2008-01-25 02:37:49 -0500
committerJaroslav Kysela <perex@perex.cz>2008-01-31 11:30:14 -0500
commit976cd62700ae378df330ec82112da3d17e33a0fe (patch)
tree22d31425c0940b8d7105c4914fd944fcc3c2a8d9 /sound/pci/oxygen/oxygen_pcm.c
parent09189ac793d7fef7d0f058815043e3d4bf7097c0 (diff)
[ALSA] oxygen: make the number of analog output configurable
Add a field to struct oxygen_model to allow model drivers for cards with less than eight output channels. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/oxygen/oxygen_pcm.c')
-rw-r--r--sound/pci/oxygen/oxygen_pcm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/pci/oxygen/oxygen_pcm.c b/sound/pci/oxygen/oxygen_pcm.c
index 2785660957d..df1d0cae1da 100644
--- a/sound/pci/oxygen/oxygen_pcm.c
+++ b/sound/pci/oxygen/oxygen_pcm.c
@@ -119,10 +119,15 @@ static int oxygen_open(struct snd_pcm_substream *substream,
119 119
120 runtime->private_data = (void *)(uintptr_t)channel; 120 runtime->private_data = (void *)(uintptr_t)channel;
121 runtime->hw = *oxygen_hardware[channel]; 121 runtime->hw = *oxygen_hardware[channel];
122 if (channel == PCM_C) { 122 switch (channel) {
123 case PCM_C:
123 runtime->hw.rates &= ~(SNDRV_PCM_RATE_32000 | 124 runtime->hw.rates &= ~(SNDRV_PCM_RATE_32000 |
124 SNDRV_PCM_RATE_64000); 125 SNDRV_PCM_RATE_64000);
125 runtime->hw.rate_min = 44100; 126 runtime->hw.rate_min = 44100;
127 break;
128 case PCM_MULTICH:
129 runtime->hw.channels_max = chip->model->dac_channels;
130 break;
126 } 131 }
127 if (chip->model->pcm_hardware_filter) 132 if (chip->model->pcm_hardware_filter)
128 chip->model->pcm_hardware_filter(channel, &runtime->hw); 133 chip->model->pcm_hardware_filter(channel, &runtime->hw);