Date: Wed, 19 Apr 2023 23:38:51 +0300 From: Trevor Arjeski <tmarjeski@gmail.com> To: Hans Petter Selasky <hps@selasky.org> Cc: freebsd-multimedia@freebsd.org Subject: Re: Possibility of remapping USB PCM device Message-ID: <CACPvkDy%2BE0Abqd7W3An-M-Kp-y=WfX-803kQ%2BmQw9dAkQ1fYPg@mail.gmail.com> In-Reply-To: <0b5091eb-342f-5e0f-2b6e-01c1b6a8af70@selasky.org> References: <CACPvkDz4NT4RFfUxzd87P%2B2iL8to9owtzVH8bCZV-To8C7fn1w@mail.gmail.com> <0b5091eb-342f-5e0f-2b6e-01c1b6a8af70@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000017a3c605f9b66aa3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=E2=80=AFAM Hans Petter Selasky <hps@selasky.o= rg> 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 fr= om > > this commit > > > https://github.com/pulseaudio/pulseaudio/commit/814419cc3d788acb9113a3d62= c373deb1a911e75 > > > > | Steelseries Arctis 7 USB headset mono output path. The headset has tw= o > > | 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 ca= n > > control the volume. > > > > I have already gone through all the sysctl's on the two pcm devices, an= d > > messed with all the available mixer settings. My assumption is that > FreeBSD > > is doing what Linux was doing before the pulseaudio patch - not allowin= g > > "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 > --00000000000017a3c605f9b66aa3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Thanks Hans,</div><div><br></div><div>It seems that v= irtual_oss could do what I need, except that I don't think I can contro= l the devices from mixer(1), which was my main goal.</div><div>I basically = want to tell the pcm driver how to set up the usb headset sinks and mic, b= ut maybe there is no way to do that either.</div><div>I thought that device= .hints(5) was the way to go, but I don't know what the heck I'm doi= ng!</div><div><br></div><div>Trevor<br></div></div><br><div class=3D"gmail_= quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Apr 19, 2023 at 12:42= =E2=80=AFAM Hans Petter Selasky <<a href=3D"mailto:hps@selasky.org">hps@= selasky.org</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style= =3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding= -left:1ex">On 4/18/23 20:56, Trevor Arjeski wrote:<br> > Hi all,<br> > I am new to FreeBSD and I am in the midst of setting up things the way= I<br> > like them on my desktop. I have a strange USB headset that requires a<= br> > special configuration on linux - pulseaudio includes this configuratio= n,<br> > and I was wondering if there is a possibility it can be done in FreeBS= D.<br> > <br> > Below is a description of the device from the pulseaudio source code f= rom<br> > this commit<br> > <a href=3D"https://github.com/pulseaudio/pulseaudio/commit/814419cc3d7= 88acb9113a3d62c373deb1a911e75" rel=3D"noreferrer" target=3D"_blank">https:/= /github.com/pulseaudio/pulseaudio/commit/814419cc3d788acb9113a3d62c373deb1a= 911e75</a><br> > <br> > | Steelseries Arctis 7 USB headset mono output path. The headset has t= wo<br> > | output devices. The first one is mono, meant for voice audio, and th= e<br> > | second one is stereo, meant for everything else. The purpose of this= <br> > | unusual design is to provide separate volume controls for voice and<= br> > | other audio, which can be useful in gaming.<br> > | This path doesn't provide hardware volume control, because the s= tereo<br> > | output is controlled by the PCM element with index 1, and currently<= br> > | PulseAudio only supports elements with index 0.<br> > <br> > The last sentence is what I am trying to achieve, somehow, so that I c= an<br> > control the volume.<br> > <br> > I have already gone through all the sysctl's on the two pcm device= s, and<br> > messed with all the available mixer settings. My assumption is that Fr= eeBSD<br> > is doing what Linux was doing before the pulseaudio patch - not allowi= ng<br> > "index 1" - whatever that means.<br> > <br> > Any information is welcome. I would even be interested in patching som= e of<br> > the driver code for my own learning (doesn't need to go upstream).= I am<br> > running CURRENT and can rebuild the system and kernel.<br> > <br> > Thanks.<br> > <br> <br> Hi,<br> <br> Maybe virtual_oss (my own invention) can solve your problem.<br> <br> It allows you to create a virtual /dev/dsp device.<br> <br> During usage you can run:<br> <br> virtual_oss_cmd /dev/vdsp.ctl -P /dev/dspX<br> <br> To change the playback device only, or -f to change both.<br> <br> Then all applications using /dev/dsp follow this change, with no need to <b= r> restart anything!<br> <br> --HPS<br> </blockquote></div> --00000000000017a3c605f9b66aa3--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACPvkDy%2BE0Abqd7W3An-M-Kp-y=WfX-803kQ%2BmQw9dAkQ1fYPg>