WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: alsa issues  (Read 18812 times)

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
alsa issues
« on: February 06, 2009, 06: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

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: alsa issues
« Reply #1 on: February 06, 2009, 06: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..
« Last Edit: February 06, 2009, 06:32:13 AM by jpeters »

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: alsa issues
« Reply #2 on: February 06, 2009, 07: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.

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
alsa issues
« Reply #3 on: February 06, 2009, 04: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



Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: alsa issues
« Reply #4 on: February 06, 2009, 09: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.


Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: alsa issues
« Reply #5 on: February 07, 2009, 12:09:39 AM »
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.

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: alsa issues
« Reply #6 on: February 07, 2009, 04: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.


Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: alsa issues
« Reply #7 on: February 07, 2009, 03: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

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: alsa issues
« Reply #8 on: February 07, 2009, 04: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?
« Last Edit: February 07, 2009, 04:15:08 PM by Jason W »

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: alsa issues
« Reply #9 on: February 07, 2009, 04: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??
« Last Edit: February 07, 2009, 05:02:24 PM by jpeters »

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: alsa issues
« Reply #10 on: February 07, 2009, 05: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.

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: alsa issues
« Reply #11 on: February 07, 2009, 06: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
« Last Edit: February 07, 2009, 07:46:11 PM by jpeters »

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: alsa issues
« Reply #12 on: February 07, 2009, 08: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.

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: alsa issues
« Reply #13 on: February 07, 2009, 09: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

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: alsa issues
« Reply #14 on: February 07, 2009, 09: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.