Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jul 2020 15:30:15 +0000 (UTC)
From:      Paul Pathiakis <pathiaki2@yahoo.com>
To:        freebsd-questions@freebsd.org, Ralf Mardorf <ralf-mardorf@riseup.net>
Subject:   Re: Ask stupid questions and you'll get a stupid answers, was: Technological advantages over Linux
Message-ID:  <1273868562.6647660.1595604615652@mail.yahoo.com>
In-Reply-To: <20200724170348.51f108ec@archlinux>
References:  <20200214121620.GA80657@admin.sibptus.ru> <CAEJNuHwRs=6kOK9uiFzEAqCgSgvUb8Xm5o2VWnK-ND_zseowdg@mail.gmail.com> <20200214141600.GA82559@admin.sibptus.ru> <20200214204838.360c8f624397c659946bd764@sohara.org> <20200215063818.GE1482@admin.sibptus.ru> <20200215083359.367d8a3e9ddb4942df67d5b5@sohara.org> <58202623-bbf7-eda0-5cb5-fb4749e91e20@watters.ws> <CAEJNuHxbFSPBB7keSrBufpg=RsgQ8EPK_fvzt8XBROLNKyN_sw@mail.gmail.com> <6318251A-973A-4DEC-9271-12333EB11F7B@kicp.uchicago.edu> <CAEJNuHxC7i%2Bq7cq65=my6mJZDdiK4gpQsKjMU1nvsm=Ri4On%2Bg@mail.gmail.com> <800f33cd-0dc1-1ae9-2262-a374bf8c10dd@kicp.uchicago.edu> <20200724170348.51f108ec@archlinux>

next in thread | previous in thread | raw e-mail | index | archive | help
 Ahhhh.... A fellow pastafarian. :)

    On Friday, July 24, 2020, 11:03:53 AM EDT, Ralf Mardorf <ralf-mardorf@riseup.net> wrote:  
 
 >On 2020-07-24 08:39, Ottavio Caruso via freebsd-questions wrote:
>> Am I an infidel?

"the only dogma allowed in the Church of the Flying Spaghetti Monster
is the rejection of dogma"
_______________________________________________
freebsd-questions@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
  
From owner-freebsd-questions@freebsd.org  Fri Jul 24 15:49:51 2020
Return-Path: <owner-freebsd-questions@freebsd.org>
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 5C3F936A3A5
 for <freebsd-questions@mailman.nyi.freebsd.org>;
 Fri, 24 Jul 2020 15:49:51 +0000 (UTC)
 (envelope-from freebsd@gregv.net)
Received: from aurora.gregv.net (aurora.gregv.net [192.111.144.138])
 by mx1.freebsd.org (Postfix) with ESMTP id 4BCttj4v17z3S84
 for <freebsd-questions@freebsd.org>; Fri, 24 Jul 2020 15:49:49 +0000 (UTC)
 (envelope-from freebsd@gregv.net)
Received: by aurora.gregv.net (Postfix, from userid 1001)
 id 85230F5; Fri, 24 Jul 2020 11:49:43 -0400 (EDT)
Date: Fri, 24 Jul 2020 11:49:43 -0400
From: Greg Veldman <freebsd@gregv.net>
To: "Russell L. Carter" <rcarter@pinyon.org>
Cc: freebsd-questions@freebsd.org
Subject: Re: forwarding audio from a (bhyve) vm
Message-ID: <20200724154943.GR67461@aurora.gregv.net>
References: <295d43ec-b5dc-2899-5d22-fb0b5d8ff5cb@pinyon.org>
 <20200720120813.4b020a5b.freebsd@edvax.de>
 <08284be8-6508-0451-312b-b575dc6d4331@pinyon.org>
 <42870245-d3c6-be29-242b-67b7697d7402@pinyon.org>
 <20200721022754.GM67461@aurora.gregv.net>
 <93920d59-a06c-62c6-7393-c19a2db2ed88@pinyon.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <93920d59-a06c-62c6-7393-c19a2db2ed88@pinyon.org>
X-Rspamd-Queue-Id: 4BCttj4v17z3S84
X-Spamd-Bar: /
Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none;
 spf=none (mx1.freebsd.org: domain of freebsd@gregv.net has no SPF policy when
 checking 192.111.144.138) smtp.mailfrom=freebsd@gregv.net
