Hide audio hardware inside a prefix

Questions about Wine on Linux
Locked
debdog
Newbie
Newbie
Posts: 3
Joined: Wed Apr 11, 2012 7:47 pm

Hide audio hardware inside a prefix

Post by debdog »

Ahoy Guys!

Battlefield 2 crashes if there is more than one audio card available. See https://appdb.winehq.org/objectManager. ... n&iId=3438
"BF2 is know[n] to crash if you have 2 sound cards"

My system offers three of them (Onboard audio, HDMI of onboard grafics and HDMI of grafics card) so I've tried to remove the entries of the HDMI ones inside the registry. Without success, of course, they just keep reappearing. Even removed them manually from system.reg and user.reg but they're back with the next run of wine.

Does anyone has an idea on how to hide the two audio cards? Right now I have to fiddle with the kernel modules but that is not a proper solution. Sometimes I need the onboard HDMI and I really would like to not disable it on module base.

wine-1.7.51 (Staging)

Thanks in advace!

Edit: Sorry, forgot to mention the suggested solutions on the appdb did not work here. HKEY_CURRENT_USER\Software\Wine\Drivers\Audio does not exist here and creating it does not solve anything.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Hide audio hardware inside a prefix

Post by Bob Wya »

@debdog,

Have you tried disabling the audio devices you're not using with pavumeter or similar?

I have not experienced this BF2 issue but then I always disable the Pulseaudio devices I am not using - Intel onboard HD Audio & Nvidia HDMI audio (I just use a USB headset).

Bob
debdog
Newbie
Newbie
Posts: 3
Joined: Wed Apr 11, 2012 7:47 pm

Re: Hide audio hardware inside a prefix

Post by debdog »

Hi Bob, thanks for your response! All this time I was thinking I had forgotten to mention something in my initial post. Thanks for reminding me!

I am not using PA, nor any other sound manager, and I am not willing to install it just because of this one game.

I wonder if it'd be worth issuing a feature request for a simple hardware manager in wine? This might also be helpful for managing/disabling other devices like perhaps com and usb ports.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Hide audio hardware inside a prefix

Post by Bob Wya »

@debdog,

Ah no that's fine. Have you tested building Wine without the PA patches then? Does the issue persist in this instance?

Also you link to the AppDB page for BF2 - which is lovely... But I'm not seeing any Bug Reports for this issue - open or "closed"!!

No one is forcing you to use PA on your system. So if Wine crashes, running BF2, with a pure ALSA system - that's a bug... It may turn out to be a bug in BF2 code - but it's still worth filing a bug report. Certainly if you don't file one then nobody's going to bother looking very hard into the issue!

Bob
debdog
Newbie
Newbie
Posts: 3
Joined: Wed Apr 11, 2012 7:47 pm

Re: Hide audio hardware inside a prefix

Post by debdog »

Bob Wya wrote:Also you link to the AppDB page for BF2 - which is lovely... But I'm not seeing any Bug Reports for this issue - open or "closed"!!
Sorry, I did not explain myself clearly. I haven't found a way to link to specific topics within appdb entries. Hence the quote so people can search for it easily. Here's the entire part:

https://appdb.winehq.org/objectManager.php?sClass=version&iId=3438 wrote:http://forums.steampowered.com/forums/s ... ?t=2015962 says "BF2 is know[n] to crash if you have 2 sound cards (A USB headset counts as a card) and 1 is realtek."

They aren't talking about wine, but I had this problem because my /proc/asound/cards has a Realtek and some HDMI audio outputs. The quick fix for me was to use regedit to set HKEY_CURRENT_USER\Software\Wine\Drivers\Audio to "" (nothing) which completely disables DirectSound, but the game works.

If you have this problem like I did, then your game will consistently crash the moment you click on the Audio settings button.
So it happened on Windows as well which let me to conclude it's not a wine related bug and hence I've never thought of even filing a bug report.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Hide audio hardware inside a prefix

Post by Bob Wya »

debdog wrote:
https://appdb.winehq.org/objectManager.php?sClass=version&iId=3438 wrote:http://forums.steampowered.com/forums/s ... ?t=2015962 says "BF2 is know[n] to crash if you have 2 sound cards (A USB headset counts as a card) and 1 is realtek."

They aren't talking about wine, but I had this problem because my /proc/asound/cards has a Realtek and some HDMI audio outputs. The quick fix for me was to use regedit to set HKEY_CURRENT_USER\Software\Wine\Drivers\Audio to "" (nothing) which completely disables DirectSound, but the game works.

If you have this problem like I did, then your game will consistently crash the moment you click on the Audio settings button.
So it happened on Windows as well which let me to conclude it's not a wine related bug and hence I've never thought of even filing a bug report.
The disc DRM for Battlefield 2142 (versions < 1.51) doesn't work under Windows 8.1 - but it does under Wine. So I would file a bug report... Can't hurt! I'll see if I can replicate this issue with my PA-based system... But I am quite busy playing about with dd-wrt just now!!

Bob
Locked