aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/oxygen/oxygen.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2008-01-16 02:32:53 -0500
committerJaroslav Kysela <perex@perex.cz>2008-01-31 11:30:00 -0500
commit747c6016ced692db18d7e849e8cbdc523fba0874 (patch)
tree76b4e8652318d090c788e172df03afe65c9a37ce /sound/pci/oxygen/oxygen.c
parentccc80fb467a88ceb7ce1b68546632b91e5ba6c18 (diff)
[ALSA] oxygen: make PCM limits configurable
Add a callback to the model structure to allow modification of the hardware PCM limits. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/oxygen/oxygen.c')
-rw-r--r--sound/pci/oxygen/oxygen.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/pci/oxygen/oxygen.c b/sound/pci/oxygen/oxygen.c
index adf91cc3e1ae..f8e3fd39749d 100644
--- a/sound/pci/oxygen/oxygen.c
+++ b/sound/pci/oxygen/oxygen.c
@@ -163,6 +163,18 @@ static void generic_cleanup(struct oxygen *chip)
163{ 163{
164} 164}
165 165
166static void generic_pcm_hardware_filter(unsigned int channel,
167 struct snd_pcm_hardware *hardware)
168{
169 if (channel == PCM_A) {
170 hardware->rates = SNDRV_PCM_RATE_44100 |
171 SNDRV_PCM_RATE_48000 |
172 SNDRV_PCM_RATE_96000 |
173 SNDRV_PCM_RATE_192000;
174 hardware->rate_min = 44100;
175 }
176}
177
166static void set_ak4396_params(struct oxygen *chip, 178static void set_ak4396_params(struct oxygen *chip,
167 struct snd_pcm_hw_params *params) 179 struct snd_pcm_hw_params *params)
168{ 180{
@@ -262,6 +274,7 @@ static const struct oxygen_model model_generic = {
262 .init = generic_init, 274 .init = generic_init,
263 .control_filter = ak4396_control_filter, 275 .control_filter = ak4396_control_filter,
264 .cleanup = generic_cleanup, 276 .cleanup = generic_cleanup,
277 .pcm_hardware_filter = generic_pcm_hardware_filter,
265 .set_dac_params = set_ak4396_params, 278 .set_dac_params = set_ak4396_params,
266 .set_adc_params = set_wm8785_params, 279 .set_adc_params = set_wm8785_params,
267 .update_dac_volume = update_ak4396_volume, 280 .update_dac_volume = update_ak4396_volume,