Message ID | 20231219162232.790358-3-sbinding@opensource.cirrus.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-5550-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp2055951dyi; Tue, 19 Dec 2023 08:24:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IFaglTM3taKIZ9zWhN8tPFp0awdRBaInkp6LneEe/2JMwTNmDG4IXE+/w3QoOSMjFYLcQBl X-Received: by 2002:a05:6512:aca:b0:50b:e056:396a with SMTP id n10-20020a0565120aca00b0050be056396amr10066941lfu.28.1703003078187; Tue, 19 Dec 2023 08:24:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703003078; cv=none; d=google.com; s=arc-20160816; b=wSx2BwqknkU75E+H/nQTD+yA4UxIAJZvXi8sP+EU2XIKBxeYMF/cbdUUP/VuKwU5Sk y5CqzkMkCVP1iuIMrcIGHV0PU8jaB3bgW9TpefSZ1ZFddZ/adv+2nfvURM/fktxhmXoY w8ul554ZvTZFcC/kEn9sc+v/n4iWpSAvB+kLU+hy2r2mDUpyemoHynFpMRx395ls1yu7 KKqrS1mPM2RoIV5/WT+pCZmw/XJ+yaWhWUwr3LDuiNW7+LMz0WPNwQwSHrXSqteFcySn tL35NcTpLrgR28WZNEb2cCD3UcEGCVvzrYJ1w1bKP2nNmtZBuYWM0Czw5otAOxp0KTod CMhQ== ARC-Message-Signature: i=1; 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=BoVaGh/eH7nGZeEelaU0i1uh/HBS9k3X4xBMik9sYek=; fh=H3Mw6n1UeURws4rS8ov/fRZAyW1iKlkS4ByHNY3u2xA=; b=aChpb9zYiyqSFNrzqRmvZ9cru9h+RYq6NuggGzQsW1uh9Qny0L7raDrra1C5281qcW CE8wWxTtSyfondMbL6uF0n0xXOewLcbF2BKVIIW7D37yyi/6VNLKx1BUfbQOpHY5FQiu AmGkjofOeiSmuRyyOQmOVTQ+bWzswY+obGPPUCf4pNp0yISDh4IY3ymwBg7fv/oRDIJ4 wZz3M02/kkqRsN1Ti7iGTe3Qe/fU0rk/NbFKgrJfZgeIn37Wydplk1TaVt1G/Aah27Th l24fDGeUXhtxDJYAgB4dHSECaCHSwajjyIELdJuyilabWEA0CaXmoz217OCvscAzRz6L Jfmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=WMCIphRa; spf=pass (google.com: domain of linux-kernel+bounces-5550-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5550-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id m9-20020a056402510900b0054cb9717a33si11022066edd.205.2023.12.19.08.24.37 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 08:24:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5550-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=WMCIphRa; spf=pass (google.com: domain of linux-kernel+bounces-5550-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5550-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id BFC0A1F25803 for <ouuuleilei@gmail.com>; Tue, 19 Dec 2023 16:24:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 49CAB1D54B; Tue, 19 Dec 2023 16:23:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="WMCIphRa" X-Original-To: linux-kernel@vger.kernel.org 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 smtp.subspace.kernel.org (Postfix) with ESMTPS id 79AA920319; Tue, 19 Dec 2023 16:23:06 +0000 (UTC) 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 (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BJ6vo3B022423; Tue, 19 Dec 2023 10:22:48 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= PODMain02222019; bh=BoVaGh/eH7nGZeEelaU0i1uh/HBS9k3X4xBMik9sYek=; b= WMCIphRaeyGQRQFZZyGmYxGArGpBbrgP27CTR5/VHMj25AcWvM4YvtTF3Wsvf935 ZfZeJPYbKIZIH+enzPcKCsmWQO2MEUFvFj5pqGooSpJqDxlKLq4CiLMXbaXINekM Ebu0qAaMA6CQ8J8q/Tf/E/WOxoy/dM9P1LpYbvKhdVhl5WI5bSpjwT9YVlz1dEqm oHD2vqrDT5loHhvUyYbDFtVz1QpoC/nN3MOrajSLp0fG+6la04+/J+/S+Jc72hJ1 iBwrY+t/UR0FHDooruvX6vV+FFMn2jQiLEkCK0/NyZ9sQk8ezv0sR3UOWFAtZRF+ OpVY4TgSgRuEpPTm/CeWFw== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3v1a6249gs-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Dec 2023 10:22:48 -0600 (CST) 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.40; Tue, 19 Dec 2023 16:22:43 +0000 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.40 via Frontend Transport; Tue, 19 Dec 2023 16:22:43 +0000 Received: from sbinding-cirrus-dsktp2.ad.cirrus.com (unknown [198.90.238.77]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 451DE11D1; Tue, 19 Dec 2023 16:22:43 +0000 (UTC) From: Stefan Binding <sbinding@opensource.cirrus.com> To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com> CC: <alsa-devel@alsa-project.org>, <linux-sound@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <patches@opensource.cirrus.com>, "Stefan Binding" <sbinding@opensource.cirrus.com>, kernel test robot <lkp@intel.com> Subject: [PATCH v1 2/2] ALSA: hda: cs35l41: Only add SPI CS GPIO if SPI is enabled in kernel Date: Tue, 19 Dec 2023 16:22:32 +0000 Message-ID: <20231219162232.790358-3-sbinding@opensource.cirrus.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231219162232.790358-1-sbinding@opensource.cirrus.com> References: <20231219162232.790358-1-sbinding@opensource.cirrus.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: yc_jk4S_5prVHkTVfhZhHYzieyQxFs6b X-Proofpoint-ORIG-GUID: yc_jk4S_5prVHkTVfhZhHYzieyQxFs6b X-Proofpoint-Spam-Reason: safe X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785728155927628474 X-GMAIL-MSGID: 1785728155927628474 |
Series |
Minor fixes for CS35L41 HDA Property driver
|
|
Commit Message
Stefan Binding
Dec. 19, 2023, 4:22 p.m. UTC
If CONFIG_SPI is not set in the kernel, there is no point in trying
to set the chip selects. We can selectively compile it.
Fixes: 8c4c216db8fb ("ALSA: hda: cs35l41: Add config table to support many laptops without _DSD")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202312192256.lJelQEoZ-lkp@intel.com/
Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
---
sound/pci/hda/cs35l41_hda_property.c | 3 +++
1 file changed, 3 insertions(+)
Comments
On Tue, 19 Dec 2023 17:22:32 +0100, Stefan Binding wrote: > > If CONFIG_SPI is not set in the kernel, there is no point in trying > to set the chip selects. We can selectively compile it. I guess it should with IS_REACHABLE() instead of IS_ENABLED()? It can be still CONFIG_SPI=m while CONFIG_SND_HDA_*=y. thanks, Takashi > > Fixes: 8c4c216db8fb ("ALSA: hda: cs35l41: Add config table to support many laptops without _DSD") > Reported-by: kernel test robot <lkp@intel.com> > Closes: https://lore.kernel.org/oe-kbuild-all/202312192256.lJelQEoZ-lkp@intel.com/ > > Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> > --- > sound/pci/hda/cs35l41_hda_property.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/sound/pci/hda/cs35l41_hda_property.c b/sound/pci/hda/cs35l41_hda_property.c > index 73b304e6c83c..194e1179a253 100644 > --- a/sound/pci/hda/cs35l41_hda_property.c > +++ b/sound/pci/hda/cs35l41_hda_property.c > @@ -210,6 +210,8 @@ static int generic_dsd_config(struct cs35l41_hda *cs35l41, struct device *physde > > if (cfg->bus == SPI) { > cs35l41->index = id; > + > +#if IS_ENABLED(CONFIG_SPI) > /* > * Manually set the Chip Select for the second amp <cs_gpio_index> in the node. > * This is only supported for systems with 2 amps, since we cannot expand the > @@ -249,6 +251,7 @@ static int generic_dsd_config(struct cs35l41_hda *cs35l41, struct device *physde > spi_setup(spi); > } > } > +#endif > } else { > if (cfg->num_amps > 2) > /* > -- > 2.34.1 >
On Wed, 20 Dec 2023 09:10:37 +0100, Takashi Iwai wrote: > > On Tue, 19 Dec 2023 17:22:32 +0100, > Stefan Binding wrote: > > > > If CONFIG_SPI is not set in the kernel, there is no point in trying > > to set the chip selects. We can selectively compile it. > > I guess it should with IS_REACHABLE() instead of IS_ENABLED()? > It can be still CONFIG_SPI=m while CONFIG_SND_HDA_*=y. In anyway, I applied the patches as is for now, as it should work in most cases. Let's see whether the use of IS_REACHABLE() is required. thanks, Takashi
diff --git a/sound/pci/hda/cs35l41_hda_property.c b/sound/pci/hda/cs35l41_hda_property.c index 73b304e6c83c..194e1179a253 100644 --- a/sound/pci/hda/cs35l41_hda_property.c +++ b/sound/pci/hda/cs35l41_hda_property.c @@ -210,6 +210,8 @@ static int generic_dsd_config(struct cs35l41_hda *cs35l41, struct device *physde if (cfg->bus == SPI) { cs35l41->index = id; + +#if IS_ENABLED(CONFIG_SPI) /* * Manually set the Chip Select for the second amp <cs_gpio_index> in the node. * This is only supported for systems with 2 amps, since we cannot expand the @@ -249,6 +251,7 @@ static int generic_dsd_config(struct cs35l41_hda *cs35l41, struct device *physde spi_setup(spi); } } +#endif } else { if (cfg->num_amps > 2) /*