Received: by 2002:a05:7208:3188:b0:7e:5202:c8b4 with SMTP id r8csp922829rbd; Fri, 23 Feb 2024 07:39:40 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVk2yAYvzboDutJ5xhuZIteES1zryz1aJPJRlpasPVUc0TikkXcmQaYvb8C9UHLCKwuG6VSyQSNFp+ZsEc2fOAwoLqtaJaDcN8yGAH8jg== X-Google-Smtp-Source: AGHT+IE3XQ13+PW+pFW5b7wcD+xwtUsOi9oGTNn+Py7dQAEiDL/SdRhDPpNOmMrSJ+usysp6JZ/s X-Received: by 2002:a05:6a00:2190:b0:6e4:7669:b8f6 with SMTP id h16-20020a056a00219000b006e47669b8f6mr187825pfi.7.1708702780394; Fri, 23 Feb 2024 07:39:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708702780; cv=pass; d=google.com; s=arc-20160816; b=Lbv9ZFgjnjm0Lt7HuF4S6ku9cJAqHoAQ5qn/HdF30FW1u1Vo4+p1wD9aOUMqrpY5c/ J6DvhbIDqnXnLs69sRG2OKDq9WkkqwbK8NZu3TREFTH8zUd/yGF8Ta40/N3wUWFsrQtR uoqrfE0W6ME948rEaOuXhC7MBTYHoTCri/Viz8ncNk+4S+wK1cFN1MYybXPAw7862JPl lASQaXsi/eC3gF5QCDon0dR964kzJ5HDXg4FctfB2DlElsX5JskmAGiMhPAC29DuFRo2 UhY/U4/FShTUyxf58d//Fz9j1iMRQh2TW7ejSgSukTTdDOxx/OyYRvKNhgVMHO2lpMhn 7u1g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=Ch7NU+9X8vJmYJdz6CxoEcg5BbpkVmYbEwAr2DuQhBU=; fh=x7+OzJIeN5mJd4Ln+gczq2EazpTbLb1MfGhRMe/0Fjo=; b=joKz+eEPE0X8VpST6O3O/b+jdEyf3ytML2gwUSQgHyFEInxqqRtjbC/pTi0v82c6Zx 8m1GA5eyfrhfGCrochXalZFIv9jX/iFslCh76k2gIq5d2ogatSz/c7gZOD7TdVVk9Axp pAbgVYpX/x0/RNElUiYUb0QyhymPmexJWjzT92xil24crjaYjumseysqJSFdBVpGtROS eB1kXtilCaMl/mterQ+NJPRQM1e6izLC5+dcxzUtODDLTwlrpf3IrLHh2ETJy/eOw5Km gjSt/XPHJCp04MgdaZLiS7ao/avJ3PL61HR7zg8ZdDH1gx/rpfzfetDCb3QEOEGGS+cW aA7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=JtEzCVL5; arc=pass (i=1 spf=pass spfdomain=opensource.cirrus.com dkim=pass dkdomain=cirrus.com dmarc=pass fromdomain=opensource.cirrus.com); spf=pass (google.com: domain of linux-kernel+bounces-78621-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78621-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id p12-20020a056a000b4c00b006e4e8fa7a22si717418pfo.1.2024.02.23.07.39.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 07:39:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78621-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=JtEzCVL5; arc=pass (i=1 spf=pass spfdomain=opensource.cirrus.com dkim=pass dkdomain=cirrus.com dmarc=pass fromdomain=opensource.cirrus.com); spf=pass (google.com: domain of linux-kernel+bounces-78621-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78621-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1E80D283712 for ; Fri, 23 Feb 2024 15:39:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4553B8287D; Fri, 23 Feb 2024 15:39:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="JtEzCVL5" 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 smtp.subspace.kernel.org (Postfix) with ESMTPS id D47275D750; Fri, 23 Feb 2024 15:39:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.152.168 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708702773; cv=none; b=bWyUANVODDSm1gh5ts9z2Kqohs44/oX7VTI+qEVt3WQfmOUrWhzl2o+pWZO1H07M5oSTtWS9vxzayCYZhmJPdfiTngpVDkDgBmsm13AoFe+hqdzBK+99SDqeJwkwpc27lMWskx1rIFQa7ZTS1rWBvwwMxCvjvQc7xID4SpDS+GA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708702773; c=relaxed/simple; bh=dC5mGTNTyyY3AWeZcJmn6etsgLzZ5Hz6FQdLDaOGHdA=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=IGRRrWtgIlW10iPhdCCcLrzdJqsm/vUEiu4Dkfq+r5Y/Ahh4cWnWA6yhJYrHrMn3FpPokOYqFd1GHxptk5tXKSXkJshJyWNbpcWIEzyokVyZacdjVsQxjB4YKNK5BljsQneVTsu/2GCrhq54JKJlMDYDJSOKzNQ86Wa53LP++Kc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com; spf=pass smtp.mailfrom=opensource.cirrus.com; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b=JtEzCVL5; arc=none smtp.client-ip=67.231.152.168 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=opensource.cirrus.com Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41N8gUBS005505; Fri, 23 Feb 2024 09:39:12 -0600 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=C h7NU+9X8vJmYJdz6CxoEcg5BbpkVmYbEwAr2DuQhBU=; b=JtEzCVL5SjrHWyJqX ink/zbuE2+SjAQRASZQBZY67wrKG5cpMAdJ6VZxymBCJg2uLmYBUsKk+pZyq/WrQ BEewAz+b45Z8kM/LxVDUKNR3cmSpmaHJVc4poM5EQhsq7HKxtZ0sYwSGD7pQR7D0 iDRadZRc7iy7YHnRq4Hmz37YGEfZGSno67JyRSW2gblah6aBDEhRxbXOJNgtpTM1 uIiv1DhkZ0gZRyh87Bv8Fjd3MXDGMRT5HQgwB/uQBbbc62R8b8TQqmM+BVGCesFp dcxa+DjUWIZwUV3PuZhVBn+w/pMBjFprwMfIzA8sn0b7l3QKgUzPQqUFlBv11mSS 50x1w== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3wd205m5pe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Feb 2024 09:39:12 -0600 (CST) 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.40; Fri, 23 Feb 2024 15:39:10 +0000 Received: from ediswmail9.ad.cirrus.com (198.61.86.93) 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.40 via Frontend Transport; Fri, 23 Feb 2024 15:39:10 +0000 Received: from ediswws06.ad.cirrus.com (ediswws06.ad.cirrus.com [198.90.208.18]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id 61BCD820246; Fri, 23 Feb 2024 15:39:10 +0000 (UTC) From: Richard Fitzgerald To: , CC: , , , , "Richard Fitzgerald" Subject: [PATCH v2 0/6] ALSA: cs35l56: Apply calibration from EFI Date: Fri, 23 Feb 2024 15:39:04 +0000 Message-ID: <20240223153910.2063698-1-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: 30I-KLe2jTA_RYiFaB2G9pall02cT_eX X-Proofpoint-GUID: 30I-KLe2jTA_RYiFaB2G9pall02cT_eX X-Proofpoint-Spam-Reason: safe Factory calibration of the speakers stores the calibration information into an EFI variable. This set of patches adds support for applying speaker calibration data from that EFI variable. The HDA patch (#5) depends on the ASoC patches #2 and #3 Patch #6 is a KUnit test for the new cs-amp-lib library. Richard Fitzgerald (6): ASoC: wm_adsp: Add wm_adsp_start() and wm_adsp_stop() ASoC: cs-amp-lib: Add helpers for factory calibration data ASoC: cs35l56: Add helper functions for amp calibration ASoC: cs35l56: Apply amp calibration from EFI data ALSA: hda: cs35l56: Apply amp calibration from EFI data ASoC: cs-amp-lib: Add KUnit test for calibration helpers include/sound/cs-amp-lib.h | 66 +++ include/sound/cs35l56.h | 10 + sound/pci/hda/Kconfig | 2 + sound/pci/hda/cs35l56_hda.c | 39 +- sound/soc/codecs/Kconfig | 17 + sound/soc/codecs/Makefile | 4 + sound/soc/codecs/cs-amp-lib-test.c | 715 +++++++++++++++++++++++++++++ sound/soc/codecs/cs-amp-lib.c | 277 +++++++++++ sound/soc/codecs/cs35l56-sdw.c | 20 + sound/soc/codecs/cs35l56-shared.c | 83 ++++ sound/soc/codecs/cs35l56.c | 44 +- sound/soc/codecs/wm_adsp.c | 27 +- sound/soc/codecs/wm_adsp.h | 2 + 13 files changed, 1287 insertions(+), 19 deletions(-) create mode 100644 include/sound/cs-amp-lib.h create mode 100644 sound/soc/codecs/cs-amp-lib-test.c create mode 100644 sound/soc/codecs/cs-amp-lib.c -- 2.30.2