[Wine] freebsd oss sound dsp scheme
Sebastian Wojtczak
sebastian.wojtczak at yahoo.com
Sun Nov 14 08:40:22 CST 2010
Hi
I had have trouble to get sound working under freebsd 8.1 amd64 arch. So i decide to dig in wine code and I create a simple "proof of concept" patch to get work my sound card.
********* SND STAT ********FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: <HDA Realtek ALC272 PCM #0 Analog> (play/rec) default <- This is my primary snd
pcm1: <HDA Realtek ALC272 PCM #1 Digital> (play)
pcm2: <HDA NVidia (Unknown) PCM #0 DisplayPort> (play)
pcm3: <HDA NVidia (Unknown) PCM #0 DisplayPort> (play)
pcm4: <HDA NVidia (Unknown) PCM #0 DisplayPort> (play)
pcm5: <HDA NVidia (Unknown) PCM #0 DisplayPort> (play)
****************************
Patch to get sound from wine ( which is compiled in /compat/i386 ).
******** PATCH ********
diff -Nrua audio.c-orig audio.c
--- audio.c-orig 2010-11-12 20:20:02.000000000 +0100
+++ audio.c 2010-11-14 13:43:41.000000000 +0100
@@ -1170,12 +1170,12 @@
}
else
{
- WOutDev[0].ossdev.dev_name = WInDev[0].ossdev.dev_name = StrDup("/dev/dsp",NULL);
+ WOutDev[0].ossdev.dev_name = WInDev[0].ossdev.dev_name = StrDup("/dev/dsp0.0",NULL);
WOutDev[0].ossdev.mixer_name = WInDev[0].ossdev.mixer_name = StrDup("/dev/mixer",NULL);
for (i = 1; i < MAX_WAVEDRV; ++i)
{
WOutDev[i].ossdev.dev_name = WInDev[i].ossdev.dev_name = HeapAlloc(GetProcessHeap(),0,11);
- sprintf(WOutDev[i].ossdev.dev_name, "/dev/dsp%u", i);
+ sprintf(WOutDev[i].ossdev.dev_name, "/dev/dsp0.%u", i);
WOutDev[i].ossdev.mixer_name = WInDev[i].ossdev.mixer_name = HeapAlloc(GetProcessHeap(),0,13);
sprintf(WOutDev[i].ossdev.mixer_name, "/dev/mixer%u", i);
}
************************
I don't know what exactly /dev/dsp device is create with other snd drivers, but in my case it is /dev/dsp0.0.
To get fully work 6 wave_drv channels, i set some sysctls:
sysctl dev.pcm.0.play.vchans=6
sysctl dev.pcm.0.rec.vchans=6
sysctl hw.snd.maxautovchans=6
I think this is workaround for problems with audio under Linux, but in case of FreeBSD it is clear, so autodetection should be possible in this respect.
Sorry for my english.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-users/attachments/20101114/af3b9774/attachment.htm>
More information about the wine-users
mailing list