You are not logged in.

#1 2009-07-26 03:13:33

beat
Member
Registered: 2009-05-24
Posts: 49

Emu 0404 Usb

Ok I just moved to Arch Linux and everything is working pretty good except for a little detail, I can't get multiple sound sources at the same time. For example I can't listen to music and get sound from youtube at the same time.

This soundcard pretty much worked out of the box I just needed to create an .asoundrc file in order to force the sample rate to 44khz.

Any idea on how to solve this?

Would really appreciate it. wink

Last edited by beat (2009-07-26 03:14:03)

Offline

#2 2009-07-26 03:57:15

agapito
Member
From: Who cares.
Registered: 2008-11-13
Posts: 644

Re: Emu 0404 Usb

Create /etc/asound.conf and put this

defaults.pcm.rate_converter "samplerate_best"
pcm.!default {
type rate
slave {
pcm "plughw:0,0"
rate 48000
}
}

pcm.dsnooped {
    type dsnoop
    slave {
        pcm "hw:0,0" 
        channels 2 
        period_size 1024
        buffer_size 4096
        rate 48000
        periods 0 
        period_time 0
    }
}

All your sound is now resampled to 48 khz, check alsamixer and change clock in to 48000. I have multisound on my E-Mu card.

Last edited by agapito (2009-07-26 04:03:49)


Excuse my poor English.

Offline

#3 2009-07-26 05:51:40

djszapi
Member
From: Cambridge, United Kingdom
Registered: 2009-06-14
Posts: 1,439
Website

Re: Emu 0404 Usb

Hello Beat!

Don't use oss, if you use that, because that can't handle your purpose, just alsa or pulseaudio!

Here is the relevant wiki pages:

http://wiki.archlinux.org/index.php/All … nd_at_once

Alsa:
http://wiki.archlinux.org/index.php/ALSA

or Pulseaudio:
http://wiki.archlinux.org/index.php/PulseAudio

Offline

#4 2009-07-26 10:30:17

beat
Member
Registered: 2009-05-24
Posts: 49

Re: Emu 0404 Usb

agapito wrote:

Create /etc/asound.conf and put this

defaults.pcm.rate_converter "samplerate_best"
pcm.!default {
type rate
slave {
pcm "plughw:0,0"
rate 48000
}
}

pcm.dsnooped {
    type dsnoop
    slave {
        pcm "hw:0,0" 
        channels 2 
        period_size 1024
        buffer_size 4096
        rate 48000
        periods 0 
        period_time 0
    }
}

All your sound is now resampled to 48 khz, check alsamixer and change clock in to 48000. I have multisound on my E-Mu card.

That didn't work, still can't get multiple sound sources. I don't understand what you mean to change the clock to 48000 on alsamixer.
Alsamixer doesn't seem to accept my sound at all, if I change the volume there everything stays the same.

Offline

#5 2009-07-29 16:54:42

beat
Member
Registered: 2009-05-24
Posts: 49

Re: Emu 0404 Usb

Still haven't found a solution, any help would be appreciated.

Offline

#6 2009-07-29 18:08:50

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Emu 0404 Usb

Try

pacman -S oss

and select OSS as the preferred output in your music player.

Edit:
If you want to stick with alsa you may want to try to put something like this in your asound.conf

ctl.!default {
    type "hw"
    card 0
}

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

pcm.non_block_duplex {
    type plug
    slave.pcm "duplex"
}

pcm.dmixer {
    type dmix
    ipc_key 1234
    ipc_key_add_uid yes
    slave {
        pcm "hw:0,0"
    }
}

pcm.dsnooper {
    type dsnoop
    ipc_key 5678
    ipc_key_add_uid yes
    slave {
        pcm "hw:0,0"
    }
}

pcm.duplex {
    type asym
    playback.pcm "dmixer"
    capture.pcm "dsnooper"
}

Last edited by R00KIE (2009-07-29 18:16:43)


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#7 2009-07-31 02:39:48

beat
Member
Registered: 2009-05-24
Posts: 49

Re: Emu 0404 Usb

That didn't work, thanks for your help though. I have already found a solution, for anyone that might be interested here it is

defaults.pcm.dmix.rate 44100 #to avoid wrong rate

#True setup (like it must be in the alsa)
pcm.test {
    type asym
    playback.pcm {
        type plug
        slave.pcm "dmix:USB"
    }
    capture.pcm {
        type plug
        slave.pcm "dsnoop:USB"
    }
}


#Clean setup

pcm.emu {
    type plug
    slave {
        pcm "hw:0"
        rate 44100
    }
}

#Setup with dmix only

pcm.emutest{
    type plug
    slave.pcm "emudmix"
}

pcm.emudmix {
    type dmix
    ipc_key 1234
    slave {
        pcm "hw:0,0"
        rate 44100
    }
}

Offline

#8 2009-07-31 05:29:01

dptkby
Member
Registered: 2009-07-02
Posts: 64

Re: Emu 0404 Usb

There are some patches for the 0404 USB by mellowman and CannibalZerg; you can find the discussion in this thread on the Ubuntu forums (links to latest patches on last page). Among other things, they add a clock rate option in alsamixer.

I know you already found a solution, but you might still find the patches useful! They work very well for me (except the softvol one, which doesn't seem to do anything).

Offline

#9 2009-07-31 11:55:53

beat
Member
Registered: 2009-05-24
Posts: 49

Re: Emu 0404 Usb

Thank you for the tip, I'll definitely have a look into it.

Offline

#10 2009-08-23 20:53:15

CannibalZerg
Member
Registered: 2009-08-23
Posts: 1

Re: Emu 0404 Usb

dptkby wrote:

They work very well for me (except the softvol one, which doesn't seem to do anything).

Softvol patch does noting, untill you feed softvol with 24bit sound stream, like vinyl-rip 24/96 (just look at patch source code) ;-)

Offline

#11 2009-08-23 22:39:33

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Emu 0404 Usb

Just out of curiosity, try to play 2 audio files with different sample rates, do both files play properly?
I ask because my latest try of alsa fails miserably in such a condition (but at least playback from just one source is better than it used to be, hdaudio codec here).


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB