Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
8f7b85a7
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看板
未验证
提交
8f7b85a7
编写于
3月 28, 2018
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'asoc/topic/pcm179x' into asoc-next
上级
0334a537
db0a11d0
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
20 addition
and
38 deletion
+20
-38
sound/soc/codecs/pcm179x-i2c.c
sound/soc/codecs/pcm179x-i2c.c
+0
-6
sound/soc/codecs/pcm179x-spi.c
sound/soc/codecs/pcm179x-spi.c
+0
-6
sound/soc/codecs/pcm179x.c
sound/soc/codecs/pcm179x.c
+20
-25
sound/soc/codecs/pcm179x.h
sound/soc/codecs/pcm179x.h
+0
-1
未找到文件。
sound/soc/codecs/pcm179x-i2c.c
浏览文件 @
8f7b85a7
...
...
@@ -39,11 +39,6 @@ static int pcm179x_i2c_probe(struct i2c_client *client,
return
pcm179x_common_init
(
&
client
->
dev
,
regmap
);
}
static
int
pcm179x_i2c_remove
(
struct
i2c_client
*
client
)
{
return
pcm179x_common_exit
(
&
client
->
dev
);
}
static
const
struct
of_device_id
pcm179x_of_match
[]
=
{
{
.
compatible
=
"ti,pcm1792a"
,
},
{
}
...
...
@@ -63,7 +58,6 @@ static struct i2c_driver pcm179x_i2c_driver = {
},
.
id_table
=
pcm179x_i2c_ids
,
.
probe
=
pcm179x_i2c_probe
,
.
remove
=
pcm179x_i2c_remove
,
};
module_i2c_driver
(
pcm179x_i2c_driver
);
...
...
sound/soc/codecs/pcm179x-spi.c
浏览文件 @
8f7b85a7
...
...
@@ -38,11 +38,6 @@ static int pcm179x_spi_probe(struct spi_device *spi)
return
pcm179x_common_init
(
&
spi
->
dev
,
regmap
);
}
static
int
pcm179x_spi_remove
(
struct
spi_device
*
spi
)
{
return
pcm179x_common_exit
(
&
spi
->
dev
);
}
static
const
struct
of_device_id
pcm179x_of_match
[]
=
{
{
.
compatible
=
"ti,pcm1792a"
,
},
{
}
...
...
@@ -62,7 +57,6 @@ static struct spi_driver pcm179x_spi_driver = {
},
.
id_table
=
pcm179x_spi_ids
,
.
probe
=
pcm179x_spi_probe
,
.
remove
=
pcm179x_spi_remove
,
};
module_spi_driver
(
pcm179x_spi_driver
);
...
...
sound/soc/codecs/pcm179x.c
浏览文件 @
8f7b85a7
...
...
@@ -77,8 +77,8 @@ struct pcm179x_private {
static
int
pcm179x_set_dai_fmt
(
struct
snd_soc_dai
*
codec_dai
,
unsigned
int
format
)
{
struct
snd_soc_co
dec
*
codec
=
codec_dai
->
codec
;
struct
pcm179x_private
*
priv
=
snd_soc_co
dec_get_drvdata
(
codec
);
struct
snd_soc_co
mponent
*
component
=
codec_dai
->
component
;
struct
pcm179x_private
*
priv
=
snd_soc_co
mponent_get_drvdata
(
component
);
priv
->
format
=
format
;
...
...
@@ -87,8 +87,8 @@ static int pcm179x_set_dai_fmt(struct snd_soc_dai *codec_dai,
static
int
pcm179x_digital_mute
(
struct
snd_soc_dai
*
dai
,
int
mute
)
{
struct
snd_soc_co
dec
*
codec
=
dai
->
codec
;
struct
pcm179x_private
*
priv
=
snd_soc_co
dec_get_drvdata
(
codec
);
struct
snd_soc_co
mponent
*
component
=
dai
->
component
;
struct
pcm179x_private
*
priv
=
snd_soc_co
mponent_get_drvdata
(
component
);
int
ret
;
ret
=
regmap_update_bits
(
priv
->
regmap
,
PCM179X_SOFT_MUTE
,
...
...
@@ -103,8 +103,8 @@ static int pcm179x_hw_params(struct snd_pcm_substream *substream,
struct
snd_pcm_hw_params
*
params
,
struct
snd_soc_dai
*
dai
)
{
struct
snd_soc_co
dec
*
codec
=
dai
->
codec
;
struct
pcm179x_private
*
priv
=
snd_soc_co
dec_get_drvdata
(
codec
);
struct
snd_soc_co
mponent
*
component
=
dai
->
component
;
struct
pcm179x_private
*
priv
=
snd_soc_co
mponent_get_drvdata
(
component
);
int
val
=
0
,
ret
;
priv
->
rate
=
params_rate
(
params
);
...
...
@@ -137,7 +137,7 @@ static int pcm179x_hw_params(struct snd_pcm_substream *substream,
}
break
;
default:
dev_err
(
co
dec
->
dev
,
"Invalid DAI format
\n
"
);
dev_err
(
co
mponent
->
dev
,
"Invalid DAI format
\n
"
);
return
-
EINVAL
;
}
...
...
@@ -205,15 +205,17 @@ const struct regmap_config pcm179x_regmap_config = {
};
EXPORT_SYMBOL_GPL
(
pcm179x_regmap_config
);
static
const
struct
snd_soc_codec_driver
soc_codec_dev_pcm179x
=
{
.
component_driver
=
{
.
controls
=
pcm179x_controls
,
.
num_controls
=
ARRAY_SIZE
(
pcm179x_controls
),
.
dapm_widgets
=
pcm179x_dapm_widgets
,
.
num_dapm_widgets
=
ARRAY_SIZE
(
pcm179x_dapm_widgets
),
.
dapm_routes
=
pcm179x_dapm_routes
,
.
num_dapm_routes
=
ARRAY_SIZE
(
pcm179x_dapm_routes
),
},
static
const
struct
snd_soc_component_driver
soc_component_dev_pcm179x
=
{
.
controls
=
pcm179x_controls
,
.
num_controls
=
ARRAY_SIZE
(
pcm179x_controls
),
.
dapm_widgets
=
pcm179x_dapm_widgets
,
.
num_dapm_widgets
=
ARRAY_SIZE
(
pcm179x_dapm_widgets
),
.
dapm_routes
=
pcm179x_dapm_routes
,
.
num_dapm_routes
=
ARRAY_SIZE
(
pcm179x_dapm_routes
),
.
idle_bias_on
=
1
,
.
use_pmdown_time
=
1
,
.
endianness
=
1
,
.
non_legacy_dai_naming
=
1
,
};
int
pcm179x_common_init
(
struct
device
*
dev
,
struct
regmap
*
regmap
)
...
...
@@ -228,18 +230,11 @@ int pcm179x_common_init(struct device *dev, struct regmap *regmap)
pcm179x
->
regmap
=
regmap
;
dev_set_drvdata
(
dev
,
pcm179x
);
return
snd_soc_register_codec
(
dev
,
&
soc_co
dec
_dev_pcm179x
,
&
pcm179x_dai
,
1
);
return
devm_snd_soc_register_component
(
dev
,
&
soc_co
mponent
_dev_pcm179x
,
&
pcm179x_dai
,
1
);
}
EXPORT_SYMBOL_GPL
(
pcm179x_common_init
);
int
pcm179x_common_exit
(
struct
device
*
dev
)
{
snd_soc_unregister_codec
(
dev
);
return
0
;
}
EXPORT_SYMBOL_GPL
(
pcm179x_common_exit
);
MODULE_DESCRIPTION
(
"ASoC PCM179X driver"
);
MODULE_AUTHOR
(
"Michael Trimarchi <michael@amarulasolutions.com>"
);
MODULE_LICENSE
(
"GPL"
);
sound/soc/codecs/pcm179x.h
浏览文件 @
8f7b85a7
...
...
@@ -23,6 +23,5 @@
extern
const
struct
regmap_config
pcm179x_regmap_config
;
int
pcm179x_common_init
(
struct
device
*
dev
,
struct
regmap
*
regmap
);
int
pcm179x_common_exit
(
struct
device
*
dev
);
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录