Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
445bb423
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看板
未验证
提交
445bb423
编写于
3月 28, 2018
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'asoc/topic/zx_aud96p22' into asoc-next
上级
38a72a9f
755d440b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
18 addition
and
17 deletion
+18
-17
sound/soc/codecs/zx_aud96p22.c
sound/soc/codecs/zx_aud96p22.c
+18
-17
未找到文件。
sound/soc/codecs/zx_aud96p22.c
浏览文件 @
445bb423
...
...
@@ -57,8 +57,8 @@ struct aud96p22_priv {
static
int
aud96p22_adc_event
(
struct
snd_soc_dapm_widget
*
w
,
struct
snd_kcontrol
*
kcontrol
,
int
event
)
{
struct
snd_soc_co
dec
*
codec
=
snd_soc_dapm_to_codec
(
w
->
dapm
);
struct
aud96p22_priv
*
priv
=
snd_soc_co
dec_get_drvdata
(
codec
);
struct
snd_soc_co
mponent
*
component
=
snd_soc_dapm_to_component
(
w
->
dapm
);
struct
aud96p22_priv
*
priv
=
snd_soc_co
mponent_get_drvdata
(
component
);
struct
regmap
*
regmap
=
priv
->
regmap
;
if
(
event
!=
SND_SOC_DAPM_POST_PMU
)
...
...
@@ -74,8 +74,8 @@ static int aud96p22_adc_event(struct snd_soc_dapm_widget *w,
static
int
aud96p22_dac_event
(
struct
snd_soc_dapm_widget
*
w
,
struct
snd_kcontrol
*
kcontrol
,
int
event
)
{
struct
snd_soc_co
dec
*
codec
=
snd_soc_dapm_to_codec
(
w
->
dapm
);
struct
aud96p22_priv
*
priv
=
snd_soc_co
dec_get_drvdata
(
codec
);
struct
snd_soc_co
mponent
*
component
=
snd_soc_dapm_to_component
(
w
->
dapm
);
struct
aud96p22_priv
*
priv
=
snd_soc_co
mponent_get_drvdata
(
component
);
struct
regmap
*
regmap
=
priv
->
regmap
;
if
(
event
!=
SND_SOC_DAPM_POST_PMU
)
...
...
@@ -261,20 +261,22 @@ static const struct snd_soc_dapm_route aud96p22_dapm_routes[] = {
{
"LINEOUTMN"
,
NULL
,
"LD2"
},
};
static
const
struct
snd_soc_codec_driver
aud96p22_driver
=
{
.
component_driver
=
{
.
controls
=
aud96p22_snd_controls
,
.
num_controls
=
ARRAY_SIZE
(
aud96p22_snd_controls
),
.
dapm_widgets
=
aud96p22_dapm_widgets
,
.
num_dapm_widgets
=
ARRAY_SIZE
(
aud96p22_dapm_widgets
),
.
dapm_routes
=
aud96p22_dapm_routes
,
.
num_dapm_routes
=
ARRAY_SIZE
(
aud96p22_dapm_routes
),
},
static
const
struct
snd_soc_component_driver
aud96p22_driver
=
{
.
controls
=
aud96p22_snd_controls
,
.
num_controls
=
ARRAY_SIZE
(
aud96p22_snd_controls
),
.
dapm_widgets
=
aud96p22_dapm_widgets
,
.
num_dapm_widgets
=
ARRAY_SIZE
(
aud96p22_dapm_widgets
),
.
dapm_routes
=
aud96p22_dapm_routes
,
.
num_dapm_routes
=
ARRAY_SIZE
(
aud96p22_dapm_routes
),
.
idle_bias_on
=
1
,
.
use_pmdown_time
=
1
,
.
endianness
=
1
,
.
non_legacy_dai_naming
=
1
,
};
static
int
aud96p22_set_fmt
(
struct
snd_soc_dai
*
dai
,
unsigned
int
fmt
)
{
struct
aud96p22_priv
*
priv
=
snd_soc_co
dec_get_drvdata
(
dai
->
codec
);
struct
aud96p22_priv
*
priv
=
snd_soc_co
mponent_get_drvdata
(
dai
->
component
);
struct
regmap
*
regmap
=
priv
->
regmap
;
unsigned
int
val
;
...
...
@@ -367,9 +369,9 @@ static int aud96p22_i2c_probe(struct i2c_client *i2c,
i2c_set_clientdata
(
i2c
,
priv
);
ret
=
snd_soc_register_codec
(
dev
,
&
aud96p22_driver
,
&
aud96p22_dai
,
1
);
ret
=
devm_snd_soc_register_component
(
dev
,
&
aud96p22_driver
,
&
aud96p22_dai
,
1
);
if
(
ret
)
{
dev_err
(
dev
,
"failed to register co
dec
: %d
\n
"
,
ret
);
dev_err
(
dev
,
"failed to register co
mponent
: %d
\n
"
,
ret
);
return
ret
;
}
...
...
@@ -378,7 +380,6 @@ static int aud96p22_i2c_probe(struct i2c_client *i2c,
static
int
aud96p22_i2c_remove
(
struct
i2c_client
*
i2c
)
{
snd_soc_unregister_codec
(
&
i2c
->
dev
);
return
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录