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.

[Fixed some interface churn from bitrot due to the patch not going via
the MFD tree as expected -- broonie]

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
Charles Keepax 2013-08-12 23:46:55 +01:00 committed by Mark Brown
parent e7edb2731b
commit 40843aea5a
5 changed files with 1216 additions and 3 deletions

View File

@ -122,6 +122,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
@ -145,8 +146,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
@ -500,6 +503,9 @@ config SND_SOC_WM8995
config SND_SOC_WM8996
tristate
config SND_SOC_WM8997
tristate
config SND_SOC_WM9081
tristate

View File

@ -114,6 +114,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
@ -239,6 +240,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

View File

@ -200,9 +200,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,

1175
sound/soc/codecs/wm8997.c Normal file

File diff suppressed because it is too large Load Diff

23
sound/soc/codecs/wm8997.h Normal file
View File

@ -0,0 +1,23 @@
/*
* wm8997.h -- WM8997 ALSA SoC Audio driver
*
* Copyright 2012 Wolfson Microelectronics plc
*
* Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
*
* 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