mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	Use new QEMU -audiodev to setup audio devices
Migrate to the new `-audiodev` . This also clearly labels the audio inputs and outputs in audio mixers on the host.
This commit is contained in:
		
							parent
							
								
									2690663b3b
								
							
						
					
					
						commit
						c4bea19bf2
					
				
					 2 changed files with 5 additions and 4 deletions
				
			
		|  | @ -94,4 +94,5 @@ You can also pass optional parameters | ||||||
|   - [x] Improve stdout presentation |   - [x] Improve stdout presentation | ||||||
|   - [x] Make disk image optionally size configurable |   - [x] Make disk image optionally size configurable | ||||||
|   - [ ] Improve snapshot management |   - [ ] Improve snapshot management | ||||||
|   - [ ] Create desktop launcher for a VM |   - [ ] Create desktop launcher for a VM | ||||||
|  |   - [x] Get QEMU `-audiodev` working for audio input, something like: | ||||||
|  | @ -183,18 +183,17 @@ function vm_boot() { | ||||||
|     -net user"${NET}" \ |     -net user"${NET}" \ | ||||||
|     -rtc base=localtime,clock=host \ |     -rtc base=localtime,clock=host \ | ||||||
|     -serial mon:stdio \ |     -serial mon:stdio \ | ||||||
|     -soundhw hda \ |     -audiodev pa,id=pa,server=unix:$XDG_RUNTIME_DIR/pulse/native,out.stream-name=${LAUNCHER}-${VMNAME},in.stream-name=${LAUNCHER}-${VMNAME} \ | ||||||
|  |     -device intel-hda -device hda-duplex,audiodev=pa \ | ||||||
|     -usb -device usb-kbd -device usb-tablet \ |     -usb -device usb-kbd -device usb-tablet \ | ||||||
|     -object rng-random,id=rng0,filename=/dev/urandom \ |     -object rng-random,id=rng0,filename=/dev/urandom \ | ||||||
|     -device virtio-rng-pci,rng=rng0 \ |     -device virtio-rng-pci,rng=rng0 \ | ||||||
|     -device qemu-xhci \ |  | ||||||
|     -device virtio-vga,virgl=${VIRGL},xres=${xres},yres=${yres} \ |     -device virtio-vga,virgl=${VIRGL},xres=${xres},yres=${yres} \ | ||||||
|     ${display} \ |     ${display} \ | ||||||
|     "$@" |     "$@" | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function usage() { | function usage() { | ||||||
|   local LAUNCHER=$(basename $0) |  | ||||||
|   echo |   echo | ||||||
|   echo "Usage" |   echo "Usage" | ||||||
|   echo "  ${LAUNCHER} --vm ubuntu.conf" |   echo "  ${LAUNCHER} --vm ubuntu.conf" | ||||||
|  | @ -211,6 +210,7 @@ DELETE=0 | ||||||
| ENABLE_EFI=0 | ENABLE_EFI=0 | ||||||
| readonly QEMU="/snap/bin/qemu-virgil" | readonly QEMU="/snap/bin/qemu-virgil" | ||||||
| readonly QEMU_IMG="/snap/bin/qemu-virgil.qemu-img" | readonly QEMU_IMG="/snap/bin/qemu-virgil.qemu-img" | ||||||
|  | readonly LAUNCHER=$(basename $0) | ||||||
| RESTORE=0 | RESTORE=0 | ||||||
| SNAPSHOT=0 | SNAPSHOT=0 | ||||||
| VM="" | VM="" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue