Hello.
I'm trying to emulate the audio using vm-bhyve /and not bhyve,because it does not fully work for me/ ; and I've found this post that I think can be useful :
https://forums.freebsd.org/threads/what-is-the-current-status-of-audio-emulation-in-bhyve.74557/
The part that I find interesting is the following :
I would like to make an experiment. Without patching bhyve,I would like to check if this parameter
I've looked inside the vm-bhyve config file "config.sample", to check if there is a trigger that I can activate to enable the audio with all the parameters needed. But I didn't find it.
I'm trying to emulate the audio using vm-bhyve /and not bhyve,because it does not fully work for me/ ; and I've found this post that I think can be useful :
https://forums.freebsd.org/threads/what-is-the-current-status-of-audio-emulation-in-bhyve.74557/
The part that I find interesting is the following :
HD sound works perfectly fine in bhyve and sound quality is as good as the host in my case.You need commit 349335 and 350255 from FreeBSD head, you can get them at the following links: patch1 and patch2. Alternatively, you can get them by using svn
Then apply those patches to /usr/src/usr.sbin/bhyve.Code:$ cd $HOME $ svn co [URL='https://svn.freebsd.org/base/head?fbclid=IwAR2jnDhjWiBtWMX2wBOAe0j_c8VDac9SgByilAFe8ERpm2aGSm5YTFEGLD8']https://svn.FreeBSD.org/base/head[/URL] freebsd-head $ cd freebsd-head $ svn diff -c 349335 > patch1.diff $ svn diff -c 350255 > patch2.diff
Then choose which dsp you want to use for play and recCode:# cd /usr/src/usr.sbin/bhyve # patch -Np2 -i $HOME/freebsd-head/patch1.diff # patch -Np2 -i $HOME/freebsd-head/patch2.diff # make # make install
-s 6,hda,play=/dev/dsp0,rec=/dev/dsp0
I'm even using it at dsp2 (HDMI output) and it works perfectly fine. I use it mostly for my Linux guest for running google chrome in order to be able to use a proprietary web conferecing used by my company.
I would like to make an experiment. Without patching bhyve,I would like to check if this parameter
-s 6,hda,play=/dev/dsp0,rec=/dev/dsp0
is able to enable the audio on the emulated Ubuntu. Now the problem is that, as I said, I can't use bhyve because there is something that is not working for me when I use it (the linux vm can't connect to internet: I've asked help but no one has been able at the moment to understand why), so there is only one thing that I can do: to use vm-bhyve and find the way to add the parameters -s 6,hda,play=/dev/dsp0,rec=/dev/dsp0
to the conf file. But how? I'm pretty sure that this vm-bhyve conf file will not work :
Code:
loader="uefi"
cpu=8
memory=8GB
network0_type="virtio-net"
network0_switch="public"
disk0_type="virtio-blk"
disk0_name="ubuntu-budgie-gpu.img"
uuid="ca6be87e-eed2-11eb-abbb-e0d55ee21f22"
network0_mac="58:9c:fc:0a:b1:92"
graphics="yes"
graphics_res="1440x900"
xhci_mouse="yes"
-s 6,hda,play=/dev/dsp0,rec=/dev/dsp0
I've looked inside the vm-bhyve config file "config.sample", to check if there is a trigger that I can activate to enable the audio with all the parameters needed. But I didn't find it.