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=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 3AEF6C433E6 for ; Mon, 15 Feb 2021 18:08:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0F77E64DCF for ; Mon, 15 Feb 2021 18:08:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229936AbhBOSIX (ORCPT ); Mon, 15 Feb 2021 13:08:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229991AbhBOSIV (ORCPT ); Mon, 15 Feb 2021 13:08:21 -0500 Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53977C061756 for ; Mon, 15 Feb 2021 10:07:41 -0800 (PST) Received: by mail-qk1-x735.google.com with SMTP id w19so7110401qki.13 for ; Mon, 15 Feb 2021 10:07:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gaikai-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FjL3bGsKN4nNEckTnZ781kw4sYUri7Vg5u7pKoqSQ4w=; b=wffB8JYDrYvNhF8aeb2t6NxZQu1RY9UOtTgBkkwOOaUMgh5tu0A71OfXnDmwWheCPx JDWf0DSnIOI4JmVZ9W9d4aqv8gnatEoAIxRkHbydowLRjfYgFi4oqIq1XQqImWd0Ks6J lmOgoc7uwa7+6w/ujJ8n6GR+On89M0rq+H+5/3gcm1QoNeqXQnabVGlxgKxSTKiIgz6b L4LfkDbhhSo1M5YmYwdBn1ke+pwatu+IUPSfkPKe/rg0bMCpTfrKzlONqMnaiUa9Fx+3 EWfsi+WolPDjnwmhkIGggWsFHCD8ff5/M1+uoj8DIlJtFrMqWEz/qZMggH5dqBtmehOU YN7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FjL3bGsKN4nNEckTnZ781kw4sYUri7Vg5u7pKoqSQ4w=; b=Z6E5VE0ujoUYdzrPClAeGHIkNegpJU47lYUFE37kMosTb5JpdTlycVnf3j1lNInIp4 VNy8vgowOXEGIWOr/jVO9Puou2E7pthOIj9D3pRQMH1O0kvyE1jifw+JHeuNsSKvbJ1G aS/c86uLu2fziMBt+rEyn61wOqKz70tRm9XXRz66JvjAUrQ0VqvJmy+zmrk6tVhXtudp /zLrOS+CZ53FyHrnkYgvMaKt7ZV8ypxWf2oZ+e3CE+A8nzYgovr1ZE2x2AiPa10i0ngJ 1pEVcdAbzBnHny5F5p2NXQ863C83PcGUd8Rhy8YWafu+42QG29gq4aTwManlLVR+JKKX Iwug== X-Gm-Message-State: AOAM533lLVVONRwyZO3fE1kOWBg8MJQN84W4XWmW/RWqvXAdZrvHcJQS nqhZXvZZNd8P4MVPHrytYRlJSriATBefNCH6tZpXeQ== X-Google-Smtp-Source: ABdhPJzfkRGYdyBeUGYpEQ1Q7dq4jWR5b71B+yuM0fF2jjb0xwBrDuMjCJrLG5bC5Ps7hZC8WbgY/yTbsmDlUZvYLYY= X-Received: by 2002:a05:620a:cd6:: with SMTP id b22mr15415318qkj.451.1613412460512; Mon, 15 Feb 2021 10:07:40 -0800 (PST) MIME-Version: 1.0 References: <20210215004549.135251-1-roderick@gaikai.com> <20210215004549.135251-3-roderick@gaikai.com> <20210215154045.4ac27ec0@nic.cz> In-Reply-To: <20210215154045.4ac27ec0@nic.cz> From: Roderick Colenbrander Date: Mon, 15 Feb 2021 10:07:29 -0800 Message-ID: Subject: Re: [PATCH v6 2/4] HID: playstation: add microphone mute support for DualSense. To: Marek Behun Cc: Jiri Kosina , Benjamin Tissoires , Pavel Machek , Dmitry Torokhov , pobm@protonmail.com, "open list:HID CORE LAYER" , linux-leds@vger.kernel.org, Roderick Colenbrander Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org On Mon, Feb 15, 2021 at 6:40 AM Marek Behun wrote: > > On Sun, 14 Feb 2021 16:45:47 -0800 > Roderick Colenbrander wrote: > > > From: Roderick Colenbrander > > > > The DualSense controller has a built-in microphone exposed as an > > audio device over USB (or HID using Bluetooth). A dedicated > > button on the controller handles mute, but software has to configure > > the device to mute the audio stream. > > > > This patch captures the mute button and schedules an output report > > to mute/unmute the audio stream as well as toggle the mute LED. > > > > Signed-off-by: Roderick Colenbrander > > Is the microphone supported via Linux? I.e. is there an audio driver > for it? Yes and no. The microphone is supported using USB, not yet using Bluetooth (uses a custom protocol). Actually there are various other audio features in the DualSense (headphone jack, speaker, volume controls,..) and they all work using custom protocols. We were planning to defer this work through future patches as the features are very complicated and need a deep analysis on how to realize them. For example audio controls work through HID, but for USB the audio driver is a generic hda audio device I think. Bluetooth is a custom protocol and will be yet a different audio driver somewhere. > If it is, look at the audio-micmute LED trigger. > I'm not sure if the expected behavior for the DualSense is similar to the standard audio mute use cases. My understanding of these triggers (please correct me if I'm wrong) is for e.g. an audio driver or user space to send a signal to anything registering for a particular trigger. In this case a global micmute. Is that, right? In our case for PlayStation games, there are often multiple controllers connected and each user has their own microphone in their controller. All can function at the same time (different from a standard PC use case). That's why I'm wondering if this makes sense.I know we are on Linux, but for Sony we want to properly support such use cases. > If you can't use the audio-micmute trigger because the microphone isn't > supported via Linux, I still think the LED should the LED should be > read-write. You can then register a LED private trigger. The driver should > change the state of the LED according to the microphone mute state only > if these trigger is enabled. > > Marek Roderick