* [PATCH] board-nokia-770.c: Add missing alsa platform driver code
@ 2006-04-05 23:20 lamikr
0 siblings, 0 replies; 2+ messages in thread
From: lamikr @ 2006-04-05 23:20 UTC (permalink / raw)
To: OMAP-Linux
[-- 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 --]
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH] board-nokia-770.c: Add missing alsa platform driver code
@ 2006-06-16 1:35 Charles 'Buck' Krasic
0 siblings, 0 replies; 2+ messages in thread
From: Charles 'Buck' Krasic @ 2006-06-16 1:35 UTC (permalink / raw)
To: linux-omap-open-source; +Cc: maemo-developers, lamikr
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I checked the mailing list archive, and I do not see any answer
regarding Mika's alsa patch for alsa and the 770.
Since Nokia released the 2.0 beta for 770, I hoped Nokia would have
ALSA support enabled, but it seems not.
So I went ahead and rebuilt the Nokia 2.6.16-omap1 kernel with Mika's
ALSA patch
(http://linux.omap.com/pipermail/linux-omap-open-source/2006-April/006868.html),
installed the kernel, and booted. Low and behold the OMAP_ALSA card
appears in /proc/asound/cards on the 770!
After this, I build the libasound2 package in scratchbox (using ubuntu
breezy package) and alsa-utils. libasound2 built and installed ok on
the 770. alsa-utils would build, but not install because of package
dependencies. So anyway, I just copied the aplay binary to the
770. So, it seems to play some wav files, but not at the correct
speed; i.e. a 44100 Hz .wav file sounds very slow on the 770. I
found a 22 KHz wav and it sounded almost right. So I'm guessing the
770 is playing at 16KHz.
Can any Nokia people comment, will we have ALSA in 2.0? I for one
would be really happy to see it.
- -- Buck
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFEkgrZPrrWIMa4SMsRAtY7AJ91hyW6s9uulFna70h9vUx/J5eeygCgrt02
lL87GqV5242tn5CaS3a1xgs=
=HJqg
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-06-16 1:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-05 23:20 [PATCH] board-nokia-770.c: Add missing alsa platform driver code lamikr
-- strict thread matches above, loose matches on Subject: below --
2006-06-16 1:35 Charles 'Buck' Krasic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox