You are not logged in.

#1 2006-10-25 11:11:44

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

soundmixer - easy sound mixing.

bored for five minutes and had an idea - package up all my sound configs, cause they might work for others. these configs provide sound mixing out of the box betwen alsa, oss and esd, using dmix. And it can't possibly get any easier than installing something with pacman.

Just makepkg, pacman -U, and relog. You may need to restart any daemons that use sound to ensure they get the aoss profile change.

http://aur.archlinux.org/packages.php?d … =1&ID=7262

gives me working sound mixing in alsa and oss applications out of the box on my two computers.

tested using savage + alsa apps, and realplayer and alsa apps. I'm sure this same config has worked in the past with ET, which implies it should work with most games. Also includes esd support, so if an application is problematic with alsa or oss, it ought to work perfectly on esd which pipes it through to alsa.

aquila deus has been saying that dmix drops sound quality. With the default config, I did have some problems, was a bit choppy, though that was fixed with a slight increase in the buffer. I havnt noticed any delay due to the slightly larger buffer either, and no noticable quality problems. But different hardware and such, I can't guarantee results, and frankly, have no idea how well this will work for others - ALSA can be funny sometimes.

so lemme know how this goes for you.

James

Offline

#2 2006-10-25 12:41:31

amdviaman
Member
From: Panama City, Florida
Registered: 2005-04-15
Posts: 28
Website

Re: soundmixer - easy sound mixing.

Tried it with XMMS (with ALSA output plugin) and Legends (OSS based FPS game) and the same thing happens; Legends has no sound while XMMS plays. Same with XMMS' OSS and ESD output plugins. Sound hardware according to lspci is

00:14.5 Multimedia audio controller: ATI Technologies Inc IXP SB400 AC'97 Audio Controller

This has baffled me for awhile as nothing I tried works, Followed the wiki pages to the letter. My other Arch system (distro originally installed last year as 0.7) has flawless sound mixing and strangely neither asound.conf, esd.conf, or libao.conf exist in /etc. Enabling sound system in KDE's comtrol center also means no sound for Legends. Sound card in my system with working mixing is

00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50)

  :?:


Desktop: Biostar GeForce 6100-M9 + AMD64 4000+ 2.4GHz, 1MB L2 + 1GB DDR400 + 80GB PATA 500GB SATA + Nvidia 7600GT, 256MB GDDR3
Notebook: HP Pavilion DV6-1245DX + Intel Core 2 Duo T6500, 2.10GHz, 2MB L2 + 4GB DDR2 + 320GB SATA + Intel 4500MHD, 17" Widescreen + Lightscribe DVD+RW

Offline

#3 2006-10-25 12:54:50

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: soundmixer - easy sound mixing.

amdviaman wrote:

Tried it with XMMS (with ALSA output plugin) and Legends (OSS based FPS game) and the same thing happens; Legends has no sound while XMMS plays. Same with XMMS' OSS and ESD output plugins. Sound hardware according to lspci is

00:14.5 Multimedia audio controller: ATI Technologies Inc IXP SB400 AC'97 Audio Controller

This has baffled me for awhile as nothing I tried works, Followed the wiki pages to the letter. My other Arch system (distro originally installed last year as 0.7) has flawless sound mixing and strangely neither asound.conf, esd.conf, or libao.conf exist in /etc. Enabling sound system in KDE's comtrol center also means no sound for Legends. Sound card in my system with working mixing is

00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50)

  :?:

relogged after installing it? i should mention that.... need to relog for the profile change to take effect.

there's still a gotcha here afaik, apps that use alsa and grab the hardware can still block. I cant think of any apps though that do this that dont have an option to change the device though to prevent that.

James

Offline

#4 2006-10-25 15:59:09

Damnshock
Member
From: Barcelona
Registered: 2006-09-13
Posts: 414

Re: soundmixer - easy sound mixing.

I agree with AqD, the sound quality decreases a lot using dmix. Hope the alsa developers improve this in the future.

Cheers


