You are not logged in.

#1 2013-07-06 23:49:18

pico
Member
Registered: 2013-07-06
Posts: 18

[SOLVED] Software mixing on ALSA+USB sound card

I have cheap chinesse USB soud card. lsusb says its "Tenx Technology, Inc. TP6911 Audio Headset"
After arch installation sound was working about 2-3 reboots. Then i googled and deleted pulseaudio, and sound randomly working or not after reboots.
After a lot of research i got /etc/asound.conf like that:

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

"AUDIO" its name of card. Checked that. And now i had sound in 80% reboots.

After research i founded that i cant play 2 sounds at same time. (And youtube writes "error occured" for 90% videos).
Tested aplay (it never works):

>aplay /usr/share/sounds/alsa/Front_Center.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1239: Channels count non available

Then played sound in other program and in same time launched aplay:

>aplay /usr/share/sounds/alsa/Front_Center.wav                                                                                                                         
aplay: main:722: audio open error: Device or resource busy 

So that mean i need software mixing.
Googled, and installed "alsa-oss" and did some random stuff with config

pcm.!default {
    type hw
    card AUDIO
    slave.pcm "dmix"
}
ctl.!default {
    type hw
    card AUDIO
    slave.pcm "dmix"
}

and now youtube working. I hear it. But now aplay says:

>aplay /usr/share/skype/sounds/CallBusy.wav
ALSA lib pcm_hw.c:1743:(_snd_pcm_hw_open) Unknown field slave
aplay: main:722: audio open error: Invalid argument

He dont like "slave" thing in config, but it helps. I tested 3 times, added "slave" and rebooted and youtube works. Without "slave" it not working.
And i still cant hear 2 sounds at same time. In google ALSA says like software mixing must work without config, if not then do bugreport.
Im in arch less then 7 days, before i had experience with ubuntu server only, so configuring ALSA is hard for me.
Can somebody help me configure software mixing?
Thank you.

Last edited by pico (2013-07-07 10:36:33)

Offline

#2 2013-07-07 03:48:23

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

Re: [SOLVED] Software mixing on ALSA+USB sound card

It's nonsensical to have "type hw" along with slave.pcm, your config is broken.

See config in my sig, for ideas.

Offline

#3 2013-07-07 10:35:58

pico
Member
Registered: 2013-07-06
Posts: 18

Re: [SOLVED] Software mixing on ALSA+USB sound card

Okay. I surfed your URLs and ended in http://alsa.opensrc.org/Dmix
Example /etc/asound.conf from 3 and 5 works great! Thank you!

If somebody will google Tenx Technology, Inc. TP6911 Audio Headset
Use /etc/asound.conf (you need create it)

pcm.dsp0 {
    type plug
    slave.pcm "hw:0"
}
ctl.mixer0 {
    type hw
    card 0
}

or

pcm.dsp0 {
    type plug
    slave.pcm "dmix"
    hint {
         show on
         description "My dmix dsp0"
    }
}
ctl.mixer0 {
    type hw
    card 0
}

both works for me.
=======
Aaaaand after 2 reboots everything is broken. Both configs not helping. aoss and alsaplayer don't make any sound.
5 reboots later sound again works.
=======
Okay, i know why i need reboot.
If you have same problem - do aplay -l, if your card not first - nothing will work. You need reboot until your card is first. I tryed to do my card always first, but then mixer dont work. And for make it work on every reboot looks like you need read 18 huge books about universe creation.

Last edited by pico (2013-07-09 09:53:25)

Offline

#4 2013-07-07 11:27:23

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

Re: [SOLVED] Software mixing on ALSA+USB sound card

aoss? Why are you using that? That's OSS, i.e. opensound. So is "dsp0".

You'll have far fewer problems if you just stick to ALSA - configure your apps to stop using OSS.

Offline

Board footer

Powered by FluxBB