Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
bd6d35a3
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
bd6d35a3
编写于
11月 08, 2013
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'asoc/topic/sn95031' into asoc-next
上级
8bffb007
83cbe35b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
20 addition
and
15 deletion
+20
-15
sound/soc/codecs/sn95031.c
sound/soc/codecs/sn95031.c
+20
-15
未找到文件。
sound/soc/codecs/sn95031.c
浏览文件 @
bd6d35a3
...
@@ -164,30 +164,28 @@ static unsigned int sn95031_get_mic_bias(struct snd_soc_codec *codec)
...
@@ -164,30 +164,28 @@ static unsigned int sn95031_get_mic_bias(struct snd_soc_codec *codec)
}
}
/*end - adc helper functions */
/*end - adc helper functions */
static
inline
unsigned
int
sn95031_read
(
struct
snd_soc_codec
*
codec
,
static
int
sn95031_read
(
void
*
ctx
,
unsigned
int
reg
,
unsigned
int
*
val
)
unsigned
int
reg
)
{
{
u8
value
=
0
;
u8
value
=
0
;
int
ret
;
int
ret
;
ret
=
intel_scu_ipc_ioread8
(
reg
,
&
value
);
ret
=
intel_scu_ipc_ioread8
(
reg
,
&
value
);
if
(
ret
)
if
(
ret
==
0
)
pr_err
(
"read of %x failed, err %d
\n
"
,
reg
,
ret
);
*
val
=
value
;
return
value
;
return
ret
;
}
}
static
inline
int
sn95031_write
(
struct
snd_soc_codec
*
codec
,
static
int
sn95031_write
(
void
*
ctx
,
unsigned
int
reg
,
unsigned
int
value
)
unsigned
int
reg
,
unsigned
int
value
)
{
{
int
ret
;
return
intel_scu_ipc_iowrite8
(
reg
,
value
);
ret
=
intel_scu_ipc_iowrite8
(
reg
,
value
);
if
(
ret
)
pr_err
(
"write of %x failed, err %d
\n
"
,
reg
,
ret
);
return
ret
;
}
}
static
const
struct
regmap_config
sn95031_regmap
=
{
.
reg_read
=
sn95031_read
,
.
reg_write
=
sn95031_write
,
};
static
int
sn95031_set_vaud_bias
(
struct
snd_soc_codec
*
codec
,
static
int
sn95031_set_vaud_bias
(
struct
snd_soc_codec
*
codec
,
enum
snd_soc_bias_level
level
)
enum
snd_soc_bias_level
level
)
{
{
...
@@ -827,6 +825,8 @@ static int sn95031_codec_probe(struct snd_soc_codec *codec)
...
@@ -827,6 +825,8 @@ static int sn95031_codec_probe(struct snd_soc_codec *codec)
{
{
pr_debug
(
"codec_probe called
\n
"
);
pr_debug
(
"codec_probe called
\n
"
);
snd_soc_codec_set_cache_io
(
codec
,
0
,
0
,
SND_SOC_REGMAP
);
/* PCM interface config
/* PCM interface config
* This sets the pcm rx slot conguration to max 6 slots
* This sets the pcm rx slot conguration to max 6 slots
* for max 4 dais (2 stereo and 2 mono)
* for max 4 dais (2 stereo and 2 mono)
...
@@ -886,8 +886,6 @@ static int sn95031_codec_remove(struct snd_soc_codec *codec)
...
@@ -886,8 +886,6 @@ static int sn95031_codec_remove(struct snd_soc_codec *codec)
static
struct
snd_soc_codec_driver
sn95031_codec
=
{
static
struct
snd_soc_codec_driver
sn95031_codec
=
{
.
probe
=
sn95031_codec_probe
,
.
probe
=
sn95031_codec_probe
,
.
remove
=
sn95031_codec_remove
,
.
remove
=
sn95031_codec_remove
,
.
read
=
sn95031_read
,
.
write
=
sn95031_write
,
.
set_bias_level
=
sn95031_set_vaud_bias
,
.
set_bias_level
=
sn95031_set_vaud_bias
,
.
idle_bias_off
=
true
,
.
idle_bias_off
=
true
,
.
dapm_widgets
=
sn95031_dapm_widgets
,
.
dapm_widgets
=
sn95031_dapm_widgets
,
...
@@ -898,7 +896,14 @@ static struct snd_soc_codec_driver sn95031_codec = {
...
@@ -898,7 +896,14 @@ static struct snd_soc_codec_driver sn95031_codec = {
static
int
sn95031_device_probe
(
struct
platform_device
*
pdev
)
static
int
sn95031_device_probe
(
struct
platform_device
*
pdev
)
{
{
struct
regmap
*
regmap
;
pr_debug
(
"codec device probe called for %s
\n
"
,
dev_name
(
&
pdev
->
dev
));
pr_debug
(
"codec device probe called for %s
\n
"
,
dev_name
(
&
pdev
->
dev
));
regmap
=
devm_regmap_init
(
&
pdev
->
dev
,
NULL
,
NULL
,
&
sn95031_regmap
);
if
(
IS_ERR
(
regmap
))
return
PTR_ERR
(
regmap
);
return
snd_soc_register_codec
(
&
pdev
->
dev
,
&
sn95031_codec
,
return
snd_soc_register_codec
(
&
pdev
->
dev
,
&
sn95031_codec
,
sn95031_dais
,
ARRAY_SIZE
(
sn95031_dais
));
sn95031_dais
,
ARRAY_SIZE
(
sn95031_dais
));
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录