You are not logged in.
Pages: 1
I'm trying to get Wine's OSS driver to play nice with other things that use the soundcard by preloading aoss, via this /etc/profile.d/aoss.sh script from iphitus:
#!/bin/sh
# A simple script to facilitate the use of the OSS compatibility library.
# Usage:
# aoss <command> <command options and arguments>
if [ -d /proc/asound ]; then
prefix=/usr
exec_prefix=${prefix}
export LD_PRELOAD=${exec_prefix}/\$LIB/libaoss.so${LD_PRELOAD:+:$LD_PRELOAD}
fi
export SDL_AUDIODRIVER="alsa"
export AUDIODEV=default
I've got the "driver emulation" option checked in winecfg, but applications under Wine don't play any sounds and complain about sound being unavailable, even when there aren't any other applications using sound.
Also, winecfg is giving me strange console messages which I think may have to do with the new version of ALSA:
ALSA lib conf.c:3939:(snd_config_expand) Unknown parameters 0
ALSA lib control.c:910:(snd_ctl_open_noupdate) Invalid CTL default:0
ALSA lib conf.c:3939:(snd_config_expand) Unknown parameters 0
ALSA lib control.c:910:(snd_ctl_open_noupdate) Invalid CTL default:0
I'm not sure if those are part of the problem or not...
Offline
1) Aoss don`t always work (for example, it don`t support mmap) and it will not work with wine, but wine lives perfectly with alsa.
2) Uncheck driver emulation in winecfg! To get sound working with wine wait for a new version of wine or downgrade alsa-lib and alsa-utils to 1.0.13. (Maybe there are other solutions but I don`t know them. I have downgraded alsa-lib and alsa-utils).
3) Wine alsa output will work good if you will properly configure alsa via ~/.asoundrc or /etc/asound.conf.
This are (a little changed) parts of my config:
pcm.!default {
type plug
slave.pcm "dmixer"
}
pcm.dmixer {
type dmix
ipc_key 1024
ipc_key_add_uid false # let multiple users share
ipc_perm 0666 # IPC permissions for multi-user sharing
slave {
pcm "hw:0,0" # change this if you use other sound device
# period_time 0
period_size 256
buffer_size 4096
rate 48000
}
}
Experiment with perion_time (try 0, 2 and commenting out), period_size and buffer_size.
Also there is pretty usefull howto at http://appdb.winehq.org/appview.php?iVersionId=3731 , look for "HOWTO CSS using ALSA".
After all of this I was able to use full hardware acceleration with wine and got perfect sound quality.
Offline
Thanks for the advice, I didn't know about the aoss problem.
Regarding the ALSA driver, it sounds pretty bad and causes Wine to crash a bit too often...
Offline
wine works fine here with alsa or oss regardless of how many apps i have playing music in the backgrouns. but for some apps you have to select 'Emulation' in 'Hardware acceleration' tab for sound to be heared. I always have it sat.
I also have no asound.conf anywhere and does not use iphitus package.
I also get the errors mentioned above when running winecfg but audio still works, and yes i have the newest alsa packages from testing.
The two 'evils' in audio in linux today are esd and artsd. I you want to get rid of artsd there are multiple ways. For esd you put 'esdctl off' in some startup file or gnome session startup as i think some part of gnome can't be compiled without(or atleast i couldn't manage to after an hour of trying).
A am not aware of a single reason why aoss is still needed for ANY app. If someone know of a legitimate use case I would like to hear about it. Also alsa should not make wine crash??? yes, there are a bunch of msg's printed to standard out about DMIX blablabla but it should never make wine crash. Maybe there's another culprit and you misinterpreted the alsa msg'es to be the culprit?
Last edited by test1000 (2007-04-29 12:09:38)
KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein
Offline
yeah, i've since ditched that aoss script in my usage. sound works well enough with just the asound.conf in that package.
Offline
> A am not aware of a single reason why aoss is still needed for ANY app. If someone know of a legitimate use case I would like to hear about it.
I`m sure you are a lucky user of a sound card with hardware mixing. Most integrated sound cards don`t support it.
I don`t wont to use oss kernel emulation because it blocks sound (if hardware mixing is not available).
Not so featurefull soundcard is the reason why I use aoss and need asound configuration.
Offline
I do NOT have hardware mixing on my onboard ac97. Can you please tell me which app needs aoss?
KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein
Offline
I do NOT have hardware mixing on my onboard ac97. Can you please tell me which app needs aoss?
the asound.conf in the soundmixer package on the AUR allows ONE oss program to run at the same time as alsa programs.
However, nearly all applications out there support Alsa, you'd most likely know if you were dealing with an application that didn't co-operate with alsa. The normal culprits are games, and some pro audio stuff... though they (pro audio) tend to have decent sound cards anyway.
James
Offline
> Can you please tell me which app needs aoss?
Some months ago I decided to use libaoss because oss apps were blocking sound system.
Now I have tried to reenable oss: exported LD_PRELOAD="" and modprobed oss emulation modules (seq, pcm and mixer).
I used mplayer -ao oss but didn`t hear any sound (and there were no errors or warnings).
I trieded to run two instances of 'mplayer -ao oss' at the same time, but when I launched the second, I got error message 'Can`t initialize /dev/dsp: Device or resource busy'.
So I think that this is dependent completely on hardware (I have CA0106, previously I had C-Media CMI9880).
Also try this experiment: set your master volume to 50% (via alsamixer or amixer, I use "amixer set 'Analog Front' 50%").
Do you hear that oss apps volume changed? And alsa? I don`t know the result of this experiment, but maybe alsa volume will be 50% and oss will be 100%. For me amixer is usefull to control sound volume via keyboard.
Offline
> I used mplayer -ao oss but didn`t hear any sound (and there were no errors or warnings).
This is because I have two sound cards in my system. With alsa it is easy to select the default via asound.conf (by configuring necessary plugin). How can I do the same for OSS? Maybe via /etc/modprobe.conf or udev rules...
Alsa plugins are very powerfull and they are not available in OSS. This is the second reason to use aoss.
Offline
Okay, am I right in saying that the "Driver Emulation" option in winecfg is supposed to force Wine to stop using the hardware directly? Because I don't think it's working.
If that's not what it does, could someone tell me what registry key to modify so that it uses /dev/dsp like a good little application?
Offline
Okay, am I right in saying that the "Driver Emulation" option in winecfg is supposed to force Wine to stop using the hardware directly? Because I don't think it's working.
nope, that's not what it does.
If that's not what it does, could someone tell me what registry key to modify so that it uses /dev/dsp like a good little application?
um. good applications don't use /dev/dsp directly. THAT is directly accessing the hardware.
If you can, set it to alsa, and let it use the 'default' output, as that is dmixed. I don't have wine installed here to check
James
Offline
Ah, thanks for clearing that up. FWIW, which would be the correct thing to use?
I'll see if I can get the alsa driver to work without crashing things every few minutes, but I am very doubtful...
Edit: nope, sound quality is invariably awful and programs using sound invariably crash after a couple of sound events. Basically, I can either get mixing to work with OSS or switch to jack.
Try again: according to WoWWiki, aoss and dmix should both work with Wine using OSS...
So you see the problem:
* WoW runs in Wine, ergo uses OSS
* Ventrilo runs in Wine, ergo uses OSS
* The Linux version of TeamSpeak is based on OSSOnly one of these applications will be able to use sound at a time, but this can be solved by using alsa-oss, which channels OSS applications through ALSA, making them them work more or less like regular ALSA programs. You should check for distro native installation methods, or just install it from a tarball file found here: ftp://ftp.alsa-project.org/pub/oss-lib/
One uses Alsa-Oss by starting the programs with the "aoss" command in front, something like this:
aoss /path-to-program/TeamSpeak
aoss wine /path-to-program/Ventrilo.exe
aoss wine /path-to-program/WoW.exe
Remember that both the voice chat program and WoW need to be run with the aoss command in front.
Another somewhat more advanced method of fixing this problem is to use Dmix. Follow these wonderful instructions: http://alsa.opensrc.org/index.php?title=DmixPlugin
[edit] Example .asound.rc for Dmix
##ALSA
pcm.dsp0 {
type plug
slave.pcm "hw:0"
}
ctl.mixer0 {
type hw
card 0
}
##OSS
pcm.dsp0 {
type plug
slave.pcm "dmix"
}
ctl.mixer0 {
type hw
card 0
}
Unfortunately aoss doesn't work (the mmap thing, right?) and dmix seems to do nothing when using iphitus' asound.conf or the one above, or a number of others.
(I should mention that, in spite of what the dmix wiki pages says, config files are necessary for some things - if you use the old OSS version of Flash for instance, you need something like iphitus' config file to have it working right. I'll do some snooping and see if anyone mentions Wine needing a special config file...)
Last edited by Gullible Jones (2007-05-07 21:33:57)
Offline
Aha, the Gentoo wiki mentions something about using "duplex mode", which none of the config files I've so far used have anything about. I'll see if anything comes of it.
Offline
Okay, the results so far:
- Neither Gentoo's nor Ubuntu's asound.conf works.
- The jack driver causes Wine'd apps to go into an endless loop as they seem to think the daemon isn't running.
- The esd driver has been removed.
Could anyone point me to some method of making Wine/OSS not hog up my sound system? Other OSS apps work fine with dmix, and Wine is apparently capable of doing so, so I figure there there has to be some way...
Offline
*phew*
Finally got the crashes to stop. No idea how. At any rate, the ALSA driver is now quite stable, and sounds a bit better.
The problem now? The driver refuses to have anything to do with dmix.
/me glares at my computer
Last edited by Gullible Jones (2007-05-08 02:49:00)
Offline
Pages: 1