View Single Post
Old 07-12-2012, 10:18 AM   #132
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Arrow good news!

I have alsa lib 1.0.25 (the latest) working on K3 and K5, with static linking (and now dynamic linking too).

The key was disabling everything I was not using (especial hwdep) in the configure options. The tones program compile needed different linked libs than my earlier attempt.

Here are my alsa build commands:
Code:
CC=arm-none-linux-gnueabi-gcc ./configure --target=arm-linux --host=i686-linux --disable-python --enable-static --disable-shared --without-libdl --without-versioned --disable-hwdep --disable-rawmidi
make
cp src/.libs/libasound.* /home/user/CodeSourcery/2010q1-202/arm-none-linux-gnueabi/libc/usr/lib/
Here is my gcc cross-compile command (static build) for tones:
Code:
arm-linux-gcc --static -o tones tones.c -lasound -lpthread -lm -lrt
EDIT: I just rebuilt tones without the "--static" option. The resulting tones program was MUCH smaller, and still works on both the K3 and K5. It is attached below. Enjoy! And thanks twobob -- now I can merge this into my code to make it annoying to other people in the room too. And this was built from the newest available stable alsa lib source code too (using CodeSourcery 2010q1-202).

EDIT2: It works on my DX (white) as well. Testing it on my K4s will be a bit harder, I'm afraid.

EDIT3: Another option for K4 sound (currently being used on the Nook Simple Touch) is to activate USB host mode and plug in a USB "sound card". We could borrow from the NST rooting project.

@twobob: you probably need to configure with "--disable-hwdep" to get the k5 fatal error to go away on your build (like I used). I also removed midi support. If you want to reconfigure the serial port to support midi, go for it. I sold my Yamaha DX7 long ago when I needed money, so I don't need midi.
Attached Files
File Type: gz tones.gz (13.3 KB, 195 views)

Last edited by geekmaster; 07-12-2012 at 11:18 AM.
geekmaster is offline   Reply With Quote