mirror of
https://github.com/churchers/vm-bhyve.git
synced 2025-12-11 09:20:17 +01:00
Add HD Audio device to guest via config
This commit is contained in:
11
lib/vm-run
11
lib/vm-run
@@ -192,6 +192,7 @@ vm::run(){
|
||||
vm::bhyve_device_passthru
|
||||
vm::bhyve_device_fbuf
|
||||
vm::bhyve_device_mouse
|
||||
vm::bhyve_device_sound
|
||||
vm::bhyve_device_console
|
||||
|
||||
vm::lock
|
||||
@@ -718,6 +719,16 @@ vm::bhyve_device_mouse(){
|
||||
fi
|
||||
}
|
||||
|
||||
vm::bhyve_device_sound(){
|
||||
local _play
|
||||
config::get "_play" "sound_play" "/dev/dsp0"
|
||||
|
||||
if config::yesno "sound"; then
|
||||
_devices="${_devices} -s ${_slot}:0,hda,play=${_play}"
|
||||
_slot=$((_slot + 1))
|
||||
fi
|
||||
}
|
||||
|
||||
# add virtio_console devices to the guest
|
||||
#
|
||||
# @modifies _devices _slot
|
||||
|
||||
Reference in New Issue
Block a user