Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
cd3a08e3
Commit
cd3a08e3
authored
Jan 20, 2010
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
davinci-audio-aic32.c: cleanup
parent
60eaf398
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
sound/oss/davinci-audio-aic32.c
sound/oss/davinci-audio-aic32.c
+11
-5
No files found.
sound/oss/davinci-audio-aic32.c
View file @
cd3a08e3
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment