Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
fa3800dd
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看板
提交
fa3800dd
编写于
12月 02, 2012
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'asoc/topic/ux500' into asoc-next
上级
9f82b044
459d2a9f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
58 addition
and
24 deletion
+58
-24
sound/soc/ux500/mop500.c
sound/soc/ux500/mop500.c
+2
-2
sound/soc/ux500/ux500_msp_dai.c
sound/soc/ux500/ux500_msp_dai.c
+48
-7
sound/soc/ux500/ux500_msp_dai.h
sound/soc/ux500/ux500_msp_dai.h
+1
-0
sound/soc/ux500/ux500_pcm.c
sound/soc/ux500/ux500_pcm.c
+4
-15
sound/soc/ux500/ux500_pcm.h
sound/soc/ux500/ux500_pcm.h
+3
-0
未找到文件。
sound/soc/ux500/mop500.c
浏览文件 @
fa3800dd
...
...
@@ -33,7 +33,7 @@ struct snd_soc_dai_link mop500_dai_links[] = {
.
stream_name
=
"ab8500_0"
,
.
cpu_dai_name
=
"ux500-msp-i2s.1"
,
.
codec_dai_name
=
"ab8500-codec-dai.0"
,
.
platform_name
=
"ux500-
pcm.0
"
,
.
platform_name
=
"ux500-
msp-i2s.1
"
,
.
codec_name
=
"ab8500-codec.0"
,
.
init
=
mop500_ab8500_machine_init
,
.
ops
=
mop500_ab8500_ops
,
...
...
@@ -43,7 +43,7 @@ struct snd_soc_dai_link mop500_dai_links[] = {
.
stream_name
=
"ab8500_1"
,
.
cpu_dai_name
=
"ux500-msp-i2s.3"
,
.
codec_dai_name
=
"ab8500-codec-dai.1"
,
.
platform_name
=
"ux500-
pcm.0
"
,
.
platform_name
=
"ux500-
msp-i2s.3
"
,
.
codec_name
=
"ab8500-codec.0"
,
.
init
=
NULL
,
.
ops
=
mop500_ab8500_ops
,
...
...
sound/soc/ux500/ux500_msp_dai.c
浏览文件 @
fa3800dd
...
...
@@ -28,6 +28,7 @@
#include "ux500_msp_i2s.h"
#include "ux500_msp_dai.h"
#include "ux500_pcm.h"
static
int
setup_pcm_multichan
(
struct
snd_soc_dai
*
dai
,
struct
ux500_msp_config
*
msp_config
)
...
...
@@ -398,11 +399,28 @@ static int ux500_msp_dai_startup(struct snd_pcm_substream *substream,
return
ret
;
}
/* Enable clock */
dev_dbg
(
dai
->
dev
,
"%s: Enabling MSP-clock.
\n
"
,
__func__
);
clk_enable
(
drvdata
->
clk
);
/* Prepare and enable clocks */
dev_dbg
(
dai
->
dev
,
"%s: Enabling MSP-clocks.
\n
"
,
__func__
);
ret
=
clk_prepare_enable
(
drvdata
->
pclk
);
if
(
ret
)
{
dev_err
(
drvdata
->
msp
->
dev
,
"%s: Failed to prepare/enable pclk!
\n
"
,
__func__
);
goto
err_pclk
;
}
return
0
;
ret
=
clk_prepare_enable
(
drvdata
->
clk
);
if
(
ret
)
{
dev_err
(
drvdata
->
msp
->
dev
,
"%s: Failed to prepare/enable clk!
\n
"
,
__func__
);
goto
err_clk
;
}
return
ret
;
err_clk:
clk_disable_unprepare
(
drvdata
->
pclk
);
err_pclk:
regulator_disable
(
drvdata
->
reg_vape
);
return
ret
;
}
static
void
ux500_msp_dai_shutdown
(
struct
snd_pcm_substream
*
substream
,
...
...
@@ -428,8 +446,9 @@ static void ux500_msp_dai_shutdown(struct snd_pcm_substream *substream,
__func__
,
dai
->
id
,
snd_pcm_stream_str
(
substream
));
}
/* Disable clock */
clk_disable
(
drvdata
->
clk
);
/* Disable and unprepare clocks */
clk_disable_unprepare
(
drvdata
->
clk
);
clk_disable_unprepare
(
drvdata
->
pclk
);
/* Disable regulator */
ret
=
regulator_disable
(
drvdata
->
reg_vape
);
...
...
@@ -780,6 +799,14 @@ static int __devinit ux500_msp_drv_probe(struct platform_device *pdev)
}
prcmu_qos_add_requirement
(
PRCMU_QOS_APE_OPP
,
(
char
*
)
pdev
->
name
,
50
);
drvdata
->
pclk
=
clk_get
(
&
pdev
->
dev
,
"apb_pclk"
);
if
(
IS_ERR
(
drvdata
->
pclk
))
{
ret
=
(
int
)
PTR_ERR
(
drvdata
->
pclk
);
dev_err
(
&
pdev
->
dev
,
"%s: ERROR: clk_get of pclk failed (%d)!
\n
"
,
__func__
,
ret
);
goto
err_pclk
;
}
drvdata
->
clk
=
clk_get
(
&
pdev
->
dev
,
NULL
);
if
(
IS_ERR
(
drvdata
->
clk
))
{
ret
=
(
int
)
PTR_ERR
(
drvdata
->
clk
);
...
...
@@ -806,12 +833,23 @@ static int __devinit ux500_msp_drv_probe(struct platform_device *pdev)
goto
err_init_msp
;
}
ret
=
ux500_pcm_register_platform
(
pdev
);
if
(
ret
<
0
)
{
dev_err
(
&
pdev
->
dev
,
"Error: %s: Failed to register PCM platform device!
\n
"
,
__func__
);
goto
err_reg_plat
;
}
return
0
;
err_reg_plat:
snd_soc_unregister_dais
(
&
pdev
->
dev
,
ARRAY_SIZE
(
ux500_msp_dai_drv
));
err_init_msp:
clk_put
(
drvdata
->
clk
);
err_clk:
clk_put
(
drvdata
->
pclk
);
err_pclk:
devm_regulator_put
(
drvdata
->
reg_vape
);
return
ret
;
...
...
@@ -821,12 +859,15 @@ static int __devexit ux500_msp_drv_remove(struct platform_device *pdev)
{
struct
ux500_msp_i2s_drvdata
*
drvdata
=
dev_get_drvdata
(
&
pdev
->
dev
);
ux500_pcm_unregister_platform
(
pdev
);
snd_soc_unregister_dais
(
&
pdev
->
dev
,
ARRAY_SIZE
(
ux500_msp_dai_drv
));
devm_regulator_put
(
drvdata
->
reg_vape
);
prcmu_qos_remove_requirement
(
PRCMU_QOS_APE_OPP
,
"ux500_msp_i2s"
);
clk_put
(
drvdata
->
clk
);
clk_put
(
drvdata
->
pclk
);
ux500_msp_i2s_cleanup_msp
(
pdev
,
drvdata
->
msp
);
...
...
sound/soc/ux500/ux500_msp_dai.h
浏览文件 @
fa3800dd
...
...
@@ -69,6 +69,7 @@ struct ux500_msp_i2s_drvdata {
/* Clocks */
unsigned
int
master_clk
;
struct
clk
*
clk
;
struct
clk
*
pclk
;
/* Regulators */
int
vape_opp_constraint
;
...
...
sound/soc/ux500/ux500_pcm.c
浏览文件 @
fa3800dd
...
...
@@ -282,7 +282,7 @@ static struct snd_soc_platform_driver ux500_pcm_soc_drv = {
.
pcm_new
=
ux500_pcm_new
,
};
static
int
__devexit
ux500_pcm_drv_probe
(
struct
platform_device
*
pdev
)
int
__devinit
ux500_pcm_register_platform
(
struct
platform_device
*
pdev
)
{
int
ret
;
...
...
@@ -296,23 +296,12 @@ static int __devexit ux500_pcm_drv_probe(struct platform_device *pdev)
return
0
;
}
EXPORT_SYMBOL_GPL
(
ux500_pcm_register_platform
);
static
int
__devinit
ux500_pcm_drv_remove
(
struct
platform_device
*
pdev
)
int
__devexit
ux500_pcm_unregister_platform
(
struct
platform_device
*
pdev
)
{
snd_soc_unregister_platform
(
&
pdev
->
dev
);
return
0
;
}
static
struct
platform_driver
ux500_pcm_driver
=
{
.
driver
=
{
.
name
=
"ux500-pcm"
,
.
owner
=
THIS_MODULE
,
},
.
probe
=
ux500_pcm_drv_probe
,
.
remove
=
__devexit_p
(
ux500_pcm_drv_remove
),
};
module_platform_driver
(
ux500_pcm_driver
);
MODULE_LICENSE
(
"GPL v2"
);
EXPORT_SYMBOL_GPL
(
ux500_pcm_unregister_platform
);
sound/soc/ux500/ux500_pcm.h
浏览文件 @
fa3800dd
...
...
@@ -32,4 +32,7 @@
#define UX500_PLATFORM_PERIODS_MAX 48
#define UX500_PLATFORM_BUFFER_BYTES_MAX (2048 * PAGE_SIZE)
int
ux500_pcm_register_platform
(
struct
platform_device
*
pdev
);
int
ux500_pcm_unregister_platform
(
struct
platform_device
*
pdev
);
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录