Opened 12 years ago

Closed 10 years ago

#2256 closed bug (fixed)

Virtual Box No Sound Despite Detection, Crashes When Restaring Media Server.

Reported by: kvdman Owned by: mmu_man
Priority: normal Milestone: R1
Component: Kits/Media Kit Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All


Virtual Box:

Emulates an ICH AC97 Audio Controller.

I've installed and tested OSS with Haiku under Virtual Box.

The media server seems to detect the controller is present, although there's no sound output (tested with core audio on a MacBook). See the attached pics 1&2.

Changing any options and restarting the server will crash it (100% reproducible). See attached backtrace #3.

You can test OSS and Haiku under VirtualBox here:

Attachments (3)

audio1.jpg (139.6 KB ) - added by kvdman 12 years ago.
audio2.jpg (187.0 KB ) - added by kvdman 12 years ago.
audio3.jpg (312.1 KB ) - added by kvdman 12 years ago.

Download all attachments as: .zip

Change History (21)

by kvdman, 12 years ago

Attachment: audio1.jpg added

by kvdman, 12 years ago

Attachment: audio2.jpg added

by kvdman, 12 years ago

Attachment: audio3.jpg added

comment:1 by marcusoverhagen, 12 years ago

Owner: changed from marcusoverhagen to mmu_man

REassigning, as the crash seems to be OSS related. But has the box really 3 audio devices?

comment:2 by mmlr, 12 years ago

I would say that having two drivers for the same device (auich and the OSS ich driver in this case) is generally not a good idea. I don't know if both are opened at the same time though. There have recently been auich fixes by Jerome that might not be included in your image. If you provided the revision number this could be verified. The last fix in this regard was in hrev25616.

comment:3 by kvdman, 12 years ago


The revision tested was 25562. I only have one audio device enabled in Virtual Box's preferences. I'll remove the auich driver, and see what happens.

Also, I'll try to see how revisions after 25616 affect this problem.

comment:4 by kvdman, 12 years ago

With hrev25562, if you remove the auich driver, the sound actually works! It is crackly though.

You will get the same crash if you try to restart the media server though.

comment:5 by stippi, 12 years ago

I think there was a bug report for that crash though. Please note that the OpenSound package is broken in that Haiku itself already comes with the OpenSound media node (installed in the system path) and then the package installs another version of that node in the home folder. So one of them should be deleted.

comment:6 by kvdman, 12 years ago

Here's what I can tell you.

I think only the Vmware image contains the OSS package. I downloaded a raw image from, converted it to a virtual box image. The only controller that shows up is the Auich. The sound works, but is horrible.

I then used a Vmware image. After deleting the Auich driver, and the second OSS folder as Stippi described, the sound works as well (I believe the quality is better than the Auich driver, but still not great).

Now when the media server is restarted, it won't crash.

comment:7 by kvdman, 12 years ago

Sorry, forgot to mention that this was tested under hrev25619.

comment:8 by andreasf, 12 years ago

VirtualBox 1.6 is the first official version to provide Mac support, and I found it to be rather unstable on my MacBook Core Duo. If it works in VMware Fusion or Q, it could well be a VirtualBox issue.

comment:9 by mmu_man, 12 years ago

Status: newassigned

As stippi said, the media node is both in the image and the package, that's because it used to be in the port, and I built it along with OSS to make an R5 zip, that's not used as package... OTH, the node comming with the image is built with the native gcc, which means installing OSS will work on gcc4 images too. Having the addon twice shouldn't cause problems anyway, open() is denied to the 2nd one. At least it's not as much of a problem than having 2 drivers.

comment:10 by kvdman, 12 years ago

I'm a bit confused now, I just downloaded the images from the factory, and OSS doesn't seem to be installed anymore (25619).

By the way, if OSS is to be in the image anyways, shouldn't the optional package be removed?

I'm not really clear what solved the problem, whether it was Jerome's changes to the media kit (and me testing it on an updated revision as suggested by mmlr), or deleting the OSS install in /home, but it doesn't crash anymore and there's sound, so the ticket can be closed.

comment:11 by umccullough, 12 years ago

The OSS Media node in the Haiku repo is *not* OSS itself - it's just a layer that allows OSS to behave like a driver for the media kit, IIRC.

AFAIK, it should not be part of the image by default, (neither should OSS in fact).

Haiku has an auich/ac97 driver already, and should not require OSS for that functionality. I have successfully used it on several ICH audio devices with good luck, and with the latest changes it even works flawlessly on my laptop where it had problems previously.

Having OSS installed on the same image as the native drivers is just asking for trouble.

comment:12 by mmu_man, 12 years ago

Once again the problem is not about OSS, it's about the pci bus manager or config manager or whichever not providing a mean to reserve a device for exclusive use. Some cards are and will always be only supported through OSS, because it just works and noone is interested in spending time on writing a driver for it. Also, I made it possible to disable selecte drivers from OSS by editting the osscore settings file, it should be easy to remove support for ich or whatever. I just didn't because I need to udate the port anyway.

comment:13 by mmu_man, 12 years ago

The crash on media_server restart should be fixed now. As for lack of sound, maybe it's actually a timing issue, it seems to happen with QEMU too, it should work but times out trying to play. (you see it in syslog)

comment:14 by kvdman, 12 years ago

Indeed, the crashing media server upon restart is fixed; thanks.

Should this be closed and a new bug be opened re: no sound now?

There used to be sound, but it was very garbly.

comment:15 by luroh, 11 years ago

I'm getting sound in Virtualbox with the HDA driver, albeit very distorted due to the sound file being played back way too slow.

comment:16 by luroh, 10 years ago

Haiku rev 36331, Virtualbox 3.1.6 and the audio is much better. Haiku's native HDA driver supports the emulated sound card, no need for OSS. Close this one?

in reply to:  16 comment:17 by luroh, 10 years ago

Replying to luroh:

Haiku's native HDA driver supports the emulated sound card

Sorry, that should be: Haiku's native auich driver supports the emulated sound card

comment:18 by luroh, 10 years ago

Resolution: fixed
Status: in-progressclosed

Works fine in Ubuntu 9.10 with haiku-r1a2-rc-hrev36737-x86gcc2hybrid-vmware, VirtualBox 3.1.6 and :-)

OSS is not needed. Closing this one as fixed.

Note: See TracTickets for help on using tickets.