LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   Getting error: "ALSA device "default" is already in use by another program." (http://www.linuxquestions.org/questions/debian-26/getting-error-alsa-device-default-is-already-in-use-by-another-program-265327/)

brynjarh 12-11-2004 03:43 PM

Getting error: "ALSA device "default" is already in use by another program."
 
If I'm playing a video file (with audio) on totem-xine and then try to play a ogg file on rhythmbox I get two error messages:
"ALSA device "default" is already in use by another program."
"Could not pause playback"

How can I play more then one audio stream at once? I have installed the ALSA driver and the esound daemon, that's not enough I guess? Do I need to install something or configure something or what?

acid_kewpie 12-11-2004 03:54 PM

you need to use the dmix plugin inside alsa to accept multiple streams. with this working, you will not need esd at all. these should help you:

http://www.pseudorandom.co.uk/2004/debian/alsa/
http://gentoo-wiki.com/HOWTO_ALSA_sound_mixer_aka_dmix

only a small piece of each should be needed though...

brynjarh 12-11-2004 05:15 PM

hmm, I'm not getting much progress using that.. still having the same problem.

acid_kewpie 12-11-2004 05:21 PM

well you've not done it right yet then...

brynjarh 12-11-2004 05:41 PM

Okay I'm getting some progress. :)

So.. basically I just need to use the dmix plugin inside alsa and then I can have multible audio streams? Why isn't the dmix plugin installed like this by default then?

brynjarh 12-11-2004 06:15 PM

Okay, I read and followed the instructions on http://www.pseudorandom.co.uk/2004/debian/alsa/ and now when I run totem-xine and gaim I can hear sound from both programs! Which is great. :)
But when I run rhyhtmbox it crashes, but when I remove the file /etc/asound.conf and run rhythmbox again it does not crash but now I when I try using totem-xine and gaim at the same time I can only get one audio stream to play at the same time.

I guess I need to change my '/etc/asound.conf' file somehow or something.. any tips on what I could do? I'll post the code from '/etc/asound.conf' here and also the rhythmbox crash debug info. And yea, I got the asound.conf file from '/usr/share/doc/libasound2/examples/asound.conf_dmix'.

/etc/asound.conf
Code:

# Example /etc/asound.conf or ~/.asoundrc file showing how
# to configure ALSA so that dmix is used by default
#
# This isn't very well tested.  Bug reports and suggestions for
# improvement are welcome.
#

# N.B. pcm.dmix is already defined in /usr/share/alsa/alsa.conf
# with configurable slave device, format and rate

# We define another one here
pcm.ossdmix {
        type dmix
        ipc_key 4339      # A unique number
        slave {
                pcm "hw:0,0"
                period_time 0
                period_size 1024  # a power of 2 for OSS compatibility
                buffer_size 8192  # a power of 2 for OSS compatibility
                #format "S32_LE"
                #periods 128      # a power of 2 for OSS compatibility
                #rate 8000
        }
}

# Make ALSA apps default to using it
pcm.!default {
        type plug
        slave.pcm "ossdmix"
}

# Make OSS apps default to using it
pcm.dsp0 {
        type plug
        slave.pcm "ossdmix"
}

ctl.mixer0 {
        type hw
        card 0
}


Rhythmbox debug info:
Code:

Backtrace was generated from '/usr/bin/rhythmbox'

(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(no debugging symbols found)
`system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols.
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 1089590656 (LWP 4031)]
[New Thread 1132882864 (LWP 4037)]
[New Thread 1124203440 (LWP 4035)]
[New Thread 1115814832 (LWP 4034)]
[New Thread 1107426224 (LWP 4033)]
[New Thread 1099037616 (LWP 4032)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
0x40d01fe3 in poll () from /lib/tls/libc.so.6
#0  0x40d01fe3 in poll () from /lib/tls/libc.so.6
#1  0x40bd9b76 in g_main_loop_get_context () from /usr/lib/libglib-2.0.so.0
#2  0x40bd8fb0 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#3  0x40bd9673 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#4  0x408273c8 in bonobo_main () from /usr/lib/libbonobo-2.so.0
#5  0x0805f7cc in main ()

Thread 6 (Thread 1099037616 (LWP 4032)):
#0  0x40bab295 in pthread_cond_wait@@GLIBC_2.3.2 ()
  from /lib/tls/libpthread.so.0
No symbol table info available.
#1  0x40bc238a in g_async_queue_push_unlocked ()
  from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#2  0x40bc24e6 in g_async_queue_pop_unlocked () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#3  0x40bf422b in g_static_rw_lock_free () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#4  0x40bf2c8d in g_static_private_free () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#5  0x40ba8b63 in start_thread () from /lib/tls/libpthread.so.0
No symbol table info available.
#6  0x40d0ac4a in clone () from /lib/tls/libc.so.6
No symbol table info available.

Thread 5 (Thread 1107426224 (LWP 4033)):
#0  0x40bab440 in pthread_cond_timedwait@@GLIBC_2.3.2 ()
  from /lib/tls/libpthread.so.0
No symbol table info available.
#1  0x40b9f7ea in ?? () from /usr/lib/libgthread-2.0.so.0
No symbol table info available.
#2  0x08223ca8 in ?? ()
No symbol table info available.
#3  0x08213308 in ?? ()
No symbol table info available.
#4  0x4201f9c8 in ?? ()
No symbol table info available.
#5  0x40be5df1 in g_queue_peek_tail () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#6  0x40bc22d1 in g_async_queue_push_unlocked ()
  from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#7  0x40bc2760 in g_async_queue_timed_pop () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#8  0x08096db2 in rhythmdb_add_song ()
No symbol table info available.
#9  0x08096e62 in rhythmdb_add_song ()
No symbol table info available.
#10 0x40bf2c8d in g_static_private_free () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#11 0x40ba8b63 in start_thread () from /lib/tls/libpthread.so.0
No symbol table info available.
#12 0x40d0ac4a in clone () from /lib/tls/libc.so.6
No symbol table info available.

Thread 4 (Thread 1115814832 (LWP 4034)):
#0  0x40bab440 in pthread_cond_timedwait@@GLIBC_2.3.2 ()
  from /lib/tls/libpthread.so.0
No symbol table info available.
#1  0x40b9f7ea in ?? () from /usr/lib/libgthread-2.0.so.0
No symbol table info available.
#2  0x08223ce0 in ?? ()
No symbol table info available.
#3  0x082132d0 in ?? ()
No symbol table info available.
#4  0x4281f9c8 in ?? ()
No symbol table info available.
#5  0x40be5df1 in g_queue_peek_tail () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#6  0x40bc22d1 in g_async_queue_push_unlocked ()
  from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#7  0x40bc2760 in g_async_queue_timed_pop () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#8  0x08096db2 in rhythmdb_add_song ()
No symbol table info available.
#9  0x0809712f in rhythmdb_add_song ()
No symbol table info available.
#10 0x40bf2c8d in g_static_private_free () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#11 0x40ba8b63 in start_thread () from /lib/tls/libpthread.so.0
No symbol table info available.
#12 0x40d0ac4a in clone () from /lib/tls/libc.so.6
No symbol table info available.

Thread 3 (Thread 1124203440 (LWP 4035)):
#0  0x40bab440 in pthread_cond_timedwait@@GLIBC_2.3.2 ()
  from /lib/tls/libpthread.so.0
No symbol table info available.
#1  0x40b9f7ea in ?? () from /usr/lib/libgthread-2.0.so.0
No symbol table info available.
#2  0x08223d18 in ?? ()
No symbol table info available.
#3  0x08213340 in ?? ()
No symbol table info available.
#4  0x4301f9b8 in ?? ()
No symbol table info available.
#5  0x40be5df1 in g_queue_peek_tail () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#6  0x40bc22d1 in g_async_queue_push_unlocked ()
  from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#7  0x40bc2760 in g_async_queue_timed_pop () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#8  0x08096db2 in rhythmdb_add_song ()
No symbol table info available.
#9  0x0809723b in rhythmdb_add_song ()
No symbol table info available.
#10 0x40bf2c8d in g_static_private_free () from /usr/lib/libglib-2.0.so.0
No symbol table info available.
#11 0x40ba8b63 in start_thread () from /lib/tls/libpthread.so.0
No symbol table info available.
#12 0x40d0ac4a in clone () from /lib/tls/libc.so.6
No symbol table info available.

Thread 2 (Thread 1132882864 (LWP 4037)):
#0  0x40bae511 in __waitpid_nocancel () from /lib/tls/libpthread.so.0
No symbol table info available.
#1  0x4007f434 in libgnomeui_module_info_get ()
  from /usr/lib/libgnomeui-2.so.0
No symbol table info available.
#2  <signal handler called>
No symbol table info available.
#3  0x40c5b7ab in raise () from /lib/tls/libc.so.6
No symbol table info available.
#4  0x40c5cf12 in abort () from /lib/tls/libc.so.6
No symbol table info available.
#5  0x40c5526f in __assert_fail () from /lib/tls/libc.so.6
No symbol table info available.
#6  0x40da44db in snd_pcm_wait () from /usr/lib/libasound.so.2
No symbol table info available.
#7  0x43a4a849 in gst_alsa_pcm_wait ()
  from /usr/lib/gstreamer-0.8/libgstalsa.so
No symbol table info available.
#8  0x43a4f50b in gst_alsa_sink_get_type ()
  from /usr/lib/gstreamer-0.8/libgstalsa.so
No symbol table info available.
#9  0x43047506 in ?? () from /usr/lib/gstreamer-0.8/libgstoptscheduler.so
No symbol table info available.
#10 0x0833b2a0 in ?? ()
No symbol table info available.
#11 0x00000004 in ?? ()
No symbol table info available.
#12 0x4304b840 in ?? () from /usr/lib/gstreamer-0.8/libgstoptscheduler.so
No symbol table info available.
#13 0x4304bce2 in ?? () from /usr/lib/gstreamer-0.8/libgstoptscheduler.so
No symbol table info available.
#14 0x00000538 in ?? ()
No symbol table info available.
#15 0x00000000 in ?? ()
No symbol table info available.
#16 0x4304cc20 in ?? () from /usr/lib/gstreamer-0.8/libgstoptscheduler.so
No symbol table info available.
#17 0x0814f980 in ?? ()
No symbol table info available.
#18 0x08338608 in ?? ()
No symbol table info available.
#19 0x080f69c8 in ?? ()
No symbol table info available.
#20 0x409a7550 in g_log_domain_gstreamer ()
  from /usr/lib/libgstreamer-0.8.so.1
No symbol table info available.
#21 0x4304e180 in ?? () from /usr/lib/gstreamer-0.8/libgstoptscheduler.so
No symbol table info available.
#22 0x0833b2a0 in ?? ()
No symbol table info available.
#23 0x00000000 in ?? ()
No symbol table info available.
#24 0x438664e8 in ?? ()
No symbol table info available.
#25 0x43046ddf in ?? () from /usr/lib/gstreamer-0.8/libgstoptscheduler.so
No symbol table info available.
#26 0x00000000 in ?? ()
No symbol table info available.
#27 0x08338608 in ?? ()
No symbol table info available.
#28 0x438664e8 in ?? ()
No symbol table info available.
#29 0x408bfbc0 in gst_debug_log () from /usr/lib/libgstreamer-0.8.so.1
No symbol table info available.
#0  0x40d01fe3 in poll () from /lib/tls/libc.so.6


brynjarh 12-11-2004 06:21 PM

Also, here is the '/etc/modprobe.d/sound' file.

Code:

alias char-major-116 snd
alias char-major-14 soundcore

options snd major=116 cards_limit=4 device_mode=0660 device_gid=29 device_uid=0
# or if you use devfs (gid=29 is 'audio' on Debian)
# options snd major=116 cards_limit=4 device_mode=0660 device_gid=29 device_uid=0

alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss

alias snd-card-0 snd-intel8x0
alias snd-card-1 off
alias snd-card-2 off
alias snd-card-3 off
alias snd-card-4 off
alias snd-card-5 off
alias snd-card-6 off
alias snd-card-7 off

alias sound-slot-0 snd-card-0
alias sound-slot-1 off
alias sound-slot-2 off
alias sound-slot-3 off
alias sound-slot-4 off
alias sound-slot-5 off
alias sound-slot-6 off
alias sound-slot-7 off



##Old configurations.
#options snd  device_mode=0660
#alias snd-card-0 snd-intel8x0
#alias sound-slot-0 snd-intel8x0


sachinvk 02-04-2005 11:45 AM

was Getting the same error: "ALSA device "default" is already in use by another program." for rhythmbox......xmms was working without nay problems....

installing/ re-installing the following solved the problem....rhythmbox sound was restored
gstreamer-plugins-mp3
gstreamer-plugins


All times are GMT -5. The time now is 06:05 PM.