aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/pcm_native.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2007-08-13 11:38:54 -0400
committerJaroslav Kysela <perex@perex.cz>2007-10-16 09:58:53 -0400
commit7653d557606c7cae921557a6a0ebb7c510e458eb (patch)
tree6bda4d9db4f59adfe2afe3413ead7dbd6c45a86e /sound/core/pcm_native.c
parentb83f346bc4d6ab358fd0da85b7eab08bf0234c0b (diff)
[ALSA] pcm: merge rates[] from pcm_misc.c and pcm_native.c
Merge the rates[] arrays from pcm_misc.c and pcm_native.c because they are both the same. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/core/pcm_native.c')
-rw-r--r--sound/core/pcm_native.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 59b29cd482a..b78a411fb55 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -1787,12 +1787,18 @@ static int snd_pcm_hw_rule_sample_bits(struct snd_pcm_hw_params *params,
1787static unsigned int rates[] = { 5512, 8000, 11025, 16000, 22050, 32000, 44100, 1787static unsigned int rates[] = { 5512, 8000, 11025, 16000, 22050, 32000, 44100,
1788 48000, 64000, 88200, 96000, 176400, 192000 }; 1788 48000, 64000, 88200, 96000, 176400, 192000 };
1789 1789
1790const struct snd_pcm_hw_constraint_list snd_pcm_known_rates = {
1791 .count = ARRAY_SIZE(rates),
1792 .list = rates,
1793};
1794
1790static int snd_pcm_hw_rule_rate(struct snd_pcm_hw_params *params, 1795static int snd_pcm_hw_rule_rate(struct snd_pcm_hw_params *params,
1791 struct snd_pcm_hw_rule *rule) 1796 struct snd_pcm_hw_rule *rule)
1792{ 1797{
1793 struct snd_pcm_hardware *hw = rule->private; 1798 struct snd_pcm_hardware *hw = rule->private;
1794 return snd_interval_list(hw_param_interval(params, rule->var), 1799 return snd_interval_list(hw_param_interval(params, rule->var),
1795 ARRAY_SIZE(rates), rates, hw->rates); 1800 snd_pcm_known_rates.count,
1801 snd_pcm_known_rates.list, hw->rates);
1796} 1802}
1797 1803
1798static int snd_pcm_hw_rule_buffer_bytes_max(struct snd_pcm_hw_params *params, 1804static int snd_pcm_hw_rule_buffer_bytes_max(struct snd_pcm_hw_params *params,