Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
bug2833
cloud-kernel
提交
afcfe435
cloud-kernel
项目概览
bug2833
/
cloud-kernel
与 Fork 源项目一致
Fork自
openanolis / cloud-kernel
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
afcfe435
编写于
2月 09, 2015
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'asoc/topic/core' into asoc-next
上级
0cee4db2
8f6f9b29
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
40 addition
and
36 deletion
+40
-36
include/sound/soc-dapm.h
include/sound/soc-dapm.h
+1
-1
sound/soc/soc-core.c
sound/soc/soc-core.c
+35
-25
sound/soc/soc-dapm.c
sound/soc/soc-dapm.c
+4
-10
未找到文件。
include/sound/soc-dapm.h
浏览文件 @
afcfe435
...
...
@@ -405,7 +405,7 @@ int snd_soc_dapm_mux_update_power(struct snd_soc_dapm_context *dapm,
struct
snd_soc_dapm_update
*
update
);
/* dapm sys fs - used by the core */
int
snd_soc_dapm_sys_add
(
struct
device
*
dev
)
;
extern
struct
attribute
*
soc_dapm_dev_attrs
[]
;
void
snd_soc_dapm_debugfs_init
(
struct
snd_soc_dapm_context
*
dapm
,
struct
dentry
*
parent
);
...
...
sound/soc/soc-core.c
浏览文件 @
afcfe435
...
...
@@ -191,6 +191,39 @@ static ssize_t pmdown_time_set(struct device *dev,
static
DEVICE_ATTR
(
pmdown_time
,
0644
,
pmdown_time_show
,
pmdown_time_set
);
static
struct
attribute
*
soc_dev_attrs
[]
=
{
&
dev_attr_codec_reg
.
attr
,
&
dev_attr_pmdown_time
.
attr
,
NULL
};
static
umode_t
soc_dev_attr_is_visible
(
struct
kobject
*
kobj
,
struct
attribute
*
attr
,
int
idx
)
{
struct
device
*
dev
=
kobj_to_dev
(
kobj
);
struct
snd_soc_pcm_runtime
*
rtd
=
dev_get_drvdata
(
dev
);
if
(
attr
==
&
dev_attr_pmdown_time
.
attr
)
return
attr
->
mode
;
/* always visible */
return
rtd
->
codec
?
attr
->
mode
:
0
;
/* enabled only with codec */
}
static
const
struct
attribute_group
soc_dapm_dev_group
=
{
.
attrs
=
soc_dapm_dev_attrs
,
.
is_visible
=
soc_dev_attr_is_visible
,
};
static
const
struct
attribute_group
soc_dev_roup
=
{
.
attrs
=
soc_dev_attrs
,
.
is_visible
=
soc_dev_attr_is_visible
,
};
static
const
struct
attribute_group
*
soc_dev_attr_groups
[]
=
{
&
soc_dapm_dev_group
,
&
soc_dev_roup
,
NULL
};
#ifdef CONFIG_DEBUG_FS
static
ssize_t
codec_reg_read_file
(
struct
file
*
file
,
char
__user
*
user_buf
,
size_t
count
,
loff_t
*
ppos
)
...
...
@@ -949,8 +982,6 @@ static void soc_remove_link_dais(struct snd_soc_card *card, int num, int order)
/* unregister the rtd device */
if
(
rtd
->
dev_registered
)
{
device_remove_file
(
rtd
->
dev
,
&
dev_attr_pmdown_time
);
device_remove_file
(
rtd
->
dev
,
&
dev_attr_codec_reg
);
device_unregister
(
rtd
->
dev
);
rtd
->
dev_registered
=
0
;
}
...
...
@@ -1120,6 +1151,7 @@ static int soc_post_component_init(struct snd_soc_pcm_runtime *rtd,
device_initialize
(
rtd
->
dev
);
rtd
->
dev
->
parent
=
rtd
->
card
->
dev
;
rtd
->
dev
->
release
=
rtd_release
;
rtd
->
dev
->
groups
=
soc_dev_attr_groups
;
dev_set_name
(
rtd
->
dev
,
"%s"
,
name
);
dev_set_drvdata
(
rtd
->
dev
,
rtd
);
mutex_init
(
&
rtd
->
pcm_mutex
);
...
...
@@ -1136,23 +1168,6 @@ static int soc_post_component_init(struct snd_soc_pcm_runtime *rtd,
return
ret
;
}
rtd
->
dev_registered
=
1
;
if
(
rtd
->
codec
)
{
/* add DAPM sysfs entries for this codec */
ret
=
snd_soc_dapm_sys_add
(
rtd
->
dev
);
if
(
ret
<
0
)
dev_err
(
rtd
->
dev
,
"ASoC: failed to add codec dapm sysfs entries: %d
\n
"
,
ret
);
/* add codec sysfs entries */
ret
=
device_create_file
(
rtd
->
dev
,
&
dev_attr_codec_reg
);
if
(
ret
<
0
)
dev_err
(
rtd
->
dev
,
"ASoC: failed to add codec sysfs files: %d
\n
"
,
ret
);
}
return
0
;
}
...
...
@@ -1308,11 +1323,6 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order)
}
#endif
ret
=
device_create_file
(
rtd
->
dev
,
&
dev_attr_pmdown_time
);
if
(
ret
<
0
)
dev_warn
(
rtd
->
dev
,
"ASoC: failed to add pmdown_time sysfs: %d
\n
"
,
ret
);
if
(
cpu_dai
->
driver
->
compress_dai
)
{
/*create compress_device"*/
ret
=
soc_new_compress
(
rtd
,
num
);
...
...
@@ -2383,8 +2393,8 @@ int snd_soc_unregister_card(struct snd_soc_card *card)
card
->
instantiated
=
false
;
snd_soc_dapm_shutdown
(
card
);
soc_cleanup_card_resources
(
card
);
dev_dbg
(
card
->
dev
,
"ASoC: Unregistered card '%s'
\n
"
,
card
->
name
);
}
dev_dbg
(
card
->
dev
,
"ASoC: Unregistered card '%s'
\n
"
,
card
->
name
);
return
0
;
}
...
...
sound/soc/soc-dapm.c
浏览文件 @
afcfe435
...
...
@@ -2127,15 +2127,10 @@ static ssize_t dapm_widget_show(struct device *dev,
static
DEVICE_ATTR
(
dapm_widget
,
0444
,
dapm_widget_show
,
NULL
);
int
snd_soc_dapm_sys_add
(
struct
device
*
dev
)
{
return
device_create_file
(
dev
,
&
dev_attr_dapm_widget
);
}
static
void
snd_soc_dapm_sys_remove
(
struct
device
*
dev
)
{
device_remove_file
(
dev
,
&
dev_attr_dapm_widget
);
}
struct
attribute
*
soc_dapm_dev_attrs
[]
=
{
&
dev_attr_dapm_widget
.
attr
,
NULL
};
static
void
dapm_free_path
(
struct
snd_soc_dapm_path
*
path
)
{
...
...
@@ -3830,7 +3825,6 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_ignore_suspend);
*/
void
snd_soc_dapm_free
(
struct
snd_soc_dapm_context
*
dapm
)
{
snd_soc_dapm_sys_remove
(
dapm
->
dev
);
dapm_debugfs_cleanup
(
dapm
);
dapm_free_widgets
(
dapm
);
list_del
(
&
dapm
->
list
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录