Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e0e16a8 authored by Mark Brown's avatar Mark Brown Committed by Jaroslav Kysela
Browse files

ALSA: ASoC: Add WM8900 CODEC driver



The WM8900 is designed for portable multimedia applications requiring
low power consumption, high performance audio and a compact form factor
providing:

 - 24 bit stereo ADC and DAC
 - Microphone and line inputs
 - Line outputs
 - Class G headphone amplifier

Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
parent 8c650087
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ config SND_SOC_ALL_CODECS
	select SND_SOC_WM8731
	select SND_SOC_WM8750
	select SND_SOC_WM8753
	select SND_SOC_WM8900
	select SND_SOC_WM8990
	select SND_SOC_CS4270
	select SND_SOC_TLV320AIC26
@@ -46,6 +47,9 @@ config SND_SOC_WM8750
config SND_SOC_WM8753
	tristate

config SND_SOC_WM8900
	tristate

config SND_SOC_WM8990
	tristate

+2 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ snd-soc-wm8510-objs := wm8510.o
snd-soc-wm8731-objs := wm8731.o
snd-soc-wm8750-objs := wm8750.o
snd-soc-wm8753-objs := wm8753.o
snd-soc-wm8900-objs := wm8900.o
snd-soc-wm8990-objs := wm8990.o
snd-soc-wm9712-objs := wm9712.o
snd-soc-wm9713-objs := wm9713.o
@@ -21,6 +22,7 @@ obj-$(CONFIG_SND_SOC_WM8510) += snd-soc-wm8510.o
obj-$(CONFIG_SND_SOC_WM8731)	+= snd-soc-wm8731.o
obj-$(CONFIG_SND_SOC_WM8750)	+= snd-soc-wm8750.o
obj-$(CONFIG_SND_SOC_WM8753)	+= snd-soc-wm8753.o
obj-$(CONFIG_SND_SOC_WM8900)	+= snd-soc-wm8900.o
obj-$(CONFIG_SND_SOC_WM8990)	+= snd-soc-wm8990.o
obj-$(CONFIG_SND_SOC_WM9712)	+= snd-soc-wm9712.o
obj-$(CONFIG_SND_SOC_WM9713)	+= snd-soc-wm9713.o
+1542 −0

File added.

Preview size limit exceeded, changes collapsed.

+64 −0
Original line number Diff line number Diff line
/*
 * wm8900.h  --  WM890 Soc Audio driver
 *
 * 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 _WM8900_H
#define _WM8900_H

#define WM8900_FLL 1

#define WM8900_BCLK_DIV   1
#define WM8900_ADC_CLKDIV 2
#define WM8900_DAC_CLKDIV 3
#define WM8900_ADC_LRCLK  4
#define WM8900_DAC_LRCLK  5
#define WM8900_OPCLK_DIV  6
#define WM8900_LRCLK_MODE 7

#define WM8900_BCLK_DIV_1   0x00
#define WM8900_BCLK_DIV_1_5 0x02
#define WM8900_BCLK_DIV_2   0x04
#define WM8900_BCLK_DIV_3   0x06
#define WM8900_BCLK_DIV_4   0x08
#define WM8900_BCLK_DIV_5_5 0x0a
#define WM8900_BCLK_DIV_6   0x0c
#define WM8900_BCLK_DIV_8   0x0e
#define WM8900_BCLK_DIV_11  0x10
#define WM8900_BCLK_DIV_12  0x12
#define WM8900_BCLK_DIV_16  0x14
#define WM8900_BCLK_DIV_22  0x16
#define WM8900_BCLK_DIV_24  0x18
#define WM8900_BCLK_DIV_32  0x1a
#define WM8900_BCLK_DIV_44  0x1c
#define WM8900_BCLK_DIV_48  0x1e

#define WM8900_ADC_CLKDIV_1   0x00
#define WM8900_ADC_CLKDIV_1_5 0x20
#define WM8900_ADC_CLKDIV_2   0x40
#define WM8900_ADC_CLKDIV_3   0x60
#define WM8900_ADC_CLKDIV_4   0x80
#define WM8900_ADC_CLKDIV_5_5 0xa0
#define WM8900_ADC_CLKDIV_6   0xc0

#define WM8900_DAC_CLKDIV_1   0x00
#define WM8900_DAC_CLKDIV_1_5 0x04
#define WM8900_DAC_CLKDIV_2   0x08
#define WM8900_DAC_CLKDIV_3   0x0c
#define WM8900_DAC_CLKDIV_4   0x10
#define WM8900_DAC_CLKDIV_5_5 0x14
#define WM8900_DAC_CLKDIV_6   0x18

#define WM8900_

struct wm8900_setup_data {
	unsigned short i2c_address;
};

extern struct snd_soc_dai wm8900_dai;
extern struct snd_soc_codec_device soc_codec_dev_wm8900;

#endif