Alsa modularisations and support for tsc2101 2/3 (round 2)
Subsystems (4)
PATCH 1/1 Alsa modularisations and support for tsc2101 2/3 (round 2)
Omap ALSA Patch (2/3)
This 2/3 patch moves omap alsa aic23 driver files to sound/arm/omap directory.
In addition it adds cleaner separation of codec specific functionality from the other functionality
so that the same code can also be used by the tsc2101 driver.
Structures required by the platform driver are now in include/asm-arm/arch-omap/omap-alsa.h.
Unlike in the previous review, all other files required by this driver are now
located in the sound/arm/omap directory. MCBSP settings required by the alsa driver are now
initialized in the omap OSK board-code. Codec specific function pointers are now initialized in the codec-file.
(omap-alsa-aic23.c)
Omap ALSA Patch (2/3)
This 2/3 patch moves omap alsa aic23 driver files to sound/arm/omap directory.
In addition it adds cleaner separation of codec specific functionality from the other functionality so that the same code can also be used by the tsc2101 driver.
Structures required by the platform driver are now in include/asm-arm/arch-omap/omap-alsa.h. Unlike in the previous review, all other files required by this driver are now
located in the sound/arm/omap directory. MCBSP settings required by the alsa driver are now initialized in the omap OSK board-code. Codec specific function pointers are now initialized in the codec-file. (omap-alsa-aic23.c)
---
arch/arm/mach-omap1/board-osk.c | 37 + include/asm-arm/arch-omap/omap-alsa.h | 144 +++++ sound/arm/Makefile | 3 sound/arm/omap-aic23.c | 904 -------------------------------- sound/arm/omap-aic23.h | 131 ----- sound/arm/omap-alsa-dma.c | 452 ---------------- sound/arm/omap-alsa-dma.h | 53 -- sound/arm/omap-alsa-mixer.c | 496 ------------------ sound/arm/omap/Makefile | 6 sound/arm/omap/omap-alsa-aic23-mixer.c | 485 +++++++++++++++++ sound/arm/omap/omap-alsa-aic23.c | 321 +++++++++++ sound/arm/omap/omap-alsa-aic23.h | 83 +++ sound/arm/omap/omap-alsa-dma.c | 443 ++++++++++++++++ sound/arm/omap/omap-alsa-dma.h | 53 ++ sound/arm/omap/omap-alsa.c | 579 ++++++++++++++++++++ 15 files changed, 2150 insertions(+), 2040 deletions(-) create mode 100644 include/asm-arm/arch-omap/omap-alsa.h delete mode 100644 sound/arm/omap-aic23.c delete mode 100644 sound/arm/omap-aic23.h delete mode 100644 sound/arm/omap-alsa-dma.c delete mode 100644 sound/arm/omap-alsa-dma.h delete mode 100644 sound/arm/omap-alsa-mixer.c create mode 100644 sound/arm/omap/Makefile create mode 100644 sound/arm/omap/omap-alsa-aic23-mixer.c create mode 100644 sound/arm/omap/omap-alsa-aic23.c create mode 100644 sound/arm/omap/omap-alsa-aic23.h create mode 100644 sound/arm/omap/omap-alsa-dma.c create mode 100644 sound/arm/omap/omap-alsa-dma.h create mode 100644 sound/arm/omap/omap-alsa.c
4b8a51dd5b9fa8d6d2ec33e98d6f17eeaab1d87c
arch/arm/mach-omap1/board-osk.c +35 -2
@@ -47,6 +47,8 @@#include <asm/arch/tc.h> #include <asm/arch/keypad.h> #include <asm/arch/common.h> +#include <asm/arch/mcbsp.h> +#include <asm/arch/omap-alsa.h> static int osk_keymap[] = {KEY (0 ,0 ,KEY_F1 ),
@@ -149,9 +151,40 @@ static struct platform_device osk5912_cf .resource = osk5912_cf_resources, }; +#define DEFAULT_BITPERSAMPLE 16 + +static struct omap_mcbsp_reg_cfg mcbsp_regs = { + .spcr2 =FREE |FRST |GRST |XRST |XINTM (3 ), + .spcr1 =RINTM (3 ) |RRST , + .rcr2 =RPHASE |RFRLEN2 (OMAP_MCBSP_WORD_8 ) | +RWDLEN2 (OMAP_MCBSP_WORD_16 ) |RDATDLY (0 ), + .rcr1 =RFRLEN1 (OMAP_MCBSP_WORD_8 ) |RWDLEN1 (OMAP_MCBSP_WORD_16 ), + .xcr2 =XPHASE |XFRLEN2 (OMAP_MCBSP_WORD_8 ) | +XWDLEN2 (OMAP_MCBSP_WORD_16 ) |XDATDLY (0 ) |XFIG , + .xcr1 =XFRLEN1 (OMAP_MCBSP_WORD_8 ) |XWDLEN1 (OMAP_MCBSP_WORD_16 ), + .srgr1 =FWID (DEFAULT_BITPERSAMPLE -1 ), + .srgr2 =GSYNC |CLKSP |FSGM |FPER (DEFAULT_BITPERSAMPLE *2 -1 ), +/*.pcr0 = FSXM | FSRM | CLKXM | CLKRM | CLKXP | CLKRP,*/ /* mcbsp: master */ + .pcr0 =CLKXP |CLKRP ,/* mcbsp: slave */ +}; + +static struct omap_alsa_codec_config alsa_config = { + .name ="OSK AIC23" , + .mcbsp_regs_alsa = &mcbsp_regs, + .codec_configure_dev =NULL ,// aic23_configure, + .codec_set_samplerate =NULL ,// aic23_set_samplerate, + .codec_clock_setup =NULL ,// aic23_clock_setup, + .codec_clock_on =NULL ,// aic23_clock_on, + .codec_clock_off =NULL ,// aic23_clock_off, + .get_default_samplerate =NULL ,// aic23_get_default_samplerate, +}; +static struct platform_device osk5912_mcbsp1_device = { - .name ="omap_mcbsp" , - .id =1 , + .name ="omap_alsa_mcbsp" , + .id =1 , + .dev = { + .platform_data = &alsa_config, + }, };static struct resource osk5912_kp_resources[] = {
include/asm-arm/arch-omap/omap-alsa.h new file +144 -0
144 lines not on this page · raw message
sound/arm/Makefile +1 -2
@@ -14,5 +14,4 @@ snd-pxa2xx-pcm-objs := pxa2xx-pcm.o obj-$(CONFIG_SND_PXA2XX_AC97) += snd-pxa2xx-ac97.o snd-pxa2xx-ac97-objs := pxa2xx-ac97.o -obj-$(CONFIG_SND_OMAP_AIC23) += snd-omap-aic23.o -snd-omap-aic23-objs := omap-aic23.o omap-alsa-dma.o omap-alsa-mixer.o +obj-$(CONFIG_SND) += omap/
sound/arm/omap-aic23.c deleted +0 -904
904 lines not on this page · raw message
sound/arm/omap-aic23.h deleted +0 -131
131 lines not on this page · raw message
sound/arm/omap-alsa-dma.c deleted +0 -452
452 lines not on this page · raw message
sound/arm/omap-alsa-dma.h deleted +0 -53
53 lines not on this page · raw message
sound/arm/omap-alsa-mixer.c deleted +0 -496
496 lines not on this page · raw message
sound/arm/omap/Makefile new file +6 -0
@@ -0,0 +1,6 @@ +# +## Makefile for ALSA OMAP +# +# +obj-$(CONFIG_SND_OMAP_AIC23) += snd-omap-alsa-aic23.o +snd-omap-alsa-aic23-objs := omap-alsa.o omap-alsa-dma.o omap-alsa-aic23.o omap-alsa-aic23-mixer.o
sound/arm/omap/omap-alsa-aic23-mixer.c new file +485 -0
485 lines not on this page · raw message
sound/arm/omap/omap-alsa-aic23.c new file +321 -0
273 lines not on this page · raw message
sound/arm/omap/omap-alsa-aic23.h new file +83 -0
83 lines not on this page · raw message
sound/arm/omap/omap-alsa-dma.c new file +443 -0
443 lines not on this page · raw message
sound/arm/omap/omap-alsa-dma.h new file +53 -0
53 lines not on this page · raw message
sound/arm/omap/omap-alsa.c new file +579 -0
579 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.2.2
Part of the diff is not shown here. View the raw message.