Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: jpeters on February 06, 2009, 03:26:22 AM

Title: alsa issues
Post by: jpeters on February 06, 2009, 03:26:22 AM
I finally got the latest version of  skype working, which required alsa to be loaded. Now skype is working, but I can't get sound for xmms (which worked great with OSS).  Maybe it's turned off...I haven't found a mixer yet.

john
Title: Re: alsa issues
Post by: jpeters on February 06, 2009, 03:30:40 AM
I finally got the latest version of  skype working, which required alsa to be loaded. Now skype is working, but I can't get sound for xmms (which worked great with OSS).  Maybe it's turned off...I haven't found a mixer yet. If I load OSS, it's all over for alsa...

john

I seem to be pushing all the wrong buttons....time for bed..
Title: Re: alsa issues
Post by: Jason W on February 06, 2009, 04:01:57 AM
XMMS as well as the Mplayers I put up have no alsa support.  For them to work with ALSA they need alsa-oss, which I intend to make and post but other things have come first.  It is easy to build, and I will get to it in the next couple of days if you do not make and submit it first.
Title: alsa issues
Post by: jpeters on February 06, 2009, 01:57:51 PM
XMMS as well as the Mplayers I put up have no alsa support.  For them to work with ALSA they need alsa-oss, which I intend to make and post but other things have come first.  It is easy to build, and I will get to it in the next couple of days if you do not make and submit it first.

XMMS was complaining about libvorbis, so I installed liboog-1.1.3  and libvorbis-1.2.0. Then I installed alsa-lib-1.0.16, which is necessary for alsa-oss.  I've tried compiling several versions of alsa-oss, 1.0.12 and 1.0.17, but get the same error when trying to 'make' .Maybe a problem with alsa-lib??

