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
56f1275b
Commit
56f1275b
authored
Jun 10, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/fix/core' into asoc-linus
parents
97e0002a
4616274d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
27 deletions
+38
-27
include/sound/soc-dapm.h
include/sound/soc-dapm.h
+2
-1
sound/soc/soc-dapm.c
sound/soc/soc-dapm.c
+26
-23
sound/soc/soc-pcm.c
sound/soc/soc-pcm.c
+10
-3
No files found.
include/sound/soc-dapm.h
View file @
56f1275b
...
...
@@ -450,7 +450,8 @@ enum snd_soc_dapm_type {
snd_soc_dapm_aif_in
,
/* audio interface input */
snd_soc_dapm_aif_out
,
/* audio interface output */
snd_soc_dapm_siggen
,
/* signal generator */
snd_soc_dapm_dai
,
/* link to DAI structure */
snd_soc_dapm_dai_in
,
/* link to DAI structure */
snd_soc_dapm_dai_out
,
snd_soc_dapm_dai_link
,
/* link between two DAI structures */
};
...
...
sound/soc/soc-dapm.c
View file @
56f1275b
...
...
@@ -55,7 +55,8 @@ static int dapm_up_seq[] = {
[
snd_soc_dapm_clock_supply
]
=
1
,
[
snd_soc_dapm_micbias
]
=
2
,
[
snd_soc_dapm_dai_link
]
=
2
,
[
snd_soc_dapm_dai
]
=
3
,
[
snd_soc_dapm_dai_in
]
=
3
,
[
snd_soc_dapm_dai_out
]
=
3
,
[
snd_soc_dapm_aif_in
]
=
3
,
[
snd_soc_dapm_aif_out
]
=
3
,
[
snd_soc_dapm_mic
]
=
4
,
...
...
@@ -92,7 +93,8 @@ static int dapm_down_seq[] = {
[
snd_soc_dapm_value_mux
]
=
9
,
[
snd_soc_dapm_aif_in
]
=
10
,
[
snd_soc_dapm_aif_out
]
=
10
,
[
snd_soc_dapm_dai
]
=
10
,
[
snd_soc_dapm_dai_in
]
=
10
,
[
snd_soc_dapm_dai_out
]
=
10
,
[
snd_soc_dapm_dai_link
]
=
11
,
[
snd_soc_dapm_clock_supply
]
=
12
,
[
snd_soc_dapm_regulator_supply
]
=
12
,
...
...
@@ -419,7 +421,8 @@ static void dapm_set_path_status(struct snd_soc_dapm_widget *w,
case
snd_soc_dapm_clock_supply
:
case
snd_soc_dapm_aif_in
:
case
snd_soc_dapm_aif_out
:
case
snd_soc_dapm_dai
:
case
snd_soc_dapm_dai_in
:
case
snd_soc_dapm_dai_out
:
case
snd_soc_dapm_hp
:
case
snd_soc_dapm_mic
:
case
snd_soc_dapm_spk
:
...
...
@@ -820,7 +823,7 @@ static int is_connected_output_ep(struct snd_soc_dapm_widget *widget,
switch
(
widget
->
id
)
{
case
snd_soc_dapm_adc
:
case
snd_soc_dapm_aif_out
:
case
snd_soc_dapm_dai
:
case
snd_soc_dapm_dai
_out
:
if
(
widget
->
active
)
{
widget
->
outputs
=
snd_soc_dapm_suspend_check
(
widget
);
return
widget
->
outputs
;
...
...
@@ -916,7 +919,7 @@ static int is_connected_input_ep(struct snd_soc_dapm_widget *widget,
switch
(
widget
->
id
)
{
case
snd_soc_dapm_dac
:
case
snd_soc_dapm_aif_in
:
case
snd_soc_dapm_dai
:
case
snd_soc_dapm_dai
_in
:
if
(
widget
->
active
)
{
widget
->
inputs
=
snd_soc_dapm_suspend_check
(
widget
);
return
widget
->
inputs
;
...
...
@@ -1135,16 +1138,6 @@ static int dapm_generic_check_power(struct snd_soc_dapm_widget *w)
return
out
!=
0
&&
in
!=
0
;
}
static
int
dapm_dai_check_power
(
struct
snd_soc_dapm_widget
*
w
)
{
DAPM_UPDATE_STAT
(
w
,
power_checks
);
if
(
w
->
active
)
return
w
->
active
;
return
dapm_generic_check_power
(
w
);
}
/* Check to see if an ADC has power */
static
int
dapm_adc_check_power
(
struct
snd_soc_dapm_widget
*
w
)
{
...
...
@@ -2318,7 +2311,8 @@ static int snd_soc_dapm_add_route(struct snd_soc_dapm_context *dapm,
case
snd_soc_dapm_clock_supply
:
case
snd_soc_dapm_aif_in
:
case
snd_soc_dapm_aif_out
:
case
snd_soc_dapm_dai
:
case
snd_soc_dapm_dai_in
:
case
snd_soc_dapm_dai_out
:
case
snd_soc_dapm_dai_link
:
list_add
(
&
path
->
list
,
&
dapm
->
card
->
paths
);
list_add
(
&
path
->
list_sink
,
&
wsink
->
sources
);
...
...
@@ -3129,10 +3123,12 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
break
;
case
snd_soc_dapm_adc
:
case
snd_soc_dapm_aif_out
:
case
snd_soc_dapm_dai_out
:
w
->
power_check
=
dapm_adc_check_power
;
break
;
case
snd_soc_dapm_dac
:
case
snd_soc_dapm_aif_in
:
case
snd_soc_dapm_dai_in
:
w
->
power_check
=
dapm_dac_check_power
;
break
;
case
snd_soc_dapm_pga
:
...
...
@@ -3152,9 +3148,6 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
case
snd_soc_dapm_clock_supply
:
w
->
power_check
=
dapm_supply_check_power
;
break
;
case
snd_soc_dapm_dai
:
w
->
power_check
=
dapm_dai_check_power
;
break
;
default:
w
->
power_check
=
dapm_always_on_check_power
;
break
;
...
...
@@ -3375,7 +3368,7 @@ int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm,
template
.
reg
=
SND_SOC_NOPM
;
if
(
dai
->
driver
->
playback
.
stream_name
)
{
template
.
id
=
snd_soc_dapm_dai
;
template
.
id
=
snd_soc_dapm_dai
_in
;
template
.
name
=
dai
->
driver
->
playback
.
stream_name
;
template
.
sname
=
dai
->
driver
->
playback
.
stream_name
;
...
...
@@ -3393,7 +3386,7 @@ int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm,
}
if
(
dai
->
driver
->
capture
.
stream_name
)
{
template
.
id
=
snd_soc_dapm_dai
;
template
.
id
=
snd_soc_dapm_dai
_out
;
template
.
name
=
dai
->
driver
->
capture
.
stream_name
;
template
.
sname
=
dai
->
driver
->
capture
.
stream_name
;
...
...
@@ -3423,8 +3416,13 @@ int snd_soc_dapm_link_dai_widgets(struct snd_soc_card *card)
/* For each DAI widget... */
list_for_each_entry
(
dai_w
,
&
card
->
widgets
,
list
)
{
if
(
dai_w
->
id
!=
snd_soc_dapm_dai
)
switch
(
dai_w
->
id
)
{
case
snd_soc_dapm_dai_in
:
case
snd_soc_dapm_dai_out
:
break
;
default:
continue
;
}
dai
=
dai_w
->
priv
;
...
...
@@ -3433,8 +3431,13 @@ int snd_soc_dapm_link_dai_widgets(struct snd_soc_card *card)
if
(
w
->
dapm
!=
dai_w
->
dapm
)
continue
;
if
(
w
->
id
==
snd_soc_dapm_dai
)
switch
(
w
->
id
)
{
case
snd_soc_dapm_dai_in
:
case
snd_soc_dapm_dai_out
:
continue
;
default:
break
;
}
if
(
!
w
->
sname
)
continue
;
...
...
sound/soc/soc-pcm.c
View file @
56f1275b
...
...
@@ -928,8 +928,13 @@ static int dpcm_add_paths(struct snd_soc_pcm_runtime *fe, int stream,
/* Create any new FE <--> BE connections */
for
(
i
=
0
;
i
<
list
->
num_widgets
;
i
++
)
{
if
(
list
->
widgets
[
i
]
->
id
!=
snd_soc_dapm_dai
)
switch
(
list
->
widgets
[
i
]
->
id
)
{
case
snd_soc_dapm_dai_in
:
case
snd_soc_dapm_dai_out
:
break
;
default:
continue
;
}
/* is there a valid BE rtd for this widget */
be
=
dpcm_get_be
(
card
,
list
->
widgets
[
i
],
stream
);
...
...
@@ -2011,9 +2016,11 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
if
(
cpu_dai
->
driver
->
capture
.
channels_min
)
capture
=
1
;
}
else
{
if
(
codec_dai
->
driver
->
playback
.
channels_min
)
if
(
codec_dai
->
driver
->
playback
.
channels_min
&&
cpu_dai
->
driver
->
playback
.
channels_min
)
playback
=
1
;
if
(
codec_dai
->
driver
->
capture
.
channels_min
)
if
(
codec_dai
->
driver
->
capture
.
channels_min
&&
cpu_dai
->
driver
->
capture
.
channels_min
)
capture
=
1
;
}
...
...
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