From nobody Tue Apr 18 21:42:49 2023 X-Original-To: freebsd-multimedia@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q1HTQ6glfz45hpc for ; Tue, 18 Apr 2023 21:42:50 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (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 4Q1HTQ4bzKz3pF1 for ; Tue, 18 Apr 2023 21:42:50 +0000 (UTC) (envelope-from hps@selasky.org) Authentication-Results: mx1.freebsd.org; none Received: from [10.36.2.154] (unknown [46.212.121.255]) (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 mail.turbocat.net (Postfix) with ESMTPSA id F03032602F0; Tue, 18 Apr 2023 23:42:48 +0200 (CEST) Message-ID: <0b5091eb-342f-5e0f-2b6e-01c1b6a8af70@selasky.org> Date: Tue, 18 Apr 2023 23:42:49 +0200 List-Id: Multimedia discussions List-Archive: https://lists.freebsd.org/archives/freebsd-multimedia List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-multimedia@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: Possibility of remapping USB PCM device Content-Language: en-US To: Trevor Arjeski , freebsd-multimedia@freebsd.org References: From: Hans Petter Selasky In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Q1HTQ4bzKz3pF1 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N 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