Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
alsa sound mixing aka dmix (not arts or esd needed)
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 8, 9, 10, 11, 12  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Kream
n00b
n00b


Joined: 19 Apr 2002
Posts: 30
Location: New Delhi, India

PostPosted: Sun Oct 10, 2004 8:58 am    Post subject: dmix enabled globally Reply with quote

I prefer to have ALSA's dmix enabled global ly for my card and here's my working /etc/asound.conf for my nforce intel8x0 onboard soundcard :

Code:
pcm.!default {
        type hw
        card 0
}

ctl.!default {
        type hw
        card 0
}
pcm.dmixer {
    type dmix
    ipc_key 1024
    slave {
        pcm "hw:0,0"
        period_time 0
        period_size 1024
        buffer_size 8192
   rate 44100
    }

    bindings {
        0 0
        1 1
    }
}

pcm.dsp0 {
    type plug
    slave.pcm "dmixer"
}

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

pcm.default {
   type plug
   slave.pcm "dmixer"
}

ctl.mixer0 {
    type hw
    card 0
}

_________________
https://forums.gentoo.org/search.php?search_id=unanswered
Back to top
View user's profile Send private message
cradlebin
n00b
n00b


Joined: 18 Sep 2004
Posts: 32

PostPosted: Tue Oct 12, 2004 12:07 pm    Post subject: Reply with quote

Here is my .asoundrc:

Code:
pcm.my_card {
  type hw
  card 0
# mmap_emulation true
}

pcm.dmixed {
  type dmix
  ipc_key 1024
  slave {
    pcm "my_card"
   # period_time 0
   # buffer_size
    rate 48000
    period_size 1024
  }
}

pcm.dsnooped {
  type dsnoop
  ipc_key 2048
  slave {
    pcm "my_card"
#   rate 48000
#   period_size 128
  }
}

pcm.asymed {
  type asym
  playback.pcm "dmixed"
  capture.pcm "dsnooped"
}

pcm.pasymed {
  type plug
  slave.pcm "asymed"
}

pcm.dsp0 {
  type plug
  slave.pcm "asymed"
}

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


However I got some problems with UT (GOTY, the original version).
When I set UT to use 22001 Hz sound, sound works but it's awful.
So I set it UT to use 44100 Hz sound today, and sound was better but now the sound lags behind and stutters all the time, really weird.
I though it might have been the buffer in my .asoundrc file, but when i uncomment the buffer, i get high squeeky noises through my speakers instead of regular sound, changing the rate to 48000 didn't work (that setting is still in my posted file, I tried 44100 as well, didn't work). (I start UT with aoss ut btw).

So i'm quite stuck here, i'd love to hear xmms play during some instagib, so hopefully someone can help me here, I use intel8x0 for my soundcard (Epox 8 RDA3+ onbourd C-media 9739 chip).
Back to top
View user's profile Send private message
Alexander_L
n00b
n00b


Joined: 13 Oct 2004
Posts: 7

PostPosted: Wed Oct 13, 2004 1:44 pm    Post subject: Reply with quote

Some hints for errors like this?
Code:
alsa_get_mixer(): Attaching to mixer hw:0 failed: Permission denied


xmms tells me this.... other aplications don't work too.
Did i miss something??
Back to top
View user's profile Send private message
PrakashP
Veteran
Veteran


Joined: 27 Oct 2003
Posts: 1249
Location: C.C.A.A., Germania

PostPosted: Wed Oct 13, 2004 2:01 pm    Post subject: Reply with quote

Do you belong to group sound?
Back to top
View user's profile Send private message
Alexander_L
n00b
n00b


Joined: 13 Oct 2004
Posts: 7

PostPosted: Wed Oct 13, 2004 3:14 pm    Post subject: Reply with quote

I belong to the group audio.
Back to top
View user's profile Send private message
PrakashP
Veteran
Veteran


Joined: 27 Oct 2003
Posts: 1249
Location: C.C.A.A., Germania

PostPosted: Wed Oct 13, 2004 3:15 pm    Post subject: Reply with quote

Right, sorry. audio is the correct group. Then the only thing left to check is whether the devices in /dev belong to group audio.
Back to top
View user's profile Send private message
Alexander_L
n00b
n00b


Joined: 13 Oct 2004
Posts: 7

PostPosted: Wed Oct 13, 2004 4:01 pm    Post subject: Reply with quote

