Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
71ae391d
Commit
71ae391d
authored
Jul 09, 2011
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-3.0' into for-3.1
parents
b5d5f59b
18361bbe
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
6 deletions
+22
-6
sound/soc/codecs/tlv320aic26.c
sound/soc/codecs/tlv320aic26.c
+11
-3
sound/soc/codecs/tlv320aic3x.c
sound/soc/codecs/tlv320aic3x.c
+8
-1
sound/soc/soc-core.c
sound/soc/soc-core.c
+3
-2
No files found.
sound/soc/codecs/tlv320aic26.c
View file @
71ae391d
...
@@ -161,10 +161,18 @@ static int aic26_hw_params(struct snd_pcm_substream *substream,
...
@@ -161,10 +161,18 @@ static int aic26_hw_params(struct snd_pcm_substream *substream,
dev_dbg
(
&
aic26
->
spi
->
dev
,
"bad format
\n
"
);
return
-
EINVAL
;
dev_dbg
(
&
aic26
->
spi
->
dev
,
"bad format
\n
"
);
return
-
EINVAL
;
}
}
/* Configure PLL */
/**
* Configure PLL
* fsref = (mclk * PLLM) / 2048
* where PLLM = J.DDDD (DDDD register ranges from 0 to 9999, decimal)
*/
pval
=
1
;
pval
=
1
;
jval
=
(
fsref
==
44100
)
?
7
:
8
;
/* compute J portion of multiplier */
dval
=
(
fsref
==
44100
)
?
5264
:
1920
;
jval
=
fsref
/
(
aic26
->
mclk
/
2048
);
/* compute fractional DDDD component of multiplier */
dval
=
fsref
-
(
jval
*
(
aic26
->
mclk
/
2048
));
dval
=
(
10000
*
dval
)
/
(
aic26
->
mclk
/
2048
);
dev_dbg
(
&
aic26
->
spi
->
dev
,
"Setting PLLM to %d.%04d
\n
"
,
jval
,
dval
);
qval
=
0
;
qval
=
0
;
reg
=
0x8000
|
qval
<<
11
|
pval
<<
8
|
jval
<<
2
;
reg
=
0x8000
|
qval
<<
11
|
pval
<<
8
|
jval
<<
2
;
aic26_reg_write
(
codec
,
AIC26_REG_PLL_PROG1
,
reg
);
aic26_reg_write
(
codec
,
AIC26_REG_PLL_PROG1
,
reg
);
...
...
sound/soc/codecs/tlv320aic3x.c
View file @
71ae391d
...
@@ -1114,12 +1114,19 @@ static int aic3x_set_power(struct snd_soc_codec *codec, int power)
...
@@ -1114,12 +1114,19 @@ static int aic3x_set_power(struct snd_soc_codec *codec, int power)
/* Sync reg_cache with the hardware */
/* Sync reg_cache with the hardware */
codec
->
cache_only
=
0
;
codec
->
cache_only
=
0
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
aic3x_reg
);
i
++
)
for
(
i
=
AIC3X_SAMPLE_RATE_SEL_REG
;
i
<
ARRAY_SIZE
(
aic3x_reg
);
i
++
)
snd_soc_write
(
codec
,
i
,
cache
[
i
]);
snd_soc_write
(
codec
,
i
,
cache
[
i
]);
if
(
aic3x
->
model
==
AIC3X_MODEL_3007
)
if
(
aic3x
->
model
==
AIC3X_MODEL_3007
)
aic3x_init_3007
(
codec
);
aic3x_init_3007
(
codec
);
codec
->
cache_sync
=
0
;
codec
->
cache_sync
=
0
;
}
else
{
}
else
{
/*
* Do soft reset to this codec instance in order to clear
* possible VDD leakage currents in case the supply regulators
* remain on
*/
snd_soc_write
(
codec
,
AIC3X_RESET
,
SOFT_RESET
);
codec
->
cache_sync
=
1
;
aic3x
->
power
=
0
;
aic3x
->
power
=
0
;
/* HW writes are needless when bias is off */
/* HW writes are needless when bias is off */
codec
->
cache_only
=
1
;
codec
->
cache_only
=
1
;
...
...
sound/soc/soc-core.c
View file @
71ae391d
...
@@ -1433,8 +1433,9 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
...
@@ -1433,8 +1433,9 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
"%s"
,
card
->
name
);
"%s"
,
card
->
name
);
snprintf
(
card
->
snd_card
->
longname
,
sizeof
(
card
->
snd_card
->
longname
),
snprintf
(
card
->
snd_card
->
longname
,
sizeof
(
card
->
snd_card
->
longname
),
"%s"
,
card
->
long_name
?
card
->
long_name
:
card
->
name
);
"%s"
,
card
->
long_name
?
card
->
long_name
:
card
->
name
);
snprintf
(
card
->
snd_card
->
driver
,
sizeof
(
card
->
snd_card
->
driver
),
if
(
card
->
driver_name
)
"%s"
,
card
->
driver_name
?
card
->
driver_name
:
card
->
name
);
strlcpy
(
card
->
snd_card
->
driver
,
card
->
driver_name
,
sizeof
(
card
->
snd_card
->
driver
));
if
(
card
->
late_probe
)
{
if
(
card
->
late_probe
)
{
ret
=
card
->
late_probe
(
card
);
ret
=
card
->
late_probe
(
card
);
...
...
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