From f0fba2ad1b6b53d5360125c41953b7afcd6deff0 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Wed, 17 Mar 2010 20:15:21 +0000 Subject: ASoC: multi-component - ASoC Multi-Component Support This patch extends the ASoC API to allow sound cards to have more than one CODEC and more than one platform DMA controller. This is achieved by dividing some current ASoC structures that contain both driver data and device data into structures that only either contain device data or driver data. i.e. struct snd_soc_codec ---> struct snd_soc_codec (device data) +-> struct snd_soc_codec_driver (driver data) struct snd_soc_platform ---> struct snd_soc_platform (device data) +-> struct snd_soc_platform_driver (driver data) struct snd_soc_dai ---> struct snd_soc_dai (device data) +-> struct snd_soc_dai_driver (driver data) struct snd_soc_device ---> deleted This now allows ASoC to be more tightly aligned with the Linux driver model and also means that every ASoC codec, platform and (platform) DAI is a kernel device. ASoC component private data is now stored as device private data. The ASoC sound card struct snd_soc_card has also been updated to store lists of it's components rather than a pointer to a codec and platform. The PCM runtime struct soc_pcm_runtime now has pointers to all its components. This patch adds DAPM support for ASoC multi-component and removes struct snd_soc_socdev from DAPM core. All DAPM calls are now made on a card, codec or runtime PCM level basis rather than using snd_soc_socdev. Other notable multi-component changes:- * Stream operations now de-reference less structures. * close_delayed work() now runs on a DAI basis rather than looping all DAIs in a card. * PM suspend()/resume() operations can now handle N CODECs and Platforms per sound card. * Added soc_bind_dai_link() to bind the component devices to the sound card. * Added soc_dai_link_probe() and soc_dai_link_remove() to probe and remove DAI link components. * sysfs entries can now be registered per component per card. * snd_soc_new_pcms() functionailty rolled into dai_link_probe(). * snd_soc_register_codec() now does all the codec list and mutex init. This patch changes the probe() and remove() of the CODEC drivers as follows:- o Make CODEC driver a platform driver o Moved all struct snd_soc_codec list, mutex, etc initialiasation to core. o Removed all static codec pointers (drivers now support > 1 codec dev) o snd_soc_register_pcms() now done by core. o snd_soc_register_dai() folded into snd_soc_register_codec(). CS4270 portions: Acked-by: Timur Tabi Some TLV320aic23 and Cirrus platform fixes. Signed-off-by: Ryan Mallon TI CODEC and OMAP fixes Signed-off-by: Peter Ujfalusi Signed-off-by: Janusz Krzysztofik Signed-off-by: Jarkko Nikula Samsung platform and misc fixes :- Signed-off-by: Chanwoo Choi Signed-off-by: Joonyoung Shim Signed-off-by: Kyungmin Park Reviewed-by: Jassi Brar Signed-off-by: Seungwhan Youn MPC8610 and PPC fixes. Signed-off-by: Timur Tabi i.MX fixes and some core fixes. Signed-off-by: Sascha Hauer J4740 platform fixes:- Signed-off-by: Lars-Peter Clausen CC: Tony Lindgren CC: Nicolas Ferre CC: Kevin Hilman CC: Sascha Hauer CC: Atsushi Nemoto CC: Kuninori Morimoto CC: Daniel Gloeckner CC: Manuel Lauss CC: Mike Frysinger CC: Arnaud Patard CC: Wan ZongShun Acked-by: Mark Brown Signed-off-by: Liam Girdwood --- arch/arm/mach-davinci/devices.c | 13 +++++++++ arch/arm/mach-ep93xx/core.c | 6 +++++ arch/arm/mach-kirkwood/common.c | 6 +++++ arch/arm/mach-mx2/clock_imx27.c | 4 +-- arch/arm/mach-mx2/devices.c | 2 +- arch/arm/mach-mx3/clock-imx31.c | 4 +-- arch/arm/mach-mx3/clock-imx35.c | 4 +-- arch/arm/mach-mx3/devices.c | 4 +-- arch/arm/mach-omap1/devices.c | 26 ++++++++++++++++++ arch/arm/mach-omap2/board-n8x0.c | 15 +++++++++++ arch/arm/mach-omap2/board-rx51-peripherals.c | 14 +++++++++- arch/arm/mach-omap2/board-zoom2.c | 28 ++++++++++++++++--- arch/arm/mach-omap2/devices.c | 39 +++++++++++++++++++++++++++ arch/arm/mach-omap2/include/mach/board-zoom.h | 2 ++ arch/arm/mach-pxa/devices.c | 25 +++++++++++++++++ arch/arm/mach-pxa/devices.h | 6 +++++ arch/arm/mach-pxa/pxa27x.c | 4 +++ arch/arm/mach-pxa/pxa3xx.c | 5 ++++ arch/arm/mach-pxa/zylonite.c | 11 ++++++++ arch/arm/mach-s3c64xx/dev-audio.c | 13 +++++++++ arch/arm/mach-s3c64xx/mach-smdk6410.c | 1 + arch/arm/plat-mxc/audmux-v2.c | 4 +-- arch/arm/plat-omap/include/plat/mcbsp.h | 7 +++++ arch/arm/plat-s3c24xx/devs.c | 30 +++++++++++++++++++-- arch/arm/plat-samsung/include/plat/devs.h | 2 ++ 25 files changed, 258 insertions(+), 17 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c index 8b7201e4c79..de40e9c787e 100644 --- a/arch/arm/mach-davinci/devices.c +++ b/arch/arm/mach-davinci/devices.c @@ -295,6 +295,18 @@ static void davinci_init_wdt(void) /*-------------------------------------------------------------------------*/ +struct platform_device davinci_pcm_device = { + .name = "davinci-pcm-audio", + .id = -1, +}; + +static void davinci_init_pcm(void) +{ + platform_device_register(&davinci_pcm_device); +} + +/*-------------------------------------------------------------------------*/ + struct davinci_timer_instance davinci_timer_instance[2] = { { .base = DAVINCI_TIMER0_BASE, @@ -315,6 +327,7 @@ static int __init davinci_init_devices(void) /* please keep these calls, and their implementations above, * in alphabetical order so they're easier to sort through. */ + davinci_init_pcm(); davinci_init_wdt(); return 0; diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index b4ee5409eb7..b5261d44b26 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -732,9 +732,15 @@ static struct platform_device ep93xx_i2s_device = { .resource = ep93xx_i2s_resource, }; +static struct platform_device ep93xx_pcm_device = { + .name = "ep93xx-pcm-audio", + .id = -1, +}; + void __init ep93xx_register_i2s(void) { platform_device_register(&ep93xx_i2s_device); + platform_device_register(&ep93xx_pcm_device); } #define EP93XX_SYSCON_DEVCFG_I2S_MASK (EP93XX_SYSCON_DEVCFG_I2SONSSP | \ diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index e1f3efedbcf..07690132cdb 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c @@ -896,10 +896,16 @@ static struct platform_device kirkwood_i2s_device = { }, }; +static struct platform_device kirkwood_pcm_device = { + .name = "kirkwood-pcm", + .id = -1, +}; + void __init kirkwood_audio_init(void) { kirkwood_clk_ctrl |= CGC_AUDIO; platform_device_register(&kirkwood_i2s_device); + platform_device_register(&kirkwood_pcm_device); } /***************************************************************************** diff --git a/arch/arm/mach-mx2/clock_imx27.c b/arch/arm/mach-mx2/clock_imx27.c index 0f0823c8b17..379de9c5933 100644 --- a/arch/arm/mach-mx2/clock_imx27.c +++ b/arch/arm/mach-mx2/clock_imx27.c @@ -653,8 +653,8 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK("mxc-ehci.1", "usb_ahb", usb_clk1) _REGISTER_CLOCK("mxc-ehci.2", "usb", usb_clk) _REGISTER_CLOCK("mxc-ehci.2", "usb_ahb", usb_clk1) - _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk) - _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) + _REGISTER_CLOCK("imx-ssi-dai.0", NULL, ssi1_clk) + _REGISTER_CLOCK("imx-ssi-dai.1", NULL, ssi2_clk) _REGISTER_CLOCK("mxc_nand.0", NULL, nfc_clk) _REGISTER_CLOCK(NULL, "vpu", vpu_clk) _REGISTER_CLOCK(NULL, "dma", dma_clk) diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-mx2/devices.c index a0aeb8a4adc..2354d67a10d 100644 --- a/arch/arm/mach-mx2/devices.c +++ b/arch/arm/mach-mx2/devices.c @@ -415,7 +415,7 @@ struct platform_device mxc_usbh2 = { }; \ \ struct platform_device imx_ssi_device ## n = { \ - .name = "imx-ssi", \ + .name = "imx-ssi-dai", \ .id = n, \ .num_resources = ARRAY_SIZE(imx_ssi_resources ## n), \ .resource = imx_ssi_resources ## n, \ diff --git a/arch/arm/mach-mx3/clock-imx31.c b/arch/arm/mach-mx3/clock-imx31.c index 9a9eb6de612..9b52a67abf2 100644 --- a/arch/arm/mach-mx3/clock-imx31.c +++ b/arch/arm/mach-mx3/clock-imx31.c @@ -558,8 +558,8 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK("mxc_w1.0", NULL, owire_clk) _REGISTER_CLOCK("mxc-mmc.0", NULL, sdhc1_clk) _REGISTER_CLOCK("mxc-mmc.1", NULL, sdhc2_clk) - _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk) - _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) + _REGISTER_CLOCK("imx-ssi-dai.0", NULL, ssi1_clk) + _REGISTER_CLOCK("imx-ssi-dai.1", NULL, ssi2_clk) _REGISTER_CLOCK(NULL, "firi", firi_clk) _REGISTER_CLOCK(NULL, "ata", ata_clk) _REGISTER_CLOCK(NULL, "rtic", rtic_clk) diff --git a/arch/arm/mach-mx3/clock-imx35.c b/arch/arm/mach-mx3/clock-imx35.c index 9f3e943e223..7b5acd5aa7c 100644 --- a/arch/arm/mach-mx3/clock-imx35.c +++ b/arch/arm/mach-mx3/clock-imx35.c @@ -464,8 +464,8 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK(NULL, "sdma", sdma_clk) _REGISTER_CLOCK(NULL, "spba", spba_clk) _REGISTER_CLOCK(NULL, "spdif", spdif_clk) - _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk) - _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) + _REGISTER_CLOCK("imx-ssi-dai.0", NULL, ssi1_clk) + _REGISTER_CLOCK("imx-ssi-dai.1", NULL, ssi2_clk) _REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk) _REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk) _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk) diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c index db7acd6e910..27cfc39106a 100644 --- a/arch/arm/mach-mx3/devices.c +++ b/arch/arm/mach-mx3/devices.c @@ -562,14 +562,14 @@ static struct resource imx_ssi_resources1[] = { }; struct platform_device imx_ssi_device0 = { - .name = "imx-ssi", + .name = "imx-ssi-dai", .id = 0, .num_resources = ARRAY_SIZE(imx_ssi_resources0), .resource = imx_ssi_resources0, }; struct platform_device imx_ssi_device1 = { - .name = "imx-ssi", + .name = "imx-ssi-dai", .id = 1, .num_resources = ARRAY_SIZE(imx_ssi_resources1), .resource = imx_ssi_resources1, diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index 379100c1763..eb98eb8d373 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c @@ -25,6 +25,7 @@ #include #include #include +#include /*-------------------------------------------------------------------------*/ @@ -267,6 +268,30 @@ static inline void omap_init_sti(void) static inline void omap_init_sti(void) {} #endif +#if defined(CONFIG_SND_SOC) || defined(CONFIG_SND_SOC_MODULE) + +static struct platform_device omap_pcm = { + .name = "omap-pcm-audio", + .id = -1, +}; + +OMAP_MCBSP_PLATFORM_DEVICE(1); +OMAP_MCBSP_PLATFORM_DEVICE(2); +OMAP_MCBSP_PLATFORM_DEVICE(3); + +static void omap_init_audio(void) +{ + platform_device_register(&omap_mcbsp1); + platform_device_register(&omap_mcbsp2); + if (!cpu_is_omap7xx()) + platform_device_register(&omap_mcbsp3); + platform_device_register(&omap_pcm); +} + +#else +static inline void omap_init_audio(void) {} +#endif + /*-------------------------------------------------------------------------*/ /* @@ -299,6 +324,7 @@ static int __init omap1_init_devices(void) omap_init_rtc(); omap_init_spi100k(); omap_init_sti(); + omap_init_audio(); return 0; } diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index 3ccc34ebdcc..04df912a7b5 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -612,11 +613,25 @@ static int n8x0_menelaus_late_init(struct device *dev) return 0; } +static struct aic3x_setup_data n810_aic33_setup = { + .gpio_func[0] = AIC3X_GPIO1_FUNC_DISABLED, + .gpio_func[1] = AIC3X_GPIO2_FUNC_DIGITAL_MIC_INPUT, +}; + +static struct aic3x_pdata n810_aic33_data = { + .setup = &n810_aic33_setup, + .gpio_reset = -1, +}; + static struct i2c_board_info __initdata n8x0_i2c_board_info_1[] = { { I2C_BOARD_INFO("menelaus", 0x72), .irq = INT_24XX_SYS_NIRQ, }, + { + I2C_BOARD_INFO("tlv320aic3x", 0x1b), + .platform_data = &n810_aic33_data, + }, }; static struct menelaus_platform_data n8x0_menelaus_platform_data = { diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index abdf321c2d4..28978c08bce 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -686,7 +687,6 @@ static struct twl4030_power_data rx51_t2scripts_data __initdata = { }; - static struct twl4030_platform_data rx51_twldata __initdata = { .irq_base = TWL4030_IRQ_BASE, .irq_end = TWL4030_IRQ_END, @@ -716,9 +716,21 @@ static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_1[] = { }, }; +/* Audio setup data */ +static struct aic3x_setup_data rx51_aic34_setup = { + .gpio_func[0] = AIC3X_GPIO1_FUNC_DISABLED, + .gpio_func[1] = AIC3X_GPIO2_FUNC_DIGITAL_MIC_INPUT, +}; + +static struct aic3x_pdata rx51_aic34_data = { + .setup = &rx51_aic34_setup, + .gpio_reset = 60, +}; + static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_2[] = { { I2C_BOARD_INFO("tlv320aic3x", 0x18), + .platform_data = &rx51_aic34_data, }, }; diff --git a/arch/arm/mach-omap2/board-zoom2.c b/arch/arm/mach-omap2/board-zoom2.c index 803ef14cbf2..410fe006c0f 100644 --- a/arch/arm/mach-omap2/board-zoom2.c +++ b/arch/arm/mach-omap2/board-zoom2.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -34,8 +35,11 @@ static void __init omap_zoom2_init_irq(void) omap_gpio_init(); } -/* REVISIT: These audio entries can be removed once MFD code is merged */ -#if 0 +/* EXTMUTE callback function */ +void zoom2_set_hs_extmute(int mute) +{ + gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute); +} static struct twl4030_madc_platform_data zoom2_madc_data = { .irq_line = 1, @@ -43,6 +47,9 @@ static struct twl4030_madc_platform_data zoom2_madc_data = { static struct twl4030_codec_audio_data zoom2_audio_data = { .audio_mclk = 26000000, + .ramp_delay_value = 3, /* 161 ms */ + .hs_extmute = 1, + .set_hs_extmute = zoom2_set_hs_extmute, }; static struct twl4030_codec_data zoom2_codec_data = { @@ -64,10 +71,24 @@ static struct twl4030_platform_data zoom2_twldata = { .vmmc1 = &zoom2_vmmc1, .vmmc2 = &zoom2_vmmc2, .vsim = &zoom2_vsim, +}; +static struct i2c_board_info __initdata zoom2_i2c_boardinfo[] = { + { + I2C_BOARD_INFO("twl4030", 0x48), + .flags = I2C_CLIENT_WAKE, + .irq = INT_34XX_SYS_NIRQ, + .platform_data = &zoom2_twldata, + }, }; -#endif +static int __init omap3_zoom2_i2c_init(void) +{ + omap_register_i2c_bus(1, 2600, zoom2_i2c_boardinfo, + ARRAY_SIZE(zoom2_i2c_boardinfo)); + return 0; +} + #ifdef CONFIG_OMAP_MUX static struct omap_board_mux board_mux[] __initdata = { @@ -81,6 +102,7 @@ static void __init omap_zoom2_init(void) { omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); zoom_peripherals_init(); + omap3_zoom2_i2c_init(); zoom_debugboard_init(); } diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 03e6c9ed82a..f9a5961d23a 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -29,6 +29,7 @@ #include #include #include +#include #include "mux.h" @@ -289,6 +290,43 @@ static inline void omap_init_sti(void) static inline void omap_init_sti(void) {} #endif +#if defined(CONFIG_SND_SOC) || defined(CONFIG_SND_SOC_MODULE) + +static struct platform_device omap_pcm = { + .name = "omap-pcm-audio", + .id = -1, +}; + +/* + * OMAP2420 has 2 McBSP ports + * OMAP2430 has 5 McBSP ports + * OMAP3 has 5 McBSP ports + * OMAP4 has 4 McBSP ports + */ +OMAP_MCBSP_PLATFORM_DEVICE(1); +OMAP_MCBSP_PLATFORM_DEVICE(2); +OMAP_MCBSP_PLATFORM_DEVICE(3); +OMAP_MCBSP_PLATFORM_DEVICE(4); +OMAP_MCBSP_PLATFORM_DEVICE(5); + +static void omap_init_audio(void) +{ + platform_device_register(&omap_mcbsp1); + platform_device_register(&omap_mcbsp2); + if (cpu_is_omap243x() || cpu_is_omap34xx() || cpu_is_omap44xx()) { + platform_device_register(&omap_mcbsp3); + platform_device_register(&omap_mcbsp4); + } + if (cpu_is_omap243x() || cpu_is_omap34xx()) + platform_device_register(&omap_mcbsp5); + + platform_device_register(&omap_pcm); +} + +#else +static inline void omap_init_audio(void) {} +#endif + #if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE) #include @@ -901,6 +939,7 @@ static int __init omap2_init_devices(void) * in alphabetical order so they're easier to sort through. */ omap_hsmmc_reset(); + omap_init_audio(); omap_init_camera(); omap_init_mbox(); omap_init_mcspi(); diff --git a/arch/arm/mach-omap2/include/mach/board-zoom.h b/arch/arm/mach-omap2/include/mach/board-zoom.h index c93b29e21b7..b6a010fc8bd 100644 --- a/arch/arm/mach-omap2/include/mach/board-zoom.h +++ b/arch/arm/mach-omap2/include/mach/board-zoom.h @@ -3,3 +3,5 @@ */ extern int __init zoom_debugboard_init(void); extern void __init zoom_peripherals_init(void); + +#define ZOOM2_HEADSET_EXTMUTE_GPIO 153 diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c index 8e10db148f1..200c31a2730 100644 --- a/arch/arm/mach-pxa/devices.c +++ b/arch/arm/mach-pxa/devices.c @@ -340,6 +340,31 @@ struct platform_device pxa_device_i2s = { .num_resources = ARRAY_SIZE(pxai2s_resources), }; +struct platform_device pxa_device_asoc_ssp1 = { + .name = "pxa-ssp-dai", + .id = 0, +}; + +struct platform_device pxa_device_asoc_ssp2= { + .name = "pxa-ssp-dai", + .id = 1, +}; + +struct platform_device pxa_device_asoc_ssp3 = { + .name = "pxa-ssp-dai", + .id = 2, +}; + +struct platform_device pxa_device_asoc_ssp4 = { + .name = "pxa-ssp-dai", + .id = 3, +}; + +struct platform_device pxa_device_asoc_platform = { + .name = "pxa-pcm-audio", + .id = -1, +}; + static u64 pxaficp_dmamask = ~(u32)0; struct platform_device pxa_device_ficp = { diff --git a/arch/arm/mach-pxa/devices.h b/arch/arm/mach-pxa/devices.h index 93817d99761..506fd5753cc 100644 --- a/arch/arm/mach-pxa/devices.h +++ b/arch/arm/mach-pxa/devices.h @@ -37,4 +37,10 @@ extern struct platform_device pxa3xx_device_i2c_power; extern struct platform_device pxa3xx_device_gcu; +extern struct platform_device pxa_device_asoc_platform; +extern struct platform_device pxa_device_asoc_ssp1; +extern struct platform_device pxa_device_asoc_ssp2; +extern struct platform_device pxa_device_asoc_ssp3; +extern struct platform_device pxa_device_asoc_ssp4; + void __init pxa_register_device(struct platform_device *dev, void *data); diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 0af36177ff0..465008293a2 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -384,6 +384,10 @@ void __init pxa27x_set_i2c_power_info(struct i2c_pxa_platform_data *info) static struct platform_device *devices[] __initdata = { &pxa27x_device_udc, &pxa_device_i2s, + &pxa_device_asoc_ssp1, + &pxa_device_asoc_ssp2, + &pxa_device_asoc_ssp3, + &pxa_device_asoc_platform, &sa1100_device_rtc, &pxa_device_rtc, &pxa27x_device_ssp1, diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index f544e58e153..f7a3b158ca9 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c @@ -597,6 +597,11 @@ void __init pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info) static struct platform_device *devices[] __initdata = { &pxa27x_device_udc, &pxa_device_i2s, + &pxa_device_asoc_ssp1, + &pxa_device_asoc_ssp2, + &pxa_device_asoc_ssp3, + &pxa_device_asoc_ssp4, + &pxa_device_asoc_platform, &sa1100_device_rtc, &pxa_device_rtc, &pxa27x_device_ssp1, diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c index c479cbecf78..5ba9d99a1bf 100644 --- a/arch/arm/mach-pxa/zylonite.c +++ b/arch/arm/mach-pxa/zylonite.c @@ -45,6 +45,16 @@ int wm9713_irq; int lcd_id; int lcd_orientation; +struct platform_device pxa_device_wm9713_audio = { + .name = "wm9713-codec", + .id = -1, +}; + +static void __init zylonite_init_wm9713_audio(void) +{ + platform_device_register(&pxa_device_wm9713_audio); +} + static struct resource smc91x_resources[] = { [0] = { .start = ZYLONITE_ETH_PHYS + 0x300, @@ -408,6 +418,7 @@ static void __init zylonite_init(void) zylonite_init_nand(); zylonite_init_leds(); zylonite_init_ohci(); + zylonite_init_wm9713_audio(); } MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)") diff --git a/arch/arm/mach-s3c64xx/dev-audio.c b/arch/arm/mach-s3c64xx/dev-audio.c index c3e9e73bd0f..55ae1b0afae 100644 --- a/arch/arm/mach-s3c64xx/dev-audio.c +++ b/arch/arm/mach-s3c64xx/dev-audio.c @@ -333,3 +333,16 @@ void __init s3c64xx_ac97_setup_gpio(int num) else s3c_ac97_pdata.cfg_gpio = s3c64xx_ac97_cfg_gpe; } + +static u64 s3c_device_audio_dmamask = 0xffffffffUL; + +struct platform_device s3c_device_pcm = { + .name = "s3c24xx-pcm-audio", + .id = -1, + .dev = { + .dma_mask = &s3c_device_audio_dmamask, + .coherent_dma_mask = 0xffffffffUL + } +}; +EXPORT_SYMBOL(s3c_device_pcm); + diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index d9a03555f88..362fc76ee72 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c @@ -256,6 +256,7 @@ static struct platform_device *smdk6410_devices[] __initdata = { &s3c_device_fb, &s3c_device_ohci, &s3c_device_usb_hsotg, + &s3c_device_pcm, &s3c64xx_device_iisv4, #ifdef CONFIG_REGULATOR diff --git a/arch/arm/plat-mxc/audmux-v2.c b/arch/arm/plat-mxc/audmux-v2.c index 0c2cc5cd4d8..7c479e4fa99 100644 --- a/arch/arm/plat-mxc/audmux-v2.c +++ b/arch/arm/plat-mxc/audmux-v2.c @@ -49,9 +49,9 @@ static const char *audmux_port_string(int port) { switch (port) { case MX31_AUDMUX_PORT1_SSI0: - return "imx-ssi.0"; + return "imx-ssi-dai.0"; case MX31_AUDMUX_PORT2_SSI1: - return "imx-ssi.1"; + return "imx-ssi-dai.1"; case MX31_AUDMUX_PORT3_SSI_PINS_3: return "SSI3"; case MX31_AUDMUX_PORT4_SSI_PINS_4: diff --git a/arch/arm/plat-omap/include/plat/mcbsp.h b/arch/arm/plat-omap/include/plat/mcbsp.h index b4ff6a11a8f..5b20103e68e 100644 --- a/arch/arm/plat-omap/include/plat/mcbsp.h +++ b/arch/arm/plat-omap/include/plat/mcbsp.h @@ -30,6 +30,13 @@ #include #include +/* macro for building platform_device for McBSP ports */ +#define OMAP_MCBSP_PLATFORM_DEVICE(port_nr) \ +static struct platform_device omap_mcbsp##port_nr = { \ + .name = "omap-mcbsp-dai", \ + .id = OMAP_MCBSP##port_nr, \ +} + #define OMAP7XX_MCBSP1_BASE 0xfffb1000 #define OMAP7XX_MCBSP2_BASE 0xfffb1800 diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c index 452e18438b4..9f8ee5e3861 100644 --- a/arch/arm/plat-s3c24xx/devs.c +++ b/arch/arm/plat-s3c24xx/devs.c @@ -481,7 +481,7 @@ static struct resource s3c_ac97_resource[] = { }, }; -static u64 s3c_device_ac97_dmamask = 0xffffffffUL; +static u64 s3c_device_audio_dmamask = 0xffffffffUL; struct platform_device s3c_device_ac97 = { .name = "s3c-ac97", @@ -489,11 +489,37 @@ struct platform_device s3c_device_ac97 = { .num_resources = ARRAY_SIZE(s3c_ac97_resource), .resource = s3c_ac97_resource, .dev = { - .dma_mask = &s3c_device_ac97_dmamask, + .dma_mask = &s3c_device_audio_dmamask, .coherent_dma_mask = 0xffffffffUL } }; EXPORT_SYMBOL(s3c_device_ac97); +/* ASoC PCM DMA */ + +struct platform_device s3c_device_pcm = { + .name = "s3c24xx-pcm-audio", + .id = -1, + .dev = { + .dma_mask = &s3c_device_audio_dmamask, + .coherent_dma_mask = 0xffffffffUL + } +}; + +EXPORT_SYMBOL(s3c_device_pcm); + +/* ASoC I2S */ + +struct platform_device s3c2412_device_iis = { + .name = "s3c2412-iis", + .id = -1, + .dev = { + .dma_mask = &s3c_device_audio_dmamask, + .coherent_dma_mask = 0xffffffffUL + } +}; + +EXPORT_SYMBOL(s3c2412_device_iis); + #endif // CONFIG_CPU_S32440 diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h index e6144e4b911..9ea6786d459 100644 --- a/arch/arm/plat-samsung/include/plat/devs.h +++ b/arch/arm/plat-samsung/include/plat/devs.h @@ -32,6 +32,8 @@ extern struct platform_device s3c64xx_device_iisv4; extern struct platform_device s3c64xx_device_spi0; extern struct platform_device s3c64xx_device_spi1; +extern struct platform_device s3c_device_pcm; + extern struct platform_device s3c64xx_device_pcm0; extern struct platform_device s3c64xx_device_pcm1; -- cgit v1.2.3-70-g09d2 From 75a6d53b2b1b3f212ea0615ed3bb2d68a249af7b Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Tue, 17 Aug 2010 09:58:02 +0300 Subject: ASoC: multi-component - Drop board-n8x0.c changes These will conflict with queued changes to board-n8x0.c coming from linux-omap tree. Only side effect from this dropping is that the integrated digital microphone on Nokia N810 will stop working when ASoC multi-component is merged. As currently the N810 is not very usable in mainline, I consider this as a minor issue that can be fixed in linux-omap tree the after the multi-component is merged. Signed-off-by: Jarkko Nikula Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- arch/arm/mach-omap2/board-n8x0.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index 4543b877a51..a3e2b49aa39 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include @@ -615,25 +614,11 @@ static int n8x0_menelaus_late_init(struct device *dev) return 0; } -static struct aic3x_setup_data n810_aic33_setup = { - .gpio_func[0] = AIC3X_GPIO1_FUNC_DISABLED, - .gpio_func[1] = AIC3X_GPIO2_FUNC_DIGITAL_MIC_INPUT, -}; - -static struct aic3x_pdata n810_aic33_data = { - .setup = &n810_aic33_setup, - .gpio_reset = -1, -}; - static struct i2c_board_info __initdata n8x0_i2c_board_info_1[] = { { I2C_BOARD_INFO("menelaus", 0x72), .irq = INT_24XX_SYS_NIRQ, }, - { - I2C_BOARD_INFO("tlv320aic3x", 0x1b), - .platform_data = &n810_aic33_data, - }, }; static struct menelaus_platform_data n8x0_menelaus_platform_data = { -- cgit v1.2.3-70-g09d2 From a8165e0e6f0511d14132423b4bce2d285e890fc8 Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Mon, 23 Aug 2010 10:35:05 +0300 Subject: omap: rx51: Remove redefinition of rx51_aic3x_data Redefinition of rx51_aic3x_data got introduced when merging upstread changes for 2.6.36 and ASoC Multi-Component Support. This must go together with multi-component commit f0fba2a. Signed-off-by: Jarkko Nikula Cc: Tony Lindgren Acked-by: Mark Brown Signed-off-by: Liam Girdwood --- arch/arm/mach-omap2/board-rx51-peripherals.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index 897d960fe16..11ce4b24bef 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -710,10 +710,6 @@ static struct twl4030_platform_data rx51_twldata __initdata = { .vio = &rx51_vio, }; -static struct aic3x_pdata rx51_aic3x_data __initdata = { - .gpio_reset = 60, -}; - static struct tpa6130a2_platform_data rx51_tpa6130a2_data __initdata = { .id = TPA6130A2, .power_gpio = 98, -- cgit v1.2.3-70-g09d2 From e4b6b74ffd32d114227a5dcfe814e2cecd80554b Mon Sep 17 00:00:00 2001 From: Dimitris Papastamos Date: Thu, 26 Aug 2010 16:07:23 +0100 Subject: ARM: S3C64XX: Fix fallthrough bug in i2sv3 gpio configuration, improve logging If the platform device id is 1, the code will fallthrough the case and incorrectly return -EINVAL. Add a break to avoid fallthrough. Make logging slightly more verbose by including the device id. This fixes an issue only present in multi-component. Signed-off-by: Dimitris Papastamos Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- arch/arm/mach-s3c64xx/dev-audio.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-s3c64xx/dev-audio.c b/arch/arm/mach-s3c64xx/dev-audio.c index f0942585b9c..3838335f125 100644 --- a/arch/arm/mach-s3c64xx/dev-audio.c +++ b/arch/arm/mach-s3c64xx/dev-audio.c @@ -43,8 +43,10 @@ static int s3c64xx_i2sv3_cfg_gpio(struct platform_device *pdev) s3c_gpio_cfgpin(S3C64XX_GPE(2), S3C64XX_GPE2_I2S1_LRCLK); s3c_gpio_cfgpin(S3C64XX_GPE(3), S3C64XX_GPE3_I2S1_DI); s3c_gpio_cfgpin(S3C64XX_GPE(4), S3C64XX_GPE4_I2S1_D0); + break; default: - printk(KERN_DEBUG "Invalid I2S Controller number!"); + printk(KERN_DEBUG "Invalid I2S Controller number: %d\n", + pdev->id); return -EINVAL; } @@ -184,7 +186,8 @@ static int s3c64xx_pcm_cfg_gpio(struct platform_device *pdev) s3c_gpio_cfgpin(S3C64XX_GPE(4), S3C64XX_GPE4_PCM1_SOUT); break; default: - printk(KERN_DEBUG "Invalid PCM Controller number!"); + printk(KERN_DEBUG "Invalid PCM Controller number: %d\n", + pdev->id); return -EINVAL; } -- cgit v1.2.3-70-g09d2 From ada69e3c1c0be591aa2e6282fb252c668ccb9a1c Mon Sep 17 00:00:00 2001 From: Vasily Khoruzhick Date: Mon, 30 Aug 2010 11:28:09 +0300 Subject: ARM: S3C24XX: I2S multi-component-related fixes Export s3c_device_pcm for all S3C24xx-devices, not only for S3C2440; Fix device name for s3c_device_iis; Signed-off-by: Vasily Khoruzhick Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- arch/arm/plat-s3c24xx/devs.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c index 9f8ee5e3861..2f91057a0c0 100644 --- a/arch/arm/plat-s3c24xx/devs.c +++ b/arch/arm/plat-s3c24xx/devs.c @@ -247,7 +247,7 @@ static struct resource s3c_iis_resource[] = { static u64 s3c_device_iis_dmamask = 0xffffffffUL; struct platform_device s3c_device_iis = { - .name = "s3c2410-iis", + .name = "s3c24xx-iis", .id = -1, .num_resources = ARRAY_SIZE(s3c_iis_resource), .resource = s3c_iis_resource, @@ -259,6 +259,21 @@ struct platform_device s3c_device_iis = { EXPORT_SYMBOL(s3c_device_iis); +/* ASoC PCM DMA */ + +static u64 s3c_device_audio_dmamask = 0xffffffffUL; + +struct platform_device s3c_device_pcm = { + .name = "s3c24xx-pcm-audio", + .id = -1, + .dev = { + .dma_mask = &s3c_device_audio_dmamask, + .coherent_dma_mask = 0xffffffffUL + } +}; + +EXPORT_SYMBOL(s3c_device_pcm); + /* RTC */ static struct resource s3c_rtc_resource[] = { @@ -481,8 +496,6 @@ static struct resource s3c_ac97_resource[] = { }, }; -static u64 s3c_device_audio_dmamask = 0xffffffffUL; - struct platform_device s3c_device_ac97 = { .name = "s3c-ac97", .id = -1, @@ -496,19 +509,6 @@ struct platform_device s3c_device_ac97 = { EXPORT_SYMBOL(s3c_device_ac97); -/* ASoC PCM DMA */ - -struct platform_device s3c_device_pcm = { - .name = "s3c24xx-pcm-audio", - .id = -1, - .dev = { - .dma_mask = &s3c_device_audio_dmamask, - .coherent_dma_mask = 0xffffffffUL - } -}; - -EXPORT_SYMBOL(s3c_device_pcm); - /* ASoC I2S */ struct platform_device s3c2412_device_iis = { -- cgit v1.2.3-70-g09d2 From c88e7b93a80bd46899c4cb09a9b2d52bb04d79bd Mon Sep 17 00:00:00 2001 From: "Arnaud Patard (Rtp)" Date: Mon, 30 Aug 2010 16:00:05 +0200 Subject: ASoC: OpenRD Client : Fix naming breakage due to multicomponent support multicomponent support added/changed some device name but added some typos, breaking existing OpenRD Client support. Signed-off-by: Arnaud Patard Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- arch/arm/mach-kirkwood/common.c | 2 +- sound/soc/codecs/cs42l51.c | 2 +- sound/soc/kirkwood/kirkwood-openrd.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 0f6ee32678e..51ff23b72d3 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c @@ -904,7 +904,7 @@ static struct platform_device kirkwood_i2s_device = { }; static struct platform_device kirkwood_pcm_device = { - .name = "kirkwood-pcm", + .name = "kirkwood-pcm-audio", .id = -1, }; diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c index 8a25743870c..39fbcff2025 100644 --- a/sound/soc/codecs/cs42l51.c +++ b/sound/soc/codecs/cs42l51.c @@ -622,7 +622,7 @@ MODULE_DEVICE_TABLE(i2c, cs42l51_id); static struct i2c_driver cs42l51_i2c_driver = { .driver = { - .name = "cs42L51-codec", + .name = "cs42l51-codec", .owner = THIS_MODULE, }, .id_table = cs42l51_id, diff --git a/sound/soc/kirkwood/kirkwood-openrd.c b/sound/soc/kirkwood/kirkwood-openrd.c index cc1a1e277ed..2cf76dfd035 100644 --- a/sound/soc/kirkwood/kirkwood-openrd.c +++ b/sound/soc/kirkwood/kirkwood-openrd.c @@ -66,7 +66,7 @@ static struct snd_soc_dai_link openrd_client_dai[] = { .stream_name = "CS42L51 HiFi", .cpu_dai_name = "kirkwood-i2s", .platform_name = "kirkwood-pcm-audio", - .codec_dai_name = "cs42l51_hifi", + .codec_dai_name = "cs42l51-hifi", .codec_name = "cs42l51-codec.0-004a", .ops = &openrd_client_ops, }, -- cgit v1.2.3-70-g09d2 From 2c8e992716b3adff52846e2280731b533db592ff Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Thu, 23 Sep 2010 19:11:53 +0300 Subject: omap: zoom2: Fix ASoC multi-component build breakage by removing dead code ASoC Multi-Component Support patch removes #if 0 in board-zoom2.c that was used to protect some uncompiling dead code. Remove that code as it seems to be here quite some time since commit 479f12c. Signed-off-by: Jarkko Nikula Cc: Vikram Pandita Cc: Tony Lindgren Tested-by: Misael Lopez Cruz Acked-by: Mark Brown Signed-off-by: Liam Girdwood --- arch/arm/mach-omap2/board-zoom2.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/board-zoom2.c b/arch/arm/mach-omap2/board-zoom2.c index efbcd8fb21e..86d4515b54b 100644 --- a/arch/arm/mach-omap2/board-zoom2.c +++ b/arch/arm/mach-omap2/board-zoom2.c @@ -41,10 +41,6 @@ void zoom2_set_hs_extmute(int mute) gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute); } -static struct twl4030_madc_platform_data zoom2_madc_data = { - .irq_line = 1, -}; - static struct twl4030_codec_audio_data zoom2_audio_data = { .audio_mclk = 26000000, .ramp_delay_value = 3, /* 161 ms */ @@ -62,15 +58,7 @@ static struct twl4030_platform_data zoom2_twldata = { .irq_end = TWL4030_IRQ_END, /* platform_data for children goes here */ - .bci = &zoom2_bci_data, - .madc = &zoom2_madc_data, - .usb = &zoom2_usb_data, - .gpio = &zoom2_gpio_data, - .keypad = &zoom2_kp_twl4030_data, .codec = &zoom2_codec_data, - .vmmc1 = &zoom2_vmmc1, - .vmmc2 = &zoom2_vmmc2, - .vsim = &zoom2_vsim, }; static struct i2c_board_info __initdata zoom2_i2c_boardinfo[] = { -- cgit v1.2.3-70-g09d2 From 4b285c3f3f0082f7fb765050f07a864474459bf0 Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Thu, 23 Sep 2010 19:11:54 +0300 Subject: omap: zoom: Move new code introduced by ASoC m-c to board-zoom-peripherals ASoC Multi-Component Support moves some code from sound/soc/omap/zoom2.c into arch/arm/mach-omap2/board-zoom2.c. However, that code should go to board-zoom-peripherals.c instead as there is common code and registration for zoom boards. Signed-off-by: Jarkko Nikula Cc: Vikram Pandita Cc: Lopez Cruz, Misael Cc: Jorge Eduardo Candelaria Cc: Tony Lindgren Acked-by: Mark Brown Signed-off-by: Liam Girdwood --- arch/arm/mach-omap2/board-zoom-peripherals.c | 12 ++++++++ arch/arm/mach-omap2/board-zoom2.c | 44 ---------------------------- 2 files changed, 12 insertions(+), 44 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c index 6b3984964cc..3c653047571 100644 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c @@ -24,6 +24,8 @@ #include #include +#include + #include "mux.h" #include "hsmmc.h" @@ -188,6 +190,11 @@ static int zoom_twl_gpio_setup(struct device *dev, return 0; } +/* EXTMUTE callback function */ +void zoom2_set_hs_extmute(int mute) +{ + gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute); +} static int zoom_batt_table[] = { /* 0 C*/ @@ -257,6 +264,11 @@ static struct i2c_board_info __initdata zoom_i2c_boardinfo[] = { static int __init omap_i2c_init(void) { + if (machine_is_omap_zoom2()) { + zoom_audio_data.ramp_delay_value = 3; /* 161 ms */ + zoom_audio_data.hs_extmute = 1; + zoom_audio_data.set_hs_extmute = zoom2_set_hs_extmute; + } omap_register_i2c_bus(1, 2400, zoom_i2c_boardinfo, ARRAY_SIZE(zoom_i2c_boardinfo)); omap_register_i2c_bus(2, 400, NULL, 0); diff --git a/arch/arm/mach-omap2/board-zoom2.c b/arch/arm/mach-omap2/board-zoom2.c index 86d4515b54b..00c8f835649 100644 --- a/arch/arm/mach-omap2/board-zoom2.c +++ b/arch/arm/mach-omap2/board-zoom2.c @@ -35,49 +35,6 @@ static void __init omap_zoom2_init_irq(void) omap_gpio_init(); } -/* EXTMUTE callback function */ -void zoom2_set_hs_extmute(int mute) -{ - gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute); -} - -static struct twl4030_codec_audio_data zoom2_audio_data = { - .audio_mclk = 26000000, - .ramp_delay_value = 3, /* 161 ms */ - .hs_extmute = 1, - .set_hs_extmute = zoom2_set_hs_extmute, -}; - -static struct twl4030_codec_data zoom2_codec_data = { - .audio_mclk = 26000000, - .audio = &zoom2_audio_data, -}; - -static struct twl4030_platform_data zoom2_twldata = { - .irq_base = TWL4030_IRQ_BASE, - .irq_end = TWL4030_IRQ_END, - - /* platform_data for children goes here */ - .codec = &zoom2_codec_data, -}; - -static struct i2c_board_info __initdata zoom2_i2c_boardinfo[] = { - { - I2C_BOARD_INFO("twl4030", 0x48), - .flags = I2C_CLIENT_WAKE, - .irq = INT_34XX_SYS_NIRQ, - .platform_data = &zoom2_twldata, - }, -}; - -static int __init omap3_zoom2_i2c_init(void) -{ - omap_register_i2c_bus(1, 2600, zoom2_i2c_boardinfo, - ARRAY_SIZE(zoom2_i2c_boardinfo)); - return 0; -} - - #ifdef CONFIG_OMAP_MUX static struct omap_board_mux board_mux[] __initdata = { /* WLAN IRQ - GPIO 162 */ @@ -144,7 +101,6 @@ static void __init omap_zoom2_init(void) { omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); zoom_peripherals_init(); - omap3_zoom2_i2c_init(); board_nand_init(zoom_nand_partitions, ARRAY_SIZE(zoom_nand_partitions), ZOOM_NAND_CS); zoom_debugboard_init(); -- cgit v1.2.3-70-g09d2 From 205d231bfbd26bb10400518586d2a9f1b62858ee Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 30 Sep 2010 13:46:14 -0700 Subject: ASoC: Remove -dai suffix from i.MX SSI driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While it is a generic serial port in practice the i.MX SSI is only supported in Linux as an audio port (the i.MX has dedicated SPI controllers and so on). This means we don't need to disambiguate against other uses of the hardware and so can drop the -dai suffix from the driver name which fixes merge issues with the i.MX tree in -next. Signed-off-by: Mark Brown Acked-by: Uwe Kleine-König Acked-by: Liam Girdwood --- arch/arm/mach-mx3/clock-imx31.c | 4 ++-- arch/arm/mach-mx3/clock-imx35.c | 4 ++-- arch/arm/mach-mx3/devices.c | 4 ++-- arch/arm/plat-mxc/audmux-v2.c | 4 ++-- sound/soc/imx/eukrea-tlv320.c | 2 +- sound/soc/imx/imx-ssi.c | 2 +- sound/soc/imx/phycore-ac97.c | 2 +- sound/soc/imx/wm1133-ev1.c | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-mx3/clock-imx31.c b/arch/arm/mach-mx3/clock-imx31.c index 9b52a67abf2..9a9eb6de612 100644 --- a/arch/arm/mach-mx3/clock-imx31.c +++ b/arch/arm/mach-mx3/clock-imx31.c @@ -558,8 +558,8 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK("mxc_w1.0", NULL, owire_clk) _REGISTER_CLOCK("mxc-mmc.0", NULL, sdhc1_clk) _REGISTER_CLOCK("mxc-mmc.1", NULL, sdhc2_clk) - _REGISTER_CLOCK("imx-ssi-dai.0", NULL, ssi1_clk) - _REGISTER_CLOCK("imx-ssi-dai.1", NULL, ssi2_clk) + _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk) + _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) _REGISTER_CLOCK(NULL, "firi", firi_clk) _REGISTER_CLOCK(NULL, "ata", ata_clk) _REGISTER_CLOCK(NULL, "rtic", rtic_clk) diff --git a/arch/arm/mach-mx3/clock-imx35.c b/arch/arm/mach-mx3/clock-imx35.c index f29c3e91fa3..d3af0fdf847 100644 --- a/arch/arm/mach-mx3/clock-imx35.c +++ b/arch/arm/mach-mx3/clock-imx35.c @@ -464,8 +464,8 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK(NULL, "sdma", sdma_clk) _REGISTER_CLOCK(NULL, "spba", spba_clk) _REGISTER_CLOCK(NULL, "spdif", spdif_clk) - _REGISTER_CLOCK("imx-ssi-dai.0", NULL, ssi1_clk) - _REGISTER_CLOCK("imx-ssi-dai.1", NULL, ssi2_clk) + _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk) + _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) _REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk) _REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk) _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk) diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c index 90eccba66d0..a4fd1a26fc9 100644 --- a/arch/arm/mach-mx3/devices.c +++ b/arch/arm/mach-mx3/devices.c @@ -327,14 +327,14 @@ static struct resource imx_ssi_resources1[] = { }; struct platform_device imx_ssi_device0 = { - .name = "imx-ssi-dai", + .name = "imx-ssi", .id = 0, .num_resources = ARRAY_SIZE(imx_ssi_resources0), .resource = imx_ssi_resources0, }; struct platform_device imx_ssi_device1 = { - .name = "imx-ssi-dai", + .name = "imx-ssi", .id = 1, .num_resources = ARRAY_SIZE(imx_ssi_resources1), .resource = imx_ssi_resources1, diff --git a/arch/arm/plat-mxc/audmux-v2.c b/arch/arm/plat-mxc/audmux-v2.c index 910374d1d48..f9e7cdbd000 100644 --- a/arch/arm/plat-mxc/audmux-v2.c +++ b/arch/arm/plat-mxc/audmux-v2.c @@ -45,9 +45,9 @@ static const char *audmux_port_string(int port) { switch (port) { case MX31_AUDMUX_PORT1_SSI0: - return "imx-ssi-dai.0"; + return "imx-ssi.0"; case MX31_AUDMUX_PORT2_SSI1: - return "imx-ssi-dai.1"; + return "imx-ssi.1"; case MX31_AUDMUX_PORT3_SSI_PINS_3: return "SSI3"; case MX31_AUDMUX_PORT4_SSI_PINS_4: diff --git a/sound/soc/imx/eukrea-tlv320.c b/sound/soc/imx/eukrea-tlv320.c index 807f736ee29..b59675257ce 100644 --- a/sound/soc/imx/eukrea-tlv320.c +++ b/sound/soc/imx/eukrea-tlv320.c @@ -82,7 +82,7 @@ static struct snd_soc_dai_link eukrea_tlv320_dai = { .codec_dai = "tlv320aic23-hifi", .platform_name = "imx-pcm-audio.0", .codec_name = "tlv320aic23-codec.0-001a", - .cpu_dai = "imx-ssi-dai.0", + .cpu_dai = "imx-ssi.0", .ops = &eukrea_tlv320_snd_ops, }; diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c index 26716e9626f..d4bd345b0a8 100644 --- a/sound/soc/imx/imx-ssi.c +++ b/sound/soc/imx/imx-ssi.c @@ -734,7 +734,7 @@ static struct platform_driver imx_ssi_driver = { .remove = __devexit_p(imx_ssi_remove), .driver = { - .name = "imx-ssi-dai", + .name = "imx-ssi", .owner = THIS_MODULE, }, }; diff --git a/sound/soc/imx/phycore-ac97.c b/sound/soc/imx/phycore-ac97.c index 65f0f99ca6d..6a65dd70551 100644 --- a/sound/soc/imx/phycore-ac97.c +++ b/sound/soc/imx/phycore-ac97.c @@ -34,7 +34,7 @@ static struct snd_soc_dai_link imx_phycore_dai_ac97[] = { .stream_name = "HiFi", .codec_dai_name = "wm9712-hifi", .codec_name = "wm9712-codec", - .cpu_dai_name = "imx-ssi-dai.0", + .cpu_dai_name = "imx-ssi.0", .platform_name = "imx-fiq-pcm-audio.0", .ops = &imx_phycore_hifi_ops, }, diff --git a/sound/soc/imx/wm1133-ev1.c b/sound/soc/imx/wm1133-ev1.c index 74068636c1d..30fdb15065b 100644 --- a/sound/soc/imx/wm1133-ev1.c +++ b/sound/soc/imx/wm1133-ev1.c @@ -243,7 +243,7 @@ static int wm1133_ev1_init(struct snd_soc_pcm_runtime *rtd) static struct snd_soc_dai_link wm1133_ev1_dai = { .name = "WM1133-EV1", .stream_name = "Audio", - .cpu_dai_name = "imx-ssi-dai.0", + .cpu_dai_name = "imx-ssi.0", .codec_dai_name = "wm8350-hifi", .platform_name = "imx-fiq-pcm-audio.0", .codec_name = "wm8350-codec.0-0x1a", -- cgit v1.2.3-70-g09d2 From a09f73fabbeac81f45969ad9ed59e74fae736873 Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Mon, 4 Oct 2010 15:04:53 +0300 Subject: omap: devices: Avoid merge conflict between ASoC and OMAP hwmod changes Upcoming ASoC multi-component and OMAP hwmod changes will conflict in arch/arm/mach-omap2/devices.c. Avoid this by moving a little bit include statement introduced by ASoC Multi-Component Support patch. Signed-off-by: Jarkko Nikula Cc: Paul Walmsley Cc: Tony Lindgren Acked-by: Mark Brown Signed-off-by: Liam Girdwood --- arch/arm/mach-omap2/devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 08e1ad5adb1..512ae4696a6 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -25,10 +25,10 @@ #include #include #include +#include #include #include #include -#include #include "mux.h" -- cgit v1.2.3-70-g09d2 From 534bc7fa3c0a9084e7a2db33898d92577c64e4eb Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Thu, 14 Oct 2010 17:49:07 +0300 Subject: ARM: ep93xx: add AC97 platform support Add platform support for the EP93xx AC97 controller driver. Signed-off-by: Mika Westerberg Acked-by: H Hartley Sweeten Acked-by: Ryan Mallon Signed-off-by: Mark Brown --- arch/arm/mach-ep93xx/core.c | 34 +++++++++++++++++++++++++ arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h | 1 + arch/arm/mach-ep93xx/include/mach/platform.h | 1 + 3 files changed, 36 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 1990e229984..ffdf87be295 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -832,6 +832,40 @@ void ep93xx_i2s_release(void) } EXPORT_SYMBOL(ep93xx_i2s_release); +/************************************************************************* + * EP93xx AC97 audio peripheral handling + *************************************************************************/ +static struct resource ep93xx_ac97_resources[] = { + { + .start = EP93XX_AAC_PHYS_BASE, + .end = EP93XX_AAC_PHYS_BASE + 0xb0 - 1, + .flags = IORESOURCE_MEM, + }, + { + .start = IRQ_EP93XX_AACINTR, + .end = IRQ_EP93XX_AACINTR, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device ep93xx_ac97_device = { + .name = "ep93xx-ac97", + .id = -1, + .num_resources = ARRAY_SIZE(ep93xx_ac97_resources), + .resource = ep93xx_ac97_resources, +}; + +void __init ep93xx_register_ac97(void) +{ + /* + * Make sure that the AC97 pins are not used by I2S. + */ + ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_I2SONAC97); + + platform_device_register(&ep93xx_ac97_device); + platform_device_register(&ep93xx_pcm_device); +} + extern void ep93xx_gpio_init(void); void __init ep93xx_init_devices(void) diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h index c54b3e56ba6..9ac4d105509 100644 --- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h +++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h @@ -105,6 +105,7 @@ #define EP93XX_GPIO_B_INT_STATUS EP93XX_GPIO_REG(0xbc) #define EP93XX_GPIO_EEDRIVE EP93XX_GPIO_REG(0xc8) +#define EP93XX_AAC_PHYS_BASE EP93XX_APB_PHYS(0x00080000) #define EP93XX_AAC_BASE EP93XX_APB_IOMEM(0x00080000) #define EP93XX_SPI_PHYS_BASE EP93XX_APB_PHYS(0x000a0000) diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h index 3330b36d79e..50660455b1d 100644 --- a/arch/arm/mach-ep93xx/include/mach/platform.h +++ b/arch/arm/mach-ep93xx/include/mach/platform.h @@ -61,6 +61,7 @@ void ep93xx_keypad_release_gpio(struct platform_device *pdev); void ep93xx_register_i2s(void); int ep93xx_i2s_acquire(unsigned i2s_pins, unsigned i2s_config); void ep93xx_i2s_release(void); +void ep93xx_register_ac97(void); void ep93xx_init_devices(void); extern struct sys_timer ep93xx_timer; -- cgit v1.2.3-70-g09d2 From d42a280dc76c04f39d1f9a374cf5c23318c49004 Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Thu, 14 Oct 2010 17:49:08 +0300 Subject: ASoC: ep93xx: add Simplemachines Sim.One AC97 audio support Add AC97 audio support for Simplemachines Sim.One board. Signed-off-by: Mika Westerberg Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- arch/arm/mach-ep93xx/simone.c | 1 + sound/soc/ep93xx/Kconfig | 9 +++++ sound/soc/ep93xx/Makefile | 2 + sound/soc/ep93xx/simone.c | 89 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 101 insertions(+) create mode 100644 sound/soc/ep93xx/simone.c (limited to 'arch/arm') diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c index 5dded588413..f5f81f9719b 100644 --- a/arch/arm/mach-ep93xx/simone.c +++ b/arch/arm/mach-ep93xx/simone.c @@ -61,6 +61,7 @@ static void __init simone_init_machine(void) ep93xx_register_fb(&simone_fb_info); ep93xx_register_i2c(&simone_i2c_gpio_data, simone_i2c_board_info, ARRAY_SIZE(simone_i2c_board_info)); + ep93xx_register_ac97(); } MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board") diff --git a/sound/soc/ep93xx/Kconfig b/sound/soc/ep93xx/Kconfig index 108e5ff3ffc..57429041189 100644 --- a/sound/soc/ep93xx/Kconfig +++ b/sound/soc/ep93xx/Kconfig @@ -21,3 +21,12 @@ config SND_EP93XX_SOC_SNAPPERCL15 help Say Y or M here if you want to add support for I2S audio on the Bluewater Systems Snapper CL15 module. + +config SND_EP93XX_SOC_SIMONE + tristate "SoC Audio support for Simplemachines Sim.One board" + depends on SND_EP93XX_SOC && MACH_SIM_ONE + select SND_EP93XX_SOC_AC97 + select SND_SOC_AC97_CODEC + help + Say Y or M here if you want to add support for AC97 audio on the + Simplemachines Sim.One board. diff --git a/sound/soc/ep93xx/Makefile b/sound/soc/ep93xx/Makefile index ac06e0092f9..8e7977fb6b7 100644 --- a/sound/soc/ep93xx/Makefile +++ b/sound/soc/ep93xx/Makefile @@ -9,5 +9,7 @@ obj-$(CONFIG_SND_EP93XX_SOC_AC97) += snd-soc-ep93xx-ac97.o # EP93XX Machine Support snd-soc-snappercl15-objs := snappercl15.o +snd-soc-simone-objs := simone.o obj-$(CONFIG_SND_EP93XX_SOC_SNAPPERCL15) += snd-soc-snappercl15.o +obj-$(CONFIG_SND_EP93XX_SOC_SIMONE) += snd-soc-simone.o diff --git a/sound/soc/ep93xx/simone.c b/sound/soc/ep93xx/simone.c new file mode 100644 index 00000000000..4b0d1991372 --- /dev/null +++ b/sound/soc/ep93xx/simone.c @@ -0,0 +1,89 @@ +/* + * simone.c -- ASoC audio for Simplemachines Sim.One board + * + * Copyright (c) 2010 Mika Westerberg + * + * Based on snappercl15 machine driver by Ryan Mallon. + * + * 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. + */ + +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include "ep93xx-pcm.h" + +static struct snd_soc_dai_link simone_dai = { + .name = "AC97", + .stream_name = "AC97 HiFi", + .cpu_dai_name = "ep93xx-ac97", + .codec_dai_name = "ac97-hifi", + .codec_name = "ac97-codec", + .platform_name = "ep93xx-pcm-audio", +}; + +static struct snd_soc_card snd_soc_simone = { + .name = "Sim.One", + .dai_link = &simone_dai, + .num_links = 1, +}; + +static struct platform_device *simone_snd_ac97_device; +static struct platform_device *simone_snd_device; + +static int __init simone_init(void) +{ + int ret; + + if (!machine_is_sim_one()) + return -ENODEV; + + simone_snd_ac97_device = platform_device_alloc("ac97-codec", -1); + if (!simone_snd_ac97_device) + return -ENOMEM; + + ret = platform_device_add(simone_snd_ac97_device); + if (ret) + goto fail; + + simone_snd_device = platform_device_alloc("soc-audio", -1); + if (!simone_snd_device) { + ret = -ENOMEM; + goto fail; + } + + platform_set_drvdata(simone_snd_device, &snd_soc_simone); + ret = platform_device_add(simone_snd_device); + if (ret) { + platform_device_put(simone_snd_device); + goto fail; + } + + return ret; + +fail: + platform_device_put(simone_snd_ac97_device); + return ret; +} +module_init(simone_init); + +static void __exit simone_exit(void) +{ + platform_device_unregister(simone_snd_device); + platform_device_unregister(simone_snd_ac97_device); +} +module_exit(simone_exit); + +MODULE_DESCRIPTION("ALSA SoC Simplemachines Sim.One"); +MODULE_AUTHOR("Mika Westerberg "); +MODULE_LICENSE("GPL"); -- cgit v1.2.3-70-g09d2