From patchwork Mon Sep 18 09:51:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 13389356 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 A5CAEC46CA1 for ; Mon, 18 Sep 2023 09:53:34 +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 1624A826; Mon, 18 Sep 2023 11:52:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1624A826 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1695030812; bh=9S68Btn9g/0RkNzUHTrKwcpTkNfab3QVtRX2qe80Qzo=; h=From:To:CC:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=R5tVTki8469LLCf6MgyZR5hmZzYFDYuCzJkJbkxC+2SRLgdyfTN52X2pP1mPc241T ecscTJ+7M/QNLNbeuuknGoGGvZyEcZ/rNXeRZVn8LM4wtAIpDmO26gAPm84f1jeGcY cpIB76xGQE9DpvF9i3kdPh7M2v/osr28siCpliGk= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7C075F80571; Mon, 18 Sep 2023 11:51:51 +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 34457F80564; Mon, 18 Sep 2023 11:51:51 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2DEAAF8025A; Mon, 18 Sep 2023 11:51:47 +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 9B6A6F80125 for ; Mon, 18 Sep 2023 11:51:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9B6A6F80125 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=gfd3uiuO 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 38I6K0DO017792; Mon, 18 Sep 2023 04:51:35 -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=O ekxzRcVaZo051lSiRKtMaMlNmQuGAT/oxmqstQ4suc=; b=gfd3uiuOnWYePPdhl bCXvCzRs1/ROHAIha7pMHyteS/I6mlruBwTeyXRtpgxlgeLKNQXE907/VaAk7CTM OvccVfFLSL6ymPd2HLqjpBw4h/OvRDxRspctV1f6eS8Bsh3zqt1DY45BbCt9LTLV DDUNDmkS9RMMTCDYMHs3kO3z222qocZOR3MO4XY3ReiEFxVr3odd8f8qSK+XQltL w+xDCkMRPKVx8rLyc+NeplW8p3G0LWGRm+tWZiW/aqlU9ldAvZmjOcurFg+ZfwiF F/ashZ07xeRG3U1oZ2LVtRdILoWjjPyJHWfuFAxt5WyfSmhUNcL5bjuyc7SDXHcZ SplWQ== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3t59ry256c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Sep 2023 04:51:35 -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.1118.37; Mon, 18 Sep 2023 10:51:33 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1118.37 via Frontend Transport; Mon, 18 Sep 2023 10:51:33 +0100 Received: from EDIN4L06LR3.ad.cirrus.com (EDIN4L06LR3.ad.cirrus.com [198.90.238.137]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 9DE0611AA; Mon, 18 Sep 2023 09:51:32 +0000 (UTC) From: Richard Fitzgerald To: CC: , , , Richard Fitzgerald Subject: [PATCH 0/2] ALSA: hda: cs35l56: Handle speaker id GPIOs Date: Mon, 18 Sep 2023 10:51:27 +0100 Message-ID: <20230918095129.440-1-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Proofpoint-GUID: lvXNau_bsidQSZVhdqEAskyfFpke2A4r X-Proofpoint-ORIG-GUID: lvXNau_bsidQSZVhdqEAskyfFpke2A4r X-Proofpoint-Spam-Reason: safe Message-ID-Hash: OO3XEVRYFJAK6MT6AW4SB2XY3NPDNAHW X-Message-ID-Hash: OO3XEVRYFJAK6MT6AW4SB2XY3NPDNAHW X-MailFrom: prvs=462534807c=rf@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.8 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: Some manufacturers use multiple sources of speakers. Motherboard GPIOs are set to indicate which type of speaker is fitted so that the correct tunings can be loaded. Patch #1 adds support for this and patch #2 adds a KUnit test for the new code. Richard Fitzgerald (2): ALSA: hda: cs35l56: Add support for speaker id ALSA: hda: cirrus_scodec: Add KUnit test MAINTAINERS | 1 + sound/pci/hda/Kconfig | 17 ++ sound/pci/hda/Makefile | 4 + sound/pci/hda/cirrus_scodec.c | 73 ++++++ sound/pci/hda/cirrus_scodec.h | 13 + sound/pci/hda/cirrus_scodec_test.c | 370 +++++++++++++++++++++++++++++ sound/pci/hda/cs35l56_hda.c | 24 +- 7 files changed, 501 insertions(+), 1 deletion(-) create mode 100644 sound/pci/hda/cirrus_scodec.c create mode 100644 sound/pci/hda/cirrus_scodec.h create mode 100644 sound/pci/hda/cirrus_scodec_test.c