They do:
Code:
ls -l /dev/sound
total 0
crw-rw----  1 root audio 14, 12 Oct 13 16:04 adsp
crw-rw----  1 root audio 14,  4 Oct 13 16:04 audio
crw-rw----  1 root audio 14,  3 Oct 13 16:04 dsp
crw-rw----  1 root audio 14,  0 Oct 13 16:04 mixer
crw-------  1 root audio 14,  1 Oct 12 10:45 sequencer
crw-------  1 root audio 14,  8 Oct 12 10:45 sequencer2


Are there any other devices i have to check?

Btw, some background info: i am running a 2.6 kernel + udev
Back to top
View user's profile Send private message
Alexander_L
n00b
n00b


Joined: 13 Oct 2004
Posts: 7

PostPosted: Wed Oct 13, 2004 4:50 pm    Post subject: Reply with quote

Code:
find /dev -group audio -print
/dev/sound/mixer
/dev/sound/audio
/dev/sound/dsp
/dev/sound/adsp
/dev/sound/sequencer2
/dev/sound/sequencer
/dev/snd/pcmC0D0c
/dev/snd/pcmC0D0p
/dev/snd/pcmC0D1c
/dev/snd/timer
/dev/snd/seq
/dev/snd/controlC0
/dev/smpte3
/dev/smpte2
/dev/smpte1
/dev/smpte0
/dev/rmidi3
/dev/rmidi2
/dev/rmidi1
/dev/rmidi0
/dev/mpu401stat
/dev/mpu401data
/dev/mixer3
/dev/mixer2
/dev/mixer1
/dev/midi3
/dev/midi2
/dev/midi1
/dev/midi03
/dev/midi02
/dev/midi01
/dev/midi00
/dev/midi0
/dev/dsp3
/dev/dsp2
/dev/dsp1
/dev/audioctl
/dev/audio3
/dev/audio2
/dev/audio1

is some device missing?
Back to top
View user's profile Send private message
galay2
Apprentice
Apprentice


Joined: 02 Feb 2004
Posts: 208

PostPosted: Wed Oct 27, 2004 10:45 pm    Post subject: Reply with quote

anyone got dmix to work with winex/cedega?
Back to top
View user's profile Send private message
melteye
n00b
n00b


Joined: 28 Feb 2004
Posts: 36

PostPosted: Sat Oct 30, 2004 7:09 am    Post subject: Reply with quote

Thanks. Did just as you said and it works great.
Back to top
View user's profile Send private message
keyser_soze
Apprentice
Apprentice


Joined: 19 Oct 2004
Posts: 162
Location: Australia

PostPosted: Sat Nov 06, 2004 3:25 am    Post subject: Reply with quote

I keep getting errors with various programs when using aoss
as an example

Code:

$ aoss esd -nobeeps -terminate

esd: stack smashing attack in function read()
Aborted



Anyone know what causes this?

it also happens on wine
mplayer gives a segmentation fault
?? any suggestions
Back to top
View user's profile Send private message
TheChuckster
Tux's lil' helper
Tux's lil' helper


Joined: 18 Aug 2003
Posts: 91
Location: United States

PostPosted: Sat Nov 06, 2004 4:50 pm    Post subject: Reply with quote

In order to get this to work, forget using the integrated 2.6 kernel drivers. They just won't work no matter what you try. Just enable Sound Support (one thing) but not anything ALSA at all in the kernel config. Recompile the kernel and install the alsa-driver ebuild and set it up 2.4 style. One advantage of separate drivers from the kernel is that you can always update ALSA without upgrading your kernel in the process.

Any way is there a way to configure OSS Emulation to also be mixed in?
_________________
http://thechuckster.homelinux.com/
Back to top
View user's profile Send private message
stahlsau
Guru
Guru


Joined: 09 Jan 2004
Posts: 565
Location: WildWestwoods

PostPosted: Wed Nov 17, 2004 11:40 am    Post subject: Reply with quote

Quote:
In order to get this to work, forget using the integrated 2.6 kernel drivers. They just won't work no matter what you try.

I can´t second that. Works very well here with kernel-alsa.

Anyhow, maybe someone in the meantime figured out how to include enemy-territory or some game like that into dmix? Running with
Code:
aoss et
doesn´t work, it dies with
Code:
Received signal 11, exiting...
Shutdown tty console

Anything else i´ve tried doesn´t work too, so i would be happy if s/o could point me a clue :-)
_________________
Join the adopt an unanswered post initiative today
Back to top
View user's profile Send private message
moosh
Tux's lil' helper
Tux's lil' helper


