aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-05-03 10:39:37 -0400
committerTakashi Iwai <tiwai@suse.de>2011-05-03 10:40:52 -0400
commit1c5d7b312f9d0e18e2051eac058257db3586f54d (patch)
tree4c805b4c32c1bb5e7e4f49ae34b66b4fbad552c9 /sound/pci
parentd43f3010b8fa7530c3780c087fad9b0a8a437ba1 (diff)
ALSA: lola - Make SRC helper global
Make lola_sample_rate_convert() global so that it can be accessed from other files. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/lola/lola.h1
-rw-r--r--sound/pci/lola/lola_clock.c8
2 files changed, 5 insertions, 4 deletions
diff --git a/sound/pci/lola/lola.h b/sound/pci/lola/lola.h
index 4734c7c6f83e..23831a1a95ad 100644
--- a/sound/pci/lola/lola.h
+++ b/sound/pci/lola/lola.h
@@ -499,6 +499,7 @@ int lola_set_clock_index(struct lola *chip, unsigned int idx);
499int lola_set_clock(struct lola *chip, int idx); 499int lola_set_clock(struct lola *chip, int idx);
500int lola_set_sample_rate(struct lola *chip, int rate); 500int lola_set_sample_rate(struct lola *chip, int rate);
501bool lola_update_ext_clock_freq(struct lola *chip, unsigned int val); 501bool lola_update_ext_clock_freq(struct lola *chip, unsigned int val);
502unsigned int lola_sample_rate_convert(unsigned int coded);
502 503
503/* mixer */ 504/* mixer */
504int lola_init_pins(struct lola *chip, int dir, int *nidp); 505int lola_init_pins(struct lola *chip, int dir, int *nidp);
diff --git a/sound/pci/lola/lola_clock.c b/sound/pci/lola/lola_clock.c
index a364dc67e55f..d2cce39c3474 100644
--- a/sound/pci/lola/lola_clock.c
+++ b/sound/pci/lola/lola_clock.c
@@ -24,7 +24,7 @@
24#include <sound/pcm.h> 24#include <sound/pcm.h>
25#include "lola.h" 25#include "lola.h"
26 26
27static unsigned int sample_rate_convert(unsigned int coded) 27unsigned int lola_sample_rate_convert(unsigned int coded)
28{ 28{
29 unsigned int freq; 29 unsigned int freq;
30 30
@@ -172,7 +172,7 @@ int __devinit lola_init_clock_widget(struct lola *chip, int nid)
172 int format = LOLA_CLOCK_FORMAT_NONE; 172 int format = LOLA_CLOCK_FORMAT_NONE;
173 bool add_clock = true; 173 bool add_clock = true;
174 if (type == LOLA_CLOCK_TYPE_INTERNAL) { 174 if (type == LOLA_CLOCK_TYPE_INTERNAL) {
175 freq = sample_rate_convert(freq); 175 freq = lola_sample_rate_convert(freq);
176 if (freq < chip->sample_rate_min) 176 if (freq < chip->sample_rate_min)
177 add_clock = false; 177 add_clock = false;
178 else if (freq == 48000) { 178 else if (freq == 48000) {
@@ -181,7 +181,7 @@ int __devinit lola_init_clock_widget(struct lola *chip, int nid)
181 chip->clock.cur_valid = true; 181 chip->clock.cur_valid = true;
182 } 182 }
183 } else if (type == LOLA_CLOCK_TYPE_VIDEO) { 183 } else if (type == LOLA_CLOCK_TYPE_VIDEO) {
184 freq = sample_rate_convert(freq); 184 freq = lola_sample_rate_convert(freq);
185 if (freq < chip->sample_rate_min) 185 if (freq < chip->sample_rate_min)
186 add_clock = false; 186 add_clock = false;
187 /* video clock has a format (0:NTSC, 1:PAL)*/ 187 /* video clock has a format (0:NTSC, 1:PAL)*/
@@ -263,7 +263,7 @@ bool lola_update_ext_clock_freq(struct lola *chip, unsigned int val)
263 /* only for current = external clocks */ 263 /* only for current = external clocks */
264 if (chip->clock.sample_clock[chip->clock.cur_index].type != 264 if (chip->clock.sample_clock[chip->clock.cur_index].type !=
265 LOLA_CLOCK_TYPE_INTERNAL) { 265 LOLA_CLOCK_TYPE_INTERNAL) {
266 chip->clock.cur_freq = sample_rate_convert(val & 0x7f); 266 chip->clock.cur_freq = lola_sample_rate_convert(val & 0x7f);
267 chip->clock.cur_valid = (val & 0x100) != 0; 267 chip->clock.cur_valid = (val & 0x100) != 0;
268 } 268 }
269 return true; 269 return true;