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
f6d655a6
Commit
f6d655a6
authored
Apr 13, 2009
by
Mark Brown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ASoC: Support DAPM events for DACs and ADCs
Signed-off-by:
Mark Brown
<
broonie@opensource.wolfsonmicro.com
>
parent
025756ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
6 deletions
+20
-6
include/sound/soc-dapm.h
include/sound/soc-dapm.h
+10
-0
sound/soc/soc-dapm.c
sound/soc/soc-dapm.c
+10
-6
No files found.
include/sound/soc-dapm.h
View file @
f6d655a6
...
...
@@ -140,9 +140,19 @@
#define SND_SOC_DAPM_DAC(wname, stname, wreg, wshift, winvert) \
{ .id = snd_soc_dapm_dac, .name = wname, .sname = stname, .reg = wreg, \
.shift = wshift, .invert = winvert}
#define SND_SOC_DAPM_DAC_E(wname, stname, wreg, wshift, winvert, \
wevent, wflags) \
{ .id = snd_soc_dapm_dac, .name = wname, .sname = stname, .reg = wreg, \
.shift = wshift, .invert = winvert, \
.event = wevent, .event_flags = wflags}
#define SND_SOC_DAPM_ADC(wname, stname, wreg, wshift, winvert) \
{ .id = snd_soc_dapm_adc, .name = wname, .sname = stname, .reg = wreg, \
.shift = wshift, .invert = winvert}
#define SND_SOC_DAPM_ADC_E(wname, stname, wreg, wshift, winvert, \
wevent, wflags) \
{ .id = snd_soc_dapm_adc, .name = wname, .sname = stname, .reg = wreg, \
.shift = wshift, .invert = winvert, \
.event = wevent, .event_flags = wflags}
/* generic register modifier widget */
#define SND_SOC_DAPM_REG(wid, wname, wreg, wshift, wmask, won_val, woff_val) \
...
...
sound/soc/soc-dapm.c
View file @
f6d655a6
...
...
@@ -598,18 +598,22 @@ static int dapm_power_widget(struct snd_soc_codec *codec, int event,
if
(
w
->
id
==
snd_soc_dapm_adc
&&
w
->
active
)
{
in
=
is_connected_input_ep
(
w
);
dapm_clear_walk
(
w
->
codec
);
w
->
power
=
(
in
!=
0
)
?
1
:
0
;
dapm_update_bits
(
w
);
return
0
;
power
=
(
in
!=
0
)
?
1
:
0
;
if
(
power
==
w
->
power
)
return
0
;
w
->
power
=
power
;
return
dapm_generic_apply_power
(
w
);
}
/* active DAC */
if
(
w
->
id
==
snd_soc_dapm_dac
&&
w
->
active
)
{
out
=
is_connected_output_ep
(
w
);
dapm_clear_walk
(
w
->
codec
);
w
->
power
=
(
out
!=
0
)
?
1
:
0
;
dapm_update_bits
(
w
);
return
0
;
power
=
(
out
!=
0
)
?
1
:
0
;
if
(
power
==
w
->
power
)
return
0
;
w
->
power
=
power
;
return
dapm_generic_apply_power
(
w
);
}
/* pre and post event widgets */
...
...
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