From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C87BC433E0 for ; Wed, 13 Jan 2021 15:09:56 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 61C9D2333E for ; Wed, 13 Jan 2021 15:09:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 61C9D2333E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2495516CE; Wed, 13 Jan 2021 16:09:03 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2495516CE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1610550593; bh=QS6XIMHmrXyas6CPgV/Yted+z0vOP97VpAvV4CiuKlY=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=I4+5TueMOt+5rtXo2uBt0OzQoITF8tPq2YHErYHjLtzzD3ak9F4jvzCSavBmILUdJ 19YmMgWB0xguEXR6B6lZoi8iAA1xaN7N9S6GZ/W2qsqWpJCrlipsIfizKXy/4ifEt2 DrxZi09lvS8O9XMLR+7bWiAKBelzG2f9Os0fd+t4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A54DFF8016D; Wed, 13 Jan 2021 16:09:02 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A67F0F801ED; Wed, 13 Jan 2021 16:09:01 +0100 (CET) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 9F9B1F8014D for ; Wed, 13 Jan 2021 16:08:51 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9F9B1F8014D X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 7E592AB9F; Wed, 13 Jan 2021 15:08:51 +0000 (UTC) Date: Wed, 13 Jan 2021 16:08:51 +0100 Message-ID: From: Takashi Iwai To: Bastien Nocera Subject: Re: USB Wireless device support In-Reply-To: <8adebcef15874187b18b930d5a71e79c6297ee80.camel@hadess.net> References: <3b322bb54a1df4b2a45586bc687fba3be5f9e3d8.camel@hadess.net> <8adebcef15874187b18b930d5a71e79c6297ee80.camel@hadess.net> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: alsa-devel@alsa-project.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Wed, 13 Jan 2021 16:03:39 +0100, Bastien Nocera wrote: > > On Wed, 2021-01-13 at 15:49 +0100, Takashi Iwai wrote: > > On Wed, 13 Jan 2021 15:36:19 +0100, > > Bastien Nocera wrote: > > > > > > Hey, > > > > > > On Wed, 2020-12-09 at 14:30 +0100, Bastien Nocera wrote: > > > > Hey, > > > > > > > > I've recently bought a SteelSeries Arctis 1 wireless headset: > > > > https://steelseries.com/gaming-headsets/arctis-1-wireless-xbox > > > > and wanted to write a kernel driver to export a few features of > > > > the > > > > device, and needed some help getting started. > > > > > > > > The receiver shows up as a audio class USB device, with extra > > > > features > > > > on a separate USB interface.[1] > > > > > > > > The extra features that can be accessed are: > > > > - Presence detection. I wanted to use that so PulseAudio or > > > > Pipewire > > > > could make routing decisions based on whether the headset is > > > > available, > > > > or probably better, implementing a "jack detection" emulation for > > > > the > > > > main audio interface? > > > > - A slider to change the sidetone volume > > > > - Export the battery level > > > > > > > > The latter is the only one I know how to do, so I'd be happy with > > > > any > > > > pointers or examples about the first two items. > > > > > > > > > I sent this in December and didn't get any answers, and I would > > > appreciate any guidance/examples if you have any into implementing > > > this. > > > > Judging from the link, is it controlled through HID?  If so, it's > > primarily done by a HID driver, and it doesn't belong to the sound > > card stuff, so far. > > Though.... > > > > > I would imagine that the new features would be implemented through > > > a > > > separate ALSA device with few features, which PulseAudio/Pipewire > > > could > > > merge with the existing USB audio device. > > > > ... given that it's implemented in a HID driver, the integration to > > the system is a different question.  But unless it's implemented as a > > sound card device, the rest will become a totally different, > > e.g. another PA or PW module. > > I think that it might be good to have the sidetone configuration > implemented as a channel mixer, so it could be shown along with the > device volume in sound settings. > > I believe there's already a device group feature in PulseAudio that > could be used to merge the sidetone level with the rest of the USB > audio mixers. > > Is there an example of a mixer like that implemented in a hid or > another type of non-ALSA/sound driver? Nothing so far, and that's the problem. HID is managed in a completely different layer, hence the integration needs to be done in a higher level like PA, I suppose. In theory we might be able to extend UCM to handle the other external devices, though. Takashi