Okay, Note #4 was a simple one that I should have known.  
 
dev is a tmpfs mount.  
 
Therefore, I needed to modify /usr/share/ALSA/snddevices to point to
/stat/dev instead of /dev.  Remount the root as rw, run it and remount it as
ro.  Now they are in dev after every reboot.

-----Original Message-----
From: Tony Plack [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 18, 2006 3:37 PM
To: 'Discussion of AstLinux - Asterisk on Compact Flash'
Subject: [Astlinux-users] ALSA - Sound in AstLinux - A journey


I am sure there are a few issues here that may need to get broken up, I just
needed to place this on the list because I haven't seen anyone else go
through this and to collect my thoughts.
 
Well I have been playing with the ALSA stuff in trunk.  I have forced the
version of the kernel to 2.6.16.12 to match the 0.4.4 kernel I have,
imported the asterisk.config file into .config and compiled.  Good news was
that Kristian did his job and everything compiled fine.  What a guy.
 
I then placed these files into my current tree.  I moved the files in
/usr/bin over /usr/shared/ALSA.  I did not move the new kernel, so I don't
know if this impacted my system tests or not.
 
I had a bit of a problem because the modules for the kernel needed to be in
the root of the system and not a symlink (if I remember correctly, the
kernel will not resolve symlinks to modules).  So I had to move the php and
microperl executables from /usr/bin to /opt/usr/bin and create symlinks back
to these files in the correct directory.
 
(Note #1: The removal of support for the opt mount in the newer version
coupled with the inability to change the size of the partition when burning
a CF disk makes the support of customizations much more difficult.  It would
be nice if this were an option and not forced, or that rc.conf would support
the mounting of other volumes.)
 
After moving these files around and rebooting the system, I was able to load
the modules.  At first I was not sure which modules to load, having not used
ALSA before, nor knowing what driver would support my card.  So I loaded ALL
the modules in /lib/modules/2.6.16.12/kernel/sound/pci and then looked in
/proc/asound/cards to find out which pci driver I needed.  Just for
reference, my Jetway 615DF used snd-intel8x0.
 
(Note #2: I copied over from the build directory the alsaconf file to the
astlinux server.  This file should have helped with the configuration but
"dialog" was not loaded.  For some reason, in the trunk, dialog is not being
compiled and included even if it is checked on "make menuconfig".  Not sure
why but it just isn't there)
 
I then placed snd-intel8x0 into the rc.conf file in the AUTOMODS string.
(Note #3: For some reason, this does not load the modules upon startup.  I
am not sure why yet but this must be investigated.  Every time I reboot, I
have to modprobe this driver)
 
I then ran the /usr/share/ALSA/snddevices to create the devices.
(Note #4: It seems that every time the system is rebooted, these drivers
need to be recreated.  Might be because of Note #3 but still had to be done
or you get errors about the card 0 not being found)
 
I then ran the following to get the aplay to work:
addgroup audio
 
If you do not run this, aplay will complain about the group not being
defined.  The message is a little vague IMHO but if you read it real
carefully, ALSA points you to this step.
 
I was then able to run aplay and play a wav file.  The way output was choppy
but this was due to Problem #1.
 
Problems yet:
1. I am getting a underrun!! error from aplay.  It looks like there may be
some patches to 1.0.13 of ALSA to fix this issue because aplay is running in
non-blocking mode and has no reason to run in this mode.  If you patch the
files to make it blocking, then the underrun does not occur.  It seems if
you shift aplay over to blocking (or so I am told) this problem goes away.
My guess is that we are running astlinux in -p mode therefore, this causes
the thread to not get sufficient resources creating the underrun.  If we
block on in the function, it will work (according to the internet articles).
 
2. Some file types are not supported because of a problem with threading in
1.0.13 (or so it seems).  If I take the Noise.wav sample from the ALSA build
directory and place it on my astlinux server, aplay gives me an "aplay:
set_params:1016: unable to install sw params" error.  This error is
supposedly occurring because it looks like astlinux is using the POSIX
compatible threads and not the old linuxthread model.  I need to get a new
CF card to recompile uClib with this model to see if this fixes the issue,
but I do not have the CF card yet.
 
I have not integrated it into asterisk directly for chan_console(?) yet.
Not sure that I will.  I am looking to use the sound card for system event
notifications at this time.  At some time, I may pull it into asterisk and
discover some new things.
 
Hope that helps others.
 
I will keep you posted on some of these errors as I walk this path.
 

_______________________________________________
Astlinux-users mailing list
Astlinux-users@lists.kriscompanies.com
http://lists.kriscompanies.com/mailman/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to [EMAIL 
PROTECTED]

Reply via email to