All of lore.kernel.org
 help / color / mirror / Atom feed
From: lamikr <lamikr@cc.jyu.fi>
To: OMAP-Linux <linux-omap-open-source@linux.omap.com>
Subject: [PATCH] board-nokia-770.c: Add missing alsa platform driver code
Date: Thu, 06 Apr 2006 02:20:48 +0300	[thread overview]
Message-ID: <443450D0.1020001@cc.jyu.fi> (raw)

[-- Attachment #1: Type: text/plain, Size: 496 bytes --]

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 lamikr@cc.jyu.fi

Mika



[-- Attachment #2: board-nokia-770.c-Add-missing-alsa-platform-driver-code.patch --]
[-- Type: text/x-patch, Size: 2392 bytes --]

Subject: [PATCH] board-nokia-770.c: Add missing alsa platform driver code.
Signed-off-by: Mika Laitio <lamikr@cc.jyu.fi>

---

 arch/arm/mach-omap1/board-nokia770.c |   39 ++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+), 0 deletions(-)

4b0bfc38bfa33f82155b339709131e6dc3dfa0ab
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
index 02b980d..924c5bd 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -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 = {
-- 
1.0.GIT

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



             reply	other threads:[~2006-04-05 23:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-05 23:20 lamikr [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-06-16  1:35 [PATCH] board-nokia-770.c: Add missing alsa platform driver code Charles 'Buck' Krasic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=443450D0.1020001@cc.jyu.fi \
    --to=lamikr@cc.jyu.fi \
    --cc=linux-omap-open-source@linux.omap.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.