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>
This commit is contained in:
parent
d43f3010b8
commit
1c5d7b312f
@ -499,6 +499,7 @@ int lola_set_clock_index(struct lola *chip, unsigned int idx);
|
|||||||
int lola_set_clock(struct lola *chip, int idx);
|
int lola_set_clock(struct lola *chip, int idx);
|
||||||
int lola_set_sample_rate(struct lola *chip, int rate);
|
int lola_set_sample_rate(struct lola *chip, int rate);
|
||||||
bool lola_update_ext_clock_freq(struct lola *chip, unsigned int val);
|
bool lola_update_ext_clock_freq(struct lola *chip, unsigned int val);
|
||||||
|
unsigned int lola_sample_rate_convert(unsigned int coded);
|
||||||
|
|
||||||
/* mixer */
|
/* mixer */
|
||||||
int lola_init_pins(struct lola *chip, int dir, int *nidp);
|
int lola_init_pins(struct lola *chip, int dir, int *nidp);
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include <sound/pcm.h>
|
#include <sound/pcm.h>
|
||||||
#include "lola.h"
|
#include "lola.h"
|
||||||
|
|
||||||
static unsigned int sample_rate_convert(unsigned int coded)
|
unsigned int lola_sample_rate_convert(unsigned int coded)
|
||||||
{
|
{
|
||||||
unsigned int freq;
|
unsigned int freq;
|
||||||
|
|
||||||
@ -172,7 +172,7 @@ int __devinit lola_init_clock_widget(struct lola *chip, int nid)
|
|||||||
int format = LOLA_CLOCK_FORMAT_NONE;
|
int format = LOLA_CLOCK_FORMAT_NONE;
|
||||||
bool add_clock = true;
|
bool add_clock = true;
|
||||||
if (type == LOLA_CLOCK_TYPE_INTERNAL) {
|
if (type == LOLA_CLOCK_TYPE_INTERNAL) {
|
||||||
freq = sample_rate_convert(freq);
|
freq = lola_sample_rate_convert(freq);
|
||||||
if (freq < chip->sample_rate_min)
|
if (freq < chip->sample_rate_min)
|
||||||
add_clock = false;
|
add_clock = false;
|
||||||
else if (freq == 48000) {
|
else if (freq == 48000) {
|
||||||
@ -181,7 +181,7 @@ int __devinit lola_init_clock_widget(struct lola *chip, int nid)
|
|||||||
chip->clock.cur_valid = true;
|
chip->clock.cur_valid = true;
|
||||||
}
|
}
|
||||||
} else if (type == LOLA_CLOCK_TYPE_VIDEO) {
|
} else if (type == LOLA_CLOCK_TYPE_VIDEO) {
|
||||||
freq = sample_rate_convert(freq);
|
freq = lola_sample_rate_convert(freq);
|
||||||
if (freq < chip->sample_rate_min)
|
if (freq < chip->sample_rate_min)
|
||||||
add_clock = false;
|
add_clock = false;
|
||||||
/* video clock has a format (0:NTSC, 1:PAL)*/
|
/* 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)
|
|||||||
/* only for current = external clocks */
|
/* only for current = external clocks */
|
||||||
if (chip->clock.sample_clock[chip->clock.cur_index].type !=
|
if (chip->clock.sample_clock[chip->clock.cur_index].type !=
|
||||||
LOLA_CLOCK_TYPE_INTERNAL) {
|
LOLA_CLOCK_TYPE_INTERNAL) {
|
||||||
chip->clock.cur_freq = sample_rate_convert(val & 0x7f);
|
chip->clock.cur_freq = lola_sample_rate_convert(val & 0x7f);
|
||||||
chip->clock.cur_valid = (val & 0x100) != 0;
|
chip->clock.cur_valid = (val & 0x100) != 0;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user