Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi. I'm a newbie to Linux (although I know some basics), so please bear with me. I have an Intel D845BG motherboard with a 1.6 GHz Pentium 4 Processor (non-HT, Willamette core I believe). I am using the integrated AC '97 audio, which I think is Intel's i810 chipset (although I might be wrong). I installed Debian easily (with the new Debian-Installer, beta 4), have been using it under Gnome, and configured a dual boot with Windows XP Pro. Sound was working without any problems at first. However, after a couple boots, and while I was playing an MP3 (with XMMS), the sound just suddenly stopped working. When I tried to load another MP3, XMMS gave me this message:
Quote:
Please check that:
Your soundcard is configured properly
You have the correct output plugin selected
No other program is blocking the soundcard
Then, when I try to play something in RythmBox, it gives me these two error messages:
Quote:
OSS device "/dev/dsp" is already in use by another program.
Quote:
Could not pause playback
Please help! I'm dying with out my MP3's!
In case it will help, here's what /sbin/lsmod outputs:
Originally posted by rsrsharma Hi. I'm a newbie to Linux (although I know some basics), so please bear with me. I have an Intel D845BG motherboard with a 1.6 GHz Pentium 4 Processor (non-HT, Willamette core I believe). I am using the integrated AC '97 audio, which I think is Intel's i810 chipset (although I might be wrong). I installed Debian easily (with the new Debian-Installer, beta 4), have been using it under Gnome, and configured a dual boot with Windows XP Pro. Sound was working without any problems at first. However, after a couple boots, and while I was playing an MP3 (with XMMS), the sound just suddenly stopped working. When I tried to load another MP3, XMMS gave me this message:
Then, when I try to play something in RythmBox, it gives me these two error messages:
Please help! I'm dying with out my MP3's!
In case it will help, here's what /sbin/lsmod outputs:
Go into the preferences in XMMS and change the output plugin to ALSA if set to ARTS and if set to ARTS change to ALSA there seems to be some kind of voodoo going on with XMMS lately at least on my install sometimes it works with ALSA others ARTS go figure eh. For the OSS /dev/dsp problem it looks like you do not have the snd_pcm_oss loaded for the OSS compatibility layer so use modprobe snd-pcm-oss as root if it works then put the module name in the file /etc/modules for it to be loaded at boot from now on.
Originally posted by adz I think he said he was using Gnome (not KDE). Therefore he should use the eSound plugin and not aRTs.
You are correct brain fart I see XMMS and problems then I automatically think that damn arts daemon God I hate that thing and have for many years. So to the original poster use the esound plugin/alsa switch and see if that is the problem as suggested the advice for the OSS still applies though.
Thanks everybody. Right now, XMMS works (under both ALSA and eSound, ARTS wasn't listed), but RythmBox still throws the same error messages. Modprobe snd-pcm-oss didn't throw any errors so I added snd-pcm-oss to /etc/modules, but it didn't seem to do anything (even after reboot). I would really like to get all my sound working fully (I'm sure there are other programs that use OSS for sound). Any other ideas?
Well it looks like there's something taking over your sound (possibly the eSound sound server). So the only thing I can think of is the Dmix plugin. That lets you pipe mulitple streams into one channel without the use of a sound server.
It may be beneficial to ALWAYS use the eSound plugin for all applications that support them (most do). In XMMS, make sure you're using the eSound plugin and do the same with RhythmBox before doing anything with Dmix.
Well, I think I found the problem. I have seen other things about the eSound hogging /dev/dsp. Low and behold, when I kill the esd process, RythmBox works. Of course, then I can't use eSound after that, so it isn't really a fix.
Anyway, I've been trying to get Dmix to work. So far, all I've done is make the ALSA plugin in XMMS stop working. Here is my /etc/asound.conf:
Code:
#asym fun start here. we define one pcm device called "dmixed"
pcm.dmixed {
type dmix
ipc_key 1025
slave {
pcm "hw:0,0" # you cannot use a "plug" device
#here,darn.
period_time 0
period_size 1024 # must be power of 2
buffer_size 8192 # dito. It
#format "S32_LE"
#periods 128 # dito.
#rate 8000 # with rate 8000 you *will* hear,
# if ossmix is used :)
}
bindings {
0 0
1 1
}
}
#one called "dsnooped" for capturing
pcm.dsnooped {
ipc_key 1027
type dsnoop
slave.pcm "hw:0,0"
}
#and this is the real magic
pcm.asymed {
type asym
playback.pcm "dmixed"
capture.pcm "dsnooped"
}
#a quick plug plugin for above device to do the converting magic
pcm.pasymed {
type plug
slave.pcm "asymed"
}
#a ctl device to keep xmms happy
ctl.pasymed {
type hw
card 0
}
#for aoss:
pcm.dsp0 {
type plug
slave.pcm "asymed"
}
ctl.mixer0 {
type hw
card 0
}
# alsa default card
pcm.!default {
type plug
slave.pcm "asymed"
}
#done
And my ~/.asoundrc:
Code:
pcm.ossmix {
type dmix
ipc_key 1024 # must be unique!
slave {
pcm "hw:0,0" # you cannot use a "plug" device here, darn.
period_time 0
period_size 1024 # must be power of 2
buffer_size 8192 # dito. It
#format "S32_LE"
#periods 128 # dito.
#rate 8000 # with rate 8000 you *will* hear,
# if ossmix is used :)
}
# bindings are cool. This says, that only the first
# two channels are to be used by dmix, which is enough for
# (most) oss apps and also lets multichannel chios work
# much faster:
bindings {
0 0 # from 0 => to 0
1 1 # from 1 => to 1
}
}
pcm.dsp0 {
type plug
slave.pcm "ossmix" # use our new PCM here
}
# mixer0 like above
ctl.mixer0 {
type hw
card 0
}
Can you please help? Maybe this will get OSS working...
OSS? You're using ALSA. You mean OSS emulation if anything. Let me suggest if there's a way for you to get rhythmbox working with esd then do that. It's a much easier solution.
If not then be aware that when you create a virutal device in ALSA (like you have above) you then have to specify that device in each app that uses ALSA for the sound to be "dmixed". If not, then any app using ALSA will just send the output to the default virtual device which funnily enough is called "default". To ivercome this I've simply redifined my default device. This is what I have in /etc/asound.conf:
I don't use any sound servers so I'm not sure of the effect it would have on this set up but I've rarely had any problems with the above configuration.
Well, I tried that /etc/asound.conf, and it didn't change a thing. I can't find an option to change the output of Rhythmbox (I even checked gconf). I tried running Rhythmbox in debug mode, here's what it outputted when I tried to play a file:
Code:
[0x80e4468] [rb_entry_view_row_activated_cb] rb-entry-view.c:1727 (11:26:59): row activated
[0x80e4468] [rb_entry_view_row_activated_cb] rb-entry-view.c:1731 (11:26:59): emitting entry activated
[0x80e4468] [rb_shell_player_entry_activated_cb] rb-shell-player.c:1485 (11:26:59): got entry 0x83a8cc0 activated
[0x80e4468] [rb_shell_player_set_playing_source_internal] rb-shell-player.c:1723 (11:26:59): setting playing source to 0x8246048
[0x80e4468] [rb_shell_player_sync_with_source] rb-shell-player.c:1580 (11:26:59): playing source: 0x8246048, active entry: (nil)
[0x80e4468] [rb_shell_set_window_title] rb-shell.c:1878 (11:26:59): clearing title
[0x80e4468] [rb_header_sync] rb-header.c:489 (11:26:59): syncing with node = (nil)
[0x80e4468] [rb_header_sync] rb-header.c:580 (11:26:59): not playing
[0x80e4468] [rb_shell_player_sync_buttons] rb-shell-player.c:1643 (11:26:59): syncing with source 0x8246048
[0x80e4468] [rb_linear_play_order_get_next] rb-play-order-linear.c:95 (11:26:59): choosing next linked entry
[0x80e4468] [rb_linear_play_order_get_next] rb-play-order-linear.c:100 (11:26:59): Player is stopped, picking first entry
[0x80e4468] [rb_shell_player_set_play_button] rb-shell-player.c:1536 (11:26:59): setting play button
[0x80e4468] [rb_shell_player_open_location] rb-shell-player.c:845 (11:26:59): Opening file:///home/rajeev/Audio/Metallica/Ride The Lightning/Ride The Lightning.mp3...
[0x80e4468] [rb_player_construct] rb-player-gst.c:457 (11:26:59): constructing element "pipeline"
[0x80e4468] [rb_player_construct] rb-player-gst.c:506 (11:26:59): constructing queue
[0x80e4468] [rb_player_construct] rb-player-gst.c:519 (11:26:59): constructing element "typefind"
[0x80e4468] [rb_player_construct] rb-player-gst.c:522 (11:26:59): constructing element "decoder"
[0x80e4468] [rb_player_construct] rb-player-gst.c:525 (11:26:59): constructing element "volume"
[0x80e4468] [rb_player_construct] rb-player-gst.c:534 (11:26:59): constructing element "audioconvert"
[0x80e4468] [rb_player_construct] rb-player-gst.c:537 (11:26:59): constructing element "audioscale"
[0x80e4468] [rb_player_construct] rb-player-gst.c:576 (11:26:59): pipeline construction complete
[0x80e4468] [rb_player_sync_pipeline] rb-player-gst.c:627 (11:26:59): syncing pipeline
[0x80e4468] [rb_player_sync_pipeline] rb-player-gst.c:669 (11:26:59): PAUSING pipeline
Got error opening "file:///home/rajeev/Audio/Metallica/Ride%20The%20Lightning/Ride%20The%20Lightning.mp3": Could not pause playback
[0x80e4468] [rb_shell_player_error] rb-shell-player.c:1900 (11:26:59): error: OSS device "/dev/dsp" is already in use by another program.
[0x80e4468] [rb_shell_player_set_playing_source_internal] rb-shell-player.c:1723 (11:26:59): setting playing source to (nil)
[0x80e4468] [rb_shell_player_set_playing_source_internal] rb-shell-player.c:1729 (11:26:59): source is already playing, stopping it
[0x80e4468] [rb_shell_entry_changed_cb] rb-shell.c:1170 (11:26:59): no song info returned!
[0x80e4468] [rb_shell_player_stop] rb-shell-player.c:1768 (11:26:59): stopping
[0x80e4468] [rb_shell_player_sync_with_source] rb-shell-player.c:1580 (11:26:59): playing source: (nil), active entry: (nil)
[0x80e4468] [rb_shell_set_window_title] rb-shell.c:1878 (11:26:59): clearing title
[0x80e4468] [rb_header_sync] rb-header.c:489 (11:26:59): syncing with node = (nil)
[0x80e4468] [rb_header_sync] rb-header.c:580 (11:26:59): not playing
[0x80e4468] [rb_shell_player_sync_buttons] rb-shell-player.c:1643 (11:26:59): syncing with source 0x8246048
[0x80e4468] [rb_shell_player_set_play_button] rb-shell-player.c:1536 (11:26:59): setting play button
[0x80e4468] [rb_shell_player_error] rb-shell-player.c:1905 (11:26:59): exiting error hander
I understand if you don't know what more to try, I just wish I could get OSS working...
Well I have to admit I don't know anything about rhythmbox. All I know is that it uses gstreamer (usually) as a back end so gstreamer has to have the esd (or ALSA) plugin installed. The capability exists, I checked. I even downloaded and installed rhythmbox and gstreamer and I can safely say that I now know even less about it than when I started. Rhythmbox works for me but doesn't use the native ALSA playback but rather the OSS emulation. No idea how to change this. Therefore I couldn't play more than one sound at a time.
I tried invoking just gstreamer with the command gst-launch filesrc location=musicfile.ogg ! vorbisfile ! alsasink as specified by the website and the manpage. No luck. I just get the error:
Quote:
INFO ( 2092: 0) Initializing GStreamer Core Library version 0.6.4
INFO ( 2092: 0) CPU features: (00000000) MMX SSE
INFO ( 2092: 0) registry: loaded user_registry in 0.000131 seconds
(/home/adz/.gstreamer/registry.xml)
INFO ( 2092: 0) registry: loaded global_registry in 0.005822 seconds
(/var/lib/gstreamer/0.6/registry.xml)
ERROR: pipeline could not be constructed: No such element vorbisfile
So, I can't get gstreamer by itself to make any sort of sound at all but I know it works because rhythmbox does. All I can recommend to you is to either not use esd which will make rhythmbox work (but you'll lose the ability to play two sounds at once unless you get dmix working) or to not use rhythmbox. Unless someone else more knowledgeable about these things comes along that's all the advice I can give you.
I am now getting rid of the whole mess from my hard disc.
Quote:
I understand if you don't know what more to try, I just wish I could get OSS working...
Are you saying you want to get rid of ALSA altogether? To do that you have to unload the ALSA drivers with rmmod or morpobe -r and load the OSS driver with modprobe. Then change all the output plugins to either OSS or esd (but not ALSA).
[EDIT]
Oh I just thought of one thing. You mentioned something about gconf. There is a way to get the default output of gstreamer to use esd through gconf. I can't remember where it is (and I can't check since I don't use Gnome) but maybe that could help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.