My blog: blog.marcdeop.com
Jabber ID: damnshock@jabber.org

Offline

#5 2006-10-25 17:47:38

aquila_deus
Member
From: Taipei
Registered: 2005-07-02
Posts: 348
Website

Re: soundmixer - easy sound mixing.

Damnshock wrote:

I agree with AqD, the sound quality decreases a lot using dmix. Hope the alsa developers improve this in the future.

Cheers

They could just adopt oss2jack and tell everyone to use oss API instead big_smile

Offline

#6 2006-10-25 20:53:59

Mikos
Member
From: Prague, Czech Republic
Registered: 2005-05-03
Posts: 228
Website

Re: soundmixer - easy sound mixing.

Well, if I use dmix, sound quality seems to be exactly the same as without dmix. At least for me...

Offline

#7 2006-10-25 23:07:56

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: soundmixer - easy sound mixing.

Damnshock wrote:

I agree with AqD, the sound quality decreases a lot using dmix. Hope the alsa developers improve this in the future.

Cheers

nice to see you even gave my changes a go. *cough*.

as has been said - others hear no problems with THESE configs.

Offline

#8 2006-10-26 03:03:54

aquila_deus
Member
From: Taipei
Registered: 2005-07-02
Posts: 348
Website

Re: soundmixer - easy sound mixing.

iphitus wrote:

as has been said - others hear no problems with THESE configs.

But the quality is still reduced (see their docs), whether you can hear or not tongue

Offline

#9 2006-10-26 06:42:19

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: soundmixer - easy sound mixing.

aquila_deus wrote:
iphitus wrote:

as has been said - others hear no problems with THESE configs.

But the quality is still reduced (see their docs), whether you can hear or not tongue

and for most users, that's completely irrelevant. as long as its an inaudible drop -- it doesnt matter. if you're an audiophile, then you have different needs - dont push them on the majority, and if you do, you can make a package that sets everything up as simply as this does.

James

Offline

#10 2006-10-26 10:25:29

Damnshock
Member
From: Barcelona
Registered: 2006-09-13
Posts: 414

Re: soundmixer - easy sound mixing.

iphitus wrote:
Damnshock wrote:

I agree with AqD, the sound quality decreases a lot using dmix. Hope the alsa developers improve this in the future.

Cheers

nice to see you even gave my changes a go. *cough*.

as has been said - others hear no problems with THESE configs.

I DID gave a try to you changes but, as you mentioned, i consider myself an audiophile and don't wanna lose sound quality.

Cheers


My blog: blog.marcdeop.com
Jabber ID: damnshock@jabber.org

Offline

#11 2006-10-26 11:51:24

aquila_deus
Member
From: Taipei
Registered: 2005-07-02
Posts: 348
Website

Re: soundmixer - easy sound mixing.

iphitus wrote:
aquila_deus wrote:

But the quality is still reduced (see their docs), whether you can hear or not tongue

and for most users, that's completely irrelevant. as long as its an inaudible drop -- it doesnt matter. if you're an audiophile, then you have different needs - dont push them on the majority, and if you do, you can make a package that sets everything up as simply as this does.

You could try it with onboard cards with headphones wink

There is a quite simple solution: ALSA should do mixing inside the kernel, rather than using extern lib which needs a lot of hacks to work (and certainly harder to code, how did they come up with the crazy idea in first place??), and does *normal* resampling and mixing just like jackd.

Offline

#12 2006-10-26 12:50:56

tezem
Member
Registered: 2004-11-04
Posts: 51
Website

Re: soundmixer - easy sound mixing.

I had dmix running for a while now but no matter how long I searched and tried around I was never able to get Unreal Tournament 99 running with aoss normally to play music next to the game for example.
Now I installed your scripts and it works.

Big thanks for that!  big_smile

Offline

#13 2006-10-27 14:01:18

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: soundmixer - easy sound mixing.

aquila_deus wrote:
iphitus wrote:
aquila_deus wrote:

But the quality is still reduced (see their docs), whether you can hear or not tongue