Joined: 17 Sep 2004
Posts: 147

PostPosted: Wed Nov 17, 2004 10:19 pm    Post subject: Reply with quote

Hi all,

I tried the solutions suggested here for software mixing (I have a Dell Inspiron 9100 with intel8x0) and everything seems to work great except for a couple of problems.
I disabled artsd (I work with KDE) and made mplayer play the system notifications. So far, so good. However, mozilla and skype refuse to cooperate. I noticed skype uses /dev/dsp. I tried running it through aoss, but then I have no microphone (I tried the asymd .asoundrc and it doesn't work). As for mozilla, I don't know where to even begin.

Thanks
Back to top
View user's profile Send private message
monicajae
Guru
Guru


Joined: 03 Sep 2003
Posts: 363
Location: Dorset, VT

PostPosted: Sat Nov 20, 2004 2:24 am    Post subject: sorry, thread too long for me to attempt an answer to this Reply with quote

why is it i can't hear more than two sounds at the same time? i have a default mail .wav for when evolution is evoked and I copiled it with alsa. HOwever, when i am listening to xmms and have gaim open, i hear both. Is there a remedy to this?
Back to top
View user's profile Send private message
Redeeman
l33t
l33t


Joined: 25 Sep 2003
Posts: 957
Location: Denmark

PostPosted: Sat Nov 20, 2004 8:41 am    Post subject: Reply with quote

that is because not all of your stuff is using alsa's default device, it might be using alsa's hw device directly, or oss emulation
_________________
Sandberg Enterprises
Back to top
View user's profile Send private message
bushwakko
Guru
Guru


Joined: 25 Mar 2003
Posts: 495

PostPosted: Sat Nov 20, 2004 1:01 pm    Post subject: Reply with quote

why do programs access the hw device and not the default, and why doesn't the oss device map to the default device in some way? it isn't a very bullet proof system imo.
_________________
Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb
Back to top
View user's profile Send private message
Redeeman
l33t
l33t


Joined: 25 Sep 2003
Posts: 957
Location: Denmark

PostPosted: Sat Nov 20, 2004 1:38 pm    Post subject: Reply with quote

i agree, its ugly that the oss emulation doesent just wrap to the default alsa device.

and why the programs doesent use the default device as default? because the program authors somehow should be kneecapped. :)
_________________
Sandberg Enterprises
Back to top
View user's profile Send private message
bushwakko
Guru
Guru


Joined: 25 Mar 2003
Posts: 495

PostPosted: Sat Nov 20, 2004 1:40 pm    Post subject: Reply with quote

Why is it even possible to use the hw directly and not the default device? isn't it the same API? If alsa makes it harder, people probably would use the defaultdeivice ;) Let's petition them! :D
_________________
Macbook Pro 15"
Core 2 Duo 2,33ghz
2gb Ram
ATI Mobility x1600 256mb
Back to top
View user's profile Send private message
Redeeman
l33t
l33t


Joined: 25 Sep 2003
Posts: 957
Location: Denmark

PostPosted: Sat Nov 20, 2004 1:58 pm    Post subject: Reply with quote

it shouldnt be harder.
_________________
Sandberg Enterprises
Back to top
View user's profile Send private message
monicajae
Guru
Guru


Joined: 03 Sep 2003
Posts: 363
Location: Dorset, VT

PostPosted: Sun Nov 21, 2004 3:03 am    Post subject: Reply with quote

Redeeman wrote:
that is because not all of your stuff is using alsa's default device, it might be using alsa's hw device directly, or oss emulation




that's it? is there a workaround?
plus, when i reboot, i have to do
the whole process all over. Now
that's a bigger pain in the arse
Back to top
View user's profile Send private message
monicajae
Guru
Guru


Joined: 03 Sep 2003
Posts: 363
Location: Dorset, VT

PostPosted: Sun Nov 21, 2004 3:22 am    Post subject: Reply with quote

Redeeman wrote:
that is because not all of your stuff is using alsa's default device, it might be using alsa's hw device directly, or oss emulation




that's it? is there a workaround?
plus, when i reboot, i have to do
the whole process all over. Now
that's a bigger pain in the arse
Back to top
View user's profile Send private message
Redeeman
l33t
l33t


Joined: 25 Sep 2003
Posts: 957
Location: Denmark

