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
f6938bb3
Commit
f6938bb3
authored
Aug 15, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/fix/sgtl5000' into asoc-linus
parents
14388a69
65f2b226
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
sound/soc/codecs/sgtl5000.c
sound/soc/codecs/sgtl5000.c
+14
-4
No files found.
sound/soc/codecs/sgtl5000.c
View file @
f6938bb3
...
@@ -153,6 +153,8 @@ static int mic_bias_event(struct snd_soc_dapm_widget *w,
...
@@ -153,6 +153,8 @@ static int mic_bias_event(struct snd_soc_dapm_widget *w,
static
int
power_vag_event
(
struct
snd_soc_dapm_widget
*
w
,
static
int
power_vag_event
(
struct
snd_soc_dapm_widget
*
w
,
struct
snd_kcontrol
*
kcontrol
,
int
event
)
struct
snd_kcontrol
*
kcontrol
,
int
event
)
{
{
const
u32
mask
=
SGTL5000_DAC_POWERUP
|
SGTL5000_ADC_POWERUP
;
switch
(
event
)
{
switch
(
event
)
{
case
SND_SOC_DAPM_POST_PMU
:
case
SND_SOC_DAPM_POST_PMU
:
snd_soc_update_bits
(
w
->
codec
,
SGTL5000_CHIP_ANA_POWER
,
snd_soc_update_bits
(
w
->
codec
,
SGTL5000_CHIP_ANA_POWER
,
...
@@ -160,9 +162,17 @@ static int power_vag_event(struct snd_soc_dapm_widget *w,
...
@@ -160,9 +162,17 @@ static int power_vag_event(struct snd_soc_dapm_widget *w,
break
;
break
;
case
SND_SOC_DAPM_PRE_PMD
:
case
SND_SOC_DAPM_PRE_PMD
:
snd_soc_update_bits
(
w
->
codec
,
SGTL5000_CHIP_ANA_POWER
,
/*
SGTL5000_VAG_POWERUP
,
0
);
* Don't clear VAG_POWERUP, when both DAC and ADC are
msleep
(
400
);
* operational to prevent inadvertently starving the
* other one of them.
*/
if
((
snd_soc_read
(
w
->
codec
,
SGTL5000_CHIP_ANA_POWER
)
&
mask
)
!=
mask
)
{
snd_soc_update_bits
(
w
->
codec
,
SGTL5000_CHIP_ANA_POWER
,
SGTL5000_VAG_POWERUP
,
0
);
msleep
(
400
);
}
break
;
break
;
default:
default:
break
;
break
;
...
@@ -388,7 +398,7 @@ static const struct snd_kcontrol_new sgtl5000_snd_controls[] = {
...
@@ -388,7 +398,7 @@ static const struct snd_kcontrol_new sgtl5000_snd_controls[] = {
SOC_DOUBLE
(
"Capture Volume"
,
SGTL5000_CHIP_ANA_ADC_CTRL
,
0
,
4
,
0xf
,
0
),
SOC_DOUBLE
(
"Capture Volume"
,
SGTL5000_CHIP_ANA_ADC_CTRL
,
0
,
4
,
0xf
,
0
),
SOC_SINGLE_TLV
(
"Capture Attenuate Switch (-6dB)"
,
SOC_SINGLE_TLV
(
"Capture Attenuate Switch (-6dB)"
,
SGTL5000_CHIP_ANA_ADC_CTRL
,
SGTL5000_CHIP_ANA_ADC_CTRL
,
8
,
2
,
0
,
capture_6db_attenuate
),
8
,
1
,
0
,
capture_6db_attenuate
),
SOC_SINGLE
(
"Capture ZC Switch"
,
SGTL5000_CHIP_ANA_CTRL
,
1
,
1
,
0
),
SOC_SINGLE
(
"Capture ZC Switch"
,
SGTL5000_CHIP_ANA_CTRL
,
1
,
1
,
0
),
SOC_DOUBLE_TLV
(
"Headphone Playback Volume"
,
SOC_DOUBLE_TLV
(
"Headphone Playback Volume"
,
...
...
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