Commit cd3a08e3 authored by Jean-Paul Saman's avatar Jean-Paul Saman

davinci-audio-aic32.c: cleanup

parent 60eaf398
......@@ -275,6 +275,7 @@ static __inline__ void audio_aic32_write(u8 address, u16 data)
if (tlv320aic32_write_value(address, data) < 0)
printk(KERN_INFO "aic32 write failed for reg = %d\n", address);
}
static __inline__ int audio_aic32_read(u8 address)
{
int val;
......@@ -284,6 +285,7 @@ static __inline__ int audio_aic32_read(u8 address)
printk(KERN_INFO "aic32 read failed for reg = %d\n", address);
return val;
}
void aic32_show_registers(void)
{
int pll, p, j, d;
......@@ -356,6 +358,7 @@ static void enable_line2_input(void)
audio_aic32_write(LINE2L_TO_LEFT_ADC_CTRL_REG, 0x0);
audio_aic32_write(LINE2R_TO_RIGHT_ADC_CTRL_REG, 0x0);
}
static void disable_line2_input(void)
{
audio_aic32_write(LINE2L_TO_LEFT_ADC_CTRL_REG,
......@@ -370,6 +373,7 @@ static void enable_mic_input(void)
audio_aic32_write(MIC3_TO_LEFT_ADC_CTRL_REG, 0x0);
audio_aic32_write(MIC3_TO_RIGHT_ADC_CTRL_REG, 0x0);
}
static void disable_mic_input(void)
{
audio_aic32_write(MIC3_TO_LEFT_ADC_CTRL_REG,
......@@ -377,6 +381,7 @@ static void disable_mic_input(void)
audio_aic32_write(MIC3_TO_RIGHT_ADC_CTRL_REG,
MIC3L_RIGHT_ADC_NOT_CONNECT | MIC3R_RIGHT_ADC_NOT_CONNECT);
}
static int aic32_update(int flag, int val)
{
u16 volume;
......@@ -591,6 +596,7 @@ int oss_recsrc_enum (oss_mixer_enuminfo * ei, const char *s)
return 0;
}
static int mixer_get_recnames(ulong arg)
{
oss_mixer_enuminfo ei;
......@@ -599,6 +605,7 @@ static int mixer_get_recnames(ulong arg)
oss_recsrc_enum(&ei, s);
return copy_to_user((int *)arg, &ei, sizeof(ei));
}
static int mixer_get_recroute(ulong arg)
{
return copy_to_user((int *)arg, &(aic32_local.recsrc),sizeof(int));
......@@ -648,7 +655,6 @@ static int mixer_set_recroute(ulong arg)
return ret;
}
static int
mixer_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg)
{
......@@ -657,8 +663,8 @@ mixer_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg)
int nr = _IOC_NR(cmd);
/*
* choose which input source to use
*/
* choose which input source to use
*/
switch(cmd)
{
case SNDCTL_DSP_GET_RECSRC_NAMES:
......@@ -824,6 +830,7 @@ mixer_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg)
out:
return ret;
}
int davinci_set_samplerate(long sample_rate)
{
u8 count = 0;
......@@ -866,7 +873,6 @@ int davinci_set_samplerate(long sample_rate)
audio_aic32_write(CODEC_DATAPATH_SETUP_REG,
FS_REF_44_1 | LDAC_LCHAN | RDAC_RCHAN);
/* Codec sample rate select */
audio_aic32_write(CODEC_SAMPLERATE_SELECT_REG,
reg_info[count].data);
......@@ -886,7 +892,7 @@ int davinci_set_samplerate(long sample_rate)
audio_aic32_write(PLL_A_REG,
PLL_ENABLE | 0x10 | 0x02);
audio_aic32_write(PLL_B_REG,
0x14); /* J-value */
0x14); /* J-value */
audio_aic32_write(PLL_C_REG,
MSB8BIT(8049)); /* D-value 8-MSB's */
audio_aic32_write(PLL_D_REG,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment