Are there audio devices which can be emulated ?
We discussed this in other threads. The audio emulation (hda) works with:hda support was imported 8 months ago
bhyve ... -s 9,hda,play=/dev/dsp,rec=/dev/dsp ...
xfreerdp ... /sound:sys:oss,dev:3 /microphone:sys:oss,format:1 ...
but sound quality is significantly worse compared to xfreerdp()'s way for a Windows guest:
ppt6@pci0:134:0:0: class=0x030000 card=0x8c931462 chip=0x128b10de rev=0xa1 hdr=0x00
vendor = 'NVIDIA Corporation'
device = 'GK208B [GeForce GT 710]'
class = display
subclass = VGA
ppt7@pci0:134:0:1: class=0x040300 card=0x8c931462 chip=0x0e0f10de rev=0xa1 hdr=0x00
vendor = 'NVIDIA Corporation'
device = 'GK208 HDMI/DP Audio Controller'
class = multimedia
subclass = HDA
Check on the top of that page in a ribbon menu bar. Look at "Info" right next to "Immutable Page".It would we nice to know when the page was created and last updated.
Did you mean the reverse - use hardware recognised by the host even when there is no driver for the guest?This pci passthrough is a very interesting concept.
If i'm correct it allows to use hardware recognised by the guest even when there is no driver for the host.
$ cd $HOME
$ svn co https://svn.FreeBSD.org/base/head freebsd-head
$ cd freebsd-head
$ svn diff -c 349335 > patch1.diff
$ svn diff -c 350255 > patch2.diff
# 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
Yes, I filed a bug report 2 years or so ago regarding similar resource non-releasing, not sure about its status, will try to find.the software is a bit buggy and does not release all resources, a reboot is needed
grub-bhyve -S -r cd0 -m /vm/device.map -M 2048 devuan1
bhyve -S -c 4 -m 8G -A -H -P -u -s 0:0,hostbridge -s 3:0,ahci-hd,/vm/devuan1.img -s 4:0,ahci-cd,/vm/devuan_ascii_2.1_amd64_netinst.iso -s 5:0,passthru,132/0/1 -s 30:0,xhci,tablet -s 31:0,lpc -l com1,/dev/nmdm4A devuan1
grub-bhyve -m /vm/device.map -r hd0,msdos1 -M 2048M -S devuan1 -d /boot/grub/
sleep 6
### I need this for my bhyve startup script as the grub menu has to complete before I can load bhyve ### bhyve -S -c 4 -m 2G -A -H -P -u -s 0:0,hostbridge -s 3:0,ahci-hd,/vm/devuan1.img -s 5:0,passthru,132/0/1 -s 30:0,xhci,tablet -s 31:0,lpc -l com1,/dev/nmdm4A devuan1 &
### the ampersand(&) is needed for my startup script.### cu -l /dev/nmdm4B
lspci | egrep -i 'network|ethernet'
cd /usr/src/usr.sbin/bhyve && svn info
URL: svn://svn.freebsd.org/base/release/12.1.0/usr.sbin/bhyve
Relative URL: ^/release/12.1.0/usr.sbin/bhyve
Revision: 360835
patch < /path/to/raw/diff/downloaded/from/reviews.freebsd.org
svn diff
Index: Makefile
===================================================================
--- Makefile (revision 360835)
+++ Makefile (working copy)
@@ -16,6 +16,7 @@
SRCS= \
atkbdc.c \
acpi.c \
+ audio.c \
bhyvegc.c \
bhyverun.c \
block_if.c \
@@ -27,6 +28,7 @@
dbgport.c \
fwctl.c \
gdb.c \
+ hda_codec.c \
inout.c \
ioapic.c \
mem.c \
@@ -37,6 +39,7 @@
pci_ahci.c \
pci_e82545.c \
pci_emul.c \
+ pci_hda.c \
pci_fbuf.c \
pci_hostbridge.c \
pci_irq.c \
cd /usr/src/usr.sbin/bhyve
make clean install
ifconfig tap0 create
ifconfig bridge0 addm tap0 addm re0
sysctl hw.snd.default_unit=3
bhyve -c 2 -m 4G -Hwl bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \
-U a7fd1b43-51d2-11e9-9fe5-54bf64f6fd48 \
-u \
-s 0,hostbridge \
-s 31,lpc \
-s 4:0,ahci-hd,/arquivo/virtual-machines/win7/vm-win7.img \
-s 10:0,virtio-net,tap0,mac=00:A0:98:22:92:FA \
-s 6:0,fbuf,tcp=0.0.0.0:5900,w=640,h=480 \
-s 7:0,xhci, \
-s 15:0,hda,play=/dev/dsp,rec=/dev/dsp \
-s 3:0,ahci-cd,/arquivo/virtual-machines/.config/null.iso \
win7
cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC256 (Internal Analog)> (play/rec)
pcm1: <Realtek ALC256 (Front Analog Headphones)> (play)
pcm2: <Intel Kaby Lake (HDMI/DP 8ch)> (play)
pcm3: <USB audio> (play/rec) default
No devices installed from userspace.
sysctl hw.snd.default_unit=0