maanantai 27. syyskuuta 2010

compile cli aumix for snake os on ubuntu

This doesn´t include gui becouse i dont know how compile gtk or ncurses for snake os
You have to install snake os sdk and export path to point arm compiler: Snake os FAQ
sudo su
apt-get build-dep alsa-utils
apt-get source alsa-utils
cd alsa-utils-1.0.22/
CC=arm-linux-gcc LDFLAGS="-static" ./configure --host arm-linux --without-gpm --without-sysmouse --without-ncurses --without-gtk
make
cd src
scp aumix root@nas-ip:/usb/sda1

usage:
aumix [-[[+|-][]]||
R[ecord]|P[lay]|q[uery]] [-dhLqS] [-f ]

channel options:
v: main volume x: mix monitor
b: bass W: PCM 2
t: treble r: record
s: synthesizer i: input gain
w: PCM o: output gain
p: PC speaker 1: line 1
l: line 2: line 2
m: microphone 3: line 3
c: CD

other options:
d: adjust a device besides /dev/mixer
f: specify file for saving and loading settings (defaults to
~/.aumixrc or /etc/aumixrc)
h: this helpful message
L: load settings
q: query all channels and print their settings
S: save settings

Basically i just use aumix -q and aumix -v 99, 99 commands \,,/
*EDIT*

You can get ncurses gui if you remove --without-ncurses switch and copy /lib/terminfo folder from full linux distribution to snake os folder /usb/sda1/terminfo and do export TERMINFO=/usb/sda1/terminfo/

USB Soundcard on Cheap NAS device running snake os

Firstly you need some kind of usb storage to store modules and programs

Install snake os 1.20 on nas device. Use google
Download and extract snake os sdk (1.10) on linux os (google)
became root (sudo su)
cd snakeos-sdk
export PATH=tools/arm-uclibc-3.4.6/bin/:$PATH
cp configs configsbackup
cp configs/str8132_defconfig_jffs2 kernels/linux/.config
cd kernels/linux
make clean && make menuconfig

Select modules to compile. Do not deselect any preselected drivers (unless you know what you are doing)

Device Drivers ---> USB Support ---> (*) Obsolete OSS USB drivers --> (M) USB Audio support
Device Drivers ---> Sound ---> (M) Sound card support
Device Drivers ---> Sound ---> Advanced Linux Sound Architecture --->
(M) Advanced Linux Sound Architecture
(M) Sequencer support
(M) OSS Mixer API
(M) OSS PCM (digital audio) API
USB devices ---> (M) USB Audio/MIDI driver
exit and save

cp .config ../../configs/str8132_defconfig_jffs2
cd ../../
./mk_snakeos_image.sh

If everything went right you get error: ROOTFS TOO BIG: 2949120 bytes BIGGER THAN 2752512 bytes - ABORTING
Thats allright because we won´t be using rootfs for extra modules

scp -r rootfs/target/lib/modules/2.6.16-gazineu/kernel/ root@nas-ip:/usb/sda1/modules
Create script to load all sound modules at once:
nano modules.sh
#######################################
insmod /usb/sda1/modules/sound/soundcore.ko;
insmod /usb/sda1/modules/sound/core/snd-page-alloc.ko;
insmod /usb/sda1/modules/sound/core/snd.ko;
insmod /usb/sda1/modules/sound/core/snd-hwdep.ko;
insmod /usb/sda1/modules/sound/core/snd-timer.ko;
insmod /usb/sda1/modules/sound/core/snd-pcm.ko;
insmod /usb/sda1/modules/sound/core/oss/snd-mixer-oss.ko;
insmod /usb/sda1/modules/sound/core/oss/snd-pcm-oss.ko;
insmod /usb/sda1/modules/drivers/usb/class/audio.ko;
insmod /usb/sda1/modules/sound/core/seq/snd-seq-device.ko;
insmod /usb/sda1/modules/sound/core/snd-rawmidi.ko;
insmod /usb/sda1/modules/sound/usb/snd-usb-lib.ko;
insmod /usb/sda1/modules/sound/usb/snd-usb-audio.ko;
#########################################

scp ./modules.sh root@nas-ip:/usb/sda1/modules
ssh root@nas-ip
cd /usb/sda1/modules
chmod u+x modules.sh
./modules.sh

If all the modules loads without errors sound should work now.
All you have to do is figure out how to compile some players ;-)

Please contact or comment if you have any suggestions or if you know how to load modules at boot.
This might be usefull: Compile cli aumix for snake os