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
1c4b578a
Commit
1c4b578a
authored
Dec 03, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/fix/core' into asoc-linus
parents
dc1ccc48
ebff6547
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
10 deletions
+16
-10
sound/soc/soc-core.c
sound/soc/soc-core.c
+2
-2
sound/soc/soc-devres.c
sound/soc/soc-devres.c
+2
-2
sound/soc/soc-pcm.c
sound/soc/soc-pcm.c
+12
-6
No files found.
sound/soc/soc-core.c
View file @
1c4b578a
...
...
@@ -3212,11 +3212,11 @@ int snd_soc_bytes_get(struct snd_kcontrol *kcontrol,
break
;
case
2
:
((
u16
*
)(
&
ucontrol
->
value
.
bytes
.
data
))[
0
]
&=
~
params
->
mask
;
&=
cpu_to_be16
(
~
params
->
mask
)
;
break
;
case
4
:
((
u32
*
)(
&
ucontrol
->
value
.
bytes
.
data
))[
0
]
&=
~
params
->
mask
;
&=
cpu_to_be32
(
~
params
->
mask
)
;
break
;
default:
return
-
EINVAL
;
...
...
sound/soc/soc-devres.c
View file @
1c4b578a
...
...
@@ -66,7 +66,7 @@ static void devm_card_release(struct device *dev, void *res)
*/
int
devm_snd_soc_register_card
(
struct
device
*
dev
,
struct
snd_soc_card
*
card
)
{
struct
device
**
ptr
;
struct
snd_soc_card
**
ptr
;
int
ret
;
ptr
=
devres_alloc
(
devm_card_release
,
sizeof
(
*
ptr
),
GFP_KERNEL
);
...
...
@@ -75,7 +75,7 @@ int devm_snd_soc_register_card(struct device *dev, struct snd_soc_card *card)
ret
=
snd_soc_register_card
(
card
);
if
(
ret
==
0
)
{
*
ptr
=
dev
;
*
ptr
=
card
;
devres_add
(
dev
,
ptr
);
}
else
{
devres_free
(
ptr
);
...
...
sound/soc/soc-pcm.c
View file @
1c4b578a
...
...
@@ -148,12 +148,12 @@ static void soc_pcm_apply_msb(struct snd_pcm_substream *substream,
}
}
static
void
soc_pcm_init_runtime_hw
(
struct
snd_pcm_
hardware
*
hw
,
static
void
soc_pcm_init_runtime_hw
(
struct
snd_pcm_
runtime
*
runtime
,
struct
snd_soc_pcm_stream
*
codec_stream
,
struct
snd_soc_pcm_stream
*
cpu_stream
)
{
hw
->
rate_min
=
max
(
codec_stream
->
rate_min
,
cpu_stream
->
rate_min
)
;
hw
->
rate_max
=
max
(
codec_stream
->
rate_max
,
cpu_stream
->
rate_max
);
struct
snd_pcm_hardware
*
hw
=
&
runtime
->
hw
;
hw
->
channels_min
=
max
(
codec_stream
->
channels_min
,
cpu_stream
->
channels_min
);
hw
->
channels_max
=
min
(
codec_stream
->
channels_max
,
...
...
@@ -166,6 +166,13 @@ static void soc_pcm_init_runtime_hw(struct snd_pcm_hardware *hw,
if
(
cpu_stream
->
rates
&
(
SNDRV_PCM_RATE_KNOT
|
SNDRV_PCM_RATE_CONTINUOUS
))
hw
->
rates
|=
codec_stream
->
rates
;
snd_pcm_limit_hw_rates
(
runtime
);
hw
->
rate_min
=
max
(
hw
->
rate_min
,
cpu_stream
->
rate_min
);
hw
->
rate_min
=
max
(
hw
->
rate_min
,
codec_stream
->
rate_min
);
hw
->
rate_max
=
min_not_zero
(
hw
->
rate_max
,
cpu_stream
->
rate_max
);
hw
->
rate_max
=
min_not_zero
(
hw
->
rate_max
,
codec_stream
->
rate_max
);
}
/*
...
...
@@ -235,15 +242,14 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
/* Check that the codec and cpu DAIs are compatible */
if
(
substream
->
stream
==
SNDRV_PCM_STREAM_PLAYBACK
)
{
soc_pcm_init_runtime_hw
(
&
runtime
->
hw
,
&
codec_dai_drv
->
playback
,
soc_pcm_init_runtime_hw
(
runtime
,
&
codec_dai_drv
->
playback
,
&
cpu_dai_drv
->
playback
);
}
else
{
soc_pcm_init_runtime_hw
(
&
runtime
->
hw
,
&
codec_dai_drv
->
capture
,
soc_pcm_init_runtime_hw
(
runtime
,
&
codec_dai_drv
->
capture
,
&
cpu_dai_drv
->
capture
);
}
ret
=
-
EINVAL
;
snd_pcm_limit_hw_rates
(
runtime
);
if
(
!
runtime
->
hw
.
rates
)
{
printk
(
KERN_ERR
"ASoC: %s <-> %s No matching rates
\n
"
,
codec_dai
->
name
,
cpu_dai
->
name
);
...
...
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