Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
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
Commits
df1ef7a3
Commit
df1ef7a3
authored
Jun 30, 2009
by
Mark Brown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ASoC: Refresh WM8974 bias configuration
Signed-off-by:
Mark Brown
<
broonie@opensource.wolfsonmicro.com
>
parent
372a14a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
7 deletions
+23
-7
sound/soc/codecs/wm8974.c
sound/soc/codecs/wm8974.c
+23
-7
No files found.
sound/soc/codecs/wm8974.c
View file @
df1ef7a3
...
...
@@ -46,6 +46,9 @@ static const u16 wm8974_reg[WM8974_CACHEREGNUM] = {
0x0000
,
};
#define WM8974_POWER1_BIASEN 0x08
#define WM8974_POWER1_BUFIOEN 0x10
struct
wm8974_priv
{
struct
snd_soc_codec
codec
;
u16
reg_cache
[
WM8974_CACHEREGNUM
];
...
...
@@ -528,22 +531,35 @@ static int wm8974_mute(struct snd_soc_dai *dai, int mute)
static
int
wm8974_set_bias_level
(
struct
snd_soc_codec
*
codec
,
enum
snd_soc_bias_level
level
)
{
u16
power1
=
wm8974_read_reg_cache
(
codec
,
WM8974_POWER1
)
&
~
0x3
;
switch
(
level
)
{
case
SND_SOC_BIAS_ON
:
wm8974_write
(
codec
,
WM8974_POWER1
,
0x1ff
);
wm8974_write
(
codec
,
WM8974_POWER2
,
0x1ff
);
wm8974_write
(
codec
,
WM8974_POWER3
,
0x1ff
);
break
;
case
SND_SOC_BIAS_PREPARE
:
power1
|=
0x1
;
/* VMID 50k */
wm8974_write
(
codec
,
WM8974_POWER1
,
power1
);
break
;
case
SND_SOC_BIAS_STANDBY
:
power1
|=
WM8974_POWER1_BIASEN
|
WM8974_POWER1_BUFIOEN
;
if
(
codec
->
bias_level
==
SND_SOC_BIAS_OFF
)
{
/* Initial cap charge at VMID 5k */
wm8974_write
(
codec
,
WM8974_POWER1
,
power1
|
0x3
);
mdelay
(
100
);
}
power1
|=
0x2
;
/* VMID 500k */
wm8974_write
(
codec
,
WM8974_POWER1
,
power1
);
break
;
case
SND_SOC_BIAS_OFF
:
wm8974_write
(
codec
,
WM8974_POWER1
,
0
x0
);
wm8974_write
(
codec
,
WM8974_POWER2
,
0
x0
);
wm8974_write
(
codec
,
WM8974_POWER3
,
0
x0
);
wm8974_write
(
codec
,
WM8974_POWER1
,
0
);
wm8974_write
(
codec
,
WM8974_POWER2
,
0
);
wm8974_write
(
codec
,
WM8974_POWER3
,
0
);
break
;
}
codec
->
bias_level
=
level
;
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