Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
19532a24
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
19532a24
编写于
2月 19, 2017
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus
上级
389dcb9d
639467c8
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
71 addition
and
0 deletion
+71
-0
sound/soc/soc-dapm.c
sound/soc/soc-dapm.c
+62
-0
sound/soc/soc-topology.c
sound/soc/soc-topology.c
+9
-0
未找到文件。
sound/soc/soc-dapm.c
浏览文件 @
19532a24
...
...
@@ -363,6 +363,10 @@ static int dapm_kcontrol_data_alloc(struct snd_soc_dapm_widget *widget,
snd_soc_dapm_new_control_unlocked
(
widget
->
dapm
,
&
template
);
kfree
(
name
);
if
(
IS_ERR
(
data
->
widget
))
{
ret
=
PTR_ERR
(
data
->
widget
);
goto
err_data
;
}
if
(
!
data
->
widget
)
{
ret
=
-
ENOMEM
;
goto
err_data
;
...
...
@@ -397,6 +401,10 @@ static int dapm_kcontrol_data_alloc(struct snd_soc_dapm_widget *widget,
data
->
widget
=
snd_soc_dapm_new_control_unlocked
(
widget
->
dapm
,
&
template
);
kfree
(
name
);
if
(
IS_ERR
(
data
->
widget
))
{
ret
=
PTR_ERR
(
data
->
widget
);
goto
err_data
;
}
if
(
!
data
->
widget
)
{
ret
=
-
ENOMEM
;
goto
err_data
;
...
...
@@ -3403,11 +3411,22 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
mutex_lock_nested
(
&
dapm
->
card
->
dapm_mutex
,
SND_SOC_DAPM_CLASS_RUNTIME
);
w
=
snd_soc_dapm_new_control_unlocked
(
dapm
,
widget
);
/* Do not nag about probe deferrals */
if
(
IS_ERR
(
w
))
{
int
ret
=
PTR_ERR
(
w
);
if
(
ret
!=
-
EPROBE_DEFER
)
dev_err
(
dapm
->
dev
,
"ASoC: Failed to create DAPM control %s (%d)
\n
"
,
widget
->
name
,
ret
);
goto
out_unlock
;
}
if
(
!
w
)
dev_err
(
dapm
->
dev
,
"ASoC: Failed to create DAPM control %s
\n
"
,
widget
->
name
);
out_unlock:
mutex_unlock
(
&
dapm
->
card
->
dapm_mutex
);
return
w
;
}
...
...
@@ -3430,6 +3449,8 @@ snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm,
w
->
regulator
=
devm_regulator_get
(
dapm
->
dev
,
w
->
name
);
if
(
IS_ERR
(
w
->
regulator
))
{
ret
=
PTR_ERR
(
w
->
regulator
);
if
(
ret
==
-
EPROBE_DEFER
)
return
ERR_PTR
(
ret
);
dev_err
(
dapm
->
dev
,
"ASoC: Failed to request %s: %d
\n
"
,
w
->
name
,
ret
);
return
NULL
;
...
...
@@ -3448,6 +3469,8 @@ snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm,
w
->
clk
=
devm_clk_get
(
dapm
->
dev
,
w
->
name
);
if
(
IS_ERR
(
w
->
clk
))
{
ret
=
PTR_ERR
(
w
->
clk
);
if
(
ret
==
-
EPROBE_DEFER
)
return
ERR_PTR
(
ret
);
dev_err
(
dapm
->
dev
,
"ASoC: Failed to request %s: %d
\n
"
,
w
->
name
,
ret
);
return
NULL
;
...
...
@@ -3566,6 +3589,16 @@ int snd_soc_dapm_new_controls(struct snd_soc_dapm_context *dapm,
mutex_lock_nested
(
&
dapm
->
card
->
dapm_mutex
,
SND_SOC_DAPM_CLASS_INIT
);
for
(
i
=
0
;
i
<
num
;
i
++
)
{
w
=
snd_soc_dapm_new_control_unlocked
(
dapm
,
widget
);
if
(
IS_ERR
(
w
))
{
ret
=
PTR_ERR
(
w
);
/* Do not nag about probe deferrals */
if
(
ret
==
-
EPROBE_DEFER
)
break
;
dev_err
(
dapm
->
dev
,
"ASoC: Failed to create DAPM control %s (%d)
\n
"
,
widget
->
name
,
ret
);
break
;
}
if
(
!
w
)
{
dev_err
(
dapm
->
dev
,
"ASoC: Failed to create DAPM control %s
\n
"
,
...
...
@@ -3842,6 +3875,15 @@ int snd_soc_dapm_new_pcm(struct snd_soc_card *card,
dev_dbg
(
card
->
dev
,
"ASoC: adding %s widget
\n
"
,
link_name
);
w
=
snd_soc_dapm_new_control_unlocked
(
&
card
->
dapm
,
&
template
);
if
(
IS_ERR
(
w
))
{
ret
=
PTR_ERR
(
w
);
/* Do not nag about probe deferrals */
if
(
ret
!=
-
EPROBE_DEFER
)
dev_err
(
card
->
dev
,
"ASoC: Failed to create %s widget (%d)
\n
"
,
link_name
,
ret
);
goto
outfree_kcontrol_news
;
}
if
(
!
w
)
{
dev_err
(
card
->
dev
,
"ASoC: Failed to create %s widget
\n
"
,
link_name
);
...
...
@@ -3893,6 +3935,16 @@ int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm,
template
.
name
);
w
=
snd_soc_dapm_new_control_unlocked
(
dapm
,
&
template
);
if
(
IS_ERR
(
w
))
{
int
ret
=
PTR_ERR
(
w
);
/* Do not nag about probe deferrals */
if
(
ret
!=
-
EPROBE_DEFER
)
dev_err
(
dapm
->
dev
,
"ASoC: Failed to create %s widget (%d)
\n
"
,
dai
->
driver
->
playback
.
stream_name
,
ret
);
return
ret
;
}
if
(
!
w
)
{
dev_err
(
dapm
->
dev
,
"ASoC: Failed to create %s widget
\n
"
,
dai
->
driver
->
playback
.
stream_name
);
...
...
@@ -3912,6 +3964,16 @@ int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm,
template
.
name
);
w
=
snd_soc_dapm_new_control_unlocked
(
dapm
,
&
template
);
if
(
IS_ERR
(
w
))
{
int
ret
=
PTR_ERR
(
w
);
/* Do not nag about probe deferrals */
if
(
ret
!=
-
EPROBE_DEFER
)
dev_err
(
dapm
->
dev
,
"ASoC: Failed to create %s widget (%d)
\n
"
,
dai
->
driver
->
playback
.
stream_name
,
ret
);
return
ret
;
}
if
(
!
w
)
{
dev_err
(
dapm
->
dev
,
"ASoC: Failed to create %s widget
\n
"
,
dai
->
driver
->
capture
.
stream_name
);
...
...
sound/soc/soc-topology.c
浏览文件 @
19532a24
...
...
@@ -1555,6 +1555,15 @@ static int soc_tplg_dapm_widget_create(struct soc_tplg *tplg,
widget
=
snd_soc_dapm_new_control
(
dapm
,
&
template
);
else
widget
=
snd_soc_dapm_new_control_unlocked
(
dapm
,
&
template
);
if
(
IS_ERR
(
widget
))
{
ret
=
PTR_ERR
(
widget
);
/* Do not nag about probe deferrals */
if
(
ret
!=
-
EPROBE_DEFER
)
dev_err
(
tplg
->
dev
,
"ASoC: failed to create widget %s controls (%d)
\n
"
,
w
->
name
,
ret
);
goto
hdr_err
;
}
if
(
widget
==
NULL
)
{
dev_err
(
tplg
->
dev
,
"ASoC: failed to create widget %s controls
\n
"
,
w
->
name
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录