AFEB9260 ASoC driver
Subsystems (6)
PATCH 1/1 AFEB9260 ASoC driver
ASoC driver for AT91SAM9260-based AFEB9260 board
--- arch/arm/mach-at91/board-afeb-9260v1.c | 4 + sound/soc/atmel/Kconfig | 8 ++ sound/soc/atmel/Makefile | 1 + sound/soc/atmel/afeb9260.c | 217 ++++++++++++++++++++++++++++++++ 4 files changed, 230 insertions(+), 0 deletions(-) create mode 100644 sound/soc/atmel/afeb9260.c
arch/arm/mach-at91/board-afeb-9260v1.c +4 -0
@@ -164,6 +164,8 @@ static struct at91_mmc_data __initdata afeb9260_mmc_data = {static struct i2c_board_info __initdata afeb9260_i2c_devices[] = { { +I2C_BOARD_INFO ("tlv320aic23" ,0x1a ), + }, {I2C_BOARD_INFO ("fm3130" ,0x68 ), }, {I2C_BOARD_INFO ("24c64" ,0x50 ),
@@ -196,6 +198,8 @@ static void __init afeb9260_board_init(void)/* I2C */ at91_add_device_i2c (afeb9260_i2c_devices,ARRAY_SIZE (afeb9260_i2c_devices)); +/* Audio */ +at91_add_device_ssc (AT91SAM9260_ID_SSC ,ATMEL_SSC_TX ); }MACHINE_START (AFEB9260 ,"Custom afeb9260 board" )
sound/soc/atmel/Kconfig +8 -0
@@ -41,3 +41,11 @@ config SND_AT32_SOC_PLAYPAQ_SLAVE and FRAME signals on the PlayPaq. Unless you want to play with the AT32 as the SSC master, you probably want to say N here, as this will give you better sound quality. + +config SND_AT91_SOC_AFEB9260 + tristate "SoC Audio support for AFEB9260 board" + depends on ARCH_AT91 && MACH_AFEB9260 && SND_ATMEL_SOC + select SND_ATMEL_SOC_SSC + select SND_SOC_TLV320AIC23 + help + Say Y here to support sound on AFEB9260 board.
sound/soc/atmel/Makefile +1 -0
@@ -13,3 +13,4 @@ snd-soc-playpaq-objs := playpaq_wm8510.o obj-$(CONFIG_SND_AT91_SOC_SAM9G20_WM8731) += snd-soc-sam9g20-wm8731.o obj-$(CONFIG_SND_AT32_SOC_PLAYPAQ) += snd-soc-playpaq.o +obj-$(CONFIG_SND_AT91_SOC_AFEB9260) += afeb9260.o
sound/soc/atmel/afeb9260.c new file +217 -0
217 lines not on this page · raw message
Signature · 1 line
1.5.6.5
Quoted 1 line · Sergey Lapin
ASoC driver for AT91SAM9260-based AFEB9260 board
This looks good - there's some issues below but they're all pretty nitpicky.
arch/arm/mach-at91/board-afeb-9260v1.c static struct at91_mmc_data __initdata afeb9260_mmc_data = { · line 168
Quoted 4 lines
static struct
i2c_board_info__initdataafeb9260_i2c_devices[] = {arch/arm/mach-at91/board-afeb-9260v1.c +2
-0{ + I2C_BOARD_INFO("tlv320aic23", 0x1a), + }, {
Push this separately via arch/arm - there's no build time dependency here and it'll avoid any merge issues.
Quoted 3 lines
obj-$(CONFIG_SND_AT91_SOC_SAM9G20_WM8731) += snd-soc-sam9g20-wm8731.o obj-$(CONFIG_SND_AT32_SOC_PLAYPAQ) += snd-soc-playpaq.o
+obj-$(CONFIG_SND_AT91_SOC_AFEB9260) += afeb9260.o
Normally ASoC drivers have a snd-soc- prefix.
Quoted 4 lines
+/*
+ *afeb9260.c-- SoC audio for AFEB9260
+ *
+ * Copyright (C) 2008 Sergey Lapin <[email protected]>
2009?
sound/soc/atmel/afeb9260.c line 48
Quoted 4 lines
sound/soc/atmel/afeb9260.c new file +4
-0+static int afeb9260_startup (struct snd_pcm_substream *substream) +{ +return 1 ; +}
This is unneeded and should be removed.
sound/soc/atmel/afeb9260.c line 55
Quoted 6 lines
sound/soc/atmel/afeb9260.c new file +6
-0+static void afeb9260_shutdown (struct snd_pcm_substream *substream) +{ +struct snd_soc_pcm_runtime *rtd =snd_pcm_substream_chip (substream); + +dev_dbg (rtd->socdev->dev,"shutdown" ); +}
This too.
sound/soc/atmel/afeb9260.c line 124
Quoted 6 lines
sound/soc/atmel/afeb9260.c new file +6
-0+static int afeb9260_tlv320aic23_init (struct snd_soc_codec *codec) +{ + +/* Add osk5912 specific widgets */ +snd_soc_dapm_new_controls (codec, tlv320aic23_dapm_widgets, +ARRAY_SIZE (tlv320aic23_dapm_widgets));
Cut'n'paste error in the comments (and in a few other places) :)
sound/soc/atmel/afeb9260.c line 209
Quoted 4 lines
sound/soc/atmel/afeb9260.c new file +4
-0+static void __exit afeb9260_soc_exit(void) +{ +platform_device_unregister (afeb9260_snd_device); +}
Do you want to reverse your requst of the SSC port here?
Quoted 6 lines · Mark Brown
Quoted 1 line · Sergey Lapin
ASoC driver for AT91SAM9260-based AFEB9260 board
This looks good - there's some issues below but they're all pretty nitpicky.
Quoted 7 lines
arch/arm/mach-at91/board-afeb-9260v1.c static struct at91_mmc_data __initdata afeb9260_mmc_data = { · line 168
Quoted 4 lines
static struct
i2c_board_info__initdataafeb9260_i2c_devices[] = {arch/arm/mach-at91/board-afeb-9260v1.c +2
-0{ + I2C_BOARD_INFO("tlv320aic23", 0x1a), + }, {Push this separately via
arch/arm- there's no build time dependency here and it'll avoid any merge issues.
Ok, will submit this separately.
Quoted 6 lines
sound/soc/atmel/afeb9260.c line 209
Quoted 4 lines
sound/soc/atmel/afeb9260.c new file +4
-0+static void __exit afeb9260_soc_exit(void) +{ +platform_device_unregister (afeb9260_snd_device); +}Do you want to reverse your requst of the SSC port here?
What would you suggest alternatively?
All the best,
S.
Quoted 4 lines · Sergey Lapin
Quoted 1 line · Mark Brown
Do you want to reverse your requst of the SSC port here?
What would you suggest alternatively?
I don't know off hand but if there's a ssc_request() I'd assume that there's something along the lines of ssc_release() to match it.
PATCH 1/1 AFEB9260 ASoC driver
In reply to Mark BrownASoC driver for AT91SAM9260-based AFEB9260 board
--- sound/soc/atmel/Kconfig | 8 ++ sound/soc/atmel/Makefile | 1 + sound/soc/atmel/snd-soc-afeb9260.c | 203 ++++++++++++++++++++++++++++++++++++ 3 files changed, 212 insertions(+), 0 deletions(-) create mode 100644 sound/soc/atmel/snd-soc-afeb9260.c
sound/soc/atmel/Kconfig +8 -0
@@ -41,3 +41,11 @@ config SND_AT32_SOC_PLAYPAQ_SLAVE and FRAME signals on the PlayPaq. Unless you want to play with the AT32 as the SSC master, you probably want to say N here, as this will give you better sound quality. + +config SND_AT91_SOC_AFEB9260 + tristate "SoC Audio support for AFEB9260 board" + depends on ARCH_AT91 && MACH_AFEB9260 && SND_ATMEL_SOC + select SND_ATMEL_SOC_SSC + select SND_SOC_TLV320AIC23 + help + Say Y here to support sound on AFEB9260 board.
sound/soc/atmel/Makefile +1 -0
@@ -13,3 +13,4 @@ snd-soc-playpaq-objs := playpaq_wm8510.o obj-$(CONFIG_SND_AT91_SOC_SAM9G20_WM8731) += snd-soc-sam9g20-wm8731.o obj-$(CONFIG_SND_AT32_SOC_PLAYPAQ) += snd-soc-playpaq.o +obj-$(CONFIG_SND_AT91_SOC_AFEB9260) += snd-soc-afeb9260.o
sound/soc/atmel/snd-soc-afeb9260.c new file +203 -0
203 lines not on this page · raw message
Signature · 1 line
1.5.6.5
Mark Brown
AppliedQuoted 3 lines · Sergey Lapin
ASoC driver for AT91SAM9260-based AFEB9260 board
Signed-off-by Sergey Lapin <[email protected]>
Applied, thanks.