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
97c53e26
Commit
97c53e26
authored
Oct 06, 2014
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/topic/core' into asoc-next
parents
5bcaca4b
e03f73a0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
23 deletions
+19
-23
include/sound/soc.h
include/sound/soc.h
+3
-3
include/trace/events/asoc.h
include/trace/events/asoc.h
+3
-3
sound/soc/soc-core.c
sound/soc/soc-core.c
+13
-17
No files found.
include/sound/soc.h
View file @
97c53e26
...
@@ -912,7 +912,7 @@ struct snd_soc_dai_link {
...
@@ -912,7 +912,7 @@ struct snd_soc_dai_link {
* only for codec to codec links, or systems using device tree.
* only for codec to codec links, or systems using device tree.
*/
*/
const
char
*
cpu_name
;
const
char
*
cpu_name
;
const
struct
device_node
*
cpu_of_node
;
struct
device_node
*
cpu_of_node
;
/*
/*
* You MAY specify the DAI name of the CPU DAI. If this information is
* You MAY specify the DAI name of the CPU DAI. If this information is
* omitted, the CPU-side DAI is matched using .cpu_name/.cpu_of_node
* omitted, the CPU-side DAI is matched using .cpu_name/.cpu_of_node
...
@@ -924,7 +924,7 @@ struct snd_soc_dai_link {
...
@@ -924,7 +924,7 @@ struct snd_soc_dai_link {
* DT/OF node, but not both.
* DT/OF node, but not both.
*/
*/
const
char
*
codec_name
;
const
char
*
codec_name
;
const
struct
device_node
*
codec_of_node
;
struct
device_node
*
codec_of_node
;
/* You MUST specify the DAI name within the codec */
/* You MUST specify the DAI name within the codec */
const
char
*
codec_dai_name
;
const
char
*
codec_dai_name
;
...
@@ -937,7 +937,7 @@ struct snd_soc_dai_link {
...
@@ -937,7 +937,7 @@ struct snd_soc_dai_link {
* do not need a platform.
* do not need a platform.
*/
*/
const
char
*
platform_name
;
const
char
*
platform_name
;
const
struct
device_node
*
platform_of_node
;
struct
device_node
*
platform_of_node
;
int
be_id
;
/* optional ID for machine driver BE identification */
int
be_id
;
/* optional ID for machine driver BE identification */
const
struct
snd_soc_pcm_stream
*
params
;
const
struct
snd_soc_pcm_stream
*
params
;
...
...
include/trace/events/asoc.h
View file @
97c53e26
...
@@ -175,7 +175,7 @@ TRACE_EVENT(snd_soc_dapm_output_path,
...
@@ -175,7 +175,7 @@ TRACE_EVENT(snd_soc_dapm_output_path,
__entry
->
path_sink
=
(
long
)
path
->
sink
;
__entry
->
path_sink
=
(
long
)
path
->
sink
;
),
),
TP_printk
(
"%c%s -> %s -> %s
\n
"
,
TP_printk
(
"%c%s -> %s -> %s"
,
(
int
)
__entry
->
path_sink
&&
(
int
)
__entry
->
path_sink
&&
(
int
)
__entry
->
path_connect
?
'*'
:
' '
,
(
int
)
__entry
->
path_connect
?
'*'
:
' '
,
__get_str
(
wname
),
__get_str
(
pname
),
__get_str
(
psname
))
__get_str
(
wname
),
__get_str
(
pname
),
__get_str
(
psname
))
...
@@ -204,7 +204,7 @@ TRACE_EVENT(snd_soc_dapm_input_path,
...
@@ -204,7 +204,7 @@ TRACE_EVENT(snd_soc_dapm_input_path,
__entry
->
path_source
=
(
long
)
path
->
source
;
__entry
->
path_source
=
(
long
)
path
->
source
;
),
),
TP_printk
(
"%c%s <- %s <- %s
\n
"
,
TP_printk
(
"%c%s <- %s <- %s"
,
(
int
)
__entry
->
path_source
&&
(
int
)
__entry
->
path_source
&&
(
int
)
__entry
->
path_connect
?
'*'
:
' '
,
(
int
)
__entry
->
path_connect
?
'*'
:
' '
,
__get_str
(
wname
),
__get_str
(
pname
),
__get_str
(
psname
))
__get_str
(
wname
),
__get_str
(
pname
),
__get_str
(
psname
))
...
@@ -226,7 +226,7 @@ TRACE_EVENT(snd_soc_dapm_connected,
...
@@ -226,7 +226,7 @@ TRACE_EVENT(snd_soc_dapm_connected,
__entry
->
stream
=
stream
;
__entry
->
stream
=
stream
;
),
),
TP_printk
(
"%s: found %d paths
\n
"
,
TP_printk
(
"%s: found %d paths"
,
__entry
->
stream
?
"capture"
:
"playback"
,
__entry
->
paths
)
__entry
->
stream
?
"capture"
:
"playback"
,
__entry
->
paths
)
);
);
...
...
sound/soc/soc-core.c
View file @
97c53e26
...
@@ -1956,19 +1956,14 @@ static struct platform_driver soc_driver = {
...
@@ -1956,19 +1956,14 @@ static struct platform_driver soc_driver = {
int
snd_soc_new_ac97_codec
(
struct
snd_soc_codec
*
codec
,
int
snd_soc_new_ac97_codec
(
struct
snd_soc_codec
*
codec
,
struct
snd_ac97_bus_ops
*
ops
,
int
num
)
struct
snd_ac97_bus_ops
*
ops
,
int
num
)
{
{
mutex_lock
(
&
codec
->
mutex
);
codec
->
ac97
=
kzalloc
(
sizeof
(
struct
snd_ac97
),
GFP_KERNEL
);
codec
->
ac97
=
kzalloc
(
sizeof
(
struct
snd_ac97
),
GFP_KERNEL
);
if
(
codec
->
ac97
==
NULL
)
{
if
(
codec
->
ac97
==
NULL
)
mutex_unlock
(
&
codec
->
mutex
);
return
-
ENOMEM
;
return
-
ENOMEM
;
}
codec
->
ac97
->
bus
=
kzalloc
(
sizeof
(
struct
snd_ac97_bus
),
GFP_KERNEL
);
codec
->
ac97
->
bus
=
kzalloc
(
sizeof
(
struct
snd_ac97_bus
),
GFP_KERNEL
);
if
(
codec
->
ac97
->
bus
==
NULL
)
{
if
(
codec
->
ac97
->
bus
==
NULL
)
{
kfree
(
codec
->
ac97
);
kfree
(
codec
->
ac97
);
codec
->
ac97
=
NULL
;
codec
->
ac97
=
NULL
;
mutex_unlock
(
&
codec
->
mutex
);
return
-
ENOMEM
;
return
-
ENOMEM
;
}
}
...
@@ -1981,7 +1976,6 @@ int snd_soc_new_ac97_codec(struct snd_soc_codec *codec,
...
@@ -1981,7 +1976,6 @@ int snd_soc_new_ac97_codec(struct snd_soc_codec *codec,
*/
*/
codec
->
ac97_created
=
1
;
codec
->
ac97_created
=
1
;
mutex_unlock
(
&
codec
->
mutex
);
return
0
;
return
0
;
}
}
EXPORT_SYMBOL_GPL
(
snd_soc_new_ac97_codec
);
EXPORT_SYMBOL_GPL
(
snd_soc_new_ac97_codec
);
...
@@ -2151,7 +2145,6 @@ EXPORT_SYMBOL_GPL(snd_soc_set_ac97_ops_of_reset);
...
@@ -2151,7 +2145,6 @@ EXPORT_SYMBOL_GPL(snd_soc_set_ac97_ops_of_reset);
*/
*/
void
snd_soc_free_ac97_codec
(
struct
snd_soc_codec
*
codec
)
void
snd_soc_free_ac97_codec
(
struct
snd_soc_codec
*
codec
)
{
{
mutex_lock
(
&
codec
->
mutex
);
#ifdef CONFIG_SND_SOC_AC97_BUS
#ifdef CONFIG_SND_SOC_AC97_BUS
soc_unregister_ac97_codec
(
codec
);
soc_unregister_ac97_codec
(
codec
);
#endif
#endif
...
@@ -2159,7 +2152,6 @@ void snd_soc_free_ac97_codec(struct snd_soc_codec *codec)
...
@@ -2159,7 +2152,6 @@ void snd_soc_free_ac97_codec(struct snd_soc_codec *codec)
kfree
(
codec
->
ac97
);
kfree
(
codec
->
ac97
);
codec
->
ac97
=
NULL
;
codec
->
ac97
=
NULL
;
codec
->
ac97_created
=
0
;
codec
->
ac97_created
=
0
;
mutex_unlock
(
&
codec
->
mutex
);
}
}
EXPORT_SYMBOL_GPL
(
snd_soc_free_ac97_codec
);
EXPORT_SYMBOL_GPL
(
snd_soc_free_ac97_codec
);
...
@@ -2876,9 +2868,10 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol,
...
@@ -2876,9 +2868,10 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol,
unsigned
int
val
,
val_mask
;
unsigned
int
val
,
val_mask
;
int
ret
;
int
ret
;
val
=
((
ucontrol
->
value
.
integer
.
value
[
0
]
+
min
)
&
mask
);
if
(
invert
)
if
(
invert
)
val
=
max
-
val
;
val
=
(
max
-
ucontrol
->
value
.
integer
.
value
[
0
])
&
mask
;
else
val
=
((
ucontrol
->
value
.
integer
.
value
[
0
]
+
min
)
&
mask
);
val_mask
=
mask
<<
shift
;
val_mask
=
mask
<<
shift
;
val
=
val
<<
shift
;
val
=
val
<<
shift
;
...
@@ -2887,9 +2880,10 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol,
...
@@ -2887,9 +2880,10 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol,
return
ret
;
return
ret
;
if
(
snd_soc_volsw_is_stereo
(
mc
))
{
if
(
snd_soc_volsw_is_stereo
(
mc
))
{
val
=
((
ucontrol
->
value
.
integer
.
value
[
1
]
+
min
)
&
mask
);
if
(
invert
)
if
(
invert
)
val
=
max
-
val
;
val
=
(
max
-
ucontrol
->
value
.
integer
.
value
[
1
])
&
mask
;
else
val
=
((
ucontrol
->
value
.
integer
.
value
[
1
]
+
min
)
&
mask
);
val_mask
=
mask
<<
shift
;
val_mask
=
mask
<<
shift
;
val
=
val
<<
shift
;
val
=
val
<<
shift
;
...
@@ -2934,6 +2928,7 @@ int snd_soc_get_volsw_range(struct snd_kcontrol *kcontrol,
...
@@ -2934,6 +2928,7 @@ int snd_soc_get_volsw_range(struct snd_kcontrol *kcontrol,
if
(
invert
)
if
(
invert
)
ucontrol
->
value
.
integer
.
value
[
0
]
=
ucontrol
->
value
.
integer
.
value
[
0
]
=
max
-
ucontrol
->
value
.
integer
.
value
[
0
];
max
-
ucontrol
->
value
.
integer
.
value
[
0
];
else
ucontrol
->
value
.
integer
.
value
[
0
]
=
ucontrol
->
value
.
integer
.
value
[
0
]
=
ucontrol
->
value
.
integer
.
value
[
0
]
-
min
;
ucontrol
->
value
.
integer
.
value
[
0
]
-
min
;
...
@@ -2946,6 +2941,7 @@ int snd_soc_get_volsw_range(struct snd_kcontrol *kcontrol,
...
@@ -2946,6 +2941,7 @@ int snd_soc_get_volsw_range(struct snd_kcontrol *kcontrol,
if
(
invert
)
if
(
invert
)
ucontrol
->
value
.
integer
.
value
[
1
]
=
ucontrol
->
value
.
integer
.
value
[
1
]
=
max
-
ucontrol
->
value
.
integer
.
value
[
1
];
max
-
ucontrol
->
value
.
integer
.
value
[
1
];
else
ucontrol
->
value
.
integer
.
value
[
1
]
=
ucontrol
->
value
.
integer
.
value
[
1
]
=
ucontrol
->
value
.
integer
.
value
[
1
]
-
min
;
ucontrol
->
value
.
integer
.
value
[
1
]
-
min
;
}
}
...
...
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