Code: [Select]
pcm.c: In function 'lib_oss_pcm_ioctl':
pcm.c:1291: error: 'SOUND_PCM_READ_RATE_is_obsolete' undeclared (first use in this function)
pcm.c:1291: error: (Each undeclared identifier is reported only once
pcm.c:1291: error: for each function it appears in.)
pcm.c:1297: error: 'SOUND_PCM_READ_CHANNELS_is_obsolete' undeclared (first use in this function)
pcm.c:1303: error: 'SOUND_PCM_READ_BITS_is_obsolete' undeclared (first use in this function)
pcm.c:1309: error: 'SNDCTL_DSP_MAPINBUF' undeclared (first use in this function)
pcm.c:1313: error: 'SNDCTL_DSP_MAPOUTBUF' undeclared (first use in this function)
pcm.c:1321: error: 'SOUND_PCM_READ_FILTER' undeclared (first use in this function)
pcm.c:1325: error: 'SOUND_PCM_WRITE_FILTER' undeclared (first use in this function)
make[1]: *** [libalsatoss_la-pcm.lo] Error 1
make[1]: Leaving directory `/tmp/alsa-oss-1.0.17/alsa'
make: *** [all-recursive] Error 1


Title: Re: alsa issues
Post by: Jason W on February 06, 2009, 06:04:53 PM
Looks like header files are missing or not found.  I did not have to use CPPFLAGS="-I/usr/local/include" to find the headers for alsa-lib and alsa-oss built on the first try when using a fresh compile of alsa-lib.  I got errors like you mentioned when first trying to build alsa-oss so I rebuilt alsa-lib and all was well.  My guess is a header file may be missing.

Title: Re: alsa issues
Post by: Juanito on February 06, 2009, 09:09:39 PM
If I remember correctly, this is something to do with the soundcard.h(?) header updated for oss in compiletc - I think it actually mentions how to correct the 'SOUND_PCM_READ_RATE_is_obsolete' error in the header itself.
Title: Re: alsa issues
Post by: jpeters on February 07, 2009, 01:15:48 AM
I would think the declarations for pcm.c would be in pcm.h; they're not.....that seems to be the problem.
The headers from alsa-lib are in /usr/local/include/alsa/ folder.  I'll try an older alsa-lib, and see if they're included.

Title: Re: alsa issues
Post by: jpeters on February 07, 2009, 12:56:25 PM
I commented out some components in mixer.c and pcm.c files that apparently related to obsolete
or missing components; then it compiled
Title: Re: alsa issues
Post by: Jason W on February 07, 2009, 01:12:59 PM
Actually, Juanito is right, soundcard.h was modified to be used with OSS.  Installing the header from the kernel source allowed alsa-oss to build. 

However, all of the alsa-lib include files are missing from the alsa.tcel extension, but probably on purpose since it's intent was an end user app.

Jpeters, would it be all the same to you if I go ahead and post the alsa-oss extension since I already extracted the kernel header and built the extension against it?
Title: Re: alsa issues
Post by: jpeters on February 07, 2009, 01:58:15 PM
Actually, Juanito is right, soundcard.h was modified to be used with OSS.  Installing the header from the kernel source allowed alsa-oss to build. 

I noticed that it also specified that it needed to be run with OSS loaded 

Quote
However, all of the alsa-lib include files are missing from the alsa.tcel extension, but probably on purpose since it's intent was an end user app.

That might explain why alsamixer can't find a default soundcard. (i.e, alsamixer -c 0). I had to get rid of alsa-lib to run skype. I was getting:

Code: [Select]
ALSA lib control.c:910:(snd_ctl_open_noupdate) Invalid CTL hw:0 
Without alsa-lib, skype runs, although with the following error:                                                           
Code: [Select]
ALSA lib pcm.c:2184:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi

Quote
Jpeters, would it be all the same to you if I go ahead and post the alsa-oss extension since I already extracted the kernel header and built the extension against it?

I would truly appreciate that, thank you! My girlfriend is complaining.....

Edit: Will it run xmms??
Title: Re: alsa issues
Post by: Jason W on February 07, 2009, 02:03:15 PM
Great, there are also two things I noticed that have to be done that can be put in the extension start script:

mknod /dev/dsp c 14 3
mknod /dev/mixer c 14 3
modprobe snd_pcm_oss
modprobe snd_mixer_oss

I have not rebooted and tested what udev and such does if alsa is loaded during boot, but I had to do the above to make alsa-oss work.  No harm in putting a test case for each of those commands and issuing them if needed.  I will post it then.
Title: Re: alsa issues
Post by: jpeters on February 07, 2009, 03:57:35 PM
Almost there....alsamixer  now works. I'm not getting any sound yet out of xmms, probably due to missing libs and OSS sound.h header.

Still getting:

Code: [Select]
ALSA lib pcm.c:2184:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
edit: lsmod:

Code: [Select]
snd_pcm                57092  3 snd_pcm_oss,snd_intel8x0,snd_ac97_codec
Title: Re: alsa issues
Post by: Jason W on February 07, 2009, 05:11:47 PM
That is most likely due to the fact that alsaconf deletes the /dev/dsp and /dev/mixer files.  I have noticed that too and I have a solution that I am running by Juanito now.  For a workaround, see if this works:

mknod /dev/dsp c 14 3
mknod /dev/mixer c 14 3

That restores alsa-oss for me, and an update should be soon to resolve the issue.
Title: Re: alsa issues
Post by: jpeters on February 07, 2009, 06:10:40 PM
That is most likely due to the fact that alsaconf deletes the /dev/dsp and /dev/mixer files.  I have noticed that too and I have a solution that I am running by Juanito now.  For a workaround, see if this works:

mknod /dev/dsp c 14 3
mknod /dev/mixer c 14 3

That restores alsa-oss for me, and an update should be soon to resolve the issue.

I already made them, re your last post (/dev/mixer, dev/dsp).  This error occurs when skype dials a number, using alsa.  I doesn't seem to affect anything, however, as the sound works fine.  Not so with xmms, however, where there's no sound.  Interestingly....there's no error message  if loading from the terminal "xmms music.mp3". Xmms loads and plays as if muted; volume appears to be up on alsamixer.   

tc@box:~$ skype
ALSA lib pcm.c:2184:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2184:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2184:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2184:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2184:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2184:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2184:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2184:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2184:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2184:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2184:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2184:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2184:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2184:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
Title: Re: alsa issues
Post by: Jason W on February 07, 2009, 06:26:18 PM
That same behavior was noticed with XMMS and is fixed with what is being discussed about the alsa extensions.  Hopefully by tomorrow the solution can be uploaded and further tested.
Title: Re: alsa issues
Post by: jpeters on February 07, 2009, 06:55:13 PM
According to bootup complaints, alsa-oss seems to need the snd pcm, mixer installed before it loads. 
Title: Re: alsa issues
Post by: jpeters on February 07, 2009, 11:59:39 PM
Success!!  I installed a new soundcard.h, which allowed me to recompile alsa-oss-1.0.12. I used alsa-lib-1.0.19, and didn't have any boot errors (I guess you added dev/dsp and /dev/mixer). Then I ran alsaconf, udevtrigger --subsystem-match=sound,  and loaded the modules: mknod /dev/dsp dc 14 3,  mknod /dev/mixer c 14 3, modprobe snd_pcm-oss, modprobe snd_mixer_oss.    The Output Plugin in XMMS preferences needed to be set to OSS Driver 1.2.11 (I think that's the default, but mine was set to the wrong one).

I copied the soundcard.h file from my Puppy setup.  I guess there's a way to save the alsaconfig
in opt/filelist so I don't have to keep repeating the process, and I'll write up a bootup script for the rest.
Title: Re: alsa issues
Post by: curaga on February 08, 2009, 02:05:27 AM
Quote
I have not rebooted and tested what udev and such does if alsa is loaded during boot, but I had to do the above to make alsa-oss work.
Udev does not handle wrapper modules like the alsa-oss ones, they must be manually loaded. An install script to do that would be best, so users don't need to modprobe themselves (or add to bootlocal.sh)
Title: Re: alsa issues
Post by: Jason W on February 08, 2009, 03:33:34 AM
There is a startup script in the alsa-oss extensin that was posted yesterday that modprobes the modules and creates the devices. 

But rerunning alsaconf after initial setup deletes the devices, so recreating the devices after each alsaconf is necessary for using alsa-oss.  A solution is in discussion as part of an update to the alsa.ecel extension that solves that, so for now recreating the devices is necessary after each alsaconf.
Title: Re: alsa issues
Post by: Juanito on February 08, 2009, 04:30:57 AM
Success!!  I installed a new soundcard.h, which allowed me to recompile alsa-oss-1.0.12...I copied the soundcard.h file from my Puppy setup...

Good  :)

Are you sure alsa-oss is required (it looks like some kind of compaitibility kludge for very old stuff to work)? BTW, soundcard.h from the 2.6.26 kernel might be more appropriate for compiling alsa-oss...

After recompiling alsa-drivers-1.0.17 (I chose this because this is what's included in the 2.6.26 kernel tree) to enable oss and without compiling alsa-oss-1.0.17, this enabled me to play mp3s with xmms:
Code: [Select]
$ sudo mknod /dev/dsp c 14 3
$ sudo mknod /dev/mixer c 14 3
$ sudo alsaconf
$ sudo modprobe snd-pcm-oss
$ sudo modprobe snd-seq-oss
$ sudo udevtrigger --subsystem-match=sound
Title: Re: alsa issues
Post by: curaga on February 08, 2009, 06:54:49 AM
jpeters, is it only skype and not your sound card, that you needed alsa for?

'cause I just took a look at Skype download page, and they have an OSS-enabled binary there available for download ( http://www.skype.com/intl/en/download/skype/linux/choose/ )
Title: Re: alsa issues
Post by: Jason W on February 08, 2009, 07:59:56 AM
alsa-oss was probably not needed even with the original alsa extension as creating the device nodes and inserting snd_pcm_oss and snd_mixer_oss is surely what gave it sound.  I will pull the exetension upon the upload of the newer alsa that takes care of the devices and modules.  Hopefully the rebuilt alsa and alsa_modules can be made PPI and TCZ compatible as the icing on the cake.
Title: Re: alsa issues
Post by: jpeters on February 08, 2009, 08:49:27 AM
jpeters, is it only skype and not your sound card, that you needed alsa for?

'cause I just took a look at Skype download page, and they have an OSS-enabled binary there available for download ( http://www.skype.com/intl/en/download/skype/linux/choose/ )

I used the static version from the Skype site you posted. It required alsa, qt4 and support libs in order to work. Skype worked fine without alsa-libs and alsa-oss, but xmms
wouldn't, which prompted the thread. They may have updated the version to work with OSS, I'll try and see if it works. 

Edit: I see they have posted two static versions, one for alsa and one for skype. The OSS version may have just been posted...or else I missed it...

Quote from: Juanito
Are you sure alsa-oss is required (it looks like some kind of compaitibility kludge for very old stuff to work)? BTW, soundcard.h from the 2.6.26 kernel might be more appropriate for compiling alsa-oss...

After recompiling alsa-drivers-1.0.17 (I chose this because this is what's included in the 2.6.26 kernel tree) to enable oss and without compiling alsa-oss-1.0.17, this enabled me to play mp3s with xmms:
Code:
$ sudo mknod /dev/dsp c 14 3
$ sudo mknod /dev/mixer c 14 3
$ sudo alsaconf
$ sudo modprobe snd-pcm-oss
$ sudo modprobe snd-seq-oss
$ sudo udevtrigger --subsystem-match=sound

I tried all the listed commands before recompiling alsa-oss with the un-adapted soundcard.h, and xmms failed to play. 

Quote from: Jason W
alsa-oss was probably not needed even with the original alsa extension as creating the device nodes and inserting snd_pcm_oss and snd_mixer_oss is surely what gave it sound.  I will pull the exetension upon the upload of the newer alsa that takes care of the devices and modules.  Hopefully the rebuilt alsa and alsa_modules can be made PPI and TCZ compatible as the icing on the cake.
It didn't work for me.....







Title: Re: alsa issues
Post by: curaga on February 08, 2009, 09:56:50 AM
ldd output of the static-oss version:
Quote
   libasound.so.2 => not found
   libXv.so.1 => /usr/local/lib/libXv.so.1 (0xf7f08000)
   libXss.so.1 => /usr/local/lib/libXss.so.1 (0xf7f05000)
   libSM.so.6 => /usr/lib/libSM.so.6 (0xf7efd000)
   libICE.so.6 => /usr/lib/libICE.so.6 (0xf7ee6000)
   libXi.so.6 => /usr/lib/libXi.so.6 (0xf7ede000)
   libXrender.so.1 => /usr/lib/libXrender.so.1 (0xf7ed4000)
   libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0xf7ecd000)
   libXfixes.so.3 => /usr/local/lib/libXfixes.so.3 (0xf7ec8000)
   libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0xf7ebf000)
   libXinerama.so.1 => /usr/local/lib/libXinerama.so.1 (0xf7ebc000)
   libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xf7e4e000)
   libfontconfig.so.1 => /usr/local/lib/libfontconfig.so.1 (0xf7e23000)
   libXext.so.6 => /usr/lib/libXext.so.6 (0xf7e17000)
   libX11.so.6 => /usr/lib/libX11.so.6 (0xf7d29000)
   librt.so.1 => /lib/librt.so.1 (0xf7d21000)
   libdl.so.2 => /lib/libdl.so.2 (0xf7d1d000)
   libpthread.so.0 => /lib/libpthread.so.0 (0xf7d0b000)
   libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xf7c21000)
   libm.so.6 => /lib/libm.so.6 (0xf7bfd000)
   libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0xf7bf2000)
   libc.so.6 => /lib/libc.so.6 (0xf7ae2000)
   libz.so.1 => /usr/lib/libz.so.1 (0xf7ace000)
   libexpat.so.1 => /usr/lib/libexpat.so.1 (0xf7aad000)
   libXau.so.6 => /usr/lib/libXau.so.6 (0xf7aaa000)
   libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xf7aa5000)
Somewhat curiously the OSS version requires an alsa lib. No QT4 libs in sight, but several Xorg libs instead.
Title: Re: alsa issues
Post by: jpeters on February 08, 2009, 10:32:38 AM
I submitted the support libs, but Jason requested documentation before I can post it. I'm looking for it, although I think I had to collect it from a variety of RPM archives. BTW, the OSS version is recent, and it works without alsa.  They must have just posted it, because the version I downloaded required alsa.  I'll see if I can find documentation for the support libs and post it today.  

john
Title: Re: alsa issues
Post by: jpeters on February 08, 2009, 10:40:48 AM
I submitted the support libs, but Jason requested documentation before I can post it. I'm looking for it, although I think I had to collect it from a variety of RPM archives. BTW, the OSS version is recent, and it works without alsa.  They must have just posted it, because the version I downloaded required alsa.  I'll see if I can find documentation for the support libs and post it today.  

Jason: Note why I included more than the libX files in the support package  :D
john
Title: Re: alsa issues
Post by: Jason W on February 08, 2009, 10:51:50 AM
Jpeters,
It appears that the OSS static version of Skype requires only a few Xorg libs from our Xorg extension like Curaga posted.  That reduces the size of the support libs extension down to about 16kb, and that extension is in the gmail thread. Maybe that is all it needs to function outside of the alsa lib for sound.  There may not be much looking for source info on the original support libs as many of those files may not be needed.  The libs that it requires are already in existing extensions unless there is more I don't know of.  They are already covered as to their documentation and source requirements so you may want to try that approach before looking up on the previous libs.  Hope this can help save some time.
JW
Title: Re: alsa issues
Post by: curaga on February 08, 2009, 11:19:39 AM
Whoa :o

a separate libc, esd, math lib? NSS & PAM? Users, please do not use this, it has the potential to seriously mess up a system. Only till a reboot with TC, but still.

jpeters, please do strip it down to only needed things ;)
Title: Re: alsa issues
Post by: Jason W on February 08, 2009, 11:55:59 AM
Besides the alsa lib that may or may not be necessary and the X libs, it looks like fontconfig and expat are the only other libs needed. 

I agree with Curaga, the support extension needs to be trimmed down to what is needed.
Title: Re: alsa issues
Post by: jpeters on February 08, 2009, 11:57:35 AM
Whoa :o

a separate libc, esd, math lib? NSS & PAM? Users, please do not use this, it has the potential to seriously mess up a system. Only till a reboot with TC, but still.

jpeters, please do strip it down to only needed things ;)

I'll submit documentation for the libX files, and hopefully that will be sufficient. Sorry to scare you with the dependencies.  (never posed any problem for me......)

Edit: The requirements seem to keep changing as they post new additions. 
Title: Re: alsa issues
Post by: jpeters on February 08, 2009, 12:52:16 PM
Okay....I submitted the smaller skype_support files with a link to the skype download site,
so people can choose the OSS or alsa versions.  I never saw the OSS version before today,
so (unless I just missed it), it's a recent addition.  I tried it, and it works nicely with OSS. The support
files  work for either version.  Jason emailed an interesting download script  that perhaps he'll post.
Title: Re: alsa issues
Post by: jpeters on February 08, 2009, 10:32:00 PM
Comparing alsa with OSS, OSS is the clear winner for my soundcard. OSS allows multiple audio streams to be running simultaneously, in addition to making phone calls with skype.  Alsa allows only one stream, and anything subsequent is silent or freezes up. This may be unique with my AC '97 AudioControler. The sound quality also seems much better with OSS. 
 
Title: Re: alsa issues
Post by: Juanito on February 09, 2009, 12:00:27 AM
Just to be doubly sure - you mean oss as in Curaga's extension is much better than the alsa-oss compatibility mode, right?

For me oss "just works", the only reason I built the alsa extension was to enable a bluetooth headset as bt does not have the option of working with oss...

Title: Re: alsa issues
Post by: jpeters on February 09, 2009, 12:46:39 AM
Just to be doubly sure - you mean oss as in Curaga's extension is much better than the alsa-oss compatibility mode, right?

For me oss "just works", the only reason I built the alsa extension was to enable a bluetooth headset as bt does not have the option of working with oss...

Yes, oss as in "open sound system." (Curaga's extension).  Maybe it's just that it works better on older devices.