From owner-freebsd-questions@freebsd.org Mon Jul 20 22:06:58 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8C52836AF3F for ; Mon, 20 Jul 2020 22:06:58 +0000 (UTC) (envelope-from rcarter@pinyon.org) Received: from h2.pinyon.org (h2.pinyon.org [65.101.20.170]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B9bRj1Z1nz4cwd for ; Mon, 20 Jul 2020 22:06:56 +0000 (UTC) (envelope-from rcarter@pinyon.org) Received: from [10.0.10.15] (unknown [10.0.10.15]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by h2.pinyon.org (Postfix) with ESMTPSA id 8FF91371B3 for ; Mon, 20 Jul 2020 15:06:55 -0700 (MST) Subject: Re: forwarding audio from a (bhyve) vm To: freebsd-questions@freebsd.org References: <295d43ec-b5dc-2899-5d22-fb0b5d8ff5cb@pinyon.org> <20200720120813.4b020a5b.freebsd@edvax.de> From: "Russell L. Carter" Message-ID: <08284be8-6508-0451-312b-b575dc6d4331@pinyon.org> Date: Mon, 20 Jul 2020 15:06:54 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Firefox/68.0 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200720120813.4b020a5b.freebsd@edvax.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4B9bRj1Z1nz4cwd X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of rcarter@pinyon.org designates 65.101.20.170 as permitted sender) smtp.mailfrom=rcarter@pinyon.org X-Spamd-Result: default: False [-1.66 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.90)[-0.897]; DMARC_NA(0.00)[pinyon.org]; NEURAL_SPAM_SHORT(0.24)[0.240]; NEURAL_HAM_MEDIUM(-0.71)[-0.708]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:209, ipnet:65.101.0.0/18, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jul 2020 22:06:58 -0000 Right. Perfect, this is what I needed to um, 'hear'. ;-) Thank you. Comments inline. On 2020-07-20 03:08, Polytropon wrote: > On Sun, 19 Jul 2020 19:10:09 -0700, Russell L. Carter wrote: >> I have unifi-video up and running in a debian 9 bhyve vm. What's the >> current best practice for forwarding the audio from the bhyve vm? I'd >> like to be able to listen to the camera audio anywhere in my very >> heterogeneous OS network. My main desktop is FreeBSD, so that's what >> I mainly need. Is that possible? Do the *vnc's do sound? >> >> What's the most efficient method? > > Maybe you can achieve this using virtual networking? There > are solutions that use UDP for audio streaming (called "Seren"), > or tunneling pulseaudio (if you're using it), or use XRDP with > its pulseaudio plugin. Seren looks perfect. However it uses alsa to access the "sound card", which I see from googling should be achievable in a bhyve vm by configuring the HDA emulation. Evidently, after consulting https://wiki.freebsd.org/SummerOfCode2016/HDAudioEmulationForBhyve and https://forums.freebsd.org/threads/what-is-the-current-status-of-audio-emulation-in-bhyve.74557/ I should be able to achieve this using vm-bhyve by setting bhyve_options="-s 9,hda,play=/dev/dsp1,rec=/dev/dsp1" in the vm template file. (Although I have no idea why the forum post uses a "9" whereas the SummerOfCode post uses "x:y" for the first entry in the config list, I'm a bhyve noob). I'll report if it works. Thanks, Russell