[alsa-devel] [PATCH 0/4] ASoC: SAMSUNG: Code clean-up suitable for current ASoC
Hi,
This patch remove(or move) unnecessary or un-suitable features on current ASoC for all Samsung audio drivers and its supports. After multi-component model patch, ASoC core part controls dai_links instead of _hard_wired_ dai links on machine drivers. Due to apply this model, many machine drivers don't need codecs and platforms includes to make _hard_wired_ dai_links. And also, ASoC core header file 'sound/soc.h' has basic includes for device driver, so many of includes in each machine/platform driver are duplicated and not essentially needed.
So, this patch-set check each platform/machine drivers' includes and definitions are suitable or not, remove unnecessary features with compile tests.
These patches are modify below features:- o Remove unnecessary 'ac97.h' header file. o Move each specific definitions, not to be shared by header files. o Clean-up unnecessary header includes.
This patch-set is based on two different branches that :- o ASoC patches are based on Mark Brown's git branch 'for-next' (commit id - f6c2ed5dd6ab43447dacc136585fc894e3f3a82d)
This patch-set contains followings :- o [PATCH 1/4] ASoC: SAMSUNG: Remove AC97 header file o [PATCH 2/4] ASoC: SAMSUNG: Clean-up DMA header file o [PATCH 3/4] ASoC: SAMSUNG: Move PCM specific definitions into pcm.c o [PATCH 4/4] ASoC: SAMSUNG: Clean-up header includes
Thanks, Claude(Seungwhan Youn)
This patch moves AC97 specific definitions, they doesn't need to be shared, into 'ac97.c' from 'ac97.h'. This patch also remove header file, 'ac97.h', and remove includes on machine drivers.
Signed-off-by: Seungwhan Youn sw.youn@samsung.com --- sound/soc/samsung/ac97.c | 4 +++- sound/soc/samsung/ac97.h | 21 --------------------- sound/soc/samsung/ln2440sbc_alc650.c | 1 - sound/soc/samsung/smdk2443_wm9710.c | 1 - sound/soc/samsung/smdk_wm9713.c | 1 - 5 files changed, 3 insertions(+), 25 deletions(-) delete mode 100644 sound/soc/samsung/ac97.h
diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c index 4770a95..1e84ee0 100644 --- a/sound/soc/samsung/ac97.c +++ b/sound/soc/samsung/ac97.c @@ -25,11 +25,13 @@ #include <plat/audio.h>
#include "dma.h" -#include "ac97.h"
#define AC_CMD_ADDR(x) (x << 16) #define AC_CMD_DATA(x) (x & 0xffff)
+#define S3C_AC97_DAI_PCM 0 +#define S3C_AC97_DAI_MIC 1 + struct s3c_ac97_info { struct clk *ac97_clk; void __iomem *regs; diff --git a/sound/soc/samsung/ac97.h b/sound/soc/samsung/ac97.h deleted file mode 100644 index 0d0e1b5..0000000 --- a/sound/soc/samsung/ac97.h +++ /dev/null @@ -1,21 +0,0 @@ -/* sound/soc/samsung/ac97.h - * - * ALSA SoC Audio Layer - S3C AC97 Controller driver - * Evolved from s3c2443-ac97.h - * - * Copyright (c) 2010 Samsung Electronics Co. Ltd - * Author: Jaswinder Singh jassi.brar@samsung.com - * Credits: Graeme Gregory, Sean Choi - * - * 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 __S3C_AC97_H_ -#define __S3C_AC97_H_ - -#define S3C_AC97_DAI_PCM 0 -#define S3C_AC97_DAI_MIC 1 - -#endif /* __S3C_AC97_H_ */ diff --git a/sound/soc/samsung/ln2440sbc_alc650.c b/sound/soc/samsung/ln2440sbc_alc650.c index a2bb34d..0241429 100644 --- a/sound/soc/samsung/ln2440sbc_alc650.c +++ b/sound/soc/samsung/ln2440sbc_alc650.c @@ -23,7 +23,6 @@ #include <sound/soc.h>
#include "dma.h" -#include "ac97.h"
static struct snd_soc_card ln2440sbc;
diff --git a/sound/soc/samsung/smdk2443_wm9710.c b/sound/soc/samsung/smdk2443_wm9710.c index 3be7e7e..4bd8c0b 100644 --- a/sound/soc/samsung/smdk2443_wm9710.c +++ b/sound/soc/samsung/smdk2443_wm9710.c @@ -19,7 +19,6 @@ #include <sound/soc.h>
#include "dma.h" -#include "ac97.h"
static struct snd_soc_card smdk2443;
diff --git a/sound/soc/samsung/smdk_wm9713.c b/sound/soc/samsung/smdk_wm9713.c index ae5fed6..d58d86e 100644 --- a/sound/soc/samsung/smdk_wm9713.c +++ b/sound/soc/samsung/smdk_wm9713.c @@ -16,7 +16,6 @@ #include <sound/soc.h>
#include "dma.h" -#include "ac97.h"
static struct snd_soc_card smdk;
This patch moves DMA specific definitions, they doesn't need to be shared, into 'dma.c' from 'dma.h'. And remove unnecessery definitions on 'dma.h'.
Signed-off-by: Seungwhan Youn sw.youn@samsung.com --- sound/soc/samsung/dma.c | 3 +++ sound/soc/samsung/dma.h | 8 -------- 2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c index 2124019..c2cdb45 100644 --- a/sound/soc/samsung/dma.c +++ b/sound/soc/samsung/dma.c @@ -32,6 +32,9 @@
#include "dma.h"
+#define ST_RUNNING (1<<0) +#define ST_OPENED (1<<1) + static const struct snd_pcm_hardware dma_hardware = { .info = SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | diff --git a/sound/soc/samsung/dma.h b/sound/soc/samsung/dma.h index f8cd2b4..c506592 100644 --- a/sound/soc/samsung/dma.h +++ b/sound/soc/samsung/dma.h @@ -12,9 +12,6 @@ #ifndef _S3C_AUDIO_H #define _S3C_AUDIO_H
-#define ST_RUNNING (1<<0) -#define ST_OPENED (1<<1) - struct s3c_dma_params { struct s3c2410_dma_client *client; /* stream identifier */ int channel; /* Channel ID */ @@ -22,9 +19,4 @@ struct s3c_dma_params { int dma_size; /* Size of the DMA transfer */ };
-#define S3C24XX_DAI_I2S 0 - -/* platform data */ -extern struct snd_ac97_bus_ops s3c24xx_ac97_ops; - #endif
On Fri, Jan 7, 2011 at 1:51 PM, Seungwhan Youn sw.youn@samsung.com wrote:
This patch moves DMA specific definitions, they doesn't need to be shared, into 'dma.c' from 'dma.h'. And remove unnecessery definitions on 'dma.h'.
Signed-off-by: Seungwhan Youn sw.youn@samsung.com
Acked-by: Jassi Brar jassi.brar@samsung.com
On Fri, Jan 7, 2011 at 1:46 PM, Seungwhan Youn sw.youn@samsung.com wrote:
This patch moves AC97 specific definitions, they doesn't need to be shared, into 'ac97.c' from 'ac97.h'. This patch also remove header file, 'ac97.h', and remove includes on machine drivers.
Acked-by: Jassi Brar jassi.brar@samsung.com
This patch moves PCM specific definitions, they doesn't need to be shared, into 'pcm.c' from 'pcm.h'.
Signed-off-by: Seungwhan Youn sw.youn@samsung.com --- sound/soc/samsung/pcm.c | 107 +++++++++++++++++++++++++++++++++++++++++++++++ sound/soc/samsung/pcm.h | 107 ----------------------------------------------- 2 files changed, 107 insertions(+), 107 deletions(-)
diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c index 48d0b75..091db5d 100644 --- a/sound/soc/samsung/pcm.c +++ b/sound/soc/samsung/pcm.c @@ -32,6 +32,113 @@ #include "dma.h" #include "pcm.h"
+/*Register Offsets */ +#define S3C_PCM_CTL 0x00 +#define S3C_PCM_CLKCTL 0x04 +#define S3C_PCM_TXFIFO 0x08 +#define S3C_PCM_RXFIFO 0x0C +#define S3C_PCM_IRQCTL 0x10 +#define S3C_PCM_IRQSTAT 0x14 +#define S3C_PCM_FIFOSTAT 0x18 +#define S3C_PCM_CLRINT 0x20 + +/* PCM_CTL Bit-Fields */ +#define S3C_PCM_CTL_TXDIPSTICK_MASK 0x3f +#define S3C_PCM_CTL_TXDIPSTICK_SHIFT 13 +#define S3C_PCM_CTL_RXDIPSTICK_MASK 0x3f +#define S3C_PCM_CTL_RXDIPSTICK_SHIFT 7 +#define S3C_PCM_CTL_TXDMA_EN (0x1 << 6) +#define S3C_PCM_CTL_RXDMA_EN (0x1 << 5) +#define S3C_PCM_CTL_TXMSB_AFTER_FSYNC (0x1 << 4) +#define S3C_PCM_CTL_RXMSB_AFTER_FSYNC (0x1 << 3) +#define S3C_PCM_CTL_TXFIFO_EN (0x1 << 2) +#define S3C_PCM_CTL_RXFIFO_EN (0x1 << 1) +#define S3C_PCM_CTL_ENABLE (0x1 << 0) + +/* PCM_CLKCTL Bit-Fields */ +#define S3C_PCM_CLKCTL_SERCLK_EN (0x1 << 19) +#define S3C_PCM_CLKCTL_SERCLKSEL_PCLK (0x1 << 18) +#define S3C_PCM_CLKCTL_SCLKDIV_MASK 0x1ff +#define S3C_PCM_CLKCTL_SYNCDIV_MASK 0x1ff +#define S3C_PCM_CLKCTL_SCLKDIV_SHIFT 9 +#define S3C_PCM_CLKCTL_SYNCDIV_SHIFT 0 + +/* PCM_TXFIFO Bit-Fields */ +#define S3C_PCM_TXFIFO_DVALID (0x1 << 16) +#define S3C_PCM_TXFIFO_DATA_MSK (0xffff << 0) + +/* PCM_RXFIFO Bit-Fields */ +#define S3C_PCM_RXFIFO_DVALID (0x1 << 16) +#define S3C_PCM_RXFIFO_DATA_MSK (0xffff << 0) + +/* PCM_IRQCTL Bit-Fields */ +#define S3C_PCM_IRQCTL_IRQEN (0x1 << 14) +#define S3C_PCM_IRQCTL_WRDEN (0x1 << 12) +#define S3C_PCM_IRQCTL_TXEMPTYEN (0x1 << 11) +#define S3C_PCM_IRQCTL_TXALMSTEMPTYEN (0x1 << 10) +#define S3C_PCM_IRQCTL_TXFULLEN (0x1 << 9) +#define S3C_PCM_IRQCTL_TXALMSTFULLEN (0x1 << 8) +#define S3C_PCM_IRQCTL_TXSTARVEN (0x1 << 7) +#define S3C_PCM_IRQCTL_TXERROVRFLEN (0x1 << 6) +#define S3C_PCM_IRQCTL_RXEMPTEN (0x1 << 5) +#define S3C_PCM_IRQCTL_RXALMSTEMPTEN (0x1 << 4) +#define S3C_PCM_IRQCTL_RXFULLEN (0x1 << 3) +#define S3C_PCM_IRQCTL_RXALMSTFULLEN (0x1 << 2) +#define S3C_PCM_IRQCTL_RXSTARVEN (0x1 << 1) +#define S3C_PCM_IRQCTL_RXERROVRFLEN (0x1 << 0) + +/* PCM_IRQSTAT Bit-Fields */ +#define S3C_PCM_IRQSTAT_IRQPND (0x1 << 13) +#define S3C_PCM_IRQSTAT_WRD_XFER (0x1 << 12) +#define S3C_PCM_IRQSTAT_TXEMPTY (0x1 << 11) +#define S3C_PCM_IRQSTAT_TXALMSTEMPTY (0x1 << 10) +#define S3C_PCM_IRQSTAT_TXFULL (0x1 << 9) +#define S3C_PCM_IRQSTAT_TXALMSTFULL (0x1 << 8) +#define S3C_PCM_IRQSTAT_TXSTARV (0x1 << 7) +#define S3C_PCM_IRQSTAT_TXERROVRFL (0x1 << 6) +#define S3C_PCM_IRQSTAT_RXEMPT (0x1 << 5) +#define S3C_PCM_IRQSTAT_RXALMSTEMPT (0x1 << 4) +#define S3C_PCM_IRQSTAT_RXFULL (0x1 << 3) +#define S3C_PCM_IRQSTAT_RXALMSTFULL (0x1 << 2) +#define S3C_PCM_IRQSTAT_RXSTARV (0x1 << 1) +#define S3C_PCM_IRQSTAT_RXERROVRFL (0x1 << 0) + +/* PCM_FIFOSTAT Bit-Fields */ +#define S3C_PCM_FIFOSTAT_TXCNT_MSK (0x3f << 14) +#define S3C_PCM_FIFOSTAT_TXFIFOEMPTY (0x1 << 13) +#define S3C_PCM_FIFOSTAT_TXFIFOALMSTEMPTY (0x1 << 12) +#define S3C_PCM_FIFOSTAT_TXFIFOFULL (0x1 << 11) +#define S3C_PCM_FIFOSTAT_TXFIFOALMSTFULL (0x1 << 10) +#define S3C_PCM_FIFOSTAT_RXCNT_MSK (0x3f << 4) +#define S3C_PCM_FIFOSTAT_RXFIFOEMPTY (0x1 << 3) +#define S3C_PCM_FIFOSTAT_RXFIFOALMSTEMPTY (0x1 << 2) +#define S3C_PCM_FIFOSTAT_RXFIFOFULL (0x1 << 1) +#define S3C_PCM_FIFOSTAT_RXFIFOALMSTFULL (0x1 << 0) + +/** + * struct s3c_pcm_info - S3C PCM Controller information + * @dev: The parent device passed to use from the probe. + * @regs: The pointer to the device register block. + * @dma_playback: DMA information for playback channel. + * @dma_capture: DMA information for capture channel. + */ +struct s3c_pcm_info { + spinlock_t lock; + struct device *dev; + void __iomem *regs; + + unsigned int sclk_per_fs; + + /* Whether to keep PCMSCLK enabled even when idle(no active xfer) */ + unsigned int idleclk; + + struct clk *pclk; + struct clk *cclk; + + struct s3c_dma_params *dma_playback; + struct s3c_dma_params *dma_capture; +}; + static struct s3c2410_dma_client s3c_pcm_dma_client_out = { .name = "PCM Stereo out" }; diff --git a/sound/soc/samsung/pcm.h b/sound/soc/samsung/pcm.h index 03393dc..726baf8 100644 --- a/sound/soc/samsung/pcm.h +++ b/sound/soc/samsung/pcm.h @@ -9,116 +9,9 @@ #ifndef __S3C_PCM_H #define __S3C_PCM_H __FILE__
-/*Register Offsets */ -#define S3C_PCM_CTL (0x00) -#define S3C_PCM_CLKCTL (0x04) -#define S3C_PCM_TXFIFO (0x08) -#define S3C_PCM_RXFIFO (0x0C) -#define S3C_PCM_IRQCTL (0x10) -#define S3C_PCM_IRQSTAT (0x14) -#define S3C_PCM_FIFOSTAT (0x18) -#define S3C_PCM_CLRINT (0x20) - -/* PCM_CTL Bit-Fields */ -#define S3C_PCM_CTL_TXDIPSTICK_MASK (0x3f) -#define S3C_PCM_CTL_TXDIPSTICK_SHIFT (13) -#define S3C_PCM_CTL_RXDIPSTICK_MASK (0x3f) -#define S3C_PCM_CTL_RXDIPSTICK_SHIFT (7) -#define S3C_PCM_CTL_TXDMA_EN (0x1<<6) -#define S3C_PCM_CTL_RXDMA_EN (0x1<<5) -#define S3C_PCM_CTL_TXMSB_AFTER_FSYNC (0x1<<4) -#define S3C_PCM_CTL_RXMSB_AFTER_FSYNC (0x1<<3) -#define S3C_PCM_CTL_TXFIFO_EN (0x1<<2) -#define S3C_PCM_CTL_RXFIFO_EN (0x1<<1) -#define S3C_PCM_CTL_ENABLE (0x1<<0) - -/* PCM_CLKCTL Bit-Fields */ -#define S3C_PCM_CLKCTL_SERCLK_EN (0x1<<19) -#define S3C_PCM_CLKCTL_SERCLKSEL_PCLK (0x1<<18) -#define S3C_PCM_CLKCTL_SCLKDIV_MASK (0x1ff) -#define S3C_PCM_CLKCTL_SYNCDIV_MASK (0x1ff) -#define S3C_PCM_CLKCTL_SCLKDIV_SHIFT (9) -#define S3C_PCM_CLKCTL_SYNCDIV_SHIFT (0) - -/* PCM_TXFIFO Bit-Fields */ -#define S3C_PCM_TXFIFO_DVALID (0x1<<16) -#define S3C_PCM_TXFIFO_DATA_MSK (0xffff<<0) - -/* PCM_RXFIFO Bit-Fields */ -#define S3C_PCM_RXFIFO_DVALID (0x1<<16) -#define S3C_PCM_RXFIFO_DATA_MSK (0xffff<<0) - -/* PCM_IRQCTL Bit-Fields */ -#define S3C_PCM_IRQCTL_IRQEN (0x1<<14) -#define S3C_PCM_IRQCTL_WRDEN (0x1<<12) -#define S3C_PCM_IRQCTL_TXEMPTYEN (0x1<<11) -#define S3C_PCM_IRQCTL_TXALMSTEMPTYEN (0x1<<10) -#define S3C_PCM_IRQCTL_TXFULLEN (0x1<<9) -#define S3C_PCM_IRQCTL_TXALMSTFULLEN (0x1<<8) -#define S3C_PCM_IRQCTL_TXSTARVEN (0x1<<7) -#define S3C_PCM_IRQCTL_TXERROVRFLEN (0x1<<6) -#define S3C_PCM_IRQCTL_RXEMPTEN (0x1<<5) -#define S3C_PCM_IRQCTL_RXALMSTEMPTEN (0x1<<4) -#define S3C_PCM_IRQCTL_RXFULLEN (0x1<<3) -#define S3C_PCM_IRQCTL_RXALMSTFULLEN (0x1<<2) -#define S3C_PCM_IRQCTL_RXSTARVEN (0x1<<1) -#define S3C_PCM_IRQCTL_RXERROVRFLEN (0x1<<0) - -/* PCM_IRQSTAT Bit-Fields */ -#define S3C_PCM_IRQSTAT_IRQPND (0x1<<13) -#define S3C_PCM_IRQSTAT_WRD_XFER (0x1<<12) -#define S3C_PCM_IRQSTAT_TXEMPTY (0x1<<11) -#define S3C_PCM_IRQSTAT_TXALMSTEMPTY (0x1<<10) -#define S3C_PCM_IRQSTAT_TXFULL (0x1<<9) -#define S3C_PCM_IRQSTAT_TXALMSTFULL (0x1<<8) -#define S3C_PCM_IRQSTAT_TXSTARV (0x1<<7) -#define S3C_PCM_IRQSTAT_TXERROVRFL (0x1<<6) -#define S3C_PCM_IRQSTAT_RXEMPT (0x1<<5) -#define S3C_PCM_IRQSTAT_RXALMSTEMPT (0x1<<4) -#define S3C_PCM_IRQSTAT_RXFULL (0x1<<3) -#define S3C_PCM_IRQSTAT_RXALMSTFULL (0x1<<2) -#define S3C_PCM_IRQSTAT_RXSTARV (0x1<<1) -#define S3C_PCM_IRQSTAT_RXERROVRFL (0x1<<0) - -/* PCM_FIFOSTAT Bit-Fields */ -#define S3C_PCM_FIFOSTAT_TXCNT_MSK (0x3f<<14) -#define S3C_PCM_FIFOSTAT_TXFIFOEMPTY (0x1<<13) -#define S3C_PCM_FIFOSTAT_TXFIFOALMSTEMPTY (0x1<<12) -#define S3C_PCM_FIFOSTAT_TXFIFOFULL (0x1<<11) -#define S3C_PCM_FIFOSTAT_TXFIFOALMSTFULL (0x1<<10) -#define S3C_PCM_FIFOSTAT_RXCNT_MSK (0x3f<<4) -#define S3C_PCM_FIFOSTAT_RXFIFOEMPTY (0x1<<3) -#define S3C_PCM_FIFOSTAT_RXFIFOALMSTEMPTY (0x1<<2) -#define S3C_PCM_FIFOSTAT_RXFIFOFULL (0x1<<1) -#define S3C_PCM_FIFOSTAT_RXFIFOALMSTFULL (0x1<<0) - #define S3C_PCM_CLKSRC_PCLK 0 #define S3C_PCM_CLKSRC_MUX 1
#define S3C_PCM_SCLK_PER_FS 0
-/** - * struct s3c_pcm_info - S3C PCM Controller information - * @dev: The parent device passed to use from the probe. - * @regs: The pointer to the device register block. - * @dma_playback: DMA information for playback channel. - * @dma_capture: DMA information for capture channel. - */ -struct s3c_pcm_info { - spinlock_t lock; - struct device *dev; - void __iomem *regs; - - unsigned int sclk_per_fs; - - /* Whether to keep PCMSCLK enabled even when idle(no active xfer) */ - unsigned int idleclk; - - struct clk *pclk; - struct clk *cclk; - - struct s3c_dma_params *dma_playback; - struct s3c_dma_params *dma_capture; -}; - #endif /* __S3C_PCM_H */
On Fri, Jan 7, 2011 at 1:57 PM, Seungwhan Youn sw.youn@samsung.com wrote:
This patch moves PCM specific definitions, they doesn't need to be shared, into 'pcm.c' from 'pcm.h'.
Signed-off-by: Seungwhan Youn sw.youn@samsung.com
Acked-by: Jassi Brar jassi.brar@samsung.com
This patch remove including unnecessary/duplicated headers which relative with Samsung SoCs.
Signed-off-by: Seungwhan Youn sw.youn@samsung.com --- sound/soc/samsung/ac97.c | 8 +++----- sound/soc/samsung/dma.c | 12 +++--------- sound/soc/samsung/goni_wm8994.c | 10 +--------- sound/soc/samsung/h1940_uda1380.c | 11 +---------- sound/soc/samsung/i2s.c | 7 +++---- sound/soc/samsung/jive_wm8750.c | 11 ----------- sound/soc/samsung/ln2440sbc_alc650.c | 6 ------ sound/soc/samsung/neo1973_gta02_wm8753.c | 15 ++------------- sound/soc/samsung/pcm.c | 15 +++------------ sound/soc/samsung/rx1950_uda1380.c | 14 +------------- sound/soc/samsung/s3c-i2s-v2.c | 7 +++---- sound/soc/samsung/s3c2412-i2s.c | 16 +++------------- sound/soc/samsung/s3c24xx-i2s.c | 18 +++--------------- sound/soc/samsung/s3c24xx_simtec.c | 12 ++---------- sound/soc/samsung/s3c24xx_simtec_hermes.c | 10 ---------- sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c | 12 ------------ sound/soc/samsung/s3c24xx_uda134x.c | 12 ++---------- sound/soc/samsung/smartq_wm8987.c | 9 +-------- sound/soc/samsung/smdk2443_wm9710.c | 6 ------ sound/soc/samsung/smdk_spdif.c | 9 ++------- sound/soc/samsung/smdk_wm8580.c | 7 +------ sound/soc/samsung/smdk_wm9713.c | 4 ---- sound/soc/samsung/spdif.c | 7 +++---- 23 files changed, 37 insertions(+), 201 deletions(-)
diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c index 1e84ee0..18528d8 100644 --- a/sound/soc/samsung/ac97.c +++ b/sound/soc/samsung/ac97.c @@ -12,16 +12,14 @@ * published by the Free Software Foundation. */
-#include <linux/init.h> -#include <linux/module.h> +#include <sound/soc.h> + #include <linux/io.h> #include <linux/delay.h> #include <linux/clk.h>
-#include <sound/soc.h> - -#include <plat/regs-ac97.h> #include <mach/dma.h> +#include <plat/regs-ac97.h> #include <plat/audio.h>
#include "dma.h" diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c index c2cdb45..c80c070 100644 --- a/sound/soc/samsung/dma.c +++ b/sound/soc/samsung/dma.c @@ -14,18 +14,12 @@ * option) any later version. */
-#include <linux/module.h> -#include <linux/init.h> -#include <linux/io.h> -#include <linux/platform_device.h> +#include <sound/soc.h> +#include <sound/pcm_params.h> + #include <linux/slab.h> #include <linux/dma-mapping.h>
-#include <sound/core.h> -#include <sound/pcm.h> -#include <sound/pcm_params.h> -#include <sound/soc.h> - #include <asm/dma.h> #include <mach/hardware.h> #include <mach/dma.h> diff --git a/sound/soc/samsung/goni_wm8994.c b/sound/soc/samsung/goni_wm8994.c index 34dd9ef..f6b3a3c 100644 --- a/sound/soc/samsung/goni_wm8994.c +++ b/sound/soc/samsung/goni_wm8994.c @@ -11,21 +11,13 @@ * */
-#include <linux/module.h> -#include <linux/moduleparam.h> -#include <linux/io.h> -#include <linux/platform_device.h> #include <sound/soc.h> #include <sound/jack.h> + #include <asm/mach-types.h> #include <mach/gpio.h> -#include <mach/regs-clock.h>
-#include <linux/mfd/wm8994/core.h> -#include <linux/mfd/wm8994/registers.h> #include "../codecs/wm8994.h" -#include "dma.h" -#include "i2s.h"
#define MACHINE_NAME 0 #define CPU_VOICE_DAI 1 diff --git a/sound/soc/samsung/h1940_uda1380.c b/sound/soc/samsung/h1940_uda1380.c index c45f7ce..5653e6d 100644 --- a/sound/soc/samsung/h1940_uda1380.c +++ b/sound/soc/samsung/h1940_uda1380.c @@ -13,25 +13,16 @@ * */
-#include <linux/module.h> -#include <linux/moduleparam.h> -#include <linux/platform_device.h> -#include <linux/i2c.h> -#include <linux/gpio.h>
#include <sound/soc.h> -#include <sound/uda1380.h> #include <sound/jack.h>
+#include <linux/gpio.h> #include <plat/regs-iis.h> - #include <mach/h1940-latch.h> - #include <asm/mach-types.h>
-#include "dma.h" #include "s3c24xx-i2s.h" -#include "../codecs/uda1380.h"
static unsigned int rates[] = { 11025, diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index d00ac3a..4fa24e0 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -10,15 +10,14 @@ * published by the Free Software Foundation. */
+#include <sound/soc.h> +#include <sound/pcm_params.h> + #include <linux/delay.h> #include <linux/slab.h> #include <linux/clk.h> #include <linux/io.h>
-#include <sound/pcm.h> -#include <sound/pcm_params.h> -#include <sound/soc.h> - #include <plat/audio.h>
#include "dma.h" diff --git a/sound/soc/samsung/jive_wm8750.c b/sound/soc/samsung/jive_wm8750.c index 0880252..3b53ad5 100644 --- a/sound/soc/samsung/jive_wm8750.c +++ b/sound/soc/samsung/jive_wm8750.c @@ -11,22 +11,11 @@ * published by the Free Software Foundation. */
-#include <linux/module.h> -#include <linux/moduleparam.h> -#include <linux/timer.h> -#include <linux/interrupt.h> -#include <linux/platform_device.h> -#include <linux/clk.h> - -#include <sound/core.h> -#include <sound/pcm.h> #include <sound/soc.h>
#include <asm/mach-types.h>
-#include "dma.h" #include "s3c2412-i2s.h" - #include "../codecs/wm8750.h"
static const struct snd_soc_dapm_route audio_map[] = { diff --git a/sound/soc/samsung/ln2440sbc_alc650.c b/sound/soc/samsung/ln2440sbc_alc650.c index 0241429..bd91c19 100644 --- a/sound/soc/samsung/ln2440sbc_alc650.c +++ b/sound/soc/samsung/ln2440sbc_alc650.c @@ -16,14 +16,8 @@ * */
-#include <linux/module.h> -#include <linux/device.h> -#include <sound/core.h> -#include <sound/pcm.h> #include <sound/soc.h>
-#include "dma.h" - static struct snd_soc_card ln2440sbc;
static struct snd_soc_dai_link ln2440sbc_dai[] = { diff --git a/sound/soc/samsung/neo1973_gta02_wm8753.c b/sound/soc/samsung/neo1973_gta02_wm8753.c index 3eec610..3fe16e5 100644 --- a/sound/soc/samsung/neo1973_gta02_wm8753.c +++ b/sound/soc/samsung/neo1973_gta02_wm8753.c @@ -13,25 +13,14 @@ * option) any later version. */
-#include <linux/module.h> -#include <linux/moduleparam.h> -#include <linux/timer.h> -#include <linux/interrupt.h> -#include <linux/platform_device.h> -#include <linux/gpio.h> -#include <sound/core.h> -#include <sound/pcm.h> #include <sound/soc.h>
+#include <linux/gpio.h> #include <asm/mach-types.h> - #include <plat/regs-iis.h> - -#include <mach/regs-clock.h> -#include <asm/io.h> #include <mach/gta02.h> + #include "../codecs/wm8753.h" -#include "dma.h" #include "s3c24xx-i2s.h"
static struct snd_soc_card neo1973_gta02; diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c index 091db5d..b7562be 100644 --- a/sound/soc/samsung/pcm.c +++ b/sound/soc/samsung/pcm.c @@ -11,21 +11,12 @@ * published by the Free Software Foundation. */
-#include <linux/init.h> -#include <linux/module.h> -#include <linux/device.h> -#include <linux/delay.h> +#include <sound/soc.h> +#include <sound/pcm_params.h> + #include <linux/clk.h> -#include <linux/kernel.h> -#include <linux/gpio.h> #include <linux/io.h>
-#include <sound/core.h> -#include <sound/pcm.h> -#include <sound/pcm_params.h> -#include <sound/initval.h> -#include <sound/soc.h> - #include <plat/audio.h> #include <plat/dma.h>
diff --git a/sound/soc/samsung/rx1950_uda1380.c b/sound/soc/samsung/rx1950_uda1380.c index 5a4587e..29b1c6d 100644 --- a/sound/soc/samsung/rx1950_uda1380.c +++ b/sound/soc/samsung/rx1950_uda1380.c @@ -17,26 +17,14 @@ * */
-#include <linux/module.h> -#include <linux/moduleparam.h> -#include <linux/platform_device.h> -#include <linux/i2c.h> -#include <linux/gpio.h> -#include <linux/clk.h> - #include <sound/soc.h> -#include <sound/uda1380.h> #include <sound/jack.h>
+#include <linux/gpio.h> #include <plat/regs-iis.h> - -#include <mach/regs-clock.h> - #include <asm/mach-types.h>
-#include "dma.h" #include "s3c24xx-i2s.h" -#include "../codecs/uda1380.h"
static int rx1950_uda1380_init(struct snd_soc_pcm_runtime *rtd); static int rx1950_startup(struct snd_pcm_substream *substream); diff --git a/sound/soc/samsung/s3c-i2s-v2.c b/sound/soc/samsung/s3c-i2s-v2.c index 094f36e..5f1a2a4 100644 --- a/sound/soc/samsung/s3c-i2s-v2.c +++ b/sound/soc/samsung/s3c-i2s-v2.c @@ -16,14 +16,13 @@ * option) any later version. */
+#include <sound/soc.h> +#include <sound/pcm_params.h> + #include <linux/delay.h> #include <linux/clk.h> #include <linux/io.h>
-#include <sound/pcm.h> -#include <sound/pcm_params.h> -#include <sound/soc.h> - #include <mach/dma.h>
#include "regs-i2s-v2.h" diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c index 7ea8378..a6977b7 100644 --- a/sound/soc/samsung/s3c2412-i2s.c +++ b/sound/soc/samsung/s3c2412-i2s.c @@ -16,22 +16,14 @@ * option) any later version. */
-#include <linux/init.h> -#include <linux/module.h> -#include <linux/device.h> +#include <sound/soc.h> +#include <sound/pcm_params.h> + #include <linux/delay.h> #include <linux/gpio.h> #include <linux/clk.h> -#include <linux/kernel.h> #include <linux/io.h>
-#include <sound/core.h> -#include <sound/pcm.h> -#include <sound/pcm_params.h> -#include <sound/initval.h> -#include <sound/soc.h> -#include <mach/hardware.h> - #include <mach/regs-gpio.h> #include <mach/dma.h>
@@ -39,8 +31,6 @@ #include "regs-i2s-v2.h" #include "s3c2412-i2s.h"
-#define S3C2412_I2S_DEBUG 0 - static struct s3c2410_dma_client s3c2412_dma_client_out = { .name = "I2S PCM Stereo out" }; diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c index 13e41ed..3b8e3ba 100644 --- a/sound/soc/samsung/s3c24xx-i2s.c +++ b/sound/soc/samsung/s3c24xx-i2s.c @@ -14,28 +14,16 @@ * option) any later version. */
-#include <linux/init.h> -#include <linux/module.h> -#include <linux/device.h> +#include <sound/soc.h> +#include <sound/pcm_params.h> + #include <linux/delay.h> #include <linux/clk.h> -#include <linux/jiffies.h> #include <linux/io.h> #include <linux/gpio.h>
-#include <sound/core.h> -#include <sound/pcm.h> -#include <sound/pcm_params.h> -#include <sound/initval.h> -#include <sound/soc.h> - -#include <mach/hardware.h> #include <mach/regs-gpio.h> -#include <mach/regs-clock.h> - -#include <asm/dma.h> #include <mach/dma.h> - #include <plat/regs-iis.h>
#include "dma.h" diff --git a/sound/soc/samsung/s3c24xx_simtec.c b/sound/soc/samsung/s3c24xx_simtec.c index a434032..e8ac932 100644 --- a/sound/soc/samsung/s3c24xx_simtec.c +++ b/sound/soc/samsung/s3c24xx_simtec.c @@ -7,20 +7,12 @@ * published by the Free Software Foundation. */
-#include <linux/module.h> -#include <linux/moduleparam.h> -#include <linux/platform_device.h> -#include <linux/gpio.h> -#include <linux/clk.h> -#include <linux/i2c.h> - -#include <sound/core.h> -#include <sound/pcm.h> #include <sound/soc.h>
+#include <linux/gpio.h> +#include <linux/clk.h> #include <plat/audio-simtec.h>
-#include "dma.h" #include "s3c24xx-i2s.h" #include "s3c24xx_simtec.h"
diff --git a/sound/soc/samsung/s3c24xx_simtec_hermes.c b/sound/soc/samsung/s3c24xx_simtec_hermes.c index bb4292e..d7b3e6e 100644 --- a/sound/soc/samsung/s3c24xx_simtec_hermes.c +++ b/sound/soc/samsung/s3c24xx_simtec_hermes.c @@ -7,18 +7,8 @@ * published by the Free Software Foundation. */
-#include <linux/module.h> -#include <linux/clk.h> -#include <linux/platform_device.h> - -#include <sound/core.h> -#include <sound/pcm.h> #include <sound/soc.h>
-#include <plat/audio-simtec.h> - -#include "dma.h" -#include "s3c24xx-i2s.h" #include "s3c24xx_simtec.h"
static const struct snd_soc_dapm_widget dapm_widgets[] = { diff --git a/sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c b/sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c index fbba4e3..ff6168f 100644 --- a/sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c +++ b/sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c @@ -7,22 +7,10 @@ * published by the Free Software Foundation. */
-#include <linux/module.h> -#include <linux/clk.h> -#include <linux/platform_device.h> - -#include <sound/core.h> -#include <sound/pcm.h> #include <sound/soc.h>
-#include <plat/audio-simtec.h> - -#include "dma.h" -#include "s3c24xx-i2s.h" #include "s3c24xx_simtec.h"
-#include "../codecs/tlv320aic23.h" - /* supported machines: * * Machine Connections AMP diff --git a/sound/soc/samsung/s3c24xx_uda134x.c b/sound/soc/samsung/s3c24xx_uda134x.c index cdc8ecb..70a7598 100644 --- a/sound/soc/samsung/s3c24xx_uda134x.c +++ b/sound/soc/samsung/s3c24xx_uda134x.c @@ -11,22 +11,14 @@ * published by the Free Software Foundation. */
-#include <linux/module.h> -#include <linux/clk.h> -#include <linux/mutex.h> -#include <linux/gpio.h> -#include <sound/pcm.h> -#include <sound/pcm_params.h> #include <sound/soc.h> #include <sound/s3c24xx_uda134x.h> -#include <sound/uda134x.h>
+#include <linux/clk.h> +#include <linux/gpio.h> #include <plat/regs-iis.h>
-#include "dma.h" #include "s3c24xx-i2s.h" -#include "../codecs/uda134x.h" -
/* #define ENFORCE_RATES 1 */ /* diff --git a/sound/soc/samsung/smartq_wm8987.c b/sound/soc/samsung/smartq_wm8987.c index 61e2b52..4e5ae41 100644 --- a/sound/soc/samsung/smartq_wm8987.c +++ b/sound/soc/samsung/smartq_wm8987.c @@ -13,20 +13,13 @@ * */
-#include <linux/module.h> -#include <linux/platform_device.h> -#include <linux/gpio.h> - -#include <sound/pcm.h> -#include <sound/pcm_params.h> #include <sound/soc.h> #include <sound/jack.h>
+#include <linux/gpio.h> #include <asm/mach-types.h>
-#include "dma.h" #include "i2s.h" - #include "../codecs/wm8750.h"
/* diff --git a/sound/soc/samsung/smdk2443_wm9710.c b/sound/soc/samsung/smdk2443_wm9710.c index 4bd8c0b..3a0dbfc 100644 --- a/sound/soc/samsung/smdk2443_wm9710.c +++ b/sound/soc/samsung/smdk2443_wm9710.c @@ -12,14 +12,8 @@ * */
-#include <linux/module.h> -#include <linux/device.h> -#include <sound/core.h> -#include <sound/pcm.h> #include <sound/soc.h>
-#include "dma.h" - static struct snd_soc_card smdk2443;
static struct snd_soc_dai_link smdk2443_dai[] = { diff --git a/sound/soc/samsung/smdk_spdif.c b/sound/soc/samsung/smdk_spdif.c index cb2f4d0..5c1f9fb 100644 --- a/sound/soc/samsung/smdk_spdif.c +++ b/sound/soc/samsung/smdk_spdif.c @@ -10,15 +10,10 @@ * */
-#include <linux/module.h> -#include <linux/device.h> -#include <linux/clk.h> - -#include <plat/devs.h> - #include <sound/soc.h>
-#include "dma.h" +#include <linux/clk.h> + #include "spdif.h"
/* Audio clock settings are belonged to board specific part. Every diff --git a/sound/soc/samsung/smdk_wm8580.c b/sound/soc/samsung/smdk_wm8580.c index b2cff1a..8aacf23 100644 --- a/sound/soc/samsung/smdk_wm8580.c +++ b/sound/soc/samsung/smdk_wm8580.c @@ -10,17 +10,12 @@ * option) any later version. */
-#include <linux/platform_device.h> -#include <linux/clk.h> -#include <sound/core.h> -#include <sound/pcm.h> -#include <sound/pcm_params.h> #include <sound/soc.h> +#include <sound/pcm_params.h>
#include <asm/mach-types.h>
#include "../codecs/wm8580.h" -#include "dma.h" #include "i2s.h"
/* diff --git a/sound/soc/samsung/smdk_wm9713.c b/sound/soc/samsung/smdk_wm9713.c index d58d86e..fffe3c1 100644 --- a/sound/soc/samsung/smdk_wm9713.c +++ b/sound/soc/samsung/smdk_wm9713.c @@ -11,12 +11,8 @@ * */
-#include <linux/module.h> -#include <linux/device.h> #include <sound/soc.h>
-#include "dma.h" - static struct snd_soc_card smdk;
/* diff --git a/sound/soc/samsung/spdif.c b/sound/soc/samsung/spdif.c index f081640..94cc716 100644 --- a/sound/soc/samsung/spdif.c +++ b/sound/soc/samsung/spdif.c @@ -10,13 +10,12 @@ * published by the Free Software Foundation. */
+#include <sound/soc.h> +#include <sound/pcm_params.h> + #include <linux/clk.h> #include <linux/io.h>
-#include <sound/pcm.h> -#include <sound/pcm_params.h> -#include <sound/soc.h> - #include <plat/audio.h> #include <mach/dma.h>
On Fri, Jan 7, 2011 at 1:57 PM, Seungwhan Youn sw.youn@samsung.com wrote:
This patch remove including unnecessary/duplicated headers which relative with Samsung SoCs.
Signed-off-by: Seungwhan Youn sw.youn@samsung.com
sound/soc/samsung/ac97.c | 8 +++----- sound/soc/samsung/dma.c | 12 +++--------- sound/soc/samsung/goni_wm8994.c | 10 +--------- sound/soc/samsung/h1940_uda1380.c | 11 +---------- sound/soc/samsung/i2s.c | 7 +++---- sound/soc/samsung/jive_wm8750.c | 11 ----------- sound/soc/samsung/ln2440sbc_alc650.c | 6 ------ sound/soc/samsung/neo1973_gta02_wm8753.c | 15 ++------------- sound/soc/samsung/pcm.c | 15 +++------------ sound/soc/samsung/rx1950_uda1380.c | 14 +------------- sound/soc/samsung/s3c-i2s-v2.c | 7 +++---- sound/soc/samsung/s3c2412-i2s.c | 16 +++------------- sound/soc/samsung/s3c24xx-i2s.c | 18 +++--------------- sound/soc/samsung/s3c24xx_simtec.c | 12 ++---------- sound/soc/samsung/s3c24xx_simtec_hermes.c | 10 ---------- sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c | 12 ------------ sound/soc/samsung/s3c24xx_uda134x.c | 12 ++---------- sound/soc/samsung/smartq_wm8987.c | 9 +-------- sound/soc/samsung/smdk2443_wm9710.c | 6 ------ sound/soc/samsung/smdk_spdif.c | 9 ++------- sound/soc/samsung/smdk_wm8580.c | 7 +------ sound/soc/samsung/smdk_wm9713.c | 4 ---- sound/soc/samsung/spdif.c | 7 +++---- 23 files changed, 37 insertions(+), 201 deletions(-)
diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c index 1e84ee0..18528d8 100644 --- a/sound/soc/samsung/ac97.c +++ b/sound/soc/samsung/ac97.c @@ -12,16 +12,14 @@ * published by the Free Software Foundation. */
-#include <linux/init.h> -#include <linux/module.h> +#include <sound/soc.h>
#include <linux/io.h> #include <linux/delay.h> #include <linux/clk.h>
-#include <sound/soc.h>
-#include <plat/regs-ac97.h> #include <mach/dma.h> +#include <plat/regs-ac97.h> #include <plat/audio.h>
I think we'd better keep sound includes after linux's. Same for all such instances in the remaining of the patch. Otherwise, the patch is ok.
Thanks
On Fri, Jan 7, 2011 at 3:08 PM, Jassi Brar jassisinghbrar@gmail.com wrote:
On Fri, Jan 7, 2011 at 1:57 PM, Seungwhan Youn sw.youn@samsung.com wrote:
This patch remove including unnecessary/duplicated headers which relative with Samsung SoCs.
Signed-off-by: Seungwhan Youn sw.youn@samsung.com
I think we'd better keep sound includes after linux's.
As you know, 'include/sound/soc.h' has some general linux's includes. So I made these sequence to prevent dependency problem, because reverse including could have some problem, if linux's includes has their dependencies.
Do we really keep this, 'sound includes after linux's'? :(
Thanks
On Fri, Jan 07, 2011 at 04:03:46PM +0900, Seungwhan Youn wrote:
As you know, 'include/sound/soc.h' has some general linux's includes. So I made these sequence to prevent dependency problem, because reverse including could have some problem, if linux's includes has their dependencies.
If there's dependency problems in the core headers we should just fix those, users shouldn't need to worry about that sort of stuff.
On Fri, Jan 7, 2011 at 7:38 PM, Mark Brown broonie@opensource.wolfsonmicro.com wrote:
On Fri, Jan 07, 2011 at 04:03:46PM +0900, Seungwhan Youn wrote:
As you know, 'include/sound/soc.h' has some general linux's includes. So I made these sequence to prevent dependency problem, because reverse including could have some problem, if linux's includes has their dependencies.
If there's dependency problems in the core headers we should just fix those, users shouldn't need to worry about that sort of stuff.
Hmm... I see. I'll re-submit this patch which applies Jassi's suggestion with compile test. ;)
Thanks. claude
This patch remove including unnecessary/duplicated headers which relative with Samsung SoCs.
Signed-off-by: Seungwhan Youn sw.youn@samsung.com --- sound/soc/samsung/ac97.c | 4 +--- sound/soc/samsung/dma.c | 8 +------- sound/soc/samsung/goni_wm8994.c | 10 +--------- sound/soc/samsung/h1940_uda1380.c | 9 --------- sound/soc/samsung/i2s.c | 3 +-- sound/soc/samsung/jive_wm8750.c | 11 ----------- sound/soc/samsung/ln2440sbc_alc650.c | 6 ------ sound/soc/samsung/neo1973_gta02_wm8753.c | 14 ++------------ sound/soc/samsung/pcm.c | 11 +---------- sound/soc/samsung/rx1950_uda1380.c | 11 ----------- sound/soc/samsung/s3c-i2s-v2.c | 3 +-- sound/soc/samsung/s3c2412-i2s.c | 12 +----------- sound/soc/samsung/s3c24xx-i2s.c | 14 +------------- sound/soc/samsung/s3c24xx_simtec.c | 7 ------- sound/soc/samsung/s3c24xx_simtec_hermes.c | 10 ---------- sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c | 12 ------------ sound/soc/samsung/s3c24xx_uda134x.c | 9 +-------- sound/soc/samsung/smartq_wm8987.c | 6 ------ sound/soc/samsung/smdk2443_wm9710.c | 6 ------ sound/soc/samsung/smdk_spdif.c | 5 ----- sound/soc/samsung/smdk_wm8580.c | 7 +------ sound/soc/samsung/smdk_wm9713.c | 4 ---- sound/soc/samsung/spdif.c | 3 +-- 23 files changed, 13 insertions(+), 172 deletions(-)
diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c index 1e84ee0..f97110e 100644 --- a/sound/soc/samsung/ac97.c +++ b/sound/soc/samsung/ac97.c @@ -12,16 +12,14 @@ * published by the Free Software Foundation. */
-#include <linux/init.h> -#include <linux/module.h> #include <linux/io.h> #include <linux/delay.h> #include <linux/clk.h>
#include <sound/soc.h>
-#include <plat/regs-ac97.h> #include <mach/dma.h> +#include <plat/regs-ac97.h> #include <plat/audio.h>
#include "dma.h" diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c index c2cdb45..9bce1df 100644 --- a/sound/soc/samsung/dma.c +++ b/sound/soc/samsung/dma.c @@ -14,17 +14,11 @@ * option) any later version. */
-#include <linux/module.h> -#include <linux/init.h> -#include <linux/io.h> -#include <linux/platform_device.h> #include <linux/slab.h> #include <linux/dma-mapping.h>
-#include <sound/core.h> -#include <sound/pcm.h> -#include <sound/pcm_params.h> #include <sound/soc.h> +#include <sound/pcm_params.h>
#include <asm/dma.h> #include <mach/hardware.h> diff --git a/sound/soc/samsung/goni_wm8994.c b/sound/soc/samsung/goni_wm8994.c index 34dd9ef..f6b3a3c 100644 --- a/sound/soc/samsung/goni_wm8994.c +++ b/sound/soc/samsung/goni_wm8994.c @@ -11,21 +11,13 @@ * */
-#include <linux/module.h> -#include <linux/moduleparam.h> -#include <linux/io.h> -#include <linux/platform_device.h> #include <sound/soc.h> #include <sound/jack.h> + #include <asm/mach-types.h> #include <mach/gpio.h> -#include <mach/regs-clock.h>
-#include <linux/mfd/wm8994/core.h> -#include <linux/mfd/wm8994/registers.h> #include "../codecs/wm8994.h" -#include "dma.h" -#include "i2s.h"
#define MACHINE_NAME 0 #define CPU_VOICE_DAI 1 diff --git a/sound/soc/samsung/h1940_uda1380.c b/sound/soc/samsung/h1940_uda1380.c index c45f7ce..241f55d 100644 --- a/sound/soc/samsung/h1940_uda1380.c +++ b/sound/soc/samsung/h1940_uda1380.c @@ -13,25 +13,16 @@ * */
-#include <linux/module.h> -#include <linux/moduleparam.h> -#include <linux/platform_device.h> -#include <linux/i2c.h> #include <linux/gpio.h>
#include <sound/soc.h> -#include <sound/uda1380.h> #include <sound/jack.h>
#include <plat/regs-iis.h> - #include <mach/h1940-latch.h> - #include <asm/mach-types.h>
-#include "dma.h" #include "s3c24xx-i2s.h" -#include "../codecs/uda1380.h"
static unsigned int rates[] = { 11025, diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index d00ac3a..ffa09b3 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -15,9 +15,8 @@ #include <linux/clk.h> #include <linux/io.h>
-#include <sound/pcm.h> -#include <sound/pcm_params.h> #include <sound/soc.h> +#include <sound/pcm_params.h>
#include <plat/audio.h>
diff --git a/sound/soc/samsung/jive_wm8750.c b/sound/soc/samsung/jive_wm8750.c index 0880252..3b53ad5 100644 --- a/sound/soc/samsung/jive_wm8750.c +++ b/sound/soc/samsung/jive_wm8750.c @@ -11,22 +11,11 @@ * published by the Free Software Foundation. */
-#include <linux/module.h> -#include <linux/moduleparam.h> -#include <linux/timer.h> -#include <linux/interrupt.h> -#include <linux/platform_device.h> -#include <linux/clk.h> - -#include <sound/core.h> -#include <sound/pcm.h> #include <sound/soc.h>
#include <asm/mach-types.h>
-#include "dma.h" #include "s3c2412-i2s.h" - #include "../codecs/wm8750.h"
static const struct snd_soc_dapm_route audio_map[] = { diff --git a/sound/soc/samsung/ln2440sbc_alc650.c b/sound/soc/samsung/ln2440sbc_alc650.c index 0241429..bd91c19 100644 --- a/sound/soc/samsung/ln2440sbc_alc650.c +++ b/sound/soc/samsung/ln2440sbc_alc650.c @@ -16,14 +16,8 @@ * */
-#include <linux/module.h> -#include <linux/device.h> -#include <sound/core.h> -#include <sound/pcm.h> #include <sound/soc.h>
-#include "dma.h" - static struct snd_soc_card ln2440sbc;
static struct snd_soc_dai_link ln2440sbc_dai[] = { diff --git a/sound/soc/samsung/neo1973_gta02_wm8753.c b/sound/soc/samsung/neo1973_gta02_wm8753.c index 3eec610..69e08fd 100644 --- a/sound/soc/samsung/neo1973_gta02_wm8753.c +++ b/sound/soc/samsung/neo1973_gta02_wm8753.c @@ -13,25 +13,15 @@ * option) any later version. */
-#include <linux/module.h> -#include <linux/moduleparam.h> -#include <linux/timer.h> -#include <linux/interrupt.h> -#include <linux/platform_device.h> #include <linux/gpio.h> -#include <sound/core.h> -#include <sound/pcm.h> + #include <sound/soc.h>
#include <asm/mach-types.h> - #include <plat/regs-iis.h> - -#include <mach/regs-clock.h> -#include <asm/io.h> #include <mach/gta02.h> + #include "../codecs/wm8753.h" -#include "dma.h" #include "s3c24xx-i2s.h"
static struct snd_soc_card neo1973_gta02; diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c index 091db5d..38aac7d 100644 --- a/sound/soc/samsung/pcm.c +++ b/sound/soc/samsung/pcm.c @@ -11,20 +11,11 @@ * published by the Free Software Foundation. */
-#include <linux/init.h> -#include <linux/module.h> -#include <linux/device.h> -#include <linux/delay.h> #include <linux/clk.h> -#include <linux/kernel.h> -#include <linux/gpio.h> #include <linux/io.h>
-#include <sound/core.h> -#include <sound/pcm.h> -#include <sound/pcm_params.h> -#include <sound/initval.h> #include <sound/soc.h> +#include <sound/pcm_params.h>
#include <plat/audio.h> #include <plat/dma.h> diff --git a/sound/soc/samsung/rx1950_uda1380.c b/sound/soc/samsung/rx1950_uda1380.c index 5a4587e..5f2479c 100644 --- a/sound/soc/samsung/rx1950_uda1380.c +++ b/sound/soc/samsung/rx1950_uda1380.c @@ -17,26 +17,15 @@ * */
-#include <linux/module.h> -#include <linux/moduleparam.h> -#include <linux/platform_device.h> -#include <linux/i2c.h> #include <linux/gpio.h> -#include <linux/clk.h>
#include <sound/soc.h> -#include <sound/uda1380.h> #include <sound/jack.h>
#include <plat/regs-iis.h> - -#include <mach/regs-clock.h> - #include <asm/mach-types.h>
-#include "dma.h" #include "s3c24xx-i2s.h" -#include "../codecs/uda1380.h"
static int rx1950_uda1380_init(struct snd_soc_pcm_runtime *rtd); static int rx1950_startup(struct snd_pcm_substream *substream); diff --git a/sound/soc/samsung/s3c-i2s-v2.c b/sound/soc/samsung/s3c-i2s-v2.c index 094f36e..52074a2 100644 --- a/sound/soc/samsung/s3c-i2s-v2.c +++ b/sound/soc/samsung/s3c-i2s-v2.c @@ -20,9 +20,8 @@ #include <linux/clk.h> #include <linux/io.h>
-#include <sound/pcm.h> -#include <sound/pcm_params.h> #include <sound/soc.h> +#include <sound/pcm_params.h>
#include <mach/dma.h>
diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c index 7ea8378..841ab14 100644 --- a/sound/soc/samsung/s3c2412-i2s.c +++ b/sound/soc/samsung/s3c2412-i2s.c @@ -16,21 +16,13 @@ * option) any later version. */
-#include <linux/init.h> -#include <linux/module.h> -#include <linux/device.h> #include <linux/delay.h> #include <linux/gpio.h> #include <linux/clk.h> -#include <linux/kernel.h> #include <linux/io.h>
-#include <sound/core.h> -#include <sound/pcm.h> -#include <sound/pcm_params.h> -#include <sound/initval.h> #include <sound/soc.h> -#include <mach/hardware.h> +#include <sound/pcm_params.h>
#include <mach/regs-gpio.h> #include <mach/dma.h> @@ -39,8 +31,6 @@ #include "regs-i2s-v2.h" #include "s3c2412-i2s.h"
-#define S3C2412_I2S_DEBUG 0 - static struct s3c2410_dma_client s3c2412_dma_client_out = { .name = "I2S PCM Stereo out" }; diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c index 13e41ed..63d8849 100644 --- a/sound/soc/samsung/s3c24xx-i2s.c +++ b/sound/soc/samsung/s3c24xx-i2s.c @@ -14,28 +14,16 @@ * option) any later version. */
-#include <linux/init.h> -#include <linux/module.h> -#include <linux/device.h> #include <linux/delay.h> #include <linux/clk.h> -#include <linux/jiffies.h> #include <linux/io.h> #include <linux/gpio.h>
-#include <sound/core.h> -#include <sound/pcm.h> -#include <sound/pcm_params.h> -#include <sound/initval.h> #include <sound/soc.h> +#include <sound/pcm_params.h>
-#include <mach/hardware.h> #include <mach/regs-gpio.h> -#include <mach/regs-clock.h> - -#include <asm/dma.h> #include <mach/dma.h> - #include <plat/regs-iis.h>
#include "dma.h" diff --git a/sound/soc/samsung/s3c24xx_simtec.c b/sound/soc/samsung/s3c24xx_simtec.c index a434032..349566f 100644 --- a/sound/soc/samsung/s3c24xx_simtec.c +++ b/sound/soc/samsung/s3c24xx_simtec.c @@ -7,20 +7,13 @@ * published by the Free Software Foundation. */
-#include <linux/module.h> -#include <linux/moduleparam.h> -#include <linux/platform_device.h> #include <linux/gpio.h> #include <linux/clk.h> -#include <linux/i2c.h>
-#include <sound/core.h> -#include <sound/pcm.h> #include <sound/soc.h>
#include <plat/audio-simtec.h>
-#include "dma.h" #include "s3c24xx-i2s.h" #include "s3c24xx_simtec.h"
diff --git a/sound/soc/samsung/s3c24xx_simtec_hermes.c b/sound/soc/samsung/s3c24xx_simtec_hermes.c index bb4292e..d7b3e6e 100644 --- a/sound/soc/samsung/s3c24xx_simtec_hermes.c +++ b/sound/soc/samsung/s3c24xx_simtec_hermes.c @@ -7,18 +7,8 @@ * published by the Free Software Foundation. */
-#include <linux/module.h> -#include <linux/clk.h> -#include <linux/platform_device.h> - -#include <sound/core.h> -#include <sound/pcm.h> #include <sound/soc.h>
-#include <plat/audio-simtec.h> - -#include "dma.h" -#include "s3c24xx-i2s.h" #include "s3c24xx_simtec.h"
static const struct snd_soc_dapm_widget dapm_widgets[] = { diff --git a/sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c b/sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c index fbba4e3..ff6168f 100644 --- a/sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c +++ b/sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c @@ -7,22 +7,10 @@ * published by the Free Software Foundation. */
-#include <linux/module.h> -#include <linux/clk.h> -#include <linux/platform_device.h> - -#include <sound/core.h> -#include <sound/pcm.h> #include <sound/soc.h>
-#include <plat/audio-simtec.h> - -#include "dma.h" -#include "s3c24xx-i2s.h" #include "s3c24xx_simtec.h"
-#include "../codecs/tlv320aic23.h" - /* supported machines: * * Machine Connections AMP diff --git a/sound/soc/samsung/s3c24xx_uda134x.c b/sound/soc/samsung/s3c24xx_uda134x.c index cdc8ecb..ce749a1 100644 --- a/sound/soc/samsung/s3c24xx_uda134x.c +++ b/sound/soc/samsung/s3c24xx_uda134x.c @@ -11,22 +11,15 @@ * published by the Free Software Foundation. */
-#include <linux/module.h> #include <linux/clk.h> -#include <linux/mutex.h> #include <linux/gpio.h> -#include <sound/pcm.h> -#include <sound/pcm_params.h> + #include <sound/soc.h> #include <sound/s3c24xx_uda134x.h> -#include <sound/uda134x.h>
#include <plat/regs-iis.h>
-#include "dma.h" #include "s3c24xx-i2s.h" -#include "../codecs/uda134x.h" -
/* #define ENFORCE_RATES 1 */ /* diff --git a/sound/soc/samsung/smartq_wm8987.c b/sound/soc/samsung/smartq_wm8987.c index 61e2b52..0a2c4f2 100644 --- a/sound/soc/samsung/smartq_wm8987.c +++ b/sound/soc/samsung/smartq_wm8987.c @@ -13,20 +13,14 @@ * */
-#include <linux/module.h> -#include <linux/platform_device.h> #include <linux/gpio.h>
-#include <sound/pcm.h> -#include <sound/pcm_params.h> #include <sound/soc.h> #include <sound/jack.h>
#include <asm/mach-types.h>
-#include "dma.h" #include "i2s.h" - #include "../codecs/wm8750.h"
/* diff --git a/sound/soc/samsung/smdk2443_wm9710.c b/sound/soc/samsung/smdk2443_wm9710.c index 4bd8c0b..3a0dbfc 100644 --- a/sound/soc/samsung/smdk2443_wm9710.c +++ b/sound/soc/samsung/smdk2443_wm9710.c @@ -12,14 +12,8 @@ * */
-#include <linux/module.h> -#include <linux/device.h> -#include <sound/core.h> -#include <sound/pcm.h> #include <sound/soc.h>
-#include "dma.h" - static struct snd_soc_card smdk2443;
static struct snd_soc_dai_link smdk2443_dai[] = { diff --git a/sound/soc/samsung/smdk_spdif.c b/sound/soc/samsung/smdk_spdif.c index cb2f4d0..d42fe8d 100644 --- a/sound/soc/samsung/smdk_spdif.c +++ b/sound/soc/samsung/smdk_spdif.c @@ -10,15 +10,10 @@ * */
-#include <linux/module.h> -#include <linux/device.h> #include <linux/clk.h>
-#include <plat/devs.h> - #include <sound/soc.h>
-#include "dma.h" #include "spdif.h"
/* Audio clock settings are belonged to board specific part. Every diff --git a/sound/soc/samsung/smdk_wm8580.c b/sound/soc/samsung/smdk_wm8580.c index b2cff1a..8aacf23 100644 --- a/sound/soc/samsung/smdk_wm8580.c +++ b/sound/soc/samsung/smdk_wm8580.c @@ -10,17 +10,12 @@ * option) any later version. */
-#include <linux/platform_device.h> -#include <linux/clk.h> -#include <sound/core.h> -#include <sound/pcm.h> -#include <sound/pcm_params.h> #include <sound/soc.h> +#include <sound/pcm_params.h>
#include <asm/mach-types.h>
#include "../codecs/wm8580.h" -#include "dma.h" #include "i2s.h"
/* diff --git a/sound/soc/samsung/smdk_wm9713.c b/sound/soc/samsung/smdk_wm9713.c index d58d86e..fffe3c1 100644 --- a/sound/soc/samsung/smdk_wm9713.c +++ b/sound/soc/samsung/smdk_wm9713.c @@ -11,12 +11,8 @@ * */
-#include <linux/module.h> -#include <linux/device.h> #include <sound/soc.h>
-#include "dma.h" - static struct snd_soc_card smdk;
/* diff --git a/sound/soc/samsung/spdif.c b/sound/soc/samsung/spdif.c index f081640..28c491d 100644 --- a/sound/soc/samsung/spdif.c +++ b/sound/soc/samsung/spdif.c @@ -13,9 +13,8 @@ #include <linux/clk.h> #include <linux/io.h>
-#include <sound/pcm.h> -#include <sound/pcm_params.h> #include <sound/soc.h> +#include <sound/pcm_params.h>
#include <plat/audio.h> #include <mach/dma.h>
On Tue, 2011-01-11 at 07:26 +0900, Seungwhan Youn wrote:
This patch remove including unnecessary/duplicated headers which relative with Samsung SoCs.
Signed-off-by: Seungwhan Youn sw.youn@samsung.com
Acked-by: Liam Girdwood lrg@slimlogic.co.uk
On Tue, Jan 11, 2011 at 7:26 AM, Seungwhan Youn sw.youn@samsung.com wrote:
This patch remove including unnecessary/duplicated headers which relative with Samsung SoCs.
Signed-off-by: Seungwhan Youn sw.youn@samsung.com
Acked-by: Jassi Brar jassi.brar@samsung.com
On Tue, Jan 11, 2011 at 07:26:06AM +0900, Seungwhan Youn wrote:
This patch remove including unnecessary/duplicated headers which relative with Samsung SoCs.
Signed-off-by: Seungwhan Youn sw.youn@samsung.com
Applied, thanks.
On Fri, 2011-01-07 at 13:43 +0900, Seungwhan Youn wrote:
Hi,
This patch remove(or move) unnecessary or un-suitable features on current ASoC for all Samsung audio drivers and its supports. After multi-component model patch, ASoC core part controls dai_links instead of _hard_wired_ dai links on machine drivers. Due to apply this model, many machine drivers don't need codecs and platforms includes to make _hard_wired_ dai_links. And also, ASoC core header file 'sound/soc.h' has basic includes for device driver, so many of includes in each machine/platform driver are duplicated and not essentially needed.
So, this patch-set check each platform/machine drivers' includes and definitions are suitable or not, remove unnecessary features with compile tests.
These patches are modify below features:- o Remove unnecessary 'ac97.h' header file. o Move each specific definitions, not to be shared by header files. o Clean-up unnecessary header includes.
This patch-set is based on two different branches that :- o ASoC patches are based on Mark Brown's git branch 'for-next' (commit id - f6c2ed5dd6ab43447dacc136585fc894e3f3a82d)
This patch-set contains followings :- o [PATCH 1/4] ASoC: SAMSUNG: Remove AC97 header file o [PATCH 2/4] ASoC: SAMSUNG: Clean-up DMA header file o [PATCH 3/4] ASoC: SAMSUNG: Move PCM specific definitions into pcm.c o [PATCH 4/4] ASoC: SAMSUNG: Clean-up header includes
All
Acked-by: Liam Girdwood lrg@slimlogic.co.uk
On Sun, Jan 09, 2011 at 02:01:22PM +0000, Liam Girdwood wrote:
On Fri, 2011-01-07 at 13:43 +0900, Seungwhan Youn wrote:
o [PATCH 1/4] ASoC: SAMSUNG: Remove AC97 header file o [PATCH 2/4] ASoC: SAMSUNG: Clean-up DMA header file o [PATCH 3/4] ASoC: SAMSUNG: Move PCM specific definitions into pcm.c o [PATCH 4/4] ASoC: SAMSUNG: Clean-up header includes
Acked-by: Liam Girdwood lrg@slimlogic.co.uk
I've applied 1-3, as discussed please do the updates Jassi requested to patch 4.
participants (5)
-
Jassi Brar
-
Liam Girdwood
-
Mark Brown
-
Seungwhan Youn
-
Seungwhan Youn