PostPosted: Sun Nov 21, 2004 12:07 pm    Post subject: Reply with quote

what process all over?
_________________
Sandberg Enterprises
Back to top
View user's profile Send private message
monicajae
Guru
Guru


Joined: 03 Sep 2003
Posts: 363
Location: Dorset, VT

PostPosted: Sun Nov 21, 2004 8:14 pm    Post subject: Reply with quote

you know, having to do this in Lynx
is also a pain in the ass. i keep losing it. any
way, that's another thread.
Waht was it about my post that confused
you? i thought it was pretty straigt
forward "when i reboot, i have to
do it again" i.e. the hardware mixing
process you mentioned at the beginning
of the thread. redundant: what is the
way to fix this? i'm tired of the
message that i can't start alsasound be
cause of the "lack of a soundcard", which
of course it tells me in it's own words.
i want to be able to do this whether i
reboot or not. I hope this was specific enough for you. i'm surprised
that ginven the simple language i used you could've tried to offer
and answer anyway based on maybe an idea or projection
may have had concerning the thread. /etc/init.d/alsasound restart
Code:

* WARNING:  you are stopping a boot service.
 * Unloading ALSA...                                                      [ ok ]
* Storing ALSA Mixer Levels
/usr/sbin/alsactl: save_state:1061: No soundcards found...                [ ok ]

* Unloading modules                                                      [ ok ]
* Loading ALSA drivers...
*   Loading: snd-intel8x0...
FATAL: Module snd_intel8x0 not found.                                     [ !! ]
 * ERROR: Failed to load necessary drivers                              [ ok ]
 * Restoring Mixer Levels                                                 [ ok ]


That's the output i get. this is after doing asound.conf your way, which works, till i reaboot.


Should i have a ~/.asoundrc? or a /etc/asound.conf?

I think i'm gonna recompile the kernel with sound as a module, re-emerge all the drivers and then try again....
Back to top
View user's profile Send private message
monicajae
Guru
Guru


Joined: 03 Sep 2003
Posts: 363
Location: Dorset, VT

PostPosted: Sun Nov 21, 2004 11:09 pm    Post subject: Reply with quote

ok, where'd you go? now i can't even compile alsa-drivers. what the hell. this was working so well until i had to go ahead and reboot, but you know, it happens. i'm going back to xp. this is bullshit, i'm getting sick of this, it works, oops, then it doesn't. what the hell, anyone know why i cna't emerge alsa-drivers now?

Code:

var/tmp/portage/alsa-driver-1.0.7/work/alsa-driver-1.0.7/kbuild/../drivers/serialmidi.c:327: error: too many arguments to function
make[4]: *** [/var/tmp/portage/alsa-driver-1.0.7/work/alsa-driver-1.0.7/kbuild/../drivers/serialmidi.o] Error 1
make[3]: *** [/var/tmp/portage/alsa-driver-1.0.7/work/alsa-driver-1.0.7/kbuild/../drivers] Error 2
make[3]: *** Waiting for unfinished jobs....
  CC [M]  /var/tmp/portage/alsa-driver-1.0.7/work/alsa-driver-1.0.7/kbuild/../acore/pcm_lib.o
  CC [M]  /
 ----and later---

e/seq/snd-seq-dummy.o
  LD [M]  /var/tmp/portage/alsa-driver-1.0.7/work/alsa-driver-1.0.7/kbuild/../ac ore/seq/snd-seq-virmidi.o
  LD [M]  /var/tmp/portage/alsa-driver-1.0.7/work/alsa-driver-1.0.7/kbuild/../ac ore/seq/snd-seq-midi.o
  LD [M]  /var/tmp/portage/alsa-driver-1.0.7/work/alsa-driver-1.0.7/kbuild/../ac ore/seq/snd-seq-midi-emul.o
  LD [M]  /var/tmp/portage/alsa-driver-1.0.7/work/alsa-driver-1.0.7/kbuild/../ac ore/seq/snd-seq-instr.o
  LD [M]  /var/tmp/portage/alsa-driver-1.0.7/work/alsa-driver-1.0.7/kbuild/../ac ore/seq/oss/snd-seq-oss.o
make[2]: *** [_module_/var/tmp/portage/alsa-driver-1.0.7/work/alsa-driver-1.0.7/ kbuild] Error 2
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.10-rc1'
make: *** [compile] Error 2
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3 ... 8, 9, 10, 11, 12  Next
Page 9 of 12

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum