Skip to contentSkip to conversation

ASoC: Add shared code for Wolfson Arizona class devices

PATCH New Mark Brown 1 participant 2 messages Jun 23, 2012

Subsystems (3)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/2 ASoC: Add shared code for Wolfson Arizona class devices

The Wolfson Arizona series of audio hub CODECs can share a large amount of their driver code as the result of a common register map. This patch adds some of this core support, providing a basis for the initial WM5102 audio driver.

---
 sound/soc/codecs/Kconfig   |    5 +
 sound/soc/codecs/Makefile  |    2 +
 sound/soc/codecs/arizona.c |  781 ++++++++++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/arizona.h |  149 +++++++++
 4 files changed, 937 insertions(+)
 create mode 100644 sound/soc/codecs/arizona.c
 create mode 100644 sound/soc/codecs/arizona.h
sound/soc/codecs/Kconfig +5 -0
index 43f5240..2ae8082 100644
@@ -129,6 +129,11 @@ config SND_SOC_ALL_CODECS
 config SND_SOC_88PM860X
 	tristate
 
+config SND_SOC_ARIZONA
+	tristate
+	default y if SND_SOC_WM5102=y
+	default m if SND_SOC_WM5102=m
+
 config SND_SOC_WM_HUBS
 	tristate
 	default y if SND_SOC_WM8993=y || SND_SOC_WM8994=y
sound/soc/codecs/Makefile +2 -0
index 3d30654..3005ea6 100644
@@ -14,6 +14,7 @@ snd-soc-ak4535-objs := ak4535.o
 snd-soc-ak4641-objs := ak4641.o
 snd-soc-ak4642-objs := ak4642.o
 snd-soc-ak4671-objs := ak4671.o
+snd-soc-arizona-objs := arizona.o
 snd-soc-cq93vc-objs := cq93vc.o
 snd-soc-cs42l51-objs := cs42l51.o
 snd-soc-cs42l52-objs := cs42l52.o
@@ -128,6 +129,7 @@ obj-$(CONFIG_SND_SOC_AK4642)	+= snd-soc-ak4642.o
 obj-$(CONFIG_SND_SOC_AK4671)	+= snd-soc-ak4671.o
 obj-$(CONFIG_SND_SOC_ALC5623)    += snd-soc-alc5623.o
 obj-$(CONFIG_SND_SOC_ALC5632)	+= snd-soc-alc5632.o
+obj-$(CONFIG_SND_SOC_ARIZONA)	+= snd-soc-arizona.o
 obj-$(CONFIG_SND_SOC_CQ0093VC) += snd-soc-cq93vc.o
 obj-$(CONFIG_SND_SOC_CS42L51)	+= snd-soc-cs42l51.o
 obj-$(CONFIG_SND_SOC_CS42L52)	+= snd-soc-cs42l52.o
sound/soc/codecs/arizona.c new file +781 -0

781 lines not on this page · raw message

sound/soc/codecs/arizona.h new file +149 -0

149 lines not on this page · raw message

Signature · 1 line
1.7.10
author
#1 lore raw

PATCH 2/2 ASoC: wm5102: Initial driver

The WM5102 is a highly-integrated low-power audio system for smartphones, tablets and other portable audio devices based on the Arizona platform.

---
 sound/soc/codecs/Kconfig  |    4 +
 sound/soc/codecs/Makefile |    2 +
 sound/soc/codecs/wm5102.c |  870 +++++++++++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/wm5102.h |   21 ++
 4 files changed, 897 insertions(+)
 create mode 100644 sound/soc/codecs/wm5102.c
 create mode 100644 sound/soc/codecs/wm5102.h
sound/soc/codecs/Kconfig +4 -0
index 2ae8082..1de24cc 100644
@@ -73,6 +73,7 @@ config SND_SOC_ALL_CODECS
 	select SND_SOC_WM2000 if I2C
 	select SND_SOC_WM2200 if I2C
 	select SND_SOC_WM5100 if I2C
+	select SND_SOC_WM5102 if MFD_WM5102
 	select SND_SOC_WM8350 if MFD_WM8350
 	select SND_SOC_WM8400 if MFD_WM8400
 	select SND_SOC_WM8510 if SND_SOC_I2C_AND_SPI
@@ -330,6 +331,9 @@ config SND_SOC_WM2200
 config SND_SOC_WM5100
 	tristate
 
+config SND_SOC_WM5102
+	tristate
+
 config SND_SOC_WM8350
 	tristate
 
sound/soc/codecs/Makefile +2 -0
index 3005ea6..d35ba7f 100644
@@ -63,6 +63,7 @@ snd-soc-wm1250-ev1-objs := wm1250-ev1.o
 snd-soc-wm2000-objs := wm2000.o
 snd-soc-wm2200-objs := wm2200.o
 snd-soc-wm5100-objs := wm5100.o wm5100-tables.o
+snd-soc-wm5102-objs := wm5102.o
 snd-soc-wm8350-objs := wm8350.o
 snd-soc-wm8400-objs := wm8400.o
 snd-soc-wm8510-objs := wm8510.o
@@ -176,6 +177,7 @@ obj-$(CONFIG_SND_SOC_WM1250_EV1) += snd-soc-wm1250-ev1.o
 obj-$(CONFIG_SND_SOC_WM2000)	+= snd-soc-wm2000.o
 obj-$(CONFIG_SND_SOC_WM2200)	+= snd-soc-wm2200.o
 obj-$(CONFIG_SND_SOC_WM5100)	+= snd-soc-wm5100.o
+obj-$(CONFIG_SND_SOC_WM5102)	+= snd-soc-wm5102.o
 obj-$(CONFIG_SND_SOC_WM8350)	+= snd-soc-wm8350.o
 obj-$(CONFIG_SND_SOC_WM8400)	+= snd-soc-wm8400.o
 obj-$(CONFIG_SND_SOC_WM8510)	+= snd-soc-wm8510.o
sound/soc/codecs/wm5102.c new file +870 -0

870 lines not on this page · raw message

sound/soc/codecs/wm5102.h new file +21 -0
new file mode 100644
index 0000000..d30477f
@@ -0,0 +1,21 @@
+/*
+ * wm5102.h  --  WM5102 ALSA SoC Audio driver
+ *
+ * Copyright 2012 Wolfson Microelectronics plc
+ *
+ * Author: Mark Brown <[email protected]>
+ *
+ * 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 _WM5102_H
+#define _WM5102_H
+
+#include "arizona.h"
+
+#define WM5102_FLL1 1
+#define WM5102_FLL2 2
+
+#endif
Signature · 1 line
1.7.10