Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
e814e393
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看板
提交
e814e393
编写于
11月 03, 2013
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'asoc/topic/core' into asoc-next
上级
6367771f
2062b4c5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
33 addition
and
24 deletion
+33
-24
sound/soc/soc-core.c
sound/soc/soc-core.c
+3
-2
sound/soc/soc-pcm.c
sound/soc/soc-pcm.c
+30
-22
未找到文件。
sound/soc/soc-core.c
浏览文件 @
e814e393
...
...
@@ -2551,8 +2551,9 @@ int snd_soc_info_enum_double(struct snd_kcontrol *kcontrol,
if
(
uinfo
->
value
.
enumerated
.
item
>
e
->
max
-
1
)
uinfo
->
value
.
enumerated
.
item
=
e
->
max
-
1
;
strcpy
(
uinfo
->
value
.
enumerated
.
name
,
e
->
texts
[
uinfo
->
value
.
enumerated
.
item
]);
strlcpy
(
uinfo
->
value
.
enumerated
.
name
,
e
->
texts
[
uinfo
->
value
.
enumerated
.
item
],
sizeof
(
uinfo
->
value
.
enumerated
.
name
));
return
0
;
}
EXPORT_SYMBOL_GPL
(
snd_soc_info_enum_double
);
...
...
sound/soc/soc-pcm.c
浏览文件 @
e814e393
...
...
@@ -190,7 +190,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
mutex_lock_nested
(
&
rtd
->
pcm_mutex
,
rtd
->
pcm_subclass
);
/* startup the audio subsystem */
if
(
cpu_dai
->
driver
->
ops
->
startup
)
{
if
(
cpu_dai
->
driver
->
ops
&&
cpu_dai
->
driver
->
ops
->
startup
)
{
ret
=
cpu_dai
->
driver
->
ops
->
startup
(
substream
,
cpu_dai
);
if
(
ret
<
0
)
{
dev_err
(
cpu_dai
->
dev
,
"ASoC: can't open interface"
...
...
@@ -208,7 +208,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
}
}
if
(
codec_dai
->
driver
->
ops
->
startup
)
{
if
(
codec_dai
->
driver
->
ops
&&
codec_dai
->
driver
->
ops
->
startup
)
{
ret
=
codec_dai
->
driver
->
ops
->
startup
(
substream
,
codec_dai
);
if
(
ret
<
0
)
{
dev_err
(
codec_dai
->
dev
,
"ASoC: can't open codec"
...
...
@@ -463,7 +463,7 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
}
}
if
(
codec_dai
->
driver
->
ops
->
prepare
)
{
if
(
codec_dai
->
driver
->
ops
&&
codec_dai
->
driver
->
ops
->
prepare
)
{
ret
=
codec_dai
->
driver
->
ops
->
prepare
(
substream
,
codec_dai
);
if
(
ret
<
0
)
{
dev_err
(
codec_dai
->
dev
,
"ASoC: DAI prepare error: %d
\n
"
,
...
...
@@ -472,7 +472,7 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
}
}
if
(
cpu_dai
->
driver
->
ops
->
prepare
)
{
if
(
cpu_dai
->
driver
->
ops
&&
cpu_dai
->
driver
->
ops
->
prepare
)
{
ret
=
cpu_dai
->
driver
->
ops
->
prepare
(
substream
,
cpu_dai
);
if
(
ret
<
0
)
{
dev_err
(
cpu_dai
->
dev
,
"ASoC: DAI prepare error: %d
\n
"
,
...
...
@@ -523,7 +523,7 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
}
}
if
(
codec_dai
->
driver
->
ops
->
hw_params
)
{
if
(
codec_dai
->
driver
->
ops
&&
codec_dai
->
driver
->
ops
->
hw_params
)
{
ret
=
codec_dai
->
driver
->
ops
->
hw_params
(
substream
,
params
,
codec_dai
);
if
(
ret
<
0
)
{
dev_err
(
codec_dai
->
dev
,
"ASoC: can't set %s hw params:"
...
...
@@ -532,7 +532,7 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
}
}
if
(
cpu_dai
->
driver
->
ops
->
hw_params
)
{
if
(
cpu_dai
->
driver
->
ops
&&
cpu_dai
->
driver
->
ops
->
hw_params
)
{
ret
=
cpu_dai
->
driver
->
ops
->
hw_params
(
substream
,
params
,
cpu_dai
);
if
(
ret
<
0
)
{
dev_err
(
cpu_dai
->
dev
,
"ASoC: %s hw params failed: %d
\n
"
,
...
...
@@ -559,11 +559,11 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
return
ret
;
platform_err:
if
(
cpu_dai
->
driver
->
ops
->
hw_free
)
if
(
cpu_dai
->
driver
->
ops
&&
cpu_dai
->
driver
->
ops
->
hw_free
)
cpu_dai
->
driver
->
ops
->
hw_free
(
substream
,
cpu_dai
);
interface_err:
if
(
codec_dai
->
driver
->
ops
->
hw_free
)
if
(
codec_dai
->
driver
->
ops
&&
codec_dai
->
driver
->
ops
->
hw_free
)
codec_dai
->
driver
->
ops
->
hw_free
(
substream
,
codec_dai
);
codec_err:
...
...
@@ -600,10 +600,10 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
platform
->
driver
->
ops
->
hw_free
(
substream
);
/* now free hw params for the DAIs */
if
(
codec_dai
->
driver
->
ops
->
hw_free
)
if
(
codec_dai
->
driver
->
ops
&&
codec_dai
->
driver
->
ops
->
hw_free
)
codec_dai
->
driver
->
ops
->
hw_free
(
substream
,
codec_dai
);
if
(
cpu_dai
->
driver
->
ops
->
hw_free
)
if
(
cpu_dai
->
driver
->
ops
&&
cpu_dai
->
driver
->
ops
->
hw_free
)
cpu_dai
->
driver
->
ops
->
hw_free
(
substream
,
cpu_dai
);
mutex_unlock
(
&
rtd
->
pcm_mutex
);
...
...
@@ -618,7 +618,7 @@ static int soc_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
struct
snd_soc_dai
*
codec_dai
=
rtd
->
codec_dai
;
int
ret
;
if
(
codec_dai
->
driver
->
ops
->
trigger
)
{
if
(
codec_dai
->
driver
->
ops
&&
codec_dai
->
driver
->
ops
->
trigger
)
{
ret
=
codec_dai
->
driver
->
ops
->
trigger
(
substream
,
cmd
,
codec_dai
);
if
(
ret
<
0
)
return
ret
;
...
...
@@ -630,7 +630,7 @@ static int soc_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
return
ret
;
}
if
(
cpu_dai
->
driver
->
ops
->
trigger
)
{
if
(
cpu_dai
->
driver
->
ops
&&
cpu_dai
->
driver
->
ops
->
trigger
)
{
ret
=
cpu_dai
->
driver
->
ops
->
trigger
(
substream
,
cmd
,
cpu_dai
);
if
(
ret
<
0
)
return
ret
;
...
...
@@ -647,19 +647,20 @@ static int soc_pcm_bespoke_trigger(struct snd_pcm_substream *substream,
struct
snd_soc_dai
*
codec_dai
=
rtd
->
codec_dai
;
int
ret
;
if
(
codec_dai
->
driver
->
ops
->
bespoke_trigger
)
{
if
(
codec_dai
->
driver
->
ops
&&
codec_dai
->
driver
->
ops
->
bespoke_trigger
)
{
ret
=
codec_dai
->
driver
->
ops
->
bespoke_trigger
(
substream
,
cmd
,
codec_dai
);
if
(
ret
<
0
)
return
ret
;
}
if
(
platform
->
driver
->
bespoke_trigger
)
{
if
(
platform
->
driver
->
ops
&&
platform
->
driver
->
bespoke_trigger
)
{
ret
=
platform
->
driver
->
bespoke_trigger
(
substream
,
cmd
);
if
(
ret
<
0
)
return
ret
;
}
if
(
cpu_dai
->
driver
->
ops
->
bespoke_trigger
)
{
if
(
cpu_dai
->
driver
->
ops
&&
cpu_dai
->
driver
->
ops
->
bespoke_trigger
)
{
ret
=
cpu_dai
->
driver
->
ops
->
bespoke_trigger
(
substream
,
cmd
,
cpu_dai
);
if
(
ret
<
0
)
return
ret
;
...
...
@@ -684,10 +685,10 @@ static snd_pcm_uframes_t soc_pcm_pointer(struct snd_pcm_substream *substream)
if
(
platform
->
driver
->
ops
&&
platform
->
driver
->
ops
->
pointer
)
offset
=
platform
->
driver
->
ops
->
pointer
(
substream
);
if
(
cpu_dai
->
driver
->
ops
->
delay
)
if
(
cpu_dai
->
driver
->
ops
&&
cpu_dai
->
driver
->
ops
->
delay
)
delay
+=
cpu_dai
->
driver
->
ops
->
delay
(
substream
,
cpu_dai
);
if
(
codec_dai
->
driver
->
ops
->
delay
)
if
(
codec_dai
->
driver
->
ops
&&
codec_dai
->
driver
->
ops
->
delay
)
delay
+=
codec_dai
->
driver
->
ops
->
delay
(
substream
,
codec_dai
);
if
(
platform
->
driver
->
delay
)
...
...
@@ -1037,6 +1038,12 @@ static int dpcm_be_dai_startup(struct snd_soc_pcm_runtime *fe, int stream)
struct
snd_pcm_substream
*
be_substream
=
snd_soc_dpcm_get_substream
(
be
,
stream
);
if
(
!
be_substream
)
{
dev_err
(
be
->
dev
,
"ASoC: no backend %s stream
\n
"
,
stream
?
"capture"
:
"playback"
);
continue
;
}
/* is this op for this BE ? */
if
(
!
snd_soc_dpcm_be_can_update
(
fe
,
be
,
stream
))
continue
;
...
...
@@ -1054,7 +1061,8 @@ static int dpcm_be_dai_startup(struct snd_soc_pcm_runtime *fe, int stream)
(
be
->
dpcm
[
stream
].
state
!=
SND_SOC_DPCM_STATE_CLOSE
))
continue
;
dev_dbg
(
be
->
dev
,
"ASoC: open BE %s
\n
"
,
be
->
dai_link
->
name
);
dev_dbg
(
be
->
dev
,
"ASoC: open %s BE %s
\n
"
,
stream
?
"capture"
:
"playback"
,
be
->
dai_link
->
name
);
be_substream
->
runtime
=
be
->
dpcm
[
stream
].
runtime
;
err
=
soc_pcm_open
(
be_substream
);
...
...
@@ -1673,7 +1681,7 @@ static int soc_pcm_ioctl(struct snd_pcm_substream *substream,
struct
snd_soc_pcm_runtime
*
rtd
=
substream
->
private_data
;
struct
snd_soc_platform
*
platform
=
rtd
->
platform
;
if
(
platform
->
driver
->
ops
->
ioctl
)
if
(
platform
->
driver
->
ops
&&
platform
->
driver
->
ops
->
ioctl
)
return
platform
->
driver
->
ops
->
ioctl
(
substream
,
cmd
,
arg
);
return
snd_pcm_lib_ioctl
(
substream
,
cmd
,
arg
);
}
...
...
@@ -1934,8 +1942,8 @@ int soc_dpcm_be_digital_mute(struct snd_soc_pcm_runtime *fe, int mute)
dev_dbg
(
be
->
dev
,
"ASoC: BE digital mute %s
\n
"
,
be
->
dai_link
->
name
);
if
(
drv
->
ops
->
digital_mute
&&
dai
->
playback_active
)
drv
->
ops
->
digital_mute
(
dai
,
mute
);
if
(
drv
->
ops
&&
drv
->
ops
->
digital_mute
&&
dai
->
playback_active
)
drv
->
ops
->
digital_mute
(
dai
,
mute
);
}
return
0
;
...
...
@@ -2224,7 +2232,7 @@ EXPORT_SYMBOL_GPL(snd_soc_dpcm_can_be_params);
int
snd_soc_platform_trigger
(
struct
snd_pcm_substream
*
substream
,
int
cmd
,
struct
snd_soc_platform
*
platform
)
{
if
(
platform
->
driver
->
ops
->
trigger
)
if
(
platform
->
driver
->
ops
&&
platform
->
driver
->
ops
->
trigger
)
return
platform
->
driver
->
ops
->
trigger
(
substream
,
cmd
);
return
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录