and for most users, that's completely irrelevant. as long as its an inaudible drop -- it doesnt matter. if you're an audiophile, then you have different needs - dont push them on the majority, and if you do, you can make a package that sets everything up as simply as this does.

You could try it with onboard cards with headphones wink

There is a quite simple solution: ALSA should do mixing inside the kernel, rather than using extern lib which needs a lot of hacks to work (and certainly harder to code, how did they come up with the crazy idea in first place??), and does *normal* resampling and mixing just like jackd.

heh, I dont see any hacks to work in this setup. all alsa apps work sweet, and there's a workaround for older OSS apps which have yet to be converted.

alsa's not going away mate, its just growing stronger, so your complaints are falling on deaf ears. oss apps will be less and less, and in turn, oss2jack will be the one using crazy hacks.

and uh, alsa does do the mixing in the kernel, and jackd certainly doesnt. so... not sure where you got that from.

James

Offline

#14 2006-10-27 15:06:36

tezem
Member
Registered: 2004-11-04
Posts: 51
Website

Re: soundmixer - easy sound mixing.

Today I experienced some problems with Tremulous. I got choppy sound.
Cannot say whats the problem for this but it worked with my old dmix config.
Can someone reproduce this? You can simply get Tremulous from http://aur.archlinux.org/packages.php?d … ns=&SeB=nd

Offline

#15 2006-10-27 16:45:01

aquila_deus
Member
From: Taipei
Registered: 2005-07-02
Posts: 348
Website

Re: soundmixer - easy sound mixing.

iphitus wrote:

alsa's not going away mate, its just growing stronger, so your complaints are falling on deaf ears. oss apps will be less and less, and in turn, oss2jack will be the one using crazy hacks.

and uh, alsa does do the mixing in the kernel, and jackd certainly doesnt. so... not sure where you got that from.

No, alsa's dmix works as a plugin via the alsa library (read their docs tongue). That's why it has problem with kernel-level oss emulation and multi-user sound. jackd works in userspace, but since oss2jack provides an emulated /dev/dsp, there isn't any difference.

Most app developers don't have any reason to choose linux-specific alsa over the universal oss API. In fact they usually use higher-level libs such as gstreamer or libao, which work for all the major sound systems.

Offline

#16 2006-10-27 23:52:23

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: soundmixer - easy sound mixing.

Works great for me, no detectable quality loss in the applications I've tried so far.

Edit: doesn't work for Wine, though; in fact, it prevents Wine from accessing the necessary devices even when no other application is accessing them. Can't have everything, I guess...

Offline

#17 2006-10-28 01:10:05

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: soundmixer - easy sound mixing.

Gullible Jones wrote:

Works great for me, no detectable quality loss in the applications I've tried so far.

Edit: doesn't work for Wine, though; in fact, it prevents Wine from accessing the necessary devices even when no other application is accessing them. Can't have everything, I guess...

use winecfg, adjust it so it's using the 'default' device, and not being a bad app and accessing the hardware directly. alternatively, use the esd.conf, and start esd on boot, and set wine to use that.

aqd: heaps of apps use alsa directly, as well as those who use higher libraries. mpd did (I think latest release moved to libao), mplayer, xine (though it's a higher lib for some apps too), wine, xmms and others. why? because OSS is deprecated, and will be moved out eventually. I don't know the inner details of each of those two sound systems, but I do know the kernel devs wouldnt dispose of a sound system for a inferior one, OSS would have undoubtedly had it's flaws. I never thought OSS was universal either. Where else does it work? One or two other unixlike platforms barely count.

as for getting sound mixing going. there will not ever be any sound mixing done in the kernel. (btw, I stand corrected about dmix) There's no way the kernel devs will ever merge it -- they're pushing for things to be moved out into userspace where possible. Sound mixing can be done in at hardware level or userspace, you won't ever see it merged at kernel level under linux.

anyway, where's your working out of the box jack/oss based solution?

James

Offline

#18 2006-10-28 02:50:23

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: soundmixer - easy sound mixing.

iphitus wrote:
Gullible Jones wrote:

Works great for me, no detectable quality loss in the applications I've tried so far.

Edit: doesn't work for Wine, though; in fact, it prevents Wine from accessing the necessary devices even when no other application is accessing them. Can't have everything, I guess...

use winecfg, adjust it so it's using the 'default' device, and not being a bad app and accessing the hardware directly. alternatively, use the esd.conf, and start esd on boot, and set wine to use that.

I don't think it has an option for that, at least in winecfg. I'll try messing with the config file, I guess...

Offline

#19 2006-10-28 03:41:58

aquila_deus
Member
From: Taipei
Registered: 2005-07-02
Posts: 348
Website

Re: soundmixer - easy sound mixing.

Gullible Jones wrote:

Works great for me, no detectable quality loss in the applications I've tried so far.

Edit: doesn't work for Wine, though; in fact, it prevents Wine from accessing the necessary devices even when no other application is accessing them. Can't have everything, I guess...

try to set sound device manually, such as /dev/dsp2 or /dev/dsp3 (virtual outputs)

EDIT: it seems I can't choose sound device in winecfg, anyone know why?

Offline

#20 2006-10-28 14:26:13

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: soundmixer - easy sound mixing.

Seems to work fine. Good job, iphitus.

Offline

#21 2006-10-28 16:13:20

jinn
Member
From: Gothenburg
Registered: 2005-12-10
Posts: 506

Re: soundmixer - easy sound mixing.

works just fine. I was thinking when somebody would add this. great work, and no loss in quality whatsoever for my hearing anyway smile


The ultimate Archlinux release name: "I am your father"

Offline

#22 2006-10-28 17:03:51

jf/
Member
Registered: 2003-10-26
Posts: 79

Re: soundmixer - easy sound mixing.

uh guys... care to update the wiki information? We could certainly do with some consolidated (and accurate) info.... Me, i'm just confused right now, man.

Offline

#23 2006-10-28 21:00:29

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,964

Re: soundmixer - easy sound mixing.

tried it, but got problems with games running under dosbox.
It seems dmix works better for me without any asound.conf file.

Note : i use onboard sound (snd_cmipci  module) , alsa, libao and sdl .
NO oss apps afaik.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#24 2006-10-28 22:22:40

damjan
Member
Registered: 2006-05-30
Posts: 452

Re: soundmixer - easy sound mixing.

iphitus wrote:

bored for five minutes and had an idea - package up all my sound configs, cause they might work for others. these configs provide sound mixing out of the box betwen alsa, oss and esd, using dmix.

Hmm, as far as I know dmix is automatically enabled in recent alsa versions, so software (user-space) mixing should work for all alsa programs out-of-the-box.

At least it works for me on two Slackware boxes without any special configs - my ArchLinux laptop has hardware mixing (a Maestro 2e chip) so I can't test it.

I also used to start firefox via the aoss wrapper, so that dmix-ed alsa sound worked for the flash plugin... but that's not needed any more since the flash 9beta plugin supports alsa nativelly.

Offline

#25 2006-10-28 23:35:48

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: soundmixer - easy sound mixing.

damjan wrote:
iphitus wrote:

bored for five minutes and had an idea - package up all my sound configs, cause they might work for others. these configs provide sound mixing out of the box betwen alsa, oss and esd, using dmix.

Hmm, as far as I know dmix is automatically enabled in recent alsa versions, so software (user-space) mixing should work for all alsa programs out-of-the-box.

At least it works for me on two Slackware boxes without any special configs - my ArchLinux laptop has hardware mixing (a Maestro 2e chip) so I can't test it.

I also used to start firefox via the aoss wrapper, so that dmix-ed alsa sound worked for the flash plugin... but that's not needed any more since the flash 9beta plugin supports alsa nativelly.

dmix is setup out of the box, but it doesnt support mixing oss apps out of the box. this asound.conf should provide support to mix an oss app alongside alsa.

Offline

Board footer

Powered by FluxBB