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) ...@@ -275,6 +275,7 @@ static __inline__ void audio_aic32_write(u8 address, u16 data)
if (tlv320aic32_write_value(address, data) < 0) if (tlv320aic32_write_value(address, data) < 0)
printk(KERN_INFO "aic32 write failed for reg = %d\n", address); printk(KERN_INFO "aic32 write failed for reg = %d\n", address);
} }
static __inline__ int audio_aic32_read(u8 address) static __inline__ int audio_aic32_read(u8 address)
{ {
int val; int val;
...@@ -284,6 +285,7 @@ static __inline__ int audio_aic32_read(u8 address) ...@@ -284,6 +285,7 @@ static __inline__ int audio_aic32_read(u8 address)
printk(KERN_INFO "aic32 read failed for reg = %d\n", address); printk(KERN_INFO "aic32 read failed for reg = %d\n", address);
return val; return val;
} }
void aic32_show_registers(void) void aic32_show_registers(void)
{ {
int pll, p, j, d; int pll, p, j, d;
...@@ -356,6 +358,7 @@ static void enable_line2_input(void) ...@@ -356,6 +358,7 @@ static void enable_line2_input(void)
audio_aic32_write(LINE2L_TO_LEFT_ADC_CTRL_REG, 0x0); audio_aic32_write(LINE2L_TO_LEFT_ADC_CTRL_REG, 0x0);
audio_aic32_write(LINE2R_TO_RIGHT_ADC_CTRL_REG, 0x0); audio_aic32_write(LINE2R_TO_RIGHT_ADC_CTRL_REG, 0x0);
} }
static void disable_line2_input(void) static void disable_line2_input(void)
{ {
audio_aic32_write(LINE2L_TO_LEFT_ADC_CTRL_REG, audio_aic32_write(LINE2L_TO_LEFT_ADC_CTRL_REG,
...@@ -370,6 +373,7 @@ static void enable_mic_input(void) ...@@ -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_LEFT_ADC_CTRL_REG, 0x0);
audio_aic32_write(MIC3_TO_RIGHT_ADC_CTRL_REG, 0x0); audio_aic32_write(MIC3_TO_RIGHT_ADC_CTRL_REG, 0x0);
} }
static void disable_mic_input(void) static void disable_mic_input(void)
{ {
audio_aic32_write(MIC3_TO_LEFT_ADC_CTRL_REG, audio_aic32_write(MIC3_TO_LEFT_ADC_CTRL_REG,
...@@ -377,6 +381,7 @@ static void disable_mic_input(void) ...@@ -377,6 +381,7 @@ static void disable_mic_input(void)
audio_aic32_write(MIC3_TO_RIGHT_ADC_CTRL_REG, audio_aic32_write(MIC3_TO_RIGHT_ADC_CTRL_REG,
MIC3L_RIGHT_ADC_NOT_CONNECT | MIC3R_RIGHT_ADC_NOT_CONNECT); MIC3L_RIGHT_ADC_NOT_CONNECT | MIC3R_RIGHT_ADC_NOT_CONNECT);
} }
static int aic32_update(int flag, int val) static int aic32_update(int flag, int val)
{ {
u16 volume; u16 volume;
...@@ -591,6 +596,7 @@ int oss_recsrc_enum (oss_mixer_enuminfo * ei, const char *s) ...@@ -591,6 +596,7 @@ int oss_recsrc_enum (oss_mixer_enuminfo * ei, const char *s)
return 0; return 0;
} }
static int mixer_get_recnames(ulong arg) static int mixer_get_recnames(ulong arg)
{ {
oss_mixer_enuminfo ei; oss_mixer_enuminfo ei;
...@@ -599,6 +605,7 @@ static int mixer_get_recnames(ulong arg) ...@@ -599,6 +605,7 @@ static int mixer_get_recnames(ulong arg)
oss_recsrc_enum(&ei, s); oss_recsrc_enum(&ei, s);
return copy_to_user((int *)arg, &ei, sizeof(ei)); return copy_to_user((int *)arg, &ei, sizeof(ei));
} }
static int mixer_get_recroute(ulong arg) static int mixer_get_recroute(ulong arg)
{ {
return copy_to_user((int *)arg, &(aic32_local.recsrc),sizeof(int)); return copy_to_user((int *)arg, &(aic32_local.recsrc),sizeof(int));
...@@ -648,7 +655,6 @@ static int mixer_set_recroute(ulong arg) ...@@ -648,7 +655,6 @@ static int mixer_set_recroute(ulong arg)
return ret; return ret;
} }
static int static int
mixer_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg) mixer_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg)
{ {
...@@ -824,6 +830,7 @@ mixer_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg) ...@@ -824,6 +830,7 @@ mixer_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg)
out: out:
return ret; return ret;
} }
int davinci_set_samplerate(long sample_rate) int davinci_set_samplerate(long sample_rate)
{ {
u8 count = 0; u8 count = 0;
...@@ -866,7 +873,6 @@ int davinci_set_samplerate(long sample_rate) ...@@ -866,7 +873,6 @@ int davinci_set_samplerate(long sample_rate)
audio_aic32_write(CODEC_DATAPATH_SETUP_REG, audio_aic32_write(CODEC_DATAPATH_SETUP_REG,
FS_REF_44_1 | LDAC_LCHAN | RDAC_RCHAN); FS_REF_44_1 | LDAC_LCHAN | RDAC_RCHAN);
/* Codec sample rate select */ /* Codec sample rate select */
audio_aic32_write(CODEC_SAMPLERATE_SELECT_REG, audio_aic32_write(CODEC_SAMPLERATE_SELECT_REG,
reg_info[count].data); reg_info[count].data);
......
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