X-Spamd-Result: default: False [0.30 / 15.00]; ARC_NA(0.00)[];
 NEURAL_HAM_MEDIUM(-0.44)[-0.440]; FROM_HAS_DN(0.00)[];
 TO_DN_SOME(0.00)[];
 SH_EMAIL_DBL_DONT_QUERY_IPS(0.00)[10.0.2.1:email];
 NEURAL_HAM_LONG(-0.39)[-0.387]; MIME_GOOD(-0.10)[text/plain];
 DMARC_NA(0.00)[gregv.net]; AUTH_NA(1.00)[];
 NEURAL_SPAM_SHORT(0.22)[0.225]; TO_MATCH_ENVRCPT_SOME(0.00)[];
 DBL_PROHIBIT(0.00)[10.0.2.1:email]; RCPT_COUNT_TWO(0.00)[2];
 R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_ZERO(0.00)[0];
 FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[];
 MIME_TRACE(0.00)[0:+];
 ASN(0.00)[asn:31863, ipnet:192.111.144.0/20, country:US]
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.33
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/>;
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 24 Jul 2020 15:49:51 -0000

On Wed, Jul 22, 2020 at 05:50:31PM -0700, Russell L. Carter wrote:
> sndio, if it can be made to work, also appears perfect.  In summary, I
> want to run multiple vm's in a Facebook cast-off server that has 32
> threads and 128GB of memory... but no audio hardware.  Adding the hda
> device to bhyve doesn't seem to work, I am guessing, because there is
> no physical audio hw in the bhyve host.

This certainly sounds like a use case for sndio.  FYI my use
case is passing audio from various bhyve VMs to my desktop
system, as needed.

> The latest tarball of sndio compiles and installs cleanly on ancienne
> Debian 9.  But what about sound devices?

I'm not sure exactly how to set this up on Debian, I've only
ever run sndiod in server mode on FreeBSD.  There, it was as
simple as setting a few flags in my rc.conf (see previous post).

> A couple of questions inline, if possible:

Further responses also inline.

> On 2020-07-20 19:27, Greg Veldman wrote:
>  > On Mon, Jul 20, 2020 at 04:00:22PM -0700, Russell L. Carter wrote:
>  >> On 2020-07-20 15:06, Russell L. Carter wrote:
>  >>> 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.
>  >>
>  >> Oh well, the vm fails to start with this template configuration.
>  >> I am not sure how to fix it.  There is only one vm running, so
>  >> I don't think bhyve should be running out of slots/devices.
>  >> There is no audio hardware in the bhyve host... is that a
>  >> problem?  I don't want to listen on the bhyve host, I want to
>  >> ship the audio over the physical network to another FreeBSD
>  >> system.
>  >>
>  >> Both the bhyve host and the target system are running FreeBSD
>  >> 12/stable from the beginning of July.
>  >
>  > I currently do this with some of my systems, I use sndio and
>  > have had no issues at all.  My current setup is all FreeBSD
>  > hosts, but sndio runs on GNU/Linux and NetBSD, OpenBSD (in
>  > fact it's originally from OpenBSD I believe).
>  >
>  > On the host you wish to send the audio from:
>  >
>  > $ grep -i audio .bashrc
>  > export AUDIODEVICE="snd@10.0.2.1/0"
> 
> You don't need to start sndiod on the audio server
> system for the client system to connect?

Yes, you do, but that is the only place you need to start the
daemon.  In my example, the lines above are on the client, the
lines below are from the audio server (my FreeBSD desktop box).
On the client, all you need to do is set the environment variable
with the location of the sndiod server, then any sndio-aware
application will forward the audio over the network to that
address.

>  > On the host you wish to hear the audio on:
>  >
>  > $ grep -i sndio /etc/rc.conf
>  > sndiod_enable="YES"
>  > sndiod_dev="rsnd/$($SYSCTL -n hw.snd.default_unit)"
>  > sndiod_flags="-f ${sndiod_dev} -c 0:7 -j off -s default -m mon -s
>  > monitor -L 10.0.2.1"
> 
> That looks very good.  My target system has a non-default "default".

Yes, I also had to explicitly set mine, that's the sysctl.conf
snippet below.

>  > $ grep -i snd /etc/sysctl.conf
>  > # Default sound device (from /dev/sndstat)
>  > hw.snd.default_unit=2
>  >
>  > See the sndio(7) manpage for setting up the cookie on both
>  > hosts to handle authentication.
>  >
> 
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"

-- 
Greg Veldman
freebsd@gregv.net



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1273868562.6647660.1595604615652>