Created attachment 203898 [details]
port option changes to enable PULSEAUDIO
I have not had working sound in VirtualBox for a long time.
- Host OS: FreeBSD 12.0-RELEASE-p3 #6 r343805M
- Host HW: Core i7 2630QM, Conexant CX20590
- x11/kde5 installed, all ports latest
- Various client machines (Win 10, FreeBSD 12 & 13, openSUSE, Debian, CentOS,...)
- Today I recompiled all ports with PULSEAUDIO enabled (where it was off before), to be exact the following: kde5-188.8.131.52.04.0 virtualbox-ose-5.2.26_4 alsa-plugins-1.1.1_4 kmix-19.04.0 openal-soft-1.19.1_2 ffmpeg-4.1.3_2,1 mplayer-184.108.40.20690329_1 mpv-0.29.1_6,1 phonon-qt5-4.10.2_3 qt5-multimedia-5.12.2 QtAV-1.12.0_7 speech-dispatcher-0.8.8 espeak-1.48.04_6 libao-1.2.0_4 sdl-1.2.15_13,2 sdl2-2.0.9_2 vlc-3.0.6_12,4 freerdp-2.0.0.r4_2 plasma5-plasma-desktop-5.15.4_1 plasma5-plasma-5.15.4 qt5-webengine-5.12.2 (precise list of changes attached)
- VirtualBox now supports Pulseaudio, Alsa, and OSS
- Sound in the VM basically never works
- Tried with OSS, Alsa, and Pulseaudio backends
- Today, and only once, sound worked haltingly in openSUSE Leap 15.0 when using Pulseaudio (now it does not anymore)
- Sound from native applications works without problem
- A few years ago, sound did work. I believe the last VirtualBox version where it was working was something like 4.0.8.
- Since enabling PULSEAUDIO (see above) I now have two audio volume mixers in my panel. Can anybody explain what is going on?
- Does anybody have sound working in VirtualBox clients? If yes, what magic are you using?
See bug 233301 – emulators/virtualbox-ose - multimedia issues on 13-current
(In reply to Graham Perrin from comment #1)
Thank you, yes I have seen that PR.
For me not even pulseaudio works (except for exactly one time), and I did switch to it in the VM config.
Please see if
applies to you.
I applied the patch in comment #19 of bug #233301 and indeed audio output now works using OSS.
I have yet to get audio input working as well. Should that also work using OSS, or do I need pulseaudio on the host for it to work?
Update: In a Windows 10 client audio input is working as well. It is not yet working in openSUSE Tumbleweed and Leap clients.
So indeed the patch in bug #233301 seems to solve this longstanding issue with the OSS audio backend not working.
O.k. so openSUSE Tumbleweed and Leap 15.1 clients microphone input works using an emulated audio device of "ICH AC97" but not "HDA".
Windows 10 works with "HDA"
Created attachment 216925 [details]
Path to make OS audio work
This patch from bug #233301 fixed OSS audio. It does not fix pulseaudio, but makes plain old OSS work. Just drop it into the files folder and build the port. Several people, including myself, have reported that it fixed the rather old problem with OSS audio. Thanks to firstname.lastname@example.org for writing the patch which was closed as "overcome by events" since the real problem was fixed by the recent update to the port, but not the OSS problem.
This has been awaiting action with multiple reports that it fixes OSS audio.
I believe ti not qualifies for commit as maintainer timeout. Could someone please commit?
If there's uncertainty about the patch for OSS, then as an interim measure can we (please) have the PulseAudio option available in emulators/virtualbox-ose in ports?
Building one's own with the PulseAudio option can take so long, it's a real drag …
[11:03:02]  [00:00:00] Building devel/llvm90 | llvm90-9.0.1_2
load: 1.46 cmd: sh 50573 [vlruwk] 288.93r 0.00u 7.25s 3% 4608k
mi_switch+0xc1 sleepq_timedwait+0x2f _sleep+0x1ab vn_alloc_hard+0x2a2 getnewvnode_reserve+0x8c zfs_zget+0x1f zfs_dirent_lookup+0x169 zfs_dirlook+0x80 zfs_lookup+0x440 zfs_freebsd_cachedlookup+0x6b vfs_cache_lookup+0xb4 lookup+0x6cc namei+0x5c1 kern_statat+0xe7 sys_fstatat+0x2f amd64_syscall+0x10c fast_syscall_common+0xf8
[head-default] [2020-10-13_17h49m15s] [parallel_build:] Queued: 267 Built: 176 Failed: 0 Skipped: 0 Ignored: 0 Tobuild: 91 Time: 13:37:14
: devel/llvm90 | llvm90-9.0.1_2 build (01:10:30 / 02:35:06)
: devel/llvm10 | llvm10-10.0.1_1 build (10:22:14 / 12:00:59)
: lang/rust | rust-1.47.0 build (08:24:17 / 08:32:53)
[13:38:08] Logs: /usr/local/poudriere/data/logs/bulk/head-default/2020-10-13_17h49m15s
^C[13:39:20] Error: Signal SIGINT caught, cleaning up and exiting
[13:39:20] Cleaning up
[13:40:03] Unmounting file systems
OSS now works for me.
Could this patch be finally merged? Thanks.
However sorry, nevermind, the only way sound works for me in the Ubuntu Guest is:
Host: enabled PulseAudio + [Intel HD Audio or ICH AC97] selected
Guest: installed and running PulseAudio
UPD: finally, default OSS driver works right away in 6.1.18 appeared today in FreeBSD ports!
A commit references this bug:
Date: Sun Mar 14 21:44:14 UTC 2021
New revision: 568418
Add patch to fix OSS audio to virtualbox-ose-legacy
Submitted by: Martin Birgmeier <d8zNeCFG@aon.at>