From patchwork Fri Oct 11 10:57:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maciej Strozek X-Patchwork-Id: 13832414 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B8A7FCFD341 for ; Fri, 11 Oct 2024 10:58:10 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 3BD29AE8; Fri, 11 Oct 2024 12:57:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3BD29AE8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1728644288; bh=fqNWX9aJ4eQahTMafLFccTpsclKWxBQcLRTn0YneEJE=; h=From:To:CC:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=K7HK9dvuMFc+ODLPSDPzGYU3ruGwKA+33Dkee182yxBYUiPL13U11SP+4rafSFG9z 52YbMIWXK/K4J6XtLe7VulwZIgHFrYCpdyK6d+y3UJ7GuwVl44vjEBCsbisjuPups8 ypU8BAv58MyDaTu7KVmICDMRlVj7bkx33zDhvU6Q= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3B44CF805AA; Fri, 11 Oct 2024 12:57:35 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 33881F805A0; Fri, 11 Oct 2024 12:57:34 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CDA64F80528; Fri, 11 Oct 2024 12:57:21 +0200 (CEST) Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 704A9F80496 for ; Fri, 11 Oct 2024 12:57:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 704A9F80496 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=NJMqXs4U Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49B4pl5H015709; Fri, 11 Oct 2024 05:57:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=cc :content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=PODMain02222019; bh=Fq85ne27V4BxqUHf HjoSy3gS5VgWSSoTeX/P9lG8bcs=; b=NJMqXs4U6kaP9Gwq3xLZ5moBwa+d1Twi AP596bjLRKyFwkWUynsIdhVPOcoUyYvrtbS/vZ3JhU7ZZferYzsmLf8Q0spIFBmW UmWtNf8gd+1oHMqvwkeFSBXVIWtZie70DCtj0d7etgQafdfgqONGdn1lz85p9t9i 3f/M62vXnpI4E3fZ+qf/Ijl91IyXHcvZgReyw+IPd0I2W/aI/I5lwaLPTk6t+GfJ +aA3nii5qYkvGQxgk18uyvIgJDWv1T5I6t5gIyVYvSuQ7DlroH9o5VdbUwGBrj2S tSoeT3Nm2npv/OJHjiGpwgtQ6alTPW7nFZ+fsIbl7I+5vcg4WR5BNQ== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 4231vj0jph-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Oct 2024 05:57:16 -0500 (CDT) Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Fri, 11 Oct 2024 11:57:15 +0100 Received: from ediswmail9.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1544.9 via Frontend Transport; Fri, 11 Oct 2024 11:57:15 +0100 Received: from ediswws03.ad.cirrus.com (ediswws03.ad.cirrus.com [198.90.208.11]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id 16A2D820248; Fri, 11 Oct 2024 10:57:15 +0000 (UTC) From: Maciej Strozek To: CC: , , "Maciej Strozek" Subject: [PATCH alsa-ucm-conf v3 1/2] sof-soundwire: Change map control names to make them unique and user friendly Date: Fri, 11 Oct 2024 11:57:09 +0100 Message-ID: <20241011105710.1998823-1-mstrozek@opensource.cirrus.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 X-Proofpoint-GUID: Qe7lwCjOgYKVt6LnC5Ysgjqy9StZ8XIr X-Proofpoint-ORIG-GUID: Qe7lwCjOgYKVt6LnC5Ysgjqy9StZ8XIr X-Proofpoint-Spam-Reason: safe Message-ID-Hash: L7KUTCDPWRR3ALX56UAWZNPQKY6TTY3S X-Message-ID-Hash: L7KUTCDPWRR3ALX56UAWZNPQKY6TTY3S X-MailFrom: prvs=701410cdec=mstrozek@opensource.cirrus.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Both 'Speaker Digital' and 'cs42l43 PDM2' names were found in other alsa controls, confusing the MixerElems paths. Make them unique to avoid errors for hardware mutes. Also add 'Capture' string into microphone controls to make them work properly. Signed-off-by: Maciej Strozek Reviewed-by: Charles Keepax --- v3: Make Headset Microphone more user-friendly and contain the word "Capture" v2: Rename to "Speaker Playback" instead of "Speaker Combined" --- ucm2/codecs/cs42l43/init.conf | 10 ++++++++-- ucm2/sof-soundwire/cs35l56-bridge.conf | 6 +++--- ucm2/sof-soundwire/cs42l43-dmic.conf | 2 +- ucm2/sof-soundwire/cs42l43.conf | 2 +- 4 files changed, 13 insertions(+), 7 deletions(-) -- 2.39.5 diff --git a/ucm2/codecs/cs42l43/init.conf b/ucm2/codecs/cs42l43/init.conf index 10a6e1f..b2796e2 100644 --- a/ucm2/codecs/cs42l43/init.conf +++ b/ucm2/codecs/cs42l43/init.conf @@ -2,13 +2,19 @@ LibraryConfig.remap.Config { ctl.default.map { - "name='cs42l43 PDM2 Switch'" { + "name='cs42l43 Microphone Capture Switch'" { "name='cs42l43 Decimator 3 Switch'".vindex.0 0 "name='cs42l43 Decimator 4 Switch'".vindex.1 0 } - "name='cs42l43 PDM2 Volume'" { + "name='cs42l43 Microphone Capture Volume'" { "name='cs42l43 Decimator 3 Volume'".vindex.0 0 "name='cs42l43 Decimator 4 Volume'".vindex.1 0 } + "name='cs42l43 Headset Microphone Capture Switch'" { + "name='cs42l43 Decimator 1 Switch'".vindex.0 0 + } + "name='cs42l43 Headset Microphone Capture Volume'" { + "name='cs42l43 Decimator 1 Volume'".vindex.0 0 + } } } diff --git a/ucm2/sof-soundwire/cs35l56-bridge.conf b/ucm2/sof-soundwire/cs35l56-bridge.conf index 5435b11..a3cf6ad 100644 --- a/ucm2/sof-soundwire/cs35l56-bridge.conf +++ b/ucm2/sof-soundwire/cs35l56-bridge.conf @@ -2,11 +2,11 @@ LibraryConfig.remap.Config { ctl.default.map { - "name='Speaker Digital Switch'" { + "name='Speaker Playback Switch'" { "name='AMPL Speaker Switch'".vindex.0 0 "name='AMPR Speaker Switch'".vindex.1 0 } - "name='Speaker Digital Volume'" { + "name='Speaker Playback Volume'" { "name='AMPL Speaker Volume'".vindex.0 0 "name='AMPR Speaker Volume'".vindex.1 0 } @@ -56,6 +56,6 @@ SectionDevice."Speaker" { PlaybackPriority 100 PlaybackPCM "hw:${CardId},0" PlaybackMixer "default:${CardId}" - PlaybackMixerElem "Speaker Digital" + PlaybackMixerElem "Speaker Playback" } } diff --git a/ucm2/sof-soundwire/cs42l43-dmic.conf b/ucm2/sof-soundwire/cs42l43-dmic.conf index d5f895d..b68a70d 100644 --- a/ucm2/sof-soundwire/cs42l43-dmic.conf +++ b/ucm2/sof-soundwire/cs42l43-dmic.conf @@ -21,6 +21,6 @@ SectionDevice."Mic" { CapturePriority 100 CapturePCM "hw:${CardId},4" CaptureMixer "default:${CardId}" - CaptureMixerElem "cs42l43 PDM2" + CaptureMixerElem "cs42l43 Microphone" } } diff --git a/ucm2/sof-soundwire/cs42l43.conf b/ucm2/sof-soundwire/cs42l43.conf index 1702cf0..7e74fb8 100644 --- a/ucm2/sof-soundwire/cs42l43.conf +++ b/ucm2/sof-soundwire/cs42l43.conf @@ -40,7 +40,7 @@ SectionDevice."Headset" { Value { CapturePriority 200 CapturePCM "hw:${CardId},4" - CaptureMixerElem "cs42l43 Decimator 1" + CaptureMixerElem "cs42l43 Headset Microphone" JackControl "Headset Mic Jack" } } From patchwork Fri Oct 11 10:57:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maciej Strozek X-Patchwork-Id: 13832415 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 58B4FCFD341 for ; Fri, 11 Oct 2024 10:58:18 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 67D80846; Fri, 11 Oct 2024 12:58:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 67D80846 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1728644296; bh=bnC6XoBKVEBs6k1SoGJQHII4T0GLZl4Gs2hAY2zd1OE=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=JwoNJAbzoICBeJzs7hqXoIMShh/7OlvYMoYj9v4iHHoP+Q+KFOayhGl9W1If/QwTF WXwnnNufuCpMjbQB/ed4eeF4ZA3owkCv/RLnd4abKK/z+oU6ksgHHNb7f/L/qxSHq3 rC8tHCI/kvUC3m7KKC7a5fYzoAU1Cny2fioCwVAk= Received: by alsa1.perex.cz (Postfix, from userid 50401) id CD7F3F805D8; Fri, 11 Oct 2024 12:57:37 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 50C38F805E2; Fri, 11 Oct 2024 12:57:37 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 44717F80528; Fri, 11 Oct 2024 12:57:23 +0200 (CEST) Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 48F67F80496 for ; Fri, 11 Oct 2024 12:57:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 48F67F80496 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=K/bPnTjK Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49B6HNLC001583; Fri, 11 Oct 2024 05:57:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= PODMain02222019; bh=SCVTn4X1Uni6FnQclFvVa/jdaZKepvH1P7SvXe15/xI=; b= K/bPnTjKCeDH2haM3fI+EC1L6YYZu8Lo3jxpBHf5Z3yBXyNx8oSyzqHKqvUgBJ9k Kdfuh35cQBWeZFaDlPK1hdwSn336M7ro98t7DXAmsVVGnHFOFI58TjE6RXCEEP0x ClSMMGsRmCIWJorqToRx5jEW9nEB9QnurZDZYy6HBMDNwZ/Ncz6BeW/Fr/mR1AQF IJgYvCmuAHJproRxnZDLacvtPkj1Xjr5yagQhqFtbQ7JM/GfCM79+Bt4+BwV0HYZ 19OOeltk8wGCNRBzG8xkVGX9Ai32xFmpXBI/oPtanktiMHqERZCe1otc0TGPmi/F rm+v/jaaj4UfbR9kcFykuw== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 4232uy97qn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Oct 2024 05:57:17 -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.1544.9; Fri, 11 Oct 2024 11:57:15 +0100 Received: from ediswmail9.ad.cirrus.com (198.61.86.93) by anon-ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1544.9 via Frontend Transport; Fri, 11 Oct 2024 11:57:15 +0100 Received: from ediswws03.ad.cirrus.com (ediswws03.ad.cirrus.com [198.90.208.11]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id 1AE9882024B; Fri, 11 Oct 2024 10:57:15 +0000 (UTC) From: Maciej Strozek To: CC: , , "Maciej Strozek" Subject: [PATCH alsa-ucm-conf v3 2/2] sof-soundwire: Add sequence for controlling Mic Mute LED Date: Fri, 11 Oct 2024 11:57:10 +0100 Message-ID: <20241011105710.1998823-2-mstrozek@opensource.cirrus.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241011105710.1998823-1-mstrozek@opensource.cirrus.com> References: <20241011105710.1998823-1-mstrozek@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-GUID: ZRmWp74KaqWr633fBzi6_v4GRZD-MzQ4 X-Proofpoint-ORIG-GUID: ZRmWp74KaqWr633fBzi6_v4GRZD-MzQ4 X-Proofpoint-Spam-Reason: safe Message-ID-Hash: 6UHJAWBBB2YXFAVM44JKZEPGRBKHDPV6 X-Message-ID-Hash: 6UHJAWBBB2YXFAVM44JKZEPGRBKHDPV6 X-MailFrom: prvs=701410cdec=mstrozek@opensource.cirrus.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Also ensure the unused microphone is disabled so that currently used mic can fully control the LED. Signed-off-by: Maciej Strozek --- v3: Add Headset Microphone, ensure unused mic is disabled v2: no changes --- ucm2/codecs/cs42l43/init.conf | 7 +++++++ ucm2/sof-soundwire/cs42l43-dmic.conf | 2 ++ ucm2/sof-soundwire/cs42l43.conf | 1 + 3 files changed, 10 insertions(+) -- 2.39.5 diff --git a/ucm2/codecs/cs42l43/init.conf b/ucm2/codecs/cs42l43/init.conf index b2796e2..c2f52ad 100644 --- a/ucm2/codecs/cs42l43/init.conf +++ b/ucm2/codecs/cs42l43/init.conf @@ -18,3 +18,10 @@ LibraryConfig.remap.Config { } } } + +FixedBootSequence [ + exec "-/sbin/modprobe snd_ctl_led" + sysw "-/class/sound/ctl-led/mic/card${CardNumber}/attach:cs42l43 Decimator 1 Switch" + sysw "-/class/sound/ctl-led/mic/card${CardNumber}/attach:cs42l43 Decimator 3 Switch" + sysw "-/class/sound/ctl-led/mic/card${CardNumber}/attach:cs42l43 Decimator 4 Switch" +] diff --git a/ucm2/sof-soundwire/cs42l43-dmic.conf b/ucm2/sof-soundwire/cs42l43-dmic.conf index b68a70d..70ce40f 100644 --- a/ucm2/sof-soundwire/cs42l43-dmic.conf +++ b/ucm2/sof-soundwire/cs42l43-dmic.conf @@ -13,6 +13,8 @@ SectionDevice."Mic" { ] DisableSequence [ + cset "name='cs42l43 Decimator 3 Switch' 0" + cset "name='cs42l43 Decimator 4 Switch' 0" cset "name='cs42l43 DP1TX1 Input' 'None'" cset "name='cs42l43 DP1TX2 Input' 'None'" ] diff --git a/ucm2/sof-soundwire/cs42l43.conf b/ucm2/sof-soundwire/cs42l43.conf index 7e74fb8..af3fd03 100644 --- a/ucm2/sof-soundwire/cs42l43.conf +++ b/ucm2/sof-soundwire/cs42l43.conf @@ -33,6 +33,7 @@ SectionDevice."Headset" { ] DisableSequence [ + cset "name='cs42l43 Decimator 1 Switch' 0" cset "name='cs42l43 DP1TX1 Input' 'None'" cset "name='cs42l43 DP1TX2 Input' 'None'" ]