Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
e74ac45d
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看板
提交
e74ac45d
编写于
5月 13, 2016
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'asoc/topic/pcm5102' into asoc-next
上级
c988e261
97d3ddd7
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
88 addition
and
0 deletion
+88
-0
Documentation/devicetree/bindings/sound/pcm5102a.txt
Documentation/devicetree/bindings/sound/pcm5102a.txt
+13
-0
sound/soc/codecs/Kconfig
sound/soc/codecs/Kconfig
+4
-0
sound/soc/codecs/Makefile
sound/soc/codecs/Makefile
+2
-0
sound/soc/codecs/pcm5102a.c
sound/soc/codecs/pcm5102a.c
+69
-0
未找到文件。
Documentation/devicetree/bindings/sound/pcm5102a.txt
0 → 100644
浏览文件 @
e74ac45d
PCM5102a audio CODECs
These devices does not use I2C or SPI.
Required properties:
- compatible : set as "ti,pcm5102a"
Examples:
pcm5102a: pcm5102a {
compatible = "ti,pcm5102a";
};
sound/soc/codecs/Kconfig
浏览文件 @
e74ac45d
...
...
@@ -94,6 +94,7 @@ config SND_SOC_ALL_CODECS
select SND_SOC_PCM3008
select SND_SOC_PCM3168A_I2C if I2C
select SND_SOC_PCM3168A_SPI if SPI_MASTER
select SND_SOC_PCM5102A
select SND_SOC_PCM512x_I2C if I2C
select SND_SOC_PCM512x_SPI if SPI_MASTER
select SND_SOC_RT286 if I2C
...
...
@@ -575,6 +576,9 @@ config SND_SOC_PCM3168A_SPI
select SND_SOC_PCM3168A
select REGMAP_SPI
config SND_SOC_PCM5102A
tristate
config SND_SOC_PCM512x
tristate
...
...
sound/soc/codecs/Makefile
浏览文件 @
e74ac45d
...
...
@@ -89,6 +89,7 @@ snd-soc-pcm3008-objs := pcm3008.o
snd-soc-pcm3168a-objs
:=
pcm3168a.o
snd-soc-pcm3168a-i2c-objs
:=
pcm3168a-i2c.o
snd-soc-pcm3168a-spi-objs
:=
pcm3168a-spi.o
snd-soc-pcm5102a-objs
:=
pcm5102a.o
snd-soc-pcm512x-objs
:=
pcm512x.o
snd-soc-pcm512x-i2c-objs
:=
pcm512x-i2c.o
snd-soc-pcm512x-spi-objs
:=
pcm512x-spi.o
...
...
@@ -298,6 +299,7 @@ obj-$(CONFIG_SND_SOC_PCM3008) += snd-soc-pcm3008.o
obj-$(CONFIG_SND_SOC_PCM3168A)
+=
snd-soc-pcm3168a.o
obj-$(CONFIG_SND_SOC_PCM3168A_I2C)
+=
snd-soc-pcm3168a-i2c.o
obj-$(CONFIG_SND_SOC_PCM3168A_SPI)
+=
snd-soc-pcm3168a-spi.o
obj-$(CONFIG_SND_SOC_PCM5102A)
+=
snd-soc-pcm5102a.o
obj-$(CONFIG_SND_SOC_PCM512x)
+=
snd-soc-pcm512x.o
obj-$(CONFIG_SND_SOC_PCM512x_I2C)
+=
snd-soc-pcm512x-i2c.o
obj-$(CONFIG_SND_SOC_PCM512x_SPI)
+=
snd-soc-pcm512x-spi.o
...
...
sound/soc/codecs/pcm5102a.c
0 → 100644
浏览文件 @
e74ac45d
/*
* Driver for the PCM5102A codec
*
* Author: Florian Meier <florian.meier@koalo.de>
* Copyright 2013
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/
#include <linux/init.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <sound/soc.h>
static
struct
snd_soc_dai_driver
pcm5102a_dai
=
{
.
name
=
"pcm5102a-hifi"
,
.
playback
=
{
.
channels_min
=
2
,
.
channels_max
=
2
,
.
rates
=
SNDRV_PCM_RATE_8000_192000
,
.
formats
=
SNDRV_PCM_FMTBIT_S16_LE
|
SNDRV_PCM_FMTBIT_S24_LE
|
SNDRV_PCM_FMTBIT_S32_LE
},
};
static
struct
snd_soc_codec_driver
soc_codec_dev_pcm5102a
;
static
int
pcm5102a_probe
(
struct
platform_device
*
pdev
)
{
return
snd_soc_register_codec
(
&
pdev
->
dev
,
&
soc_codec_dev_pcm5102a
,
&
pcm5102a_dai
,
1
);
}
static
int
pcm5102a_remove
(
struct
platform_device
*
pdev
)
{
snd_soc_unregister_codec
(
&
pdev
->
dev
);
return
0
;
}
static
const
struct
of_device_id
pcm5102a_of_match
[]
=
{
{
.
compatible
=
"ti,pcm5102a"
,
},
{
}
};
MODULE_DEVICE_TABLE
(
of
,
pcm5102a_of_match
);
static
struct
platform_driver
pcm5102a_codec_driver
=
{
.
probe
=
pcm5102a_probe
,
.
remove
=
pcm5102a_remove
,
.
driver
=
{
.
name
=
"pcm5102a-codec"
,
.
owner
=
THIS_MODULE
,
.
of_match_table
=
pcm5102a_of_match
,
},
};
module_platform_driver
(
pcm5102a_codec_driver
);
MODULE_DESCRIPTION
(
"ASoC PCM5102A codec driver"
);
MODULE_AUTHOR
(
"Florian Meier <florian.meier@koalo.de>"
);
MODULE_LICENSE
(
"GPL v2"
);
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录