LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Alsa, ony one programm can play sound, for another device is busy (https://www.linuxquestions.org/questions/slackware-14/alsa-ony-one-programm-can-play-sound-for-another-device-is-busy-4175460690/)

StreamThreader 05-04-2013 09:45 AM

Alsa, ony one programm can play sound, for another device is busy
 
Hello!
I use Slackware 14.0 x68_64
I have 2x sound cards.
Code:

cat /proc/asound/cards
 0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xfdff8000 irq 44
 1 [Creative      ]: HDA-Intel - HDA Creative
                      HDA Creative at 0xfddfc000 irq 18
 2 [U0x46d0x805    ]: USB-Audio - USB Device 0x46d:0x805
                      USB Device 0x46d:0x805 at usb-0000:00:1d.7-4, high speed

I not found how to configure alsa for work with Creative X-Fi sound card microphone.
It use special jack, in windows this jack is manage by drivers, in linux this jack not possible configure.
Ok.
I resolve this problem: use mic for intel realtek integrated sound card.
And playback music through Creative.
But, flash player and other software not can play sound through not default sound card.
Creative (playback sound card) not is by default.
I need change creative as default card, and intel realtek as secondary sound card for microphone.
I finded how do this. I create file /etc/asound.conf:
Code:

pcm.!default {
    type hw
    card Creative
}
ctl.!default {
    type hw
    card Creative
}

OK!
Work.
But.
Only one program can play sound! Or skype, or video player, or flash player.
Error is "Device is busy"


Please help, where is documentations for resolve to many problems with sound.
I not understand how KDE4 work with alsa, and what is Phonon, and how to work with Phonon?
Device is busy is a Phonon or Alsa problem?

Thanks for yours support.

StreamThreader 05-06-2013 10:43 AM

I find what is problem.
My sound card not supported hardware mixing.
I rewrite my asound.conf and software mixing is work!
P.S. I use "pcm.swmixer" for resempling to 44100Hz. Dmix by default use 48kHz. It is important!
Code:

pcm.ossmix {
    type dmix
    ipc_key 1024 # must be unique!
#  ipc_key_add_uid false  # let multiple users share
#  ipc_perm 0666          # IPC permissions for multi-user sharing (octal, default 0600)
    slave {
        pcm "hw:1,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 Creative
}

# You may want to make your new ossmix the default for alsa.
# If your alsa programs are complaining that they can't open
# your sound devices, try uncommenting this next line
pcm.default pcm.dsp0

pcm.swmixer {
    type dmix
    ipc_key 1234
    slave {
        pcm "hw:0,0" #for ICE1724's analog output
        pcm "hw:0,1" # for ICE1724's digital output
        format S32_LE # needed only for ICE1724's digital output.
        period_size 1024
        buffer_size 4096
        rate 44100
        }
}


dugan 05-06-2013 11:16 AM

I'm glad you solved it. This would also have worked:

http://www.linuxquestions.org/questi...0/#post4929576


All times are GMT -5. The time now is 12:38 PM.