Bug 280612

Summary: emulators/wine-devel: no sound then build with OSS and run x32 apps
Product: Ports & Packages Reporter: Ivan Rozhuk <rozhuk.im>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Open ---    
Severity: Affects Some People CC: Alexander88207, agh, bsdcode, christos, gerald, rozhuk.im
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://reviews.freebsd.org/D47638
Bug Depends on: 281390    
Bug Blocks:    

Description Ivan Rozhuk 2024-08-04 13:04:36 UTC
...
ALSA lib pcm.c:2722:(snd_pcm_open_noupdate) Unknown PCM oss
ALSA lib pcm.c:2722:(snd_pcm_open_noupdate) Unknown PCM oss
...

Mine wine build with OSS, but wine32 looks like build with ALSA, this looks a bit ridiculous to have:
OPTIONS_DEFAULT=ALSA GNUTLS X11
instead of:
OPTIONS_DEFAULT=OSS GNUTLS X11

Manual installation: audio/alsa-plugins fix issue.
Comment 1 Alexander Vereeken freebsd_triage 2024-09-01 21:53:34 UTC
Hello,

if you change options on your native system and built an new package for (amd64) you also have to build a new extra package with your changed options for i386 too.

To have ALSA as default is not ridiculous as OSS is missing the AFMT_FLOAT implementation which is needed in very much applications (that do use FMOD for example) or you will have no sound / the application might not not run at all. 

It has also issues with xaudio2 applications when using win7 compat and upwards.
Comment 2 Gerald Pfeifer freebsd_committer freebsd_triage 2024-09-07 08:14:08 UTC
Thank you for the explanation, Alexander.

Ivan, there essentially is nothing to do here: Combining the 64-bit
port and 32-port built with different options is bound to break.
Comment 3 Ivan Rozhuk 2024-09-07 11:30:50 UTC
Continue use ALSA is not a good option.

Issue a bit deeper than I describe.
wine32+ALSA (32+64 both ALSA) does not play MIDI, while wine64 can play.

I do not want debug ALSA staff, and FBSD foundation have some one who work with OSS in kernel:
https://freebsdfoundation.org/project/freebsd-audio-stack-improvements/ (@christos I suggest).

IMHO add some in kernel conversion AFMT_FLOAT to some thing that already supported or add "PCM subsystem still doesn't support mixing of AFMT_FLOAT through its feeder subsystem" [1] is not big deal.

I suggest to open another bug for add support AFMT_FLOAT or reopen [1] / [2] and make this depend from that.

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=157050
[2] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=184380
Comment 4 Alexander Vereeken freebsd_triage 2024-09-11 13:53:41 UTC
Also don't forget about the XAudio2 issues and iirc WASAPI too, means someone also has to maintain the OSS code on Wine's side as well, if you want to see default builds for OSS.
Comment 5 Alexander Vereeken freebsd_triage 2024-11-16 19:53:51 UTC
Added an link to: sound: Implement AFMT_FLOAT support.

I did tested 2 FMOD games and can confirm that it works fine.

The other issues mentioned with Xaudio2 seems also to be solved.

Looks like we can soon return to OSS as default.