From patchwork Mon Jun 24 15:37:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Keepax X-Patchwork-Id: 13709758 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 6D896C2BD09 for ; Mon, 24 Jun 2024 15:38:37 +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 6ACB81E7; Mon, 24 Jun 2024 17:38:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6ACB81E7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1719243515; bh=1eGMXZpdQKhkhSjhppnLU4k6yRbcC0KGeLsCNDejIis=; h=From:To:CC:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=RwBFo2uZQapdknpdy/mmphwtC9/D86AicGVc0zmMEToeTGfyE6LX/Tf6F5C13/Egw U1O3x7UTFlGoIKVmoRges2SCc+anlTEU0xsyNDZY4kYsOEmSeQVG8F/bBErvjx2cjN 1TEuAdxYvPV347U2zT5oGC57lSetWvpxE/CJpTvY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0E21BF805C3; Mon, 24 Jun 2024 17:37:48 +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 49204F805E6; Mon, 24 Jun 2024 17:37:48 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 995B5F805C0; Mon, 24 Jun 2024 17:37:44 +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 E4B6FF800E4 for ; Mon, 24 Jun 2024 17:37:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E4B6FF800E4 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=j4AYQIKI 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 45O49C59019003; Mon, 24 Jun 2024 10:37:23 -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=zIU0V/MgH1+Co7IG yw3fzdEKyoM7MA9XoZ30fj3Lk1c=; b=j4AYQIKIR/1VOhrJemBRfU8JtYkCgvCg sEX9jlmxca8QrHZ+0dXOXlBfsHSP3oV/qGJnw1bzvVHR+MFOVNj5JY/4tZ8yluI6 6PSo3REV0sAU4NNN8lF9SmW+NNC9EOC4k/X2ItL+IaQUgjAAFfDQRx3UxmF/O+gZ T6FpgnOLkB+5yyOlwr9qtSCNN5U5P11zvioNtbNeGJ3ZjJMutaML3fxEb7L/xUse yYfbrmClEnUA3bVvPlesD6ttq2wWxm9SGSeSGUBqGn02mYE/++PW1STLc8k8dTiC 9cjc0PGjAoh1B2bq8obrOEjQjTaqNvfzzGt0oHgXnoNsBciCc59wFw== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3ywv0x9su9-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 24 Jun 2024 10:37:22 -0500 (CDT) Received: from ediex01.ad.cirrus.com (198.61.84.80) 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; Mon, 24 Jun 2024 16:37:19 +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; Mon, 24 Jun 2024 16:37:19 +0100 Received: from ediswws07.ad.cirrus.com (ediswws07.ad.cirrus.com [198.90.208.14]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id 9BFBA820248; Mon, 24 Jun 2024 15:37:19 +0000 (UTC) From: Charles Keepax To: CC: , , , Subject: [PATCH alsa-ucm-conf v2 1/2] sof-soundwire: Add missing match for cs42l43 speakers Date: Mon, 24 Jun 2024 16:37:18 +0100 Message-ID: <20240624153719.1053093-1-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: C2trxqQBTASs5YWwdRihYFGDMQb0GtBF X-Proofpoint-GUID: C2trxqQBTASs5YWwdRihYFGDMQb0GtBF X-Proofpoint-Spam-Reason: safe Message-ID-Hash: 5KMD2PIKHNTB7D4HYKHLY5M5Z2SC7IDP X-Message-ID-Hash: 5KMD2PIKHNTB7D4HYKHLY5M5Z2SC7IDP X-MailFrom: prvs=3905e7e383=ckeepax@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: The cs42l43 reports as cs42l43-spk in the speaker case, the regex in sof-soundwire needs updated to recognise that. Fixes: 035d9206cffd ("sof-soundwire: Add basic support for cs42l43's speaker") Signed-off-by: Charles Keepax --- No change since v1. Thanks, Charles ucm2/sof-soundwire/sof-soundwire.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ucm2/sof-soundwire/sof-soundwire.conf b/ucm2/sof-soundwire/sof-soundwire.conf index 31492e3..2f61d11 100644 --- a/ucm2/sof-soundwire/sof-soundwire.conf +++ b/ucm2/sof-soundwire/sof-soundwire.conf @@ -21,7 +21,7 @@ Define { DefineRegex { SpeakerCodec { - Regex " spk:([a-z0-9]+(-sdca)?)" + Regex " spk:([a-z0-9]+((-sdca)|(-spk))?)" String "${CardComponents}" } SpeakerChannels { From patchwork Mon Jun 24 15:37:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Keepax X-Patchwork-Id: 13709757 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 71D7EC2D0D1 for ; Mon, 24 Jun 2024 15:38:20 +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 A9BEF851; Mon, 24 Jun 2024 17:38:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A9BEF851 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1719243493; bh=0s/P6tQyVgfOjIMVFT5641OfgAy/JT433Ll7izxB0ZU=; 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=TjP5mSukmjynUJgbDWGQ++5DtMJTYX3O+3k14CfGeZEMA9lqzdwisFjjeTTBVWYNV S2VwKjbcMN8LzueU8fEZo7CvMxt5i6kzi1+uwUE5Frm75UqjZFC694xGtzbMsV0ODO h758Hg3yTL60VkCBiFl1M7cgr+D8ubloVIrR+m1k= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5D637F805BB; Mon, 24 Jun 2024 17:37:42 +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 D9735F805BE; Mon, 24 Jun 2024 17:37:41 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 802DAF804D6; Mon, 24 Jun 2024 17:37:35 +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 7C914F800ED for ; Mon, 24 Jun 2024 17:37:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7C914F800ED 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=ZeS1n9X3 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 45O49C58019003; Mon, 24 Jun 2024 10:37:22 -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=JIBBI7ri/JiGWlrbGC0yAtwpafwJ8QnAF4gdojL3wyQ=; b= ZeS1n9X3Pi9GTu0OIFbwpvwDA399+Ggs0zAZzF8SQSlDlO6vx28Rb7FmIML966fc ePm55YmmqJYAp9YLWxOllwN3X+Y8mWbhWKVC9+EkdOB/aVTKFwA6XPi8stMY7yDW IejBVAqqg0sTm7wrmDmOeq6OK8daffPGsV7TSgDOzXUNZCB8gJ9xz+ISFmPQH6OA robucayr7S/mpkZjwMIgPlAupAo6g3Tm/O91tJ5feGDsJLcbSCnhlq2hnup/Ruca ihlWBjWn4pOdF8xv2XZKd0+1fUkaTfmOUc5gu2DSHFEaMBEX9h+yQH1KeA4vXcXs LRHprOjG5tv8kj0jaPXCFg== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3ywv0x9su9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 24 Jun 2024 10:37:22 -0500 (CDT) Received: from ediex01.ad.cirrus.com (198.61.84.80) 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; Mon, 24 Jun 2024 16:37:19 +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; Mon, 24 Jun 2024 16:37:19 +0100 Received: from ediswws07.ad.cirrus.com (ediswws07.ad.cirrus.com [198.90.208.14]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id AA75D82024D; Mon, 24 Jun 2024 15:37:19 +0000 (UTC) From: Charles Keepax To: CC: , , , Subject: [PATCH alsa-ucm-conf v2 2/2] sof-soundwire: Add support for cs42l43/cs35l56 bridge configuration Date: Mon, 24 Jun 2024 16:37:19 +0100 Message-ID: <20240624153719.1053093-2-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240624153719.1053093-1-ckeepax@opensource.cirrus.com> References: <20240624153719.1053093-1-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: KhaWOxRabp-kXA9tQZ0LXn9GNafY31aK X-Proofpoint-GUID: KhaWOxRabp-kXA9tQZ0LXn9GNafY31aK X-Proofpoint-Spam-Reason: safe Message-ID-Hash: RSTEXYFU3YFHF6YXZFIMTCAQJFCZWMGA X-Message-ID-Hash: RSTEXYFU3YFHF6YXZFIMTCAQJFCZWMGA X-MailFrom: prvs=3905e7e383=ckeepax@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: The cs42l43 has both a SPI master and an I2S interface, in some configurations 2 cs35l56 amplifiers are connected to these to provide bass speakers whilst the cs42l43's internal speaker drivers are used for the tweeters. Add UCM configuration for this type of system. Signed-off-by: Charles Keepax --- Changes since v1: - Update control names to just "Speaker Switch/Volume" Thanks, Charles ucm2/sof-soundwire/cs35l56-bridge.conf | 61 ++++++++++++++++++++++++++ ucm2/sof-soundwire/sof-soundwire.conf | 2 +- 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 ucm2/sof-soundwire/cs35l56-bridge.conf diff --git a/ucm2/sof-soundwire/cs35l56-bridge.conf b/ucm2/sof-soundwire/cs35l56-bridge.conf new file mode 100644 index 0000000..dcf5e5c --- /dev/null +++ b/ucm2/sof-soundwire/cs35l56-bridge.conf @@ -0,0 +1,61 @@ +# Use case Configuration for sof-soundwire card + +LibraryConfig.remap.Config { + ctl.default.map { + "name='Speaker Switch'" { + "name='AMPL Speaker Switch'".vindex.0 0 + "name='AMPR Speaker Switch'".vindex.1 0 + } + "name='Speaker Volume'" { + "name='AMPL Speaker Volume'".vindex.0 0 + "name='AMPR Speaker Volume'".vindex.1 0 + } + } +} + +SectionDevice."Speaker" { + Comment "Speaker" + + ConflictingDevice [ + "Headphones" + ] + + EnableSequence [ + cset "name='cs42l43 Speaker L Input 1' 'ASPRX1'" + cset "name='cs42l43 Speaker R Input 1' 'ASPRX2'" + cset "name='cs42l43 ASPTX1 Input' 'DP5RX1'" + cset "name='cs42l43 ASPTX2 Input' 'DP5RX2'" + + cset "name='AMPL ASP1 TX1 Source' 'DSP1TX1'" + cset "name='AMPL ASP1 TX2 Source' 'None'" + cset "name='AMPL ASP1 TX3 Source' 'None'" + cset "name='AMPL ASP1 TX4 Source' 'None'" + + cset "name='AMPR ASP1 TX1 Source' 'None'" + cset "name='AMPR ASP1 TX2 Source' 'DSP1TX1'" + cset "name='AMPR ASP1 TX3 Source' 'None'" + cset "name='AMPR ASP1 TX4 Source' 'None'" + + cset "name='cs42l43 Speaker Digital Switch' 1" + cset "name='cs42l43 Speaker Digital Volume' 128" + ] + + DisableSequence [ + cset "name='cs42l43 Speaker Digital Switch' 0" + + cset "name='AMPL ASP1 TX2 Source' 'None'" + cset "name='AMPR ASP1 TX1 Source' 'None'" + + cset "name='cs42l43 ASPTX1 Input' 'None'" + cset "name='cs42l43 ASPTX2 Input' 'None'" + cset "name='cs42l43 Speaker L Input 1' 'None'" + cset "name='cs42l43 Speaker R Input 1' 'None'" + ] + + Value { + PlaybackPriority 100 + PlaybackPCM "hw:${CardId},0" + PlaybackMixer "default:${CardId}" + PlaybackMixerElem "Speaker" + } +} diff --git a/ucm2/sof-soundwire/sof-soundwire.conf b/ucm2/sof-soundwire/sof-soundwire.conf index 2f61d11..2ede1cd 100644 --- a/ucm2/sof-soundwire/sof-soundwire.conf +++ b/ucm2/sof-soundwire/sof-soundwire.conf @@ -21,7 +21,7 @@ Define { DefineRegex { SpeakerCodec { - Regex " spk:([a-z0-9]+((-sdca)|(-spk))?)" + Regex " spk:([a-z0-9]+((-sdca)|(-spk)|(-bridge))?)" String "${CardComponents}" } SpeakerChannels {