Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 25904 - wine dossn't work with alsa 1.0.0
Summary: wine dossn't work with alsa 1.0.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Wine Maintainers
URL:
Whiteboard:
Keywords:
: 35001 35510 (view as bug list)
Depends on: 35412
Blocks: 35482
  Show dependency tree
 
Reported: 2003-08-04 13:48 UTC by Serge Matveev
Modified: 2003-12-12 07:44 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Serge Matveev 2003-08-04 13:48:07 UTC
If I write "Drivers" = "winealsa.drv" in ~/.wine/config I can't hear any sound
in wine applications

ALSA lib pcm_hw.c:370:(snd_pcm_hw_sw_params) SNDRV_PCM_IOCTL_SW_PARAMS failed:
Invalid argument

app-emulation/wine-20030709
media-libs/alsa-lib-0.9.6

Portage 2.0.48-r7 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1)
=================================================================
System uname: 2.4.20-gentoo-r5 i686 Pentium III (Katmai)
GENTOO_MIRRORS="ftp://ftp.uninett.no/pub/linux/Gentoo http://gentoo.linux.no/
ftp://gentoo.linux.no/pub/gentoo/"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config
/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY="/usr/local/portage"
USE="x86 oss avi crypt encode foomaticdb gif jpeg libg++ libwww mad mikmod mmx
mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib alsa gdbm
berkdb readline arts java X sdl gpm tcpd pam ssl perl python esd imlib oggvorbis
gtk qt kde motif opengl acpi acpi4linux evo gd jikes mbox mdb moznoirc moznomail
mozp3p mozsvg pda prebuilt radeon sox sse tiff type1 usb vim-with-x wmf xosd
-3dnow -apm -cups -slang -svga -gnome"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O3 -pipe -mfpmath=sse -fomit-frame-pointer -fforce-addr
-falign-functions=4 -fprefetch-loop-arrays"
CXXFLAGS="-march=pentium3 -O3 -pipe -mfpmath=sse -fomit-frame-pointer
-fforce-addr -falign-functions=4 -fprefetch-loop-arrays"
ACCEPT_KEYWORDS="x86 ~x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"
Comment 1 Alex Veber (RETIRED) gentoo-dev 2003-08-04 15:48:05 UTC
as far as I know wine doesn't support alsa directly, it uses the OSS emulation. 
do you have the OSS emulation module loaded? 
Comment 2 Serge Matveev 2003-08-06 00:27:40 UTC
No, ALSA support in wine is present (see http://source.winehq.org/source/dlls/winmm/winealsa/)

For OSS I emulation I mus use wineoss.drv

OTOH, maybe this is upstream bug.

Comment 3 Alex Veber (RETIRED) gentoo-dev 2003-08-06 04:18:55 UTC
look like the driver only supports alsa 0.5 by the comments in it... 
Comment 4 Alex Veber (RETIRED) gentoo-dev 2003-08-06 04:21:33 UTC
oops, I see it also supports alsa 0.9, but its very old... 
does it work for you with oss emulation? 
does it happen in all applications? 
what happens if you downgrade alsa-lib ? 
 
Comment 5 Serge Matveev 2003-08-11 05:32:29 UTC
>does it work for you with oss emulation? 
Yes, but occasionaly game hangs up :-(
Mi wife plays with BubbleShooter (http://absolutist.com/bubbles/bubshoot.zip) and without alsa all was ok. :-( Now, if I turn sound On, game hangs every 10-20 minutes.

>does it happen in all applications?
I don't have any other windows applications. Can you give me an example?

>what happens if you downgrade alsa-lib ? 
What version I can try?
Comment 6 Alex Veber (RETIRED) gentoo-dev 2003-08-11 09:56:41 UTC
can you try alsa-lib 0.9.5 ? 
Comment 7 Serge Matveev 2003-08-11 12:51:38 UTC
Done. I get the same effect:

ALSA lib pcm_hw.c:370:(snd_pcm_hw_sw_params) SNDRV_PCM_IOCTL_SW_PARAMS failed: Invalid argument
ALSA lib pcm_hw.c:370:(snd_pcm_hw_sw_params) SNDRV_PCM_IOCTL_SW_PARAMS failed: Invalid argument
ALSA lib pcm_hw.c:370:(snd_pcm_hw_sw_params) SNDRV_PCM_IOCTL_SW_PARAMS failed: Invalid argument
...

On any sound
Comment 8 Alex Veber (RETIRED) gentoo-dev 2003-12-01 04:58:10 UTC
Can you try the latest version of wine?
Comment 9 Scott Taylor (RETIRED) gentoo-dev 2003-12-02 22:21:34 UTC
wine doesn't seem to cooperate well with the brand new alsa. There is an alsa use flag, however it is ignored due to the fact that ./configure "automatically finds these things". There should be an option passed into the configure script to make it not look for alsa if there is a use flag for "-alsa". 

Star wine # emerge -p alsa-lib
[ebuild   R   ] media-libs/alsa-lib-1.0.0_rc1  

End result from emerge wine:

make[2]: Entering directory `/var/tmp/portage/wine-20031118-r1/work/wine-20031118/dlls/winmm/winealsa'
gcc -c -I. -I. -I../../../include -I../../../include  -D__WINESRC__  -D_REENTRANT -fPIC -Wall -mpreferred-stack-boundary=2 -fno-strict-aliasing -gstabs+ -Wpointer-arith  -g -O2 -o audio.o audio.c
audio.c: In function `ALSA_TraceParameters':
audio.c:316: error: too few arguments to function `snd_pcm_hw_params_get_format'
audio.c:317: error: too few arguments to function `snd_pcm_hw_params_get_access'
audio.c:372: error: too few arguments to function `snd_pcm_hw_params_get_channels'
audio.c:373: error: too few arguments to function `snd_pcm_hw_params_get_buffer_size'
audio.c:385: error: too few arguments to function `snd_pcm_hw_params_get_rate'
audio.c:386: error: too few arguments to function `snd_pcm_hw_params_get_buffer_time'
audio.c:387: error: too few arguments to function `snd_pcm_hw_params_get_periods'
audio.c:388: error: too few arguments to function `snd_pcm_hw_params_get_period_size'
audio.c:389: error: too few arguments to function `snd_pcm_hw_params_get_period_time'
audio.c:390: error: too few arguments to function `snd_pcm_hw_params_get_tick_time'
audio.c: In function `ALSA_WaveInit':
audio.c:464: error: too few arguments to function `snd_pcm_hw_params_get_rate_min'
audio.c:465: error: too few arguments to function `snd_pcm_hw_params_get_rate_max'
audio.c:466: error: too few arguments to function `snd_pcm_hw_params_get_channels_min'
audio.c:466: error: too few arguments to function `snd_pcm_hw_params_get_channels_max'
audio.c:496: error: too few arguments to function `snd_pcm_hw_params_get_channels_min'
audio.c:497: error: too few arguments to function `snd_pcm_hw_params_get_channels_max'
audio.c:498: error: too few arguments to function `snd_pcm_hw_params_get_channels_min'
audio.c:498: error: too few arguments to function `snd_pcm_hw_params_get_channels_max'
audio.c: In function `wodPlayer_DSPWait':
audio.c:744: error: too few arguments to function `snd_pcm_hw_params_get_period_time'
audio.c: In function `wodOpen':
audio.c:1171: warning: passing arg 3 of `snd_pcm_hw_params_set_rate_near' makes pointer from integer without a cast
audio.c:1183: warning: passing arg 3 of `snd_pcm_hw_params_set_buffer_time_near' makes pointer from integer without a cast
audio.c:1184: warning: passing arg 3 of `snd_pcm_hw_params_set_period_time_near' makes pointer from integer without a cast
audio.c:1188: error: too few arguments to function `snd_pcm_hw_params_get_period_size'
audio.c:1189: error: too few arguments to function `snd_pcm_hw_params_get_buffer_size'
audio.c: In function `DSDB_MMAPCopy':
audio.c:1738: error: too few arguments to function `snd_pcm_hw_params_get_channels'
audio.c:1739: error: too few arguments to function `snd_pcm_hw_params_get_format'
audio.c:1740: error: too few arguments to function `snd_pcm_hw_params_get_period_size'
audio.c: In function `DSDB_CreateMMAP':
audio.c:1782: error: too few arguments to function `snd_pcm_hw_params_get_format'
audio.c:1783: error: too few arguments to function `snd_pcm_hw_params_get_buffer_size'
audio.c:1784: error: too few arguments to function `snd_pcm_hw_params_get_channels'
audio.c: In function `IDsDriverBufferImpl_GetPosition':
audio.c:1938: error: too few arguments to function `snd_pcm_hw_params_get_period_size'
make[2]: *** [audio.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/wine-20031118-r1/work/wine-20031118/dlls/winmm/winealsa'
make[1]: *** [winmm/winealsa] Error 2
make[1]: Leaving directory `/var/tmp/portage/wine-20031118-r1/work/wine-20031118/dlls'
make: *** [dlls] Error 2

!!! ERROR: app-emulation/wine-20031118-r1 failed.
!!! Function src_compile, Line 62, Exitcode 2
!!! (no error message)

Comment 10 Ulrich Plate (RETIRED) gentoo-dev 2003-12-03 11:54:07 UTC
My problem exactly. wine-20031118-r1 doesn't build, 
compile chokes on winealsa just like in comment #9.
Is this a problem with the ebuild or should we 
pester winehq about this?

Particularly embarrassing since my alsa-lib upgrade 
preceded the wine build failure by just one emerge...
Comment 11 A.J. Aranyosi 2003-12-03 12:10:50 UTC
I also got bit by the incompatibility between app-emulation/wine-20031118-r1 and media-libs/alsa-lib-1.0.0_rc1, but found a quick fix.  Apparently they've changed some functions, but included the possibility to use the old ones.  If you edit /var/tmp/portage/wine-20031118-r1/work/wine-20031118/dlls/winmm/winealsa/audio.c and add the following lines to the top (before #include "alsa.h"):

#ifndef ALSA_PCM_OLD_HW_PARAMS_API
#define ALSA_PCM_OLD_HW_PARAMS_API 1
#endif

Then audio.c will compile properly, after which the rest of wine should build okay.
Comment 12 SpanKY gentoo-dev 2003-12-03 12:35:02 UTC
*** Bug 35001 has been marked as a duplicate of this bug. ***
Comment 13 Martin Holzer (RETIRED) gentoo-dev 2003-12-03 15:22:04 UTC
maybe this should be sent upstream

there's an open bug about alsa and wine
http://bugs.winehq.org/show_bug.cgi?id=780
Comment 14 Aanund Austrheim 2003-12-04 13:56:08 UTC
http://www.winehq.com/hypermail/wine-devel/2003/11/0167.html

contains patches for alsa-0.9 and alsa-1.0 etc etc etc.

i applied them manually and im trying to compile right now :) (vs alsa-1.0)

will let you know if it worked.
Comment 15 Aaron Gyes 2003-12-04 15:37:17 UTC
Aanund messed up on the URL. Here's the correct one.

http://www.winehq.com/hypermail/wine-devel/2003/11/0166.html
Comment 16 Aanund Austrheim 2003-12-04 15:55:27 UTC
woopsies, yes i messed the url:) but happyness awaits!

using the alsa 1.0 patches, wine both compiled and played music through alsa:=)

