Re: Possibility of remapping USB PCM device

From: Trevor Arjeski <tmarjeski_at_gmail.com>
Date: Wed, 19 Apr 2023 20:38:51 UTC
Thanks Hans,

It seems that virtual_oss could do what I need, except that I don't think I
can control the devices from mixer(1), which was my main goal.
I basically want to tell the pcm driver how to set up the usb headset sinks
and mic, but maybe there is no way to do that either.
I thought that device.hints(5) was the way to go, but I don't know what the
heck I'm doing!

Trevor

On Wed, Apr 19, 2023 at 12:42 AM Hans Petter Selasky <hps@selasky.org>
wrote:

> On 4/18/23 20:56, Trevor Arjeski wrote:
> > Hi all,
> > I am new to FreeBSD and I am in the midst of setting up things the way I
> > like them on my desktop. I have a strange USB headset that requires a
> > special configuration on linux - pulseaudio includes this configuration,
> > and I was wondering if there is a possibility it can be done in FreeBSD.
> >
> > Below is a description of the device from the pulseaudio source code from
> > this commit
> >
> https://github.com/pulseaudio/pulseaudio/commit/814419cc3d788acb9113a3d62c373deb1a911e75
> >
> > | Steelseries Arctis 7 USB headset mono output path. The headset has two
> > | output devices. The first one is mono, meant for voice audio, and the
> > | second one is stereo, meant for everything else. The purpose of this
> > | unusual design is to provide separate volume controls for voice and
> > | other audio, which can be useful in gaming.
> > | This path doesn't provide hardware volume control, because the stereo
> > | output is controlled by the PCM element with index 1, and currently
> > | PulseAudio only supports elements with index 0.
> >
> > The last sentence is what I am trying to achieve, somehow, so that I can
> > control the volume.
> >
> > I have already gone through all the sysctl's on the two pcm devices, and
> > messed with all the available mixer settings. My assumption is that
> FreeBSD
> > is doing what Linux was doing before the pulseaudio patch - not allowing
> > "index 1" - whatever that means.
> >
> > Any information is welcome. I would even be interested in patching some
> of
> > the driver code for my own learning (doesn't need to go upstream). I am
> > running CURRENT and can rebuild the system and kernel.
> >
> > Thanks.
> >
>
> Hi,
>
> Maybe virtual_oss (my own invention) can solve your problem.
>
> It allows you to create a virtual /dev/dsp device.
>
> During usage you can run:
>
> virtual_oss_cmd /dev/vdsp.ctl -P /dev/dspX
>
> To change the playback device only, or -f to change both.
>
> Then all applications using /dev/dsp follow this change, with no need to
> restart anything!
>
> --HPS
>