New ASoC Drivers for ADI AD1938 codec
Subsystems (3)
PATCH 1/1 New ASoC Drivers for ADI AD1938 codec
1. add AD1938 codec driver (codec)
2. add blackfin SPORT-TDM DAI and PCM driver (platform)
3. add bf5xx board with AD1938 driver (machine)
Signed-off-by Barry Song <[email protected]>
--- include/sound/soc-dai.h | 1 + sound/soc/blackfin/Kconfig | 46 +++- sound/soc/blackfin/Makefile | 6 + sound/soc/blackfin/bf5xx-ad1938.c | 178 ++++++++++++ sound/soc/blackfin/bf5xx-tdm-pcm.c | 330 ++++++++++++++++++++++ sound/soc/blackfin/bf5xx-tdm-pcm.h | 21 ++ sound/soc/blackfin/bf5xx-tdm.c | 295 +++++++++++++++++++ sound/soc/blackfin/bf5xx-tdm.h | 14 + sound/soc/codecs/Kconfig | 4 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/ad1938.c | 548 ++++++++++++++++++++++++++++++++++++ sound/soc/codecs/ad1938.h | 68 +++++ 12 files changed, 1512 insertions(+), 1 deletions(-) create mode 100644 sound/soc/blackfin/bf5xx-ad1938.c create mode 100644 sound/soc/blackfin/bf5xx-tdm-pcm.c create mode 100644 sound/soc/blackfin/bf5xx-tdm-pcm.h create mode 100644 sound/soc/blackfin/bf5xx-tdm.c create mode 100644 sound/soc/blackfin/bf5xx-tdm.h create mode 100644 sound/soc/codecs/ad1938.c create mode 100644 sound/soc/codecs/ad1938.h
include/sound/soc-dai.h +1 -0
@@ -30,6 +30,7 @@ struct snd_pcm_substream;#define SND_SOC_DAIFMT_DSP_A 3/* L data msb after FRM LRC */ #define SND_SOC_DAIFMT_DSP_B 4/* L data msb during FRM LRC */ #define SND_SOC_DAIFMT_AC97 5/* AC97 */ +#define SND_SOC_DAIFMT_SPORT_TDM 6/* SPORT TDM for ADI parts */ /* left and right justified also known as MSB and LSB respectively */ #define SND_SOC_DAIFMT_MSB SND_SOC_DAIFMT_LEFT_J
sound/soc/blackfin/Kconfig +45 -1
66 lines not on this page · raw message
sound/soc/blackfin/Makefile +6 -0
@@ -1,21 +1,27 @@ # Blackfin Platform Support snd-bf5xx-ac97-objs := bf5xx-ac97-pcm.o snd-bf5xx-i2s-objs := bf5xx-i2s-pcm.o +snd-bf5xx-tdm-objs := bf5xx-tdm-pcm.o snd-soc-bf5xx-sport-objs := bf5xx-sport.o snd-soc-bf5xx-ac97-objs := bf5xx-ac97.o snd-soc-bf5xx-i2s-objs := bf5xx-i2s.o +snd-soc-bf5xx-tdm-objs := bf5xx-tdm.o obj-$(CONFIG_SND_BF5XX_AC97) += snd-bf5xx-ac97.o obj-$(CONFIG_SND_BF5XX_I2S) += snd-bf5xx-i2s.o +obj-$(CONFIG_SND_BF5XX_TDM) += snd-bf5xx-tdm.o obj-$(CONFIG_SND_BF5XX_SOC_SPORT) += snd-soc-bf5xx-sport.o obj-$(CONFIG_SND_BF5XX_SOC_AC97) += snd-soc-bf5xx-ac97.o obj-$(CONFIG_SND_BF5XX_SOC_I2S) += snd-soc-bf5xx-i2s.o +obj-$(CONFIG_SND_BF5XX_SOC_TDM) += snd-soc-bf5xx-tdm.o # Blackfin Machine Support snd-ad1980-objs := bf5xx-ad1980.o snd-ssm2602-objs := bf5xx-ssm2602.o snd-ad73311-objs := bf5xx-ad73311.o +snd-ad1938-objs := bf5xx-ad1938.o obj-$(CONFIG_SND_BF5XX_SOC_AD1980) += snd-ad1980.o obj-$(CONFIG_SND_BF5XX_SOC_SSM2602) += snd-ssm2602.o obj-$(CONFIG_SND_BF5XX_SOC_AD73311) += snd-ad73311.o +obj-$(CONFIG_SND_BF5XX_SOC_AD1938) += snd-ad1938.o
sound/soc/blackfin/bf5xx-ad1938.c new file +178 -0
178 lines not on this page · raw message
sound/soc/blackfin/bf5xx-tdm-pcm.c new file +330 -0
330 lines not on this page · raw message
sound/soc/blackfin/bf5xx-tdm-pcm.h new file +21 -0
@@ -0,0 +1,21 @@ +/* +* linux/sound/arm/bf5xx-tdm-pcm.h -- ALSA PCM interface for the Blackfin +* +* Copyright 2009 Analog Device Inc. +* +* 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 _BF5XX_TDM_PCM_H +#define _BF5XX_TDM_PCM_H + +struct bf5xx_pcm_dma_params { +char *name;/* stream identifier */ +}; + +/* platform data */ +extern struct snd_soc_platform bf5xx_tdm_soc_platform; + +#endif
sound/soc/blackfin/bf5xx-tdm.c new file +295 -0
295 lines not on this page · raw message
sound/soc/blackfin/bf5xx-tdm.h new file +14 -0
@@ -0,0 +1,14 @@ +/* +* linux/sound/arm/bf5xx-i2s.h +* +* 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 _BF5XX_TDM_H +#define _BF5XX_TDM_H + +extern struct snd_soc_dai bf5xx_tdm_dai; + +#endif
sound/soc/codecs/Kconfig +4 -0
@@ -12,6 +12,7 @@ config SND_SOC_ALL_CODECS tristate "Build all ASoC CODEC drivers" select SND_SOC_L3 select SND_SOC_AC97_CODEC if SND_SOC_AC97_BUS + select SND_SOC_AD1938 if SPI_MASTER select SND_SOC_AD1939 if I2C select SND_SOC_AD1980 if SND_SOC_AC97_BUS select SND_SOC_AD73311 if I2C
@@ -70,6 +71,9 @@ config SND_SOC_ALL_CODECS config SND_SOC_AC97_CODEC tristate +config SND_SOC_AD1938 + tristate + config SND_SOC_AD1939 tristate
sound/soc/codecs/Makefile +2 -0
@@ -1,4 +1,5 @@ snd-soc-ac97-objs := ac97.o +snd-soc-ad1938-objs := ad1938.o snd-soc-ad1939-objs := ad1939.o snd-soc-ad1980-objs := ad1980.o snd-soc-ak4535-objs := ak4535.o
@@ -49,6 +50,7 @@ snd-soc-wm9712-objs := wm9712.o snd-soc-wm9713-objs := wm9713.o obj-$(CONFIG_SND_SOC_AC97_CODEC) += snd-soc-ac97.o +obj-$(CONFIG_SND_SOC_AD1938) += snd-soc-ad1938.o obj-$(CONFIG_SND_SOC_AD1939) += snd-soc-ad1939.o obj-$(CONFIG_SND_SOC_AD1980) += snd-soc-ad1980.o obj-$(CONFIG_SND_SOC_AD73311) += snd-soc-ad73311.o
sound/soc/codecs/ad1938.c new file +548 -0
548 lines not on this page · raw message
sound/soc/codecs/ad1938.h new file +68 -0
68 lines not on this page · raw message
Signature · 1 line
1.5.6.3
this really should be going to [email protected] than LKML -mike