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
Kirill Smelkov
linux
Commits
699ba454
Commit
699ba454
authored
Feb 11, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/topic/wm8993' into asoc-next
parents
63ddcd7b
6757d8cc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
19 deletions
+22
-19
sound/soc/codecs/wm8983.c
sound/soc/codecs/wm8983.c
+22
-19
No files found.
sound/soc/codecs/wm8983.c
View file @
699ba454
...
@@ -851,19 +851,20 @@ static int wm8983_set_pll(struct snd_soc_dai *dai, int pll_id,
...
@@ -851,19 +851,20 @@ static int wm8983_set_pll(struct snd_soc_dai *dai, int pll_id,
struct
pll_div
pll_div
;
struct
pll_div
pll_div
;
codec
=
dai
->
codec
;
codec
=
dai
->
codec
;
if
(
freq_in
&&
freq_out
)
{
if
(
!
freq_in
||
!
freq_out
)
{
/* disable the PLL */
snd_soc_update_bits
(
codec
,
WM8983_POWER_MANAGEMENT_1
,
WM8983_PLLEN_MASK
,
0
);
return
0
;
}
else
{
ret
=
pll_factors
(
&
pll_div
,
freq_out
*
4
*
2
,
freq_in
);
ret
=
pll_factors
(
&
pll_div
,
freq_out
*
4
*
2
,
freq_in
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
}
/* disable the PLL before re-programming it */
/* disable the PLL before re-programming it */
snd_soc_update_bits
(
codec
,
WM8983_POWER_MANAGEMENT_1
,
snd_soc_update_bits
(
codec
,
WM8983_POWER_MANAGEMENT_1
,
WM8983_PLLEN_MASK
,
0
);
WM8983_PLLEN_MASK
,
0
);
if
(
!
freq_in
||
!
freq_out
)
return
0
;
/* set PLLN and PRESCALE */
/* set PLLN and PRESCALE */
snd_soc_write
(
codec
,
WM8983_PLL_N
,
snd_soc_write
(
codec
,
WM8983_PLL_N
,
(
pll_div
.
div2
<<
WM8983_PLL_PRESCALE_SHIFT
)
(
pll_div
.
div2
<<
WM8983_PLL_PRESCALE_SHIFT
)
...
@@ -875,6 +876,8 @@ static int wm8983_set_pll(struct snd_soc_dai *dai, int pll_id,
...
@@ -875,6 +876,8 @@ static int wm8983_set_pll(struct snd_soc_dai *dai, int pll_id,
/* enable the PLL */
/* enable the PLL */
snd_soc_update_bits
(
codec
,
WM8983_POWER_MANAGEMENT_1
,
snd_soc_update_bits
(
codec
,
WM8983_POWER_MANAGEMENT_1
,
WM8983_PLLEN_MASK
,
WM8983_PLLEN
);
WM8983_PLLEN_MASK
,
WM8983_PLLEN
);
}
return
0
;
return
0
;
}
}
...
...
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