Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
2914b700
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
161
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2914b700
编写于
6月 05, 2015
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'asoc/topic/core' into asoc-next
上级
f1363c40
3e0aa8d8
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
23 addition
and
21 deletion
+23
-21
sound/soc/soc-core.c
sound/soc/soc-core.c
+23
-21
未找到文件。
sound/soc/soc-core.c
浏览文件 @
2914b700
...
...
@@ -92,30 +92,21 @@ static int format_register_str(struct snd_soc_codec *codec,
int
wordsize
=
min_bytes_needed
(
codec
->
driver
->
reg_cache_size
)
*
2
;
int
regsize
=
codec
->
driver
->
reg_word_size
*
2
;
int
ret
;
char
tmpbuf
[
len
+
1
];
char
regbuf
[
regsize
+
1
];
/* since tmpbuf is allocated on the stack, warn the callers if they
* try to abuse this function */
WARN_ON
(
len
>
63
);
/* +2 for ': ' and + 1 for '\n' */
if
(
wordsize
+
regsize
+
2
+
1
!=
len
)
return
-
EINVAL
;
ret
=
snd_soc_read
(
codec
,
reg
);
if
(
ret
<
0
)
{
memset
(
regbuf
,
'X'
,
regsize
);
regbuf
[
regsize
]
=
'\0'
;
}
else
{
snprintf
(
regbuf
,
regsize
+
1
,
"%.*x"
,
regsize
,
ret
);
}
/* prepare the buffer */
snprintf
(
tmpbuf
,
len
+
1
,
"%.*x: %s
\n
"
,
wordsize
,
reg
,
regbuf
);
/* copy it back to the caller without the '\0' */
memcpy
(
buf
,
tmpbuf
,
len
);
sprintf
(
buf
,
"%.*x: "
,
wordsize
,
reg
);
buf
+=
wordsize
+
2
;
ret
=
snd_soc_read
(
codec
,
reg
);
if
(
ret
<
0
)
memset
(
buf
,
'X'
,
regsize
);
else
sprintf
(
buf
,
"%.*x"
,
regsize
,
ret
);
buf
[
regsize
]
=
'\n'
;
/* no NUL-termination needed */
return
0
;
}
...
...
@@ -904,12 +895,17 @@ static struct snd_soc_dai *snd_soc_find_dai(
{
struct
snd_soc_component
*
component
;
struct
snd_soc_dai
*
dai
;
struct
device_node
*
component_of_node
;
lockdep_assert_held
(
&
client_mutex
);
/* Find CPU DAI from registered DAIs*/
list_for_each_entry
(
component
,
&
component_list
,
list
)
{
if
(
dlc
->
of_node
&&
component
->
dev
->
of_node
!=
dlc
->
of_node
)
component_of_node
=
component
->
dev
->
of_node
;
if
(
!
component_of_node
&&
component
->
dev
->
parent
)
component_of_node
=
component
->
dev
->
parent
->
of_node
;
if
(
dlc
->
of_node
&&
component_of_node
!=
dlc
->
of_node
)
continue
;
if
(
dlc
->
name
&&
strcmp
(
component
->
name
,
dlc
->
name
))
continue
;
...
...
@@ -2599,7 +2595,8 @@ static int snd_soc_register_dais(struct snd_soc_component *component,
* the same naming style even though those DAIs are not
* component-less anymore.
*/
if
(
count
==
1
&&
legacy_dai_naming
)
{
if
(
count
==
1
&&
legacy_dai_naming
&&
(
dai_drv
[
i
].
id
==
0
||
dai_drv
[
i
].
name
==
NULL
))
{
dai
->
name
=
fmt_single_name
(
dev
,
&
dai
->
id
);
}
else
{
dai
->
name
=
fmt_multiple_name
(
dev
,
&
dai_drv
[
i
]);
...
...
@@ -3488,11 +3485,16 @@ static int snd_soc_get_dai_name(struct of_phandle_args *args,
const
char
**
dai_name
)
{
struct
snd_soc_component
*
pos
;
struct
device_node
*
component_of_node
;
int
ret
=
-
EPROBE_DEFER
;
mutex_lock
(
&
client_mutex
);
list_for_each_entry
(
pos
,
&
component_list
,
list
)
{
if
(
pos
->
dev
->
of_node
!=
args
->
np
)
component_of_node
=
pos
->
dev
->
of_node
;
if
(
!
component_of_node
&&
pos
->
dev
->
parent
)
component_of_node
=
pos
->
dev
->
parent
->
of_node
;
if
(
component_of_node
!=
args
->
np
)
continue
;
if
(
pos
->
driver
->
of_xlate_dai_name
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录