Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
6afff9e0
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看板
提交
6afff9e0
编写于
6月 22, 2015
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'asoc/topic/simple' into asoc-next
上级
71d8c2d7
85a4bfd8
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
20 addition
and
4 deletion
+20
-4
Documentation/devicetree/bindings/sound/simple-card.txt
Documentation/devicetree/bindings/sound/simple-card.txt
+5
-1
sound/soc/generic/simple-card.c
sound/soc/generic/simple-card.c
+15
-3
未找到文件。
Documentation/devicetree/bindings/sound/simple-card.txt
浏览文件 @
6afff9e0
...
...
@@ -16,7 +16,8 @@ Optional properties:
connection's sink, the second being the connection's
source.
- simple-audio-card,mclk-fs : Multiplication factor between stream rate and codec
mclk.
mclk. When defined, mclk-fs property defined in
dai-link sub nodes are ignored.
- simple-audio-card,hp-det-gpio : Reference to GPIO that signals when
headphones are attached.
- simple-audio-card,mic-det-gpio : Reference to GPIO that signals when
...
...
@@ -55,6 +56,9 @@ Optional dai-link subnode properties:
dai-link uses bit clock inversion.
- frame-inversion : bool property. Add this if the
dai-link uses frame clock inversion.
- mclk-fs : Multiplication factor between stream
rate and codec mclk, applied only for
the dai-link.
For backward compatibility the frame-master and bitclock-master
properties can be used as booleans in codec subnode to indicate if the
...
...
sound/soc/generic/simple-card.c
浏览文件 @
6afff9e0
...
...
@@ -26,6 +26,7 @@ struct simple_card_data {
struct
simple_dai_props
{
struct
asoc_simple_dai
cpu_dai
;
struct
asoc_simple_dai
codec_dai
;
unsigned
int
mclk_fs
;
}
*
dai_props
;
unsigned
int
mclk_fs
;
int
gpio_hp_det
;
...
...
@@ -76,11 +77,18 @@ static int asoc_simple_card_hw_params(struct snd_pcm_substream *substream,
struct
snd_soc_pcm_runtime
*
rtd
=
substream
->
private_data
;
struct
snd_soc_dai
*
codec_dai
=
rtd
->
codec_dai
;
struct
simple_card_data
*
priv
=
snd_soc_card_get_drvdata
(
rtd
->
card
);
unsigned
int
mclk
;
struct
simple_dai_props
*
dai_props
=
&
priv
->
dai_props
[
rtd
-
rtd
->
card
->
rtd
];
unsigned
int
mclk
,
mclk_fs
=
0
;
int
ret
=
0
;
if
(
priv
->
mclk_fs
)
{
mclk
=
params_rate
(
params
)
*
priv
->
mclk_fs
;
if
(
priv
->
mclk_fs
)
mclk_fs
=
priv
->
mclk_fs
;
else
if
(
dai_props
->
mclk_fs
)
mclk_fs
=
dai_props
->
mclk_fs
;
if
(
mclk_fs
)
{
mclk
=
params_rate
(
params
)
*
mclk_fs
;
ret
=
snd_soc_dai_set_sysclk
(
codec_dai
,
0
,
mclk
,
SND_SOC_CLOCK_IN
);
}
...
...
@@ -313,6 +321,7 @@ static int asoc_simple_card_dai_link_of(struct device_node *node,
char
prop
[
128
];
char
*
prefix
=
""
;
int
ret
,
cpu_args
;
u32
val
;
/* For single DAI link & old style of DT node */
if
(
is_top_level_node
)
...
...
@@ -338,6 +347,9 @@ static int asoc_simple_card_dai_link_of(struct device_node *node,
if
(
ret
<
0
)
goto
dai_link_of_err
;
if
(
!
of_property_read_u32
(
node
,
"mclk-fs"
,
&
val
))
dai_props
->
mclk_fs
=
val
;
ret
=
asoc_simple_card_sub_parse_of
(
cpu
,
&
dai_props
->
cpu_dai
,
&
dai_link
->
cpu_of_node
,
&
dai_link
->
cpu_dai_name
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录