Skip to contentSkip to conversation

ASoC: add RT5651 CODEC driver

PATCH In review [email protected] 2 participants 2 messages Apr 16, 2014 – Apr 18, 2014

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

PATCH 1/1 ASoC: add RT5651 CODEC driver

From: Bard Liao <[email protected]>

This patch adds the Realtek ALC5651 codec driver.

---
 include/sound/rt5651.h    |   21 +
 sound/soc/codecs/Kconfig  |    4 +
 sound/soc/codecs/Makefile |    2 +
 sound/soc/codecs/rt5651.c | 1898 +++++++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/rt5651.h | 2081 +++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 4006 insertions(+)
 create mode 100644 include/sound/rt5651.h
 create mode 100644 sound/soc/codecs/rt5651.c
 create mode 100644 sound/soc/codecs/rt5651.h
include/sound/rt5651.h new file +21 -0
new file mode 100644
index 0000000..d35de75
@@ -0,0 +1,21 @@
+/*
+ * linux/sound/rt286.h -- Platform data for RT286
+ *
+ * Copyright 2013 Realtek Microelectronics
+ *
+ * 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.
+ */
+
+#ifndef __LINUX_SND_RT5651_H
+#define __LINUX_SND_RT5651_H
+
+struct rt5651_platform_data {
+	/* IN2 can optionally be differential */
+	bool in2_diff;
+
+	bool dmic_en;
+};
+
+#endif
sound/soc/codecs/Kconfig +4 -0
index c7b853f..6bdacaf 100644
@@ -71,6 +71,7 @@ config SND_SOC_ALL_CODECS
 	select SND_SOC_PCM512x_SPI if SPI_MASTER
 	select SND_SOC_RT5631 if I2C
 	select SND_SOC_RT5640 if I2C
+	select SND_SOC_RT5651 if I2C
 	select SND_SOC_SGTL5000 if I2C
 	select SND_SOC_SI476X if MFD_SI476X_CORE
 	select SND_SOC_SIRF_AUDIO_CODEC
@@ -397,6 +398,9 @@ config SND_SOC_RT5631
 config SND_SOC_RT5640
 	tristate
 
+config SND_SOC_RT5651
+	tristate
+
 #Freescale sgtl5000 codec
 config SND_SOC_SGTL5000
 	tristate "Freescale SGTL5000 CODEC"
sound/soc/codecs/Makefile +2 -0
index efdb4d0..923b6b5e 100644
@@ -60,6 +60,7 @@ snd-soc-pcm512x-i2c-objs := pcm512x-i2c.o
 snd-soc-pcm512x-spi-objs := pcm512x-spi.o
 snd-soc-rt5631-objs := rt5631.o
 snd-soc-rt5640-objs := rt5640.o
+snd-soc-rt5651-objs := rt5651.o
 snd-soc-sgtl5000-objs := sgtl5000.o
 snd-soc-alc5623-objs := alc5623.o
 snd-soc-alc5632-objs := alc5632.o
@@ -212,6 +213,7 @@ obj-$(CONFIG_SND_SOC_PCM512x_I2C)	+= snd-soc-pcm512x-i2c.o
 obj-$(CONFIG_SND_SOC_PCM512x_SPI)	+= snd-soc-pcm512x-spi.o
 obj-$(CONFIG_SND_SOC_RT5631)	+= snd-soc-rt5631.o
 obj-$(CONFIG_SND_SOC_RT5640)	+= snd-soc-rt5640.o
+obj-$(CONFIG_SND_SOC_RT5651)	+= snd-soc-rt5651.o
 obj-$(CONFIG_SND_SOC_SGTL5000)  += snd-soc-sgtl5000.o
 obj-$(CONFIG_SND_SOC_SIGMADSP)	+= snd-soc-sigmadsp.o
 obj-$(CONFIG_SND_SOC_SI476X)	+= snd-soc-si476x.o
sound/soc/codecs/rt5651.c new file +1898 -0

1,898 lines not on this page · raw message

sound/soc/codecs/rt5651.h new file +2081 -0

1,051 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.8.1.1.439.g50a6b54

Part of the diff is not shown here. View the raw message.

maintainer
#1 lore raw
Quoted 3 lines · On Wed, Apr 16, 2014 at 07:20:46PM +0800, [email protected] wrote:

From: Bard Liao <[email protected]>

This patch adds the Realtek ALC5651 codec driver.

I've applied this but please look into opportunities for code sharing with rt5640 - there's not quite so many overlaps as with rt5639 but there are some. Can you do something like the Wolfson arizona code and factor out things like the hw_params() into a shared bit of code for example?