diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2008-01-16 08:32:53 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-01-31 17:30:00 +0100 |
commit | 747c6016ced692db18d7e849e8cbdc523fba0874 (patch) | |
tree | 76b4e8652318d090c788e172df03afe65c9a37ce /sound/pci/oxygen/oxygen.c | |
parent | ccc80fb467a88ceb7ce1b68546632b91e5ba6c18 (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.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/pci/oxygen/oxygen.c b/sound/pci/oxygen/oxygen.c index adf91cc3e1a..f8e3fd39749 100644 --- a/sound/pci/oxygen/oxygen.c +++ b/sound/pci/oxygen/oxygen.c @@ -163,6 +163,18 @@ static void generic_cleanup(struct oxygen *chip) { } +static void generic_pcm_hardware_filter(unsigned int channel, + struct snd_pcm_hardware *hardware) +{ + if (channel == PCM_A) { + hardware->rates = SNDRV_PCM_RATE_44100 | + SNDRV_PCM_RATE_48000 | + SNDRV_PCM_RATE_96000 | + SNDRV_PCM_RATE_192000; + hardware->rate_min = 44100; + } +} + static void set_ak4396_params(struct oxygen *chip, struct snd_pcm_hw_params *params) { @@ -262,6 +274,7 @@ static const struct oxygen_model model_generic = { .init = generic_init, .control_filter = ak4396_control_filter, .cleanup = generic_cleanup, + .pcm_hardware_filter = generic_pcm_hardware_filter, .set_dac_params = set_ak4396_params, .set_adc_params = set_wm8785_params, .update_dac_volume = update_ak4396_volume, |