Re: Combine 2 hardware devices into 1 sndio device

From: Tim Preston <tim_at_timpreston.net>
Date: Fri, 19 Jun 2020 16:50:33 +1000
Just following this up in case someone else stumbles across this thread:

Problem is solved! At least in FreeBSD.

You can use the audio/virtual_oss port to combine audio interfaces, then run sndiod over the top. It works really well for the webcam and headphones case described below.

Documentation here: https://wiki.freebsd.org/Sound#Advanced

On Fri, 2 Aug 2019, at 7:28 PM, Alexandre Ratchov wrote:
> On Fri, Aug 02, 2019 at 03:14:59PM +1000, Tim Preston wrote:
> > Hi,
> > 
> > Is it possible to combine or merge two hardware devices into a
> > single sndio device?
> > 
> >  My use case is a USB webcam with mic, and an external USB audio
> > interface for my headphones. When making video calls in Firefox or
> > Chromium I can use either the mic or headphones, but not both at the
> > same time. Both web browsers use the 'default' audio device (snd/0)
> > and don't list any other devices to choose from.
> > 
> > Since this is a FreeBSD system one thing I can do is attach sndiod
> > to the mic and expose that as snd/0, then let audio out fallback to
> > FreeBSD's default (which I can set as the USB audio interface). This
> > means the audio out is not controlled by sndiod, and is hence quite
> > loud.  Thanks, Tim
> 
> Hi,
> 
> Sorry, it's not possible to combine multiple devices into a single
> one, mostly because they run at slightly different clock rates and
> it's difficult to synchronize them reliably.
> 
> To handle telephony programs, the plan is to let programs not using
> full-duplex (like firefox and chromium) to choose different devices
> for playback and recording, but that's not done yet, no promises. In
> other words "default" would point to different devices depending on
> whether it's open play-only, rec-only or full-duplex.
>
Received on Fri Jun 19 2020 - 08:50:33 CEST

This archive was generated by hypermail 2.3.0 : Tue Aug 09 2022 - 16:23:49 CEST