From patchwork Tue Sep 19 14:22:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Binding X-Patchwork-Id: 14228 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp3596918vqi; Tue, 19 Sep 2023 11:31:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFbne2wZyaJ54JzajM7MpyrRqgmGfMCTY9K+ycFbnRCHwjHJJBo8tr0uGES1r3RX5nPkICc X-Received: by 2002:a05:6a00:399b:b0:68e:417c:ed5c with SMTP id fi27-20020a056a00399b00b0068e417ced5cmr553690pfb.32.1695148308216; Tue, 19 Sep 2023 11:31:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695148308; cv=none; d=google.com; s=arc-20160816; b=fL4mz5aY5PdpY8H+v0jKIXd/hzCh4CecFCfdLNf5m4U39rciVueMqiM6uBfEDjTVbC vtUT1NjjJ4kieGApgcD/xJv9htrbhD6HhbINrgsMtoLmtkDYmIYkpjZQr5G0UGhAvuR9 AksjTZ7tg7iiDKynfpGBRBJdJHtsnVOtESrkTCFjrraIubZYy9kdL2Yq3YD/acgBsWeD XDstHmqt6vmGnPy/1pDedbrzZpsOX95/+inyFwtBlBbtXgEgXoiw60nBPn6Yoy+BtYXh sKpCnaV75lBfFEKhPqOqYc6OkHtyPq3wDR0DtRSk8Citr7MgwAjYe8/tiXkBaHwD2PFk TqRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ymCJde178UwL4TYnW7s7IyEfWXED9q+z5lMLNLuhi3A=; fh=w0YUzQ46fBcI9TSX4/vlEjRtiHb0kiqukhFXye02PR8=; b=eU+vMvs0F+E458Y7QluuyvAQZsTGEOvWQxDIYb6fMq5qrNuGZWKQzKgE1O005zG5km PUg7Ibq0SDcQlrUHPYPtjfr/wSmqEn2KHrUAws8LZmDQ5TvLv4qIkVX40twdVd33IR2R BPcwJe3Cwjjdm2m8UcCeQ97uSDk5f0ehTVxOnz0EiKamiJHXPpR/FHlJsBMiipQlYxAx bmQXEkwKPFAoXZMP3gbQDngio0f49Gp6FZDegmzz15kNKIm4SqB16QtvXzPZVjndJGCX h4pCNCJviAROwtnoXydWzZDNN15cbamBWueEuHMc3f2AIykoctMJzPF5CXeFIfDK/u9H hkZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=rABvyKCR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id v2-20020a655c42000000b00577561158b3si10078084pgr.411.2023.09.19.11.31.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 11:31:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=rABvyKCR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 1D3C882B9285; Tue, 19 Sep 2023 07:23:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232762AbjISOXR (ORCPT + 26 others); Tue, 19 Sep 2023 10:23:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232784AbjISOXN (ORCPT ); Tue, 19 Sep 2023 10:23:13 -0400 Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F652181 for ; Tue, 19 Sep 2023 07:23:07 -0700 (PDT) Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 38J4KMPD022193; Tue, 19 Sep 2023 09:22:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=PODMain02222019; bh=y mCJde178UwL4TYnW7s7IyEfWXED9q+z5lMLNLuhi3A=; b=rABvyKCR5r1jR97Q4 BeNNTwSLu/LgjfN+q7Lx69h3dJSeSC2qZNbNIQYxgPtuyFSX0Ikn+14d7myfs+UJ tBYfeax4dAt71X6oR/n9XSK55T08fNAm8grc9yBRi3ypMlwpB5wVBT24oPkirBix YktCYnEDOGwg2MoxKRQLANYHBQlMa5DA7WLWTqGlLhfDqIV7ndmxKwC/fxJK8laO 4fL4DBOtyCOutmW0sVaFc6s16AZplGNXSfn5UgJ0j0GvVGY0NWK6ck+d8fTB49zK SiECPNIJxbc7Lk/FOP+eqYJlG/kgF87ajuHKyIe2VGnieav4AOgfRv3cT+PybzF9 fGWMg== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3t59ry3y7r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Sep 2023 09:22:52 -0500 (CDT) Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.37; Tue, 19 Sep 2023 15:22:49 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1118.37 via Frontend Transport; Tue, 19 Sep 2023 15:22:49 +0100 Received: from sbinding-cirrus-dsktp2.ad.cirrus.com (unknown [198.90.238.135]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id B11C811AB; Tue, 19 Sep 2023 14:22:49 +0000 (UTC) From: Stefan Binding To: Jaroslav Kysela , Takashi Iwai CC: , , , Stefan Binding Subject: [PATCH v3 0/2] Support mute notifications for CS35L41 HDA Date: Tue, 19 Sep 2023 15:22:38 +0100 Message-ID: <20230919142240.467682-1-sbinding@opensource.cirrus.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Proofpoint-GUID: sBpAx-564mdkuf1hDpvQdlgRriHoT1e_ X-Proofpoint-ORIG-GUID: sBpAx-564mdkuf1hDpvQdlgRriHoT1e_ X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 19 Sep 2023 07:23:30 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777491832331300651 X-GMAIL-MSGID: 1777491832331300651 Some systems use a special keyboard shortcut to mute speaker audio. On systems using CS35L41 HDA which have this shortcut, add a mechanism which uses ACPI notifications to determine when the shortcut is pressed, and then mute the amps inside the driver. Since this is not a normal mute mechanism, it does not go through userspace. To allow userspace to be able to track this special state, add an ALSA control which tracks the state of this forced mute Changes since v2: - Fixed compile issue when CONFIG_ACPI is missing Stefan Binding (1): ALSA: hda: cs35l41: Add read-only ALSA control for forced mute Vitaly Rodionov (1): ALSA: hda: cs35l41: Support mute notifications for CS35L41 HDA sound/pci/hda/cs35l41_hda.c | 132 ++++++++++++++++++++++++++++++---- sound/pci/hda/cs35l41_hda.h | 3 + sound/pci/hda/hda_component.h | 4 ++ sound/pci/hda/patch_realtek.c | 85 +++++++++++++++++++++- 4 files changed, 210 insertions(+), 14 deletions(-)