well, to a certain extent at least, the only prog i got installed thats using sound is starcraft, and heres the catch, if i run setup.exe from my cd, sound works perfectly, however, if i run the installed starcraft.exe, no sound, no errors, it works perfectly, but no sound.

if i start it with setup.exe from cd, and then press "play starcraft" it starts as it is supposed to but i get this error:

ALSA lib pcm_hw.c:1055:(snd_pcm_hw_open) open /dev/snd/pcmC0D0p failed: Device or resource busy

Which makes sense since it doesnt close the first window (which uses sound) untill after the second has opened and written the error msgs.
Comment 17 Martin Holzer (RETIRED) gentoo-dev 2003-12-07 17:44:56 UTC
From the NOTES in alsa-lib-1.0.0rc2:

    From the binary compatibility view, there is no change.  For compilation,
    1.0 ALSA applications do not need any change.  The older applications
    must use this include sequence:

    #define ALSA_PCM_OLD_HW_PARAMS_API
    #define ALSA_PCM_NEW_HW_PARAMS_API
    #include <alsa/asoundlib.h>
Comment 18 Brian Harring (RETIRED) gentoo-dev 2003-12-08 20:37:04 UTC
I've created an eclass fixes this in a more general way (rather then having to create a crapload of package/version specific patches)- bug #35412.
Comment 19 Martin Holzer (RETIRED) gentoo-dev 2003-12-10 02:58:35 UTC
*** Bug 35510 has been marked as a duplicate of this bug. ***
Comment 20 Martin Holzer (RETIRED) gentoo-dev 2003-12-10 12:06:26 UTC
just added a patch into cvs

works with 0.9.8 up to 1.0.0_rc2