ASoC: wm8997: Initial CODEC driver
Subsystems (4)
A message that is not in the archive (sent off-list or not yet received): 1371113011-11918-1-git-send-email-ckeepax@opensource.wolfsonmicro.com
PATCH v2 2/3 ASoC: wm8997: Initial CODEC driver
The wm8997 is a compact, high-performance audio hub CODEC with SLIMbus interfacing, for smartphones, tablets and other portable audio devices based on the Arizona platform.
This patch adds the wm8997 CODEC driver.
--- sound/soc/codecs/Kconfig | 6 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/arizona.c | 13 +- sound/soc/codecs/wm8997.c | 1187 ++++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/wm8997.h | 23 + 5 files changed, 1228 insertions(+), 3 deletions(-) create mode 100644 sound/soc/codecs/wm8997.c create mode 100644 sound/soc/codecs/wm8997.h
sound/soc/codecs/Kconfig +6 -0
@@ -120,6 +120,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_WM8994 if MFD_WM8994 select SND_SOC_WM8995 if SND_SOC_I2C_AND_SPI select SND_SOC_WM8996 if I2C + select SND_SOC_WM8997 if MFD_WM8997 select SND_SOC_WM9081 if I2C select SND_SOC_WM9090 if I2C select SND_SOC_WM9705 if SND_SOC_AC97_BUS
@@ -143,8 +144,10 @@ config SND_SOC_ARIZONA tristate default y if SND_SOC_WM5102=y default y if SND_SOC_WM5110=y + default y if SND_SOC_WM8997=y default m if SND_SOC_WM5102=m default m if SND_SOC_WM5110=m + default m if SND_SOC_WM8997=m config SND_SOC_WM_HUBS tristate
@@ -492,6 +495,9 @@ config SND_SOC_WM8995 config SND_SOC_WM8996 tristate +config SND_SOC_WM8997 + tristate + config SND_SOC_WM9081 tristate
sound/soc/codecs/Makefile +2 -0
@@ -112,6 +112,7 @@ snd-soc-wm8991-objs := wm8991.o snd-soc-wm8993-objs := wm8993.o snd-soc-wm8994-objs := wm8994.o wm8958-dsp2.o snd-soc-wm8995-objs := wm8995.o +snd-soc-wm8997-objs := wm8997.o snd-soc-wm9081-objs := wm9081.o snd-soc-wm9090-objs := wm9090.o snd-soc-wm9705-objs := wm9705.o
@@ -235,6 +236,7 @@ obj-$(CONFIG_SND_SOC_WM8991) += snd-soc-wm8991.o obj-$(CONFIG_SND_SOC_WM8993) += snd-soc-wm8993.o obj-$(CONFIG_SND_SOC_WM8994) += snd-soc-wm8994.o obj-$(CONFIG_SND_SOC_WM8995) += snd-soc-wm8995.o +obj-$(CONFIG_SND_SOC_WM8997) += snd-soc-wm8997.o obj-$(CONFIG_SND_SOC_WM9081) += snd-soc-wm9081.o obj-$(CONFIG_SND_SOC_WM9090) += snd-soc-wm9090.o obj-$(CONFIG_SND_SOC_WM9705) += snd-soc-wm9705.o
sound/soc/codecs/arizona.c +10 -3
@@ -199,9 +199,16 @@ int arizona_init_spk(struct snd_soc_codec *codec)if (ret !=0 )return ret; - ret =snd_soc_dapm_new_controls (&codec->dapm, &arizona_spkr,1 ); -if (ret !=0 ) -return ret; +switch (arizona->type) { +case WM8997 : +break ; +default : + ret =snd_soc_dapm_new_controls (&codec->dapm, + &arizona_spkr,1 ); +if (ret !=0 ) +return ret; +break ; + } ret = arizona_request_irq(arizona, ARIZONA_IRQ_SPK_SHUTDOWN_WARN, "Thermal warning", arizona_thermal_warn,
sound/soc/codecs/wm8997.c new file +1187 -0
1,187 lines not on this page · raw message
sound/soc/codecs/wm8997.h new file +23 -0
@@ -0,0 +1,23 @@ +/* +* wm8997.h -- WM8997 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 _WM8997_H +#define _WM8997_H + +#include "arizona.h" + +#define WM8997_FLL1 1 +#define WM8997_FLL2 2 +#define WM8997_FLL1_REFCLK 3 +#define WM8997_FLL2_REFCLK 4 + +#endif
Signature · 1 line
1.7.2.5
Quoted 5 lines · Charles Keepax
The wm8997 is a compact, high-performance audio hub CODEC with SLIMbus interfacing, for smartphones, tablets and other portable audio devices based on the Arizona platform.
This patch adds the wm8997 CODEC driver.
Or I can apply the lot to the ASoC tree.
Mark Brown
maintainerQuoted 10 lines · Mark Brown
Quoted 5 lines · Charles Keepax
The wm8997 is a compact, high-performance audio hub CODEC with SLIMbus interfacing, for smartphones, tablets and other portable audio devices based on the Arizona platform.
This patch adds the wm8997 CODEC driver.
Acked-by Mark Brown <[email protected]>Or I can apply the lot to the ASoC tree.
I applied this since it didn't get applied to the mfd tree as I had been expecting; Charles, you ought to keep track to make sure things are getting applied. The same thing has happened to the GPIO driver.
Quoted 3 lines · Mark Brown
I applied this since it didn't get applied to the mfd tree as I had been expecting; Charles, you ought to keep track to make sure things are getting applied. The same thing has happened to the GPIO driver.
Thanks for that. Sending this out again has been on the todo list for a little while, apologies for not getting around to it. I will check what is going on the GPIO part of it and resend that if necessary.
Thanks,
Charles
PATCH v2 3/3 gpio: arizona: Add wm8997 support to probe
In reply to a message not in the archive--- drivers/gpio/gpio-arizona.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/gpio/gpio-arizona.c +1 -0
@@ -113,6 +113,7 @@ static int arizona_gpio_probe(struct platform_device *pdev)switch (arizona->type) {case WM5102 :case WM5110 : +case WM8997 : arizona_gpio->gpio_chip.ngpio =5 ;break ;default :
Signature · 1 line
1.7.2.5
Samuel Ortiz
AppliedRe: [PATCH 1/3 v2] mfd: arizona: Integrate wm8997 into Arizona mfd
In reply to a message not in the archiveHi Charles,
Quoted 7 lines · Charles Keepax
The wm8997 is a compact, high-performance audio hub CODEC with SLIMbus interfacing, for smartphones, tablets and other portable audio devices based on the Arizona platform.
This patch integrates the wm8997 into the Arizona mfd.
Signed-off-by Charles Keepax <[email protected]>
Quoted 11 lines
--- drivers/mfd/Kconfig | 6 + drivers/mfd/Makefile | 3 + drivers/mfd/arizona-core.c | 27 + drivers/mfd/arizona-i2c.c | 6 + drivers/mfd/arizona-irq.c | 8 + drivers/mfd/arizona.h | 5 + drivers/mfd/wm8997-tables.c | 1525 ++++++++++++++++++++++++++++++++++++++ include/linux/mfd/arizona/core.h | 2 + 8 files changed, 1582 insertions(+), 0 deletions(-) create mode 100644 drivers/mfd/wm8997-tables.c
Applied to mfd-next, thanks.
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/