board-nokia-770.c: Add missing alsa platform driver code
Subsystems (3)
PATCH 1/1 board-nokia-770.c: Add missing alsa platform driver code
Hi it seems that 770 is also using aic23 alsa driver, original patches added aic23 platform data driver code only to board-osk.c,
but this adds now a similar platform driver config also to board-nokia770.c. I have only tested made a compile test for this one.Can somebody who is building own kernels for 770 try to build, boot & "play it again sam" with this?
The patch should apply on top of both to 2.6.16-omap2 branch and linux-omap git head.
Signed off: Mika Laitio [email protected]
Mika
Subject: [PATCH] board-nokia-770.c: Add missing alsa platform driver code.
Signed-off-by Mika Laitio <[email protected]>
---
arch/arm/mach-omap1/board-nokia770.c | 39 ++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+), 0 deletions(-)
4b0bfc38bfa33f82155b339709131e6dc3dfa0ab
arch/arm/mach-omap1/board-nokia770.c +39 -0
@@ -31,6 +31,8 @@#include <asm/arch/dsp_common.h> #include <asm/arch/aic23.h> #include <asm/arch/gpio.h> +#include <asm/arch/mcbsp.h> +#include <asm/arch/omap-alsa.h> static void __init omap_nokia770_init_irq (void ) {
@@ -86,8 +88,45 @@ static struct platform_device nokia770_k .resource = nokia770_kp_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 ="n770 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 nokia770_mcbsp1_device = { + .name ="omap_alsa_mcbsp" , + .id =1 , + .dev = { + .platform_data = &alsa_config, + }, +}; +static struct platform_device *nokia770_devices[]__initdata = { &nokia770_kp_device, + &nokia770_mcbsp1_device, };static struct ads7846_platform_data nokia770_ads7846_platform_data__initdata = {
Signature · 1 line
1.0.GIT