Skip to contentSkip to conversation

ASoC: Adding trivial codec drivers

RFC In review Florian Meier 2 participants 2 messages Jan 5, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC 1/1 ASoC: Adding trivial codec drivers

This is not intended to be a real patch.
I would just like to ask if this is the preferred way to add codec and machine driver for codecs without I2C or SPI configuration possibilities or should I rather use a more generic approach?

Grettings,
Florian

 sound/soc/bcm/Kconfig             |  7 +++
 sound/soc/bcm/Makefile            |  2 +
 sound/soc/bcm/rpi-dac.c           | 97 +++++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/Kconfig          |  4 ++
 sound/soc/codecs/Makefile         |  2 +
 sound/soc/codecs/pcm1794a.c       | 62 +++++++++++++++++++++++++
 6 files changed, 174 insertions(+)
 create mode 100644 sound/soc/bcm/rpi-dac.c
 create mode 100644 sound/soc/codecs/pcm1794a.c
sound/soc/bcm/Kconfig +6 -0
index 8b14e37..1c1f5cf 100644
@@ -15,3 +15,10 @@
+config SND_BCM2708_SOC_RPI_DAC
+        tristate "Support for RPi-DAC"
+        depends on SND_BCM2708_SOC_I2S
+        select SND_SOC_PCM1794A
+        help
+         Say Y or M if you want to add support for RPi-DAC.
\ No newline at end of file
sound/soc/bcm/Makefile +2 -0
index 6834b4d..95a9d44 100644
@@ -5,5 +5,7 @@ obj-$(CONFIG_SND_BCM2708_SOC_I2S) += snd-soc-bcm2708-i2s.o
 
+snd-soc-rpi-dac-objs := rpi-dac.o
+obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o
sound/soc/bcm/rpi-dac.c new file +97 -0

97 lines not on this page · raw message

sound/soc/codecs/Kconfig +4 -0
index 7c43413..ef9ac1e 100644
@@ -55,6 +55,7 @@ config SND_SOC_ALL_CODECS
 	select SND_SOC_ML26124 if I2C
 	select SND_SOC_OMAP_HDMI_CODEC if OMAP4_DSS_HDMI
 	select SND_SOC_PCM3008
+	select SND_SOC_PCM1794A
 	select SND_SOC_PCM5102A
 	select SND_SOC_RT5631 if I2C
 	select SND_SOC_SGTL5000 if I2C
@@ -294,6 +295,9 @@ config SND_SOC_OMAP_HDMI_CODEC
 config SND_SOC_PCM3008
        tristate
 
+config SND_SOC_PCM1794A
+	tristate
+
 config SND_SOC_PCM5102A
 	tristate
 
sound/soc/codecs/Makefile +2 -0
index 0677eb5..e98b865 100644
@@ -43,6 +43,7 @@ snd-soc-mc13783-objs := mc13783.o
 snd-soc-ml26124-objs := ml26124.o
 snd-soc-omap-hdmi-codec-objs := omap-hdmi.o
 snd-soc-pcm3008-objs := pcm3008.o
+snd-soc-pcm1794a-objs := pcm1794a.o
 snd-soc-rt5631-objs := rt5631.o
 snd-soc-sgtl5000-objs := sgtl5000.o
@@ -171,6 +172,7 @@ obj-$(CONFIG_SND_SOC_MC13783)	+= snd-soc-mc13783.o
 obj-$(CONFIG_SND_SOC_ML26124)	+= snd-soc-ml26124.o
 obj-$(CONFIG_SND_SOC_OMAP_HDMI_CODEC) += snd-soc-omap-hdmi-codec.o
 obj-$(CONFIG_SND_SOC_PCM3008)	+= snd-soc-pcm3008.o
+obj-$(CONFIG_SND_SOC_PCM1794A)	+= snd-soc-pcm1794a.o
 obj-$(CONFIG_SND_SOC_RT5631)	+= snd-soc-rt5631.o
 obj-$(CONFIG_SND_SOC_SGTL5000)  += snd-soc-sgtl5000.o
sound/soc/codecs/pcm1794a.c new file +62 -0

62 lines not on this page · raw message

Signature · 1 line
1.8.3.2
#1 lore raw
Quoted 6 lines · Florian Meier

This is not intended to be a real patch.
I would just like to ask if this is the preferred way to add codec and machine driver for codecs without I2C or SPI configuration possibilities or should I rather use a more generic approach?

Should be fine. There are a couple of other similar drivers.

- Lars