Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
1c4b578a
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
1c4b578a
编写于
12月 03, 2013
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'asoc/fix/core' into asoc-linus
上级
dc1ccc48
ebff6547
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
10 deletion
+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
未找到文件。
sound/soc/soc-core.c
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录