You are not logged in.

#1 2014-11-18 12:59:46

xabit
Member
Registered: 2013-12-31
Posts: 23

[solved] Alsa - simultaneous playback issue

Hello Archfriends,
im trying to fix my alsa, i cant play simultaneous sound. for expample i cant do vlc/flash/wine on the same time.
it says device busy. 4 days im sitting on that and have no clue why it is like that. that makes me slowly crazy!

my soundcards

arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 2: ALC892 Alt Analog [ALC892 Alt Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


my asound.conf

cat /etc/asound.conf
pcm.snd_card {
        type hw
        card 1
        device  0
}

ctl.snd_card {
        type hw
	
	card 1
        
	device 0
}


### Alles in einer Zeile nach dem Zeichen # ist ein Kommentar, und wird von ALSA ignoriert.

# Das dmix-Plugin wird definiert.
pcm.dmixer {
    type dmix
    ipc_key 1024
    ipc_perm 0666       # Andere Benutzer knnen ebenfalls dmix gleichzeitig nutzen
    slave.pcm "snd_card"
    slave {
        ### buffer_size kann bei Problemen der jeweiligen Karte angepasst werden.
        period_time 0
        period_size 1024
        buffer_size 4096
        ### bei Strungen kann die Konvertierung auf die Rate 44100 eingeschaltet werden.
        # rate 44100
        ### einige Soundkarten bentigen das exakte Datenformat (zB ice1712)
        # format S32_LE
        ### Verfgbare Formate: S8 U8 S16_LE S16_BE U16_LE U16_BE S24_LE S24_BE U24_LE U24_BE
        ###               S32_LE S32_BE U32_LE U32_BE FLOAT_LE FLOAT_BE FLOAT64_LE FLOAT64_BE
        ###               IEC958_SUBFRAME_LE IEC958_SUBFRAME_BE MU_LAW A_LAW IMA_ADPCM MPEG GSM
        ### Anzahl channels muss mit den bindings bereinstimmen
        channels 2 
    }
    bindings {
        0 0
        1 1
    }
}

# Das dsnoop-Plugin, welches es erlaubt, mehrere Programme gleichzeitig aufnehmen zu lassen.
pcm.dsnooper {
    type dsnoop
    ipc_key 2048
    ipc_perm 0666 
    slave.pcm "snd_card"
    slave 
    {
        period_time 0
        period_size 1024
        buffer_size 4096
        # bei Strungen kann die Konvertierung auf die Rate 44100 eingeschaltet werden.
        # rate 44100
        # einige Soundkarten bentigen das exakte Datenformat (zB ice1712)
        # format S32_LE
        ### Anzahl channels muss mit den bindings bereinstimmen
        channels 2 
    }
    bindings {
        0 0
        1 1
    }
}

# Dies definiert unser Fullduplex-Plugin als Standard fr alle ALSA-Programme.
pcm.duplex {
    type asym
    playback.pcm "dmixer"
    capture.pcm "dsnooper"
}

pcm.!default {
    type plug
    slave.pcm "duplex"
}

i hope somebody knows good about alsa.

Last edited by xabit (2014-11-19 04:23:44)

Offline

#2 2014-11-18 13:34:58

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [solved] Alsa - simultaneous playback issue

See config in my sig.

Do tests using speaker-test (look in my config file, for example usage).

You might have mis-configured your apps (e.g. vlc) to *deliberately* bypass dmix.

Offline

#3 2014-11-18 14:20:37

xabit
Member
Registered: 2013-12-31
Posts: 23

Re: [solved] Alsa - simultaneous playback issue

Thank you Brebs for your reply,

See config in my sig.

Do tests using speaker-test (look in my config file, for example usage).

i saw in the past that you help many archuser and im very thankfull for that,
but im afraid to ask, what is the SIG?


You might have mis-configured your apps (e.g. vlc) to *deliberately* bypass dmix.

i set vlc on default and still no sound,
in winecfg the device (card 1: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]) is gone if it is in use

Last edited by xabit (2014-11-18 14:41:06)

Offline

#4 2014-11-18 15:29:11

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [solved] Alsa - simultaneous playback issue

"Sig" is "signature" - click on my "ALSA sound" hyperlink.

You've got:

    slave.pcm "snd_card"
    slave {

I'm not sure if that's valid - specify pcm inside the "slave" section, instead of outside. Take a good look at my configuration wink

Offline

#5 2014-11-18 16:03:59

xabit
Member
Registered: 2013-12-31
Posts: 23

Re: [solved] Alsa - simultaneous playback issue

brebs with your help i got it finaly,

my .asoundrc

cat .asoundrc 
pcm.snd_card {
    type hw
    card 1
    device 0
}

ctl.snd_card {
    type hw
    card 1
    device 0
}

pcm.!default {
    type plug
    slave.pcm "snd_card"
}

pcm.snd_card {
    type hw
    card 1
    device 0
}

ctl.snd_card {
    type hw
    card 1
    device 0
}

# Das dmix-Plugin wird definiert.
pcm.dmixer {
    type dmix           # pcm.NAME: der Name jedes Gertes kann angepasst werden
    ipc_key 1024
    ipc_perm 0666       # Andere Benutzer knnen ebenfalls dmix gleichzeitig nutzen
    slave.pcm "snd_card"
    slave {
        channels 2
    }
}

ctl.dmixer {
    type hw
    card 1
}

# Das dsnoop-Plugin, welches es erlaubt, mehrere Programme gleichzeitig aufnehmen zu lassen.
pcm.dsnooper {
    type dsnoop
    ipc_key 2048
    ipc_perm 0666
    slave.pcm "snd_card"
    slave
    {
        channels 2
    }
}

# Dies definiert unser Fullduplex-Plugin als Standard fr alle ALSA-Programme.
pcm.duplex {
    type asym
    playback.pcm "dmixer"	#natrlich muss dann auch das passende Gegenstck angepasst werden
    capture.pcm "dsnooper"
}

pcm.!default {
    type plug
    slave.pcm "duplex" 

the confusing part was the vlc error, just vlc is complaining now. -
your right the config of vlc is wrong need to check it again.

Thank you very much brebs, you gave me the right clue.

btw: i see signature, learned more ;-) "again"

Offline

Board footer

Powered by FluxBB