From patchwork Mon May 27 19:35:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 799266 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 7253BC25B74 for ; Mon, 27 May 2024 19:41:13 +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 B706DDEC; Mon, 27 May 2024 21:41:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B706DDEC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1716838871; bh=ih6BwwZkBO8p6XkXeac4kg6IsIuNg8xO76PcQYXBbiM=; 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=DChrI2ptTDOawaOhvIanOsddN+FmUHgXz81DMgpsXmYKlY+mGdBMRavRqxcshFyH7 O069SKixrAzXFgJR6f0RjB9KtkFdzhUw8IVvXFDmWGcpVpZt/8QWOdShOxbnEoYFKQ DXPVOY4Nnw9ms8tQmmJsFkIh5u/Pc7kpN8oIFhTQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6B423F80603; Mon, 27 May 2024 21:38:16 +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 EBCACF805FE; Mon, 27 May 2024 21:38:15 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8BE69F805B2; Mon, 27 May 2024 21:38:11 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 6481DF800BA for ; Mon, 27 May 2024 21:36:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6481DF800BA Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=FQ8q2Jks DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716838575; x=1748374575; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ih6BwwZkBO8p6XkXeac4kg6IsIuNg8xO76PcQYXBbiM=; b=FQ8q2Jks+e4VgAn/5aX0h/0YG4r4sZXX7TTSfsjTcyjgnMlE21H6bMzE qazpeL8ti32XEjf9uUMkryVBaMQUHKsqSG+iLWgOcRB0jmBSfinKfReah HXzaz2YbFQQqIhSCqMNZq9koIDq9Sa3L+stKQtvQLU87Y2M6MJYmIzcnL i0UeO+lq7Te2xjED/5R59WPyITzf2qMsJ8OldaxVl2YmjT/bjc8ECg6a/ kB0RR05TZynKM/d6UtY5PrM02DT/eU3Uz5zfKgkteoXjwSbDxCkdaCB4p Gxr85e94bg7JzlU4mr+zAwFeV6Ff4gEJYpvautjgYMJunIzCV+AnPL/xM g==; X-CSE-ConnectionGUID: tYkSp00pT5O2ft0G7QSp5w== X-CSE-MsgGUID: 44nX6E7TQB+pUjZNNKWq+A== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13339315" X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="13339315" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:09 -0700 X-CSE-ConnectionGUID: jcxOIgDSTH6Bp95YNKwlpQ== X-CSE-MsgGUID: gJYznnWgS3mQERdT56hDTw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="58029753" Received: from unknown (HELO pbossart-mobl6.lan) ([10.125.110.221]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:08 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Bard Liao , =?utf-8?q?P=C3=A9ter_Ujfalusi?= , Pierre-Louis Bossart Subject: [PATCH 01/18] ASoC: Intel: sof_sdw_cs42l42: use dai parameter Date: Mon, 27 May 2024 14:35:35 -0500 Message-ID: <20240527193552.165567-2-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> References: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: KRAAUC2ANXUMYR66Q46KSM2M64XEVXCV X-Message-ID-Hash: KRAAUC2ANXUMYR66Q46KSM2M64XEVXCV X-MailFrom: pierre-louis.bossart@linux.intel.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: From: Bard Liao The dai is passed from the parameter. We don't need to find the dai by name. Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_sdw_cs42l42.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/sound/soc/intel/boards/sof_sdw_cs42l42.c b/sound/soc/intel/boards/sof_sdw_cs42l42.c index fdb75fc71c26..fc18e4aa3dbe 100644 --- a/sound/soc/intel/boards/sof_sdw_cs42l42.c +++ b/sound/soc/intel/boards/sof_sdw_cs42l42.c @@ -36,24 +36,15 @@ static struct snd_soc_jack_pin cs42l42_jack_pins[] = { }, }; -static const char * const jack_codecs[] = { - "cs42l42" -}; - int cs42l42_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) { struct snd_soc_card *card = rtd->card; struct mc_private *ctx = snd_soc_card_get_drvdata(card); - struct snd_soc_dai *codec_dai; struct snd_soc_component *component; struct snd_soc_jack *jack; int ret; - codec_dai = get_codec_dai_by_name(rtd, jack_codecs, ARRAY_SIZE(jack_codecs)); - if (!codec_dai) - return -EINVAL; - - component = codec_dai->component; + component = dai->component; card->components = devm_kasprintf(card->dev, GFP_KERNEL, "%s hs:cs42l42", card->components); From patchwork Mon May 27 19:35:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 799273 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 337A9C25B78 for ; Mon, 27 May 2024 19:37:21 +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 CE5E3950; Mon, 27 May 2024 21:37:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CE5E3950 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1716838638; bh=e/LHQnLLC8ZkQM3sl9or4MpWdmenS3A2f/+pElCHaCY=; 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=DBiTtsn3KVnCF/ecFVi9nk6lsN1Fr2sVy6ImCtf9UWgNQwAHjhaqvZBIolW2Ta/ZU eaoya7lh/4T7SNeWmITpfGOQhFI3htuHTvnjQqnocoaMiX9b9UhD9lQaOrxp+xgfD7 jAmtwVT2sFsB34zZWsI35UiCg3ODCpd2nyrrC+aQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 90C8DF805D5; Mon, 27 May 2024 21:36:32 +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 0D40EF805BF; Mon, 27 May 2024 21:36:32 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 39F85F805AE; Mon, 27 May 2024 21:36:28 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 BFEE6F80149 for ; Mon, 27 May 2024 21:36:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BFEE6F80149 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=NP7SYuKK DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716838576; x=1748374576; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=e/LHQnLLC8ZkQM3sl9or4MpWdmenS3A2f/+pElCHaCY=; b=NP7SYuKKdGNs1iJoYG4lFaVE8sBD3XkPQbdOMwOHAS1GXxhLYg0tbKac 3detg9CiFlr+MevKerRK7BDqCA1Fvp83g7wZCnVEVFn348u8WausVCWjd 72NJh+D+Xn92IA6VLp+a+kQYI5NvK7GwVLnwpUSv6XgAOcIvhvuv5HinF dG73mxljF+BBv5i7vWc8tCYGq7TNBTUVnZGaQqUFK/6d15jkxl6Lmo2kr RN701Ri8JlQV0cBJohPwYHYD4pLcCIr8niUmlEyEU+TCbrnjBuFMjP2JN 8WoC/RX9dUASj7Lcs/mKZcwgdbjxHha5UBEPmWM86TZxIHiOc7Ny8z9Vd A==; X-CSE-ConnectionGUID: C317Gw73QXuDTl03nXLuWQ== X-CSE-MsgGUID: 6aeaoGHaTcW8u+BVoQnFnw== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13339320" X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="13339320" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:10 -0700 X-CSE-ConnectionGUID: w2+WP+uwTbefPwzVVWdOFQ== X-CSE-MsgGUID: AY/MPoRWTWCFt1uK1ZgW5w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="58029755" Received: from unknown (HELO pbossart-mobl6.lan) ([10.125.110.221]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:09 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Bard Liao , =?utf-8?q?P=C3=A9ter_Ujfalusi?= , Pierre-Louis Bossart Subject: [PATCH 02/18] ASoC: Intel: sof_sdw_rt711: use dai parameter Date: Mon, 27 May 2024 14:35:36 -0500 Message-ID: <20240527193552.165567-3-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> References: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: STPDWD75AS7FSVPWROPPUHRT4UKX2OKS X-Message-ID-Hash: STPDWD75AS7FSVPWROPPUHRT4UKX2OKS X-MailFrom: pierre-louis.bossart@linux.intel.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: From: Bard Liao The dai is passed from the parameter. We don't need to find the dai by name. Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_sdw_rt711.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/sound/soc/intel/boards/sof_sdw_rt711.c b/sound/soc/intel/boards/sof_sdw_rt711.c index d49e5aa786c3..60ff4d88e2dc 100644 --- a/sound/soc/intel/boards/sof_sdw_rt711.c +++ b/sound/soc/intel/boards/sof_sdw_rt711.c @@ -59,24 +59,15 @@ static struct snd_soc_jack_pin rt711_jack_pins[] = { }, }; -static const char * const jack_codecs[] = { - "rt711" -}; - int rt711_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) { struct snd_soc_card *card = rtd->card; struct mc_private *ctx = snd_soc_card_get_drvdata(card); - struct snd_soc_dai *codec_dai; struct snd_soc_component *component; struct snd_soc_jack *jack; int ret; - codec_dai = get_codec_dai_by_name(rtd, jack_codecs, ARRAY_SIZE(jack_codecs)); - if (!codec_dai) - return -EINVAL; - - component = codec_dai->component; + component = dai->component; card->components = devm_kasprintf(card->dev, GFP_KERNEL, "%s hs:rt711", card->components); From patchwork Mon May 27 19:35:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 799896 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 B9EA2C25B74 for ; Mon, 27 May 2024 19:37:33 +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 BE9EBDFA; Mon, 27 May 2024 21:37:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BE9EBDFA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1716838651; bh=MgEHNB9167o7HxV9OUTCTOGMriG+s33CZ/6nsWsUPlU=; 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=phpEhzNqh2DaarI4Lbz31k+p5VIvlxz4AZv7ib5wLSGwMhw9qucJHgzHodM9BTBB8 Oc0nGl20eoxLtY8IaaYaCwrAYjVg25bTDOfIjjGwXjtTLdKON/aVxaBYJ6ehPgSpzi xwRALMeEFlDw3fR3BsuQRvPXYMecK3QrmP+pm998= Received: by alsa1.perex.cz (Postfix, from userid 50401) id D08EDF8051D; Mon, 27 May 2024 21:36:34 +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 7F991F80602; Mon, 27 May 2024 21:36:34 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2186EF805BF; Mon, 27 May 2024 21:36:29 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 7CC05F80494 for ; Mon, 27 May 2024 21:36:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7CC05F80494 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=fLZwvSVP DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716838578; x=1748374578; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MgEHNB9167o7HxV9OUTCTOGMriG+s33CZ/6nsWsUPlU=; b=fLZwvSVPrmaMf2b6G7ErDl0rFacr7my4brI0oImlfZwdhL3I/CT5rozL pQaGRywZELFYgyOzZ87pHzhcQlN/YwU650xhLAzBlKs1G1/V2QzSq5+io OzRNvTXTwvbXJP1jPm87qXkZVRZ9ETFPnMD2qX0pGlpdEdDddArCWb49l Yqs+npbnw55xyFWoU53c4gd2RXWVSMiLiMlgiyj64hTNT3XfqjVawIB/d Gd87T3sqlcPnRTNmHMQSUIss/AW/sUx7tSJHJja4ddQbMYKIBDBWcMF9c wuvJ3xKDSAgjA3ExScWSynlnhjbGjbSw8WM31ivKeCZxpEc4kspbQSGiL Q==; X-CSE-ConnectionGUID: mOnghTPqTmOietjA0VXJxw== X-CSE-MsgGUID: 2vFVUBARQHelzy/dJQI6pg== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13339324" X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="13339324" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:11 -0700 X-CSE-ConnectionGUID: 737jNDigQuq3fEkVVgv1Ww== X-CSE-MsgGUID: +TA6kQULRxyIigljJ+VYbw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="58029758" Received: from unknown (HELO pbossart-mobl6.lan) ([10.125.110.221]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:10 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Bard Liao , =?utf-8?q?P=C3=A9ter_Ujfalusi?= , Pierre-Louis Bossart Subject: [PATCH 03/18] ASoC: Intel: sof_sdw_rt5682: use dai parameter Date: Mon, 27 May 2024 14:35:37 -0500 Message-ID: <20240527193552.165567-4-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> References: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: D5CHKOJQY67NRXQOKM2MLWLSDS3LIXY5 X-Message-ID-Hash: D5CHKOJQY67NRXQOKM2MLWLSDS3LIXY5 X-MailFrom: pierre-louis.bossart@linux.intel.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: From: Bard Liao The dai is passed from the parameter. We don't need to find the dai by name. Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_sdw_rt5682.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/sound/soc/intel/boards/sof_sdw_rt5682.c b/sound/soc/intel/boards/sof_sdw_rt5682.c index 96f193798540..67737815d016 100644 --- a/sound/soc/intel/boards/sof_sdw_rt5682.c +++ b/sound/soc/intel/boards/sof_sdw_rt5682.c @@ -35,24 +35,15 @@ static struct snd_soc_jack_pin rt5682_jack_pins[] = { }, }; -static const char * const jack_codecs[] = { - "rt5682" -}; - int rt5682_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) { struct snd_soc_card *card = rtd->card; struct mc_private *ctx = snd_soc_card_get_drvdata(card); - struct snd_soc_dai *codec_dai; struct snd_soc_component *component; struct snd_soc_jack *jack; int ret; - codec_dai = get_codec_dai_by_name(rtd, jack_codecs, ARRAY_SIZE(jack_codecs)); - if (!codec_dai) - return -EINVAL; - - component = codec_dai->component; + component = dai->component; card->components = devm_kasprintf(card->dev, GFP_KERNEL, "%s hs:rt5682", card->components); From patchwork Mon May 27 19:35:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 799895 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 A533DC25B78 for ; Mon, 27 May 2024 19:38:13 +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 B2FC082A; Mon, 27 May 2024 21:38:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B2FC082A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1716838691; bh=jYtuJBvgWMuKyE6cWQ6d12Q1gxREjdJIFUCWcLL4Sls=; 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=NlA9Y2o8NlK1MZ+wEjPK34EOfKOqlEi9fEmqHQWTmPTtksb16P6D+mwP8hDE4tDgA A2yhdQHWxqzRtmuzJ1KxBMfPg9Kv7lBFfFhwHoZXaQg54u5+B7eRbLE0nRckXBE3kK BpejrIvHAgNgov1qq8Kcw3eoFJ2Zp79v/yTfDQl8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0AA44F8065A; Mon, 27 May 2024 21:36:41 +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 51F3BF8063E; Mon, 27 May 2024 21:36:41 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5CD62F805D2; Mon, 27 May 2024 21:36:31 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 70161F8026D for ; Mon, 27 May 2024 21:36:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 70161F8026D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Lq8LWT9c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716838578; x=1748374578; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jYtuJBvgWMuKyE6cWQ6d12Q1gxREjdJIFUCWcLL4Sls=; b=Lq8LWT9c56+iDJSxUUtgsYEPouucc+9sq5OcUvQdxU5zpE6EfptOpge9 xcY9LfqOkL4D+MShhMmdTOiWIXJQhcPtiV5ytZnA3y7AXAftzcji9plT3 UEA1OlblVr4fd7MY05GmSahPYEN7BGAO1VjtE+Yt+K+ACZweekjtbj8Tx AkqycmED5JEQWLtunRm7uru+HT5Go3f9VjSAXAUCNPR6BU5ltYmPiOC1k GnYdE/Gonvge/Ud8hFfcM/3oRdRJCUbulAF/RYxRylukLRBZfbJff2RgL W1jQCfr+1dUydh/VH0EOxljlOltP6+ZCiajKX6kIKiFtt1B2rRx29elQE Q==; X-CSE-ConnectionGUID: GSRmdLR3TSeBz3WefD/BnQ== X-CSE-MsgGUID: k2iQl7+ZQ9yRz5gvqi3tjQ== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13339330" X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="13339330" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:12 -0700 X-CSE-ConnectionGUID: nkHSFpeTQsuuJNL15641LQ== X-CSE-MsgGUID: gs6GNEr5TZ6AIDTvAowelw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="58029760" Received: from unknown (HELO pbossart-mobl6.lan) ([10.125.110.221]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:11 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Bard Liao , =?utf-8?q?P=C3=A9ter_Ujfalusi?= , Pierre-Louis Bossart Subject: [PATCH 04/18] ASoC: Intel: sof_sdw_rt700: use dai parameter Date: Mon, 27 May 2024 14:35:38 -0500 Message-ID: <20240527193552.165567-5-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> References: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: MECZWPJZRLV63SR6VU2XNDFN2ZXUZOVL X-Message-ID-Hash: MECZWPJZRLV63SR6VU2XNDFN2ZXUZOVL X-MailFrom: pierre-louis.bossart@linux.intel.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: From: Bard Liao The dai is passed from the parameter. We don't need to find the dai by name. Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_sdw_rt700.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/sound/soc/intel/boards/sof_sdw_rt700.c b/sound/soc/intel/boards/sof_sdw_rt700.c index f9575db9d99c..0db730071be2 100644 --- a/sound/soc/intel/boards/sof_sdw_rt700.c +++ b/sound/soc/intel/boards/sof_sdw_rt700.c @@ -33,24 +33,15 @@ static struct snd_soc_jack_pin rt700_jack_pins[] = { }, }; -static const char * const jack_codecs[] = { - "rt700" -}; - int rt700_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) { struct snd_soc_card *card = rtd->card; struct mc_private *ctx = snd_soc_card_get_drvdata(card); - struct snd_soc_dai *codec_dai; struct snd_soc_component *component; struct snd_soc_jack *jack; int ret; - codec_dai = get_codec_dai_by_name(rtd, jack_codecs, ARRAY_SIZE(jack_codecs)); - if (!codec_dai) - return -EINVAL; - - component = codec_dai->component; + component = dai->component; card->components = devm_kasprintf(card->dev, GFP_KERNEL, "%s hs:rt700", card->components); From patchwork Mon May 27 19:35:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 799272 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 9B46EC25B74 for ; Mon, 27 May 2024 19:37:53 +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 0FE36A4A; Mon, 27 May 2024 21:37:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0FE36A4A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1716838672; bh=/4pDOYBWNcEf9AroYPd8usrLXvoOq2NmzsOK87JNjVU=; 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=fk6w3PtQppSVzAVkScMFPs07ErJW++1cBYA2KoaQ6V+zw8EHBzBR4inOHtk7McfRL owB2O61LuHdKXCSM5bF3aJLYN4SHEslNFwLKMAMF58Yvx07SKIJ3/1TfoFZIUR8q0E HGINEpBDV6rYlqyTU3/bPuK1IQOj/1EClWqFmCyU= Received: by alsa1.perex.cz (Postfix, from userid 50401) id C47F6F80630; Mon, 27 May 2024 21:36:38 +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 28CB2F80621; Mon, 27 May 2024 21:36:38 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6E135F805AE; Mon, 27 May 2024 21:36:30 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 B1B83F80496 for ; Mon, 27 May 2024 21:36:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B1B83F80496 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=CuUgn/fG DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716838578; x=1748374578; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/4pDOYBWNcEf9AroYPd8usrLXvoOq2NmzsOK87JNjVU=; b=CuUgn/fGNpmIeqOlW6cD+Ehj44NX5Aqh333rbnBiBFINly1o02wq3h4r hR43plmr3pnI7vgRZYiASM4lTDdv/yoerROoUPLu9PAYusXWCbUCxbVK/ 7Vn/lttB+w0Z276e5Cm+uhljXHS42i/5qwZq25G0DEeNsJtzf8VmOdJ5p b3YqhWyDT24nRyhqDQ62kPKkmv4UWlqALVSZ2uD1reMgx9gyIcNujetUT ltFDbPL+mS9PvgriEcQ2gi8QIVSRWJ1CJfj1pJ4P2YjTcvs4apD0Mm3WU rVru3N6B5f6VAJKsglPIJluiUyjcykyy43hF8+5e6XsjcSkQnZvfhRisd Q==; X-CSE-ConnectionGUID: TL9hSmT5QKStQqXf6TOITw== X-CSE-MsgGUID: ZRJsierlSsaolR8o03idDw== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13339334" X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="13339334" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:13 -0700 X-CSE-ConnectionGUID: OvXNVPloTm+aiktCL3ThUA== X-CSE-MsgGUID: C4GsiRY9SzeO5T+dbVAHqQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="58029761" Received: from unknown (HELO pbossart-mobl6.lan) ([10.125.110.221]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:12 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Bard Liao , =?utf-8?q?P=C3=A9ter_Ujfalusi?= , Pierre-Louis Bossart Subject: [PATCH 05/18] ASoC: Intel: sof_sdw_rt_dmic: use from dai parameter Date: Mon, 27 May 2024 14:35:39 -0500 Message-ID: <20240527193552.165567-6-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> References: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: TLUCQ2YPGZAEBKFVILN3EK7XPMBBY6ZR X-Message-ID-Hash: TLUCQ2YPGZAEBKFVILN3EK7XPMBBY6ZR X-MailFrom: pierre-louis.bossart@linux.intel.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: From: Bard Liao The dai is passed from the parameter. We don't need to find the dai by name. Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_sdw_rt_dmic.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/sound/soc/intel/boards/sof_sdw_rt_dmic.c b/sound/soc/intel/boards/sof_sdw_rt_dmic.c index b8b493d5c6ec..ea7c1a4bc566 100644 --- a/sound/soc/intel/boards/sof_sdw_rt_dmic.c +++ b/sound/soc/intel/boards/sof_sdw_rt_dmic.c @@ -12,25 +12,13 @@ #include "sof_board_helpers.h" #include "sof_sdw_common.h" -static const char * const dmics[] = { - "rt715", - "rt715-sdca", - "rt712-sdca-dmic", - "rt722-sdca", -}; - int rt_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) { struct snd_soc_card *card = rtd->card; struct snd_soc_component *component; - struct snd_soc_dai *codec_dai; char *mic_name; - codec_dai = get_codec_dai_by_name(rtd, dmics, ARRAY_SIZE(dmics)); - if (!codec_dai) - return -EINVAL; - - component = codec_dai->component; + component = dai->component; /* * rt715-sdca (aka rt714) is a special case that uses different name in card->components From patchwork Mon May 27 19:35:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 799265 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 C10A0C25B74 for ; Mon, 27 May 2024 19:41:50 +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 05E5EE72; Mon, 27 May 2024 21:41:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 05E5EE72 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1716838909; bh=YUZRQX2mKZ5gfIkh+Vr07Pz1IYqZFFFZgqwYlxYqv4I=; 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=KlvwAJXEwFJ6/OE//2e/yNmeW36BBbT3NImAFzL1hTDp/G1icFDSsxxCdoqRCQfzU xpguAQb2PwCHh7eyOTHHImGBwfcFo7/UHqLinxJKj8/N1hRNGtRfoXzAQ064LIFSBh X4uPMWD7D1V6+M09yoqW10z8Ms9czfjb0JQFbfyA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8FA29F80671; Mon, 27 May 2024 21:38: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 CCC7FF8063B; Mon, 27 May 2024 21:38:47 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A064CF80634; Mon, 27 May 2024 21:38:44 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 7F272F804B2 for ; Mon, 27 May 2024 21:36:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7F272F804B2 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Vhp0RxLF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716838580; x=1748374580; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YUZRQX2mKZ5gfIkh+Vr07Pz1IYqZFFFZgqwYlxYqv4I=; b=Vhp0RxLFnXnI+YbHLAwG1DSLpKIWBXCaAj3f+pqMqiywojGBqdJl2kOd a4MiPYf6HNNchvK6pvnjchLKURjSwOBCuIN6unBaOmn0HMOLNJ/knnDqS fto8S28R8/D1e3uyz87wTdnfPaS7+JxKWzlsVUbiMUW/Zcg7cVgIdozcM p8soqRUZYWc5jJscp0p3dhD2WMf+OI/hPzBdzrGvypMTIHBIuJsN8tK/V segjwIvmmB3DT7+AXh5LSk2N2raTZskPNCvxtlmdNooixZpbeWCQgjK6P y5R+vHoQSgjmfzCzZxrzxdIIfPsVHq2gIBsHdM9+vX8tNqhGQ+tZ57J8c Q==; X-CSE-ConnectionGUID: knksUEz7TuKdHraAS7D50Q== X-CSE-MsgGUID: KpFgiBeUSYKbqHP/bm1M7Q== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13339338" X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="13339338" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:13 -0700 X-CSE-ConnectionGUID: KixdqEyuTE+4jttLsMiIPA== X-CSE-MsgGUID: dfQbgSOwRL+qeAcre3UfFw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="58029762" Received: from unknown (HELO pbossart-mobl6.lan) ([10.125.110.221]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:13 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Bard Liao , =?utf-8?q?P=C3=A9ter_Ujfalusi?= , Pierre-Louis Bossart Subject: [PATCH 06/18] ASoC: Intel: sof_sdw_rt_sdca_jack_common: use dai parameter Date: Mon, 27 May 2024 14:35:40 -0500 Message-ID: <20240527193552.165567-7-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> References: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: 3WAKPY5QIIR62WNSBDDHXMFMIJ752X73 X-Message-ID-Hash: 3WAKPY5QIIR62WNSBDDHXMFMIJ752X73 X-MailFrom: pierre-louis.bossart@linux.intel.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: From: Bard Liao The dai is passed from the parameter. We don't need to find the dai by name. Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c b/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c index 012195c50519..4254e30ee4c3 100644 --- a/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c +++ b/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c @@ -74,10 +74,6 @@ static struct snd_soc_jack_pin rt_sdca_jack_pins[] = { }, }; -static const char * const jack_codecs[] = { - "rt711", "rt712", "rt713", "rt722" -}; - /* * The sdca suffix is required for rt711 since there are two generations of the same chip. * RT713 is an SDCA device but the sdca suffix is required for backwards-compatibility with @@ -91,17 +87,12 @@ int rt_sdca_jack_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *d { struct snd_soc_card *card = rtd->card; struct mc_private *ctx = snd_soc_card_get_drvdata(card); - struct snd_soc_dai *codec_dai; struct snd_soc_component *component; struct snd_soc_jack *jack; int ret; int i; - codec_dai = get_codec_dai_by_name(rtd, jack_codecs, ARRAY_SIZE(jack_codecs)); - if (!codec_dai) - return -EINVAL; - - component = codec_dai->component; + component = dai->component; card->components = devm_kasprintf(card->dev, GFP_KERNEL, "%s hs:%s", card->components, component->name_prefix); From patchwork Mon May 27 19:35:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 799264 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 2BD68C25B74 for ; Mon, 27 May 2024 19:42:17 +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 91291EF2; Mon, 27 May 2024 21:42:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 91291EF2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1716838935; bh=Axobvno4BTD+B4nQOHHdbjjD+fECyO9OmJP/teh7esw=; 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=C7ezY9GqD6qa+riqE7PcGKwF3+ajt7RBsgeqxxBmOi98dM9JQFYe7fIyMgHMW5mUM y0ojhYO7xJA41jjgMIkSRk75hnEWH1h7V0BPXGk29l6nugOSnCzgc2iUggo9vLSanX A1dlinY/xRwqL8J4GcifTioqcFawSK185EVEJbZ8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 94222F806AC; Mon, 27 May 2024 21:38:53 +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 0624CF806AF; Mon, 27 May 2024 21:38:53 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E33E7F80634; Mon, 27 May 2024 21:38:47 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 A63D2F804E5 for ; Mon, 27 May 2024 21:36:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A63D2F804E5 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=SiXrRSiI DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716838580; x=1748374580; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Axobvno4BTD+B4nQOHHdbjjD+fECyO9OmJP/teh7esw=; b=SiXrRSiIuC1SDEOdZCZL+J3s5qqnFllPHmueENUbZPGh3wLEFayZbfZk 7qxoKpJDkdyddRkCIq2HDUxlj/UNO4eWYjxNeN2HiCKjU21zBCIQB6w7E pcNaJUUfnE1P7TcR7AYf6GPKfT6J3ar0Mr8EX2MdkF2joS2owyfH7dYPm neeO5j2vdetMcqo6Pw+t0wSFs8Upw1lzmwfvsdvA7bLWoE0c5rpM9rwKx OUPK1lNu/sKQMomDo8CEcacPIiPN0b7EVEflyxvp1larJL3Hfd9i56fBg 5qUc4g0HBlfSrHDWRCpw13F2SAwtjUmi3dI7zf6LbhPQzu2zyQCbItBEt Q==; X-CSE-ConnectionGUID: SKCs47R4R1WvgLhxZz+Nsg== X-CSE-MsgGUID: CyV7+pqBQ++jN6cPvCD/cQ== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13339344" X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="13339344" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:14 -0700 X-CSE-ConnectionGUID: Xi4Y4G8QQb29T7kYrDfaUw== X-CSE-MsgGUID: mfMnBCuJS0SH6BcIovSiYg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="58029763" Received: from unknown (HELO pbossart-mobl6.lan) ([10.125.110.221]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:13 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Bard Liao , =?utf-8?q?P=C3=A9ter_Ujfalusi?= , Pierre-Louis Bossart Subject: [PATCH 07/18] ASoC: Intel: sof_sdw: remove get_codec_dai_by_name Date: Mon, 27 May 2024 14:35:41 -0500 Message-ID: <20240527193552.165567-8-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> References: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: VCCSWDSCQV2BTSDIS5UGWPKVWA4GXPCJ X-Message-ID-Hash: VCCSWDSCQV2BTSDIS5UGWPKVWA4GXPCJ X-MailFrom: pierre-louis.bossart@linux.intel.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: From: Bard Liao get_codec_dai_by_name() is not used anymore. Remove it. Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_sdw.c | 18 ------------------ sound/soc/intel/boards/sof_sdw_common.h | 4 ---- 2 files changed, 22 deletions(-) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index e41b0d95e0ff..9dc50a6d5301 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -559,24 +559,6 @@ static const struct snd_kcontrol_new rt700_controls[] = { SOC_DAPM_PIN_SWITCH("Speaker"), }; -struct snd_soc_dai *get_codec_dai_by_name(struct snd_soc_pcm_runtime *rtd, - const char * const dai_name[], - int num_dais) -{ - struct snd_soc_dai *dai; - int index; - int i; - - for (index = 0; index < num_dais; index++) - for_each_rtd_codec_dais(rtd, i, dai) - if (strstr(dai->name, dai_name[index])) { - dev_dbg(rtd->card->dev, "get dai %s\n", dai->name); - return dai; - } - - return NULL; -} - /* these wrappers are only needed to avoid typecast compilation errors */ int sdw_startup(struct snd_pcm_substream *substream) { diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h index 3dfba6f6b95d..4e92ff65b537 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -134,10 +134,6 @@ struct mc_private { extern unsigned long sof_sdw_quirk; -struct snd_soc_dai *get_codec_dai_by_name(struct snd_soc_pcm_runtime *rtd, - const char * const dai_name[], - int num_dais); - int sdw_startup(struct snd_pcm_substream *substream); int sdw_prepare(struct snd_pcm_substream *substream); int sdw_trigger(struct snd_pcm_substream *substream, int cmd); From patchwork Mon May 27 19:35:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 799888 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 49AEDC25B78 for ; Mon, 27 May 2024 19:42:06 +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 616F1E7F; Mon, 27 May 2024 21:41:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 616F1E7F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1716838924; bh=2m3wXl1aloLbGCx8+3UjrcvRoYSfSH2cV7nQxeM9yPM=; 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=CS3JFD7ngaGwGVQeBD5u2vBOPlewSLyUwMVjJNvd9D9QrPBDPEA0zCctPNfvbXNwH lKCeJ0t9YaCjxT2rfOfHgE+Ghk4MuySFDLY6bFUJVSsuZbZr4htgkHjBfdnAZIeu1z egDKiyHYlkQxePeqfQs+lhYdAUaFy4C6YCPuf3vY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id F04F2F80676; Mon, 27 May 2024 21:38:50 +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 029AFF80688; Mon, 27 May 2024 21:38:50 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 43A5FF80578; Mon, 27 May 2024 21:38:45 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 42A96F8047C for ; Mon, 27 May 2024 21:36:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 42A96F8047C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=MI2mLxc0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716838580; x=1748374580; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2m3wXl1aloLbGCx8+3UjrcvRoYSfSH2cV7nQxeM9yPM=; b=MI2mLxc0b5ZFFxvpvYDdFROKlSxwUln4WjAIBy4h9QKkfFI7r6d5V/lS jeKhrnSH3vKSTXKAfIiEV8rB5duV6asbMzWPJgiT6vOEswphqULhJpdiF A0LnHY+0X+hc1HYoDBtkVog/u3HwrwigVv/8sO2GwNQ2Q2WveGP59CtPB U03PFS6RLz9Sy4QwdWptkrLJzYLw2U7pNfp9xRHSbxw2K2mndIWFnfbA9 LjWy9zwzy3q4zpEqxwmX0wDXPEAPfDZirj568LrageTBZyWvovpd+Hplc ZCZLzgiVnis5YUDJNnzpwiVP5T7qABC0d0hIUWO6ev9VcXPyVAqkPaytc Q==; X-CSE-ConnectionGUID: sGVKuj9WQGiolgzLXJ9ZBQ== X-CSE-MsgGUID: XKW7weSyT8SZXay18odbiw== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13339348" X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="13339348" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:15 -0700 X-CSE-ConnectionGUID: SzXWC9yzTX6l47CeOqX5AQ== X-CSE-MsgGUID: lZ55y1mQQva053ZLa7PkXw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="58029767" Received: from unknown (HELO pbossart-mobl6.lan) ([10.125.110.221]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:14 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Charles Keepax , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 08/18] ASoC: Intel: sof_sdw: Add missing controls for cs42l43/cs35l56 Date: Mon, 27 May 2024 14:35:42 -0500 Message-ID: <20240527193552.165567-9-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> References: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: AF4BLXQME5Y47OUT4A5CMINQ4QMLRTU6 X-Message-ID-Hash: AF4BLXQME5Y47OUT4A5CMINQ4QMLRTU6 X-MailFrom: pierre-louis.bossart@linux.intel.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: From: Charles Keepax No reason for cs42l43 and cs35l56 not to offer pin switch controls for the headphones and speakers, add these controls. Reviewed-by: Bard Liao Signed-off-by: Charles Keepax Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_sdw.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 9dc50a6d5301..0516ae660824 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -1059,6 +1059,8 @@ static struct sof_sdw_codec_info codec_info_list[] = { .dailink = {SDW_AMP_OUT_DAI_ID, SDW_AMP_IN_DAI_ID}, .init = sof_sdw_cs_amp_init, .rtd_init = cs_spk_rtd_init, + .controls = generic_spk_controls, + .num_controls = ARRAY_SIZE(generic_spk_controls), .widgets = generic_spk_widgets, .num_widgets = ARRAY_SIZE(generic_spk_widgets), }, @@ -1094,6 +1096,8 @@ static struct sof_sdw_codec_info codec_info_list[] = { .dai_type = SOF_SDW_DAI_TYPE_JACK, .dailink = {SDW_JACK_OUT_DAI_ID, SDW_UNUSED_DAI_ID}, .rtd_init = cs42l43_hs_rtd_init, + .controls = generic_jack_controls, + .num_controls = ARRAY_SIZE(generic_jack_controls), .widgets = generic_jack_widgets, .num_widgets = ARRAY_SIZE(generic_jack_widgets), }, @@ -1119,6 +1123,8 @@ static struct sof_sdw_codec_info codec_info_list[] = { .dailink = {SDW_AMP_OUT_DAI_ID, SDW_UNUSED_DAI_ID}, .init = sof_sdw_cs42l43_spk_init, .rtd_init = cs42l43_spk_rtd_init, + .controls = generic_spk_controls, + .num_controls = ARRAY_SIZE(generic_spk_controls), .widgets = generic_spk_widgets, .num_widgets = ARRAY_SIZE(generic_spk_widgets), .quirk = SOF_CODEC_SPKR | SOF_SIDECAR_AMPS, From patchwork Mon May 27 19:35:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 799894 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 9C8DCC25B74 for ; Mon, 27 May 2024 19:38:45 +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 E6DDBB76; Mon, 27 May 2024 21:38:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E6DDBB76 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1716838723; bh=dW60t95bPnKl9GWiqKVKl+Byxl7cm63BjWqgbq4l084=; 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=JZRuc1g0oZ10vsbYHZsVQ01E1QFnI+jsCRmpOzGyEZCzsHcHRwuu28K44de/zz/Mo MYYk4AoVUkS7EZS1qMt/UEuPLNvPgVPPBKDK1esAAPfKfwbIVT1M9Oie+J8+gp0OwI YVT0Pb5B6rDslOEmYr81vygpXurcoz3i7Bshbbfw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 57805F806A8; Mon, 27 May 2024 21:36:46 +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 B548CF80693; Mon, 27 May 2024 21:36:45 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4BE84F8063A; Mon, 27 May 2024 21:36:40 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 8D08DF804FF for ; Mon, 27 May 2024 21:36:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8D08DF804FF Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=nb5lbwlm DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716838582; x=1748374582; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dW60t95bPnKl9GWiqKVKl+Byxl7cm63BjWqgbq4l084=; b=nb5lbwlmlSmxgmGGO93In2QUk4wbeOcfoZavOnAZaYBg5rdHNwkINE3l mqcEZvqhrU/LuSI+74T2J4c3a9G/OIms/sA+7abnPie+XoHa9QzcqQvNh uFbvci/Y0Ggg4eoEf/KSQcX6/8bcaDfpBlmiS5+B4net+j9rTFk0qwuBs Ln/F/ngNuLqQtbxODMB4seFvinkGHqW2QQL3HsoXqXbhHjyJ8zFtZ0vwv ZAwgKYRzJ9ev+eyboqyAL8Uoyw118QWSjl7MdwwcnlBJyebsU1kuln5YS h2GoPjUMScz/WkeYcCmiLv8Q9FuYAH+T1Any4EztHp4npjWSSWeYlZoCI Q==; X-CSE-ConnectionGUID: YVbydrt7TQSXPjRE9maagg== X-CSE-MsgGUID: gKYjSvtyTiytW2JVLJWiwg== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13339355" X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="13339355" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:16 -0700 X-CSE-ConnectionGUID: Zsqq2Q+eRfaSs/mvUm/xDQ== X-CSE-MsgGUID: RRRiOZjUTtmCPcAtG7WfwA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="58029771" Received: from unknown (HELO pbossart-mobl6.lan) ([10.125.110.221]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:15 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Charles Keepax , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 09/18] ASoC: Intel: soc-acpi: Add match entries for some cs42l43 laptops Date: Mon, 27 May 2024 14:35:43 -0500 Message-ID: <20240527193552.165567-10-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> References: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: Q3LRT4ZICWARWGHGECELPMBZYEAAQI3D X-Message-ID-Hash: Q3LRT4ZICWARWGHGECELPMBZYEAAQI3D X-MailFrom: pierre-louis.bossart@linux.intel.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: From: Charles Keepax Add some new match table entries on Arrowlake and Raptorlake for some coming cs42l43 laptops. Reviewed-by: Bard Liao Signed-off-by: Charles Keepax Signed-off-by: Pierre-Louis Bossart --- .../intel/common/soc-acpi-intel-arl-match.c | 50 +++++++++++++++++++ .../intel/common/soc-acpi-intel-rpl-match.c | 50 +++++++++++++++++++ 2 files changed, 100 insertions(+) diff --git a/sound/soc/intel/common/soc-acpi-intel-arl-match.c b/sound/soc/intel/common/soc-acpi-intel-arl-match.c index 79d26e0f2c28..cc87c34e5a08 100644 --- a/sound/soc/intel/common/soc-acpi-intel-arl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-arl-match.c @@ -15,6 +15,42 @@ static const struct snd_soc_acpi_endpoint single_endpoint = { .group_id = 0, }; +static const struct snd_soc_acpi_endpoint cs42l43_endpoints[] = { + { /* Jack Playback Endpoint */ + .num = 0, + .aggregated = 0, + .group_position = 0, + .group_id = 0, + }, + { /* DMIC Capture Endpoint */ + .num = 1, + .aggregated = 0, + .group_position = 0, + .group_id = 0, + }, + { /* Jack Capture Endpoint */ + .num = 2, + .aggregated = 0, + .group_position = 0, + .group_id = 0, + }, + { /* Speaker Playback Endpoint */ + .num = 3, + .aggregated = 0, + .group_position = 0, + .group_id = 0, + }, +}; + +static const struct snd_soc_acpi_adr_device cs42l43_0_adr[] = { + { + .adr = 0x00003001FA424301ull, + .num_endpoints = ARRAY_SIZE(cs42l43_endpoints), + .endpoints = cs42l43_endpoints, + .name_prefix = "cs42l43" + } +}; + static const struct snd_soc_acpi_adr_device rt711_0_adr[] = { { .adr = 0x000020025D071100ull, @@ -33,6 +69,14 @@ static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = { } }; +static const struct snd_soc_acpi_link_adr arl_cs42l43_l0[] = { + { + .mask = BIT(0), + .num_adr = ARRAY_SIZE(cs42l43_0_adr), + .adr_d = cs42l43_0_adr, + }, +}; + static const struct snd_soc_acpi_link_adr arl_rvp[] = { { .mask = BIT(0), @@ -58,6 +102,12 @@ EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_arl_machines); /* this table is used when there is no I2S codec present */ struct snd_soc_acpi_mach snd_soc_acpi_intel_arl_sdw_machines[] = { + { + .link_mask = BIT(0), + .links = arl_cs42l43_l0, + .drv_name = "sof_sdw", + .sof_tplg_filename = "sof-arl-cs42l43-l0.tplg", + }, { .link_mask = 0x1, /* link0 required */ .links = arl_rvp, diff --git a/sound/soc/intel/common/soc-acpi-intel-rpl-match.c b/sound/soc/intel/common/soc-acpi-intel-rpl-match.c index b0a49e28ab09..bc8817633b81 100644 --- a/sound/soc/intel/common/soc-acpi-intel-rpl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-rpl-match.c @@ -30,6 +30,42 @@ static const struct snd_soc_acpi_endpoint spk_r_endpoint = { .group_id = 1, }; +static const struct snd_soc_acpi_endpoint cs42l43_endpoints[] = { + { /* Jack Playback Endpoint */ + .num = 0, + .aggregated = 0, + .group_position = 0, + .group_id = 0, + }, + { /* DMIC Capture Endpoint */ + .num = 1, + .aggregated = 0, + .group_position = 0, + .group_id = 0, + }, + { /* Jack Capture Endpoint */ + .num = 2, + .aggregated = 0, + .group_position = 0, + .group_id = 0, + }, + { /* Speaker Playback Endpoint */ + .num = 3, + .aggregated = 0, + .group_position = 0, + .group_id = 0, + }, +}; + +static const struct snd_soc_acpi_adr_device cs42l43_0_adr[] = { + { + .adr = 0x00003001FA424301ull, + .num_endpoints = ARRAY_SIZE(cs42l43_endpoints), + .endpoints = cs42l43_endpoints, + .name_prefix = "cs42l43" + } +}; + static const struct snd_soc_acpi_adr_device rt711_0_adr[] = { { .adr = 0x000020025D071100ull, @@ -156,6 +192,14 @@ static const struct snd_soc_acpi_adr_device rt714_3_adr[] = { } }; +static const struct snd_soc_acpi_link_adr rpl_cs42l43_l0[] = { + { + .mask = BIT(0), + .num_adr = ARRAY_SIZE(cs42l43_0_adr), + .adr_d = cs42l43_0_adr, + }, +}; + static const struct snd_soc_acpi_link_adr rpl_sdca_3_in_1[] = { { .mask = BIT(0), @@ -446,6 +490,12 @@ EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_rpl_machines); /* this table is used when there is no I2S codec present */ struct snd_soc_acpi_mach snd_soc_acpi_intel_rpl_sdw_machines[] = { + { + .link_mask = BIT(0), + .links = rpl_cs42l43_l0, + .drv_name = "sof_sdw", + .sof_tplg_filename = "sof-rpl-cs42l43-l0.tplg", + }, { .link_mask = 0xF, /* 4 active links required */ .links = rpl_sdca_3_in_1, From patchwork Mon May 27 19:35:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 799271 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 C0AE1C25B78 for ; Mon, 27 May 2024 19:38:24 +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 3EC6CA4A; Mon, 27 May 2024 21:38:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3EC6CA4A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1716838703; bh=Mbv5Pp+x3KBmrpNjxUEHHJN4Ju5oASOGYV2/ps+Ec/k=; 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=L9/ppYEYVqYp9uB+qjtRVHnKJMLbehsnNm2hi8DTPsDBDuFuxxPYUy3DaCD+pDlPv oM7bluGl3tuKcv/ESaHpPW7lNUOiqQy8U3MNFnIaJTvsFVraAOXiSVwnKgxSAPI/ad yq9NY34Y/e8Q279ucF5E2+c4mz6gqajiqqaFH7Ng= Received: by alsa1.perex.cz (Postfix, from userid 50401) id F3EEFF8068E; Mon, 27 May 2024 21:36:43 +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 87A26F80682; Mon, 27 May 2024 21:36:43 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 22800F805FF; Mon, 27 May 2024 21:36:35 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 A018BF8051D for ; Mon, 27 May 2024 21:36:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A018BF8051D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=jfIvfXxy DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716838582; x=1748374582; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Mbv5Pp+x3KBmrpNjxUEHHJN4Ju5oASOGYV2/ps+Ec/k=; b=jfIvfXxyeKxJxSwFQUS0/60Y9Wr9Wk6sQqw8zxaGCAyDZQKzUtQ3Cw4I lSXyFO4MkAMry0bFe4z7V+O2898i+M5AcuKHiIpQQUtvJ55nJTpJiKuzz 9DdB105HsCi8a79xJznv+GZq6cLk4a4Z3dqKI73/nxOlhfUiLy9qP1x30 h3icnrjSpzY68tKlYzdJz3q7YUJp3l9Lm3+N84kOJA/0WNdZ++b4PD9+T 8nIiZbAeeAL5fvqDoMUy4rpf7QWFf+ezm0LSE4QH/GfbXfdxfP49KYGbz 0ELZFs/UKMckJkN6B9TPG3NzRPgqHbSs662w6dO6wx2eDE7bOZImaYsLb Q==; X-CSE-ConnectionGUID: scRUXAjfRVu/S99VQzSNeA== X-CSE-MsgGUID: hVzEW/MdRIGzlreGwTsSoA== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13339360" X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="13339360" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:17 -0700 X-CSE-ConnectionGUID: 1xgFQ/loQvaF+L9zuifpMQ== X-CSE-MsgGUID: i7UE2F61SVyfigCaYlDlzw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="58029772" Received: from unknown (HELO pbossart-mobl6.lan) ([10.125.110.221]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:16 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Charles Keepax , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 10/18] ASoC: Intel: sof_sdw: Add quirks for some new Dell laptops Date: Mon, 27 May 2024 14:35:44 -0500 Message-ID: <20240527193552.165567-11-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> References: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: ZHJQUSY7UIKMA62MPOZAKAO7GNBVNPS4 X-Message-ID-Hash: ZHJQUSY7UIKMA62MPOZAKAO7GNBVNPS4 X-MailFrom: pierre-louis.bossart@linux.intel.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: From: Charles Keepax Add quirks for some new Dell laptops using Cirrus amplifiers in a bridge configuration. Reviewed-by: Bard Liao Signed-off-by: Charles Keepax Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_sdw.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 0516ae660824..b646b32dd311 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -505,6 +505,22 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { }, .driver_data = (void *)(RT711_JD2), }, + { + .callback = sof_sdw_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CE3") + }, + .driver_data = (void *)(SOF_SIDECAR_AMPS), + }, + { + .callback = sof_sdw_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CE4") + }, + .driver_data = (void *)(SOF_SIDECAR_AMPS), + }, {} }; From patchwork Mon May 27 19:35:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 799270 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 61A6DC25B74 for ; Mon, 27 May 2024 19:39:01 +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 9830A93A; Mon, 27 May 2024 21:38:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9830A93A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1716838734; bh=u5E8H9x87T0wWV9iRYcC5/WwcEuQhbmtbeRk9A9m61Y=; 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=cBWWK3G8j2RD+8frgXku5WKgVSn+BI/KK4N/qr2TwcKf7N/hM4p71jTAgGHVlXlgB U4fCE3cB0TH2A0Np9Yge8nY61ZI5TiJ2uyx3jKOZumjjXJ89UZkEwsv77f4FKDGebw YBWasEV6KCSTC5VXv9MY+xinkemEtbjtpx5AGTVQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id E74C4F806B2; Mon, 27 May 2024 21:36: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 B45B4F806C5; Mon, 27 May 2024 21:36:48 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A8F6CF80693; Mon, 27 May 2024 21:36:44 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 368AFF80051 for ; Mon, 27 May 2024 21:36:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 368AFF80051 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Rw2/lDUC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716838582; x=1748374582; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=u5E8H9x87T0wWV9iRYcC5/WwcEuQhbmtbeRk9A9m61Y=; b=Rw2/lDUC+G63SdpV/U/ztqKqdBGUlveh2WZNX583AxlosiYq65pqATMp rUpggUyKb7qCqaxYhEebd4IPCrFehJ6kAvHXFAJAM0WN/GtTWIkJmrN2E FqWf8QpehY8wKJAKjNwz/pqRlG6QuZU2fOVHvUonsNoXjSsrM4t/PtSRL vKO8WnLEywrJKxI2xX3PRQhHnw9ShrCWtIrGZFUif+oLtD7j0tZs7FFoK JFr5tUGYikBxbnScba04XKfzT9PgEBKFXg5RMlKfE+7cK9qxouz98AaoG BzrZQIe7TbMyKZsAxNejClZVAI8yVGCo4bbViszHZ2Ns8xDIOHkGk5z77 Q==; X-CSE-ConnectionGUID: aqeT3PO2QrGm9znZR1NyEA== X-CSE-MsgGUID: omAzXDkpTWGZSlyNoAEmnw== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13339366" X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="13339366" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:17 -0700 X-CSE-ConnectionGUID: HjPXEEPVTnmgePRh+bz9Iw== X-CSE-MsgGUID: KaU0VvT1RNysi/IWtuqKgA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="58029773" Received: from unknown (HELO pbossart-mobl6.lan) ([10.125.110.221]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:17 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Charles Keepax , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 11/18] ASoC: Intel: sof_sdw: Add quirks from some new Dell laptops Date: Mon, 27 May 2024 14:35:45 -0500 Message-ID: <20240527193552.165567-12-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> References: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: II73HTMDLLRB3X5Y7M5CMOFVDTP2CWFK X-Message-ID-Hash: II73HTMDLLRB3X5Y7M5CMOFVDTP2CWFK X-MailFrom: pierre-louis.bossart@linux.intel.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: From: Charles Keepax Add quirks for some new Dell laptops using cs42l43's speaker outputs. Reviewed-by: Bard Liao Signed-off-by: Charles Keepax Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_sdw.c | 88 ++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index b646b32dd311..5015d3ed6a9c 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -461,6 +461,30 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { .driver_data = (void *)(SOF_SDW_TGL_HDMI | RT711_JD2), }, + { + .callback = sof_sdw_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CF6") + }, + .driver_data = (void *)(SOF_CODEC_SPKR), + }, + { + .callback = sof_sdw_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CF9") + }, + .driver_data = (void *)(SOF_CODEC_SPKR), + }, + { + .callback = sof_sdw_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CFA") + }, + .driver_data = (void *)(SOF_CODEC_SPKR), + }, /* MeteorLake devices */ { .callback = sof_sdw_quirk_cb, @@ -495,6 +519,46 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { }, .driver_data = (void *)(RT711_JD2), }, + { + .callback = sof_sdw_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CE8") + }, + .driver_data = (void *)(SOF_CODEC_SPKR), + }, + { + .callback = sof_sdw_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CF3") + }, + .driver_data = (void *)(SOF_CODEC_SPKR), + }, + { + .callback = sof_sdw_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CF4") + }, + .driver_data = (void *)(SOF_CODEC_SPKR), + }, + { + .callback = sof_sdw_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CF5") + }, + .driver_data = (void *)(SOF_CODEC_SPKR), + }, + { + .callback = sof_sdw_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CF7") + }, + .driver_data = (void *)(SOF_CODEC_SPKR), + }, /* LunarLake devices */ { @@ -521,6 +585,30 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { }, .driver_data = (void *)(SOF_SIDECAR_AMPS), }, + { + .callback = sof_sdw_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CDC") + }, + .driver_data = (void *)(SOF_CODEC_SPKR), + }, + { + .callback = sof_sdw_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CDD") + }, + .driver_data = (void *)(SOF_CODEC_SPKR), + }, + { + .callback = sof_sdw_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CF8") + }, + .driver_data = (void *)(SOF_CODEC_SPKR), + }, {} }; From patchwork Mon May 27 19:35:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 799893 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 133C6C25B78 for ; Mon, 27 May 2024 19:39:23 +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 41387950; Mon, 27 May 2024 21:39:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 41387950 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1716838756; bh=mBR1eG8LrTH2tWng+DOwRhMM8oYZsu8AdmROfY29hRM=; 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=p/Sh4FC/Gkc2xhHmg9GudgqFwYfe8Ck2xXteHeGRcBytOjkDSiXA9s2B5Z3TzkuB1 KB8ZjipxQKWYjmZmJ+J0i61r/54hrWZR5i3IPu0PasVJo6IXZNUxmk0PpQ0FURHqQg rMJGN23uiP1bqSwtuM10+3ZYSK8kBgltqEkLt8PA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7A644F806DE; Mon, 27 May 2024 21:36:57 +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 C00B2F805A0; Mon, 27 May 2024 21:36:56 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D6183F806C7; Mon, 27 May 2024 21:36:53 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 989F8F8051E for ; Mon, 27 May 2024 21:36:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 989F8F8051E Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=E16j+zvv DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716838584; x=1748374584; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mBR1eG8LrTH2tWng+DOwRhMM8oYZsu8AdmROfY29hRM=; b=E16j+zvv0GMDfdfydYDLAW2aqmV2mnQJU/1b+6SQBacegzBoUhgIU/hF PfQyQ5u/jOH0WMlqXBLuTndBxohdPfsmTjBshzr+k8u6Y3xqlk549nECX /FL84Whu9POcus6Jxo22TSCrXJ8tgjtvyYuUwpk0GfQhfKi6tqAVW3BMt lleHLF50rGTtribla8113ltPdV5nvt+u0/slz2b8CLoDNDA5UQgdgGuGR Keq/ADW+haFVoyJmMrELsA8GJGWt54C4wK2d3cPEgyCcbpIKE5FyR7ZYU zPkMEDXtW3FmXEGrqoKzid11alaL8s7dyfcv4xLC5fk3GhR/CjpFM1YAl A==; X-CSE-ConnectionGUID: 9gcxfEbSTRyecDitx5WlVw== X-CSE-MsgGUID: JBHEAJB6TkyWi2xCu0SJPg== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13339375" X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="13339375" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:18 -0700 X-CSE-ConnectionGUID: Nw3ssMQYQKyk3AkUJG+/Qw== X-CSE-MsgGUID: j/KG1HWrQLiI3IAIOOw8Gg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="58029777" Received: from unknown (HELO pbossart-mobl6.lan) ([10.125.110.221]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:17 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 12/18] ASoC: SOF: sof-audio: rename dai clock setting query function Date: Mon, 27 May 2024 14:35:46 -0500 Message-ID: <20240527193552.165567-13-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> References: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: 3U2Y5LLJWRYWZMUUMSUCOWDM6YZYABLM X-Message-ID-Hash: 3U2Y5LLJWRYWZMUUMSUCOWDM6YZYABLM X-MailFrom: pierre-louis.bossart@linux.intel.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: From: Brent Lu We are going to extend the dai_get_clk() callback function to retrieve other dai-specific settings like tdm slot number, not just mclk/bclk frequencies. Revisit functions and macros related to the callback and replace the string 'clk' with 'param' to reflect the ongoing change. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/ipc3-topology.c | 12 ++++++------ sound/soc/sof/ipc4-topology.c | 12 ++++++------ sound/soc/sof/sof-audio.c | 10 +++++----- sound/soc/sof/sof-audio.h | 8 ++++---- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/sound/soc/sof/ipc3-topology.c b/sound/soc/sof/ipc3-topology.c index 32c7d1f3b528..b68dea41cd95 100644 --- a/sound/soc/sof/ipc3-topology.c +++ b/sound/soc/sof/ipc3-topology.c @@ -2500,7 +2500,7 @@ static int sof_ipc3_tear_down_all_pipelines(struct snd_sof_dev *sdev, bool verif return 0; } -static int sof_ipc3_dai_get_clk(struct snd_sof_dev *sdev, struct snd_sof_dai *dai, int clk_type) +static int sof_ipc3_dai_get_param(struct snd_sof_dev *sdev, struct snd_sof_dai *dai, int param_type) { struct sof_dai_private_data *private = dai->private; @@ -2509,15 +2509,15 @@ static int sof_ipc3_dai_get_clk(struct snd_sof_dev *sdev, struct snd_sof_dai *da switch (private->dai_config->type) { case SOF_DAI_INTEL_SSP: - switch (clk_type) { - case SOF_DAI_CLK_INTEL_SSP_MCLK: + switch (param_type) { + case SOF_DAI_PARAM_INTEL_SSP_MCLK: return private->dai_config->ssp.mclk_rate; - case SOF_DAI_CLK_INTEL_SSP_BCLK: + case SOF_DAI_PARAM_INTEL_SSP_BCLK: return private->dai_config->ssp.bclk_rate; default: + dev_err(sdev->dev, "invalid SSP param %d\n", param_type); break; } - dev_err(sdev->dev, "fail to get SSP clk %d rate\n", clk_type); break; default: /* not yet implemented for platforms other than the above */ @@ -2692,7 +2692,7 @@ const struct sof_ipc_tplg_ops ipc3_tplg_ops = { .widget_free = sof_ipc3_widget_free, .widget_setup = sof_ipc3_widget_setup, .dai_config = sof_ipc3_dai_config, - .dai_get_clk = sof_ipc3_dai_get_clk, + .dai_get_param = sof_ipc3_dai_get_param, .set_up_all_pipelines = sof_ipc3_set_up_all_pipelines, .tear_down_all_pipelines = sof_ipc3_tear_down_all_pipelines, .parse_manifest = sof_ipc3_parse_manifest, diff --git a/sound/soc/sof/ipc4-topology.c b/sound/soc/sof/ipc4-topology.c index beff10989324..67e34fd559f2 100644 --- a/sound/soc/sof/ipc4-topology.c +++ b/sound/soc/sof/ipc4-topology.c @@ -3130,7 +3130,7 @@ static int sof_ipc4_parse_manifest(struct snd_soc_component *scomp, int index, return 0; } -static int sof_ipc4_dai_get_clk(struct snd_sof_dev *sdev, struct snd_sof_dai *dai, int clk_type) +static int sof_ipc4_dai_get_param(struct snd_sof_dev *sdev, struct snd_sof_dai *dai, int param_type) { struct sof_ipc4_copier *ipc4_copier = dai->private; struct snd_soc_tplg_hw_config *hw_config; @@ -3169,13 +3169,13 @@ static int sof_ipc4_dai_get_clk(struct snd_sof_dev *sdev, struct snd_sof_dai *da switch (ipc4_copier->dai_type) { case SOF_DAI_INTEL_SSP: - switch (clk_type) { - case SOF_DAI_CLK_INTEL_SSP_MCLK: + switch (param_type) { + case SOF_DAI_PARAM_INTEL_SSP_MCLK: return le32_to_cpu(hw_config->mclk_rate); - case SOF_DAI_CLK_INTEL_SSP_BCLK: + case SOF_DAI_PARAM_INTEL_SSP_BCLK: return le32_to_cpu(hw_config->bclk_rate); default: - dev_err(sdev->dev, "Invalid clk type for SSP %d\n", clk_type); + dev_err(sdev->dev, "invalid SSP param %d\n", param_type); break; } break; @@ -3352,7 +3352,7 @@ const struct sof_ipc_tplg_ops ipc4_tplg_ops = { .route_free = sof_ipc4_route_free, .dai_config = sof_ipc4_dai_config, .parse_manifest = sof_ipc4_parse_manifest, - .dai_get_clk = sof_ipc4_dai_get_clk, + .dai_get_param = sof_ipc4_dai_get_param, .tear_down_all_pipelines = sof_ipc4_tear_down_all_pipelines, .link_setup = sof_ipc4_link_setup, }; diff --git a/sound/soc/sof/sof-audio.c b/sound/soc/sof/sof-audio.c index b3ac040811e7..2421a115747e 100644 --- a/sound/soc/sof/sof-audio.c +++ b/sound/soc/sof/sof-audio.c @@ -978,7 +978,7 @@ struct snd_sof_dai *snd_sof_find_dai(struct snd_soc_component *scomp, return NULL; } -static int sof_dai_get_clk(struct snd_soc_pcm_runtime *rtd, int clk_type) +static int sof_dai_get_param(struct snd_soc_pcm_runtime *rtd, int param_type) { struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, SOF_AUDIO_PCM_DRV_NAME); @@ -991,8 +991,8 @@ static int sof_dai_get_clk(struct snd_soc_pcm_runtime *rtd, int clk_type) if (!dai) return 0; - if (tplg_ops && tplg_ops->dai_get_clk) - return tplg_ops->dai_get_clk(sdev, dai, clk_type); + if (tplg_ops && tplg_ops->dai_get_param) + return tplg_ops->dai_get_param(sdev, dai, param_type); return 0; } @@ -1003,7 +1003,7 @@ static int sof_dai_get_clk(struct snd_soc_pcm_runtime *rtd, int clk_type) */ int sof_dai_get_mclk(struct snd_soc_pcm_runtime *rtd) { - return sof_dai_get_clk(rtd, SOF_DAI_CLK_INTEL_SSP_MCLK); + return sof_dai_get_param(rtd, SOF_DAI_PARAM_INTEL_SSP_MCLK); } EXPORT_SYMBOL(sof_dai_get_mclk); @@ -1013,6 +1013,6 @@ EXPORT_SYMBOL(sof_dai_get_mclk); */ int sof_dai_get_bclk(struct snd_soc_pcm_runtime *rtd) { - return sof_dai_get_clk(rtd, SOF_DAI_CLK_INTEL_SSP_BCLK); + return sof_dai_get_param(rtd, SOF_DAI_PARAM_INTEL_SSP_BCLK); } EXPORT_SYMBOL(sof_dai_get_bclk); diff --git a/sound/soc/sof/sof-audio.h b/sound/soc/sof/sof-audio.h index ec2a3bb644d2..abb2a00c520d 100644 --- a/sound/soc/sof/sof-audio.h +++ b/sound/soc/sof/sof-audio.h @@ -44,8 +44,8 @@ #define WIDGET_IS_AIF_OR_DAI(id) (WIDGET_IS_DAI(id) || WIDGET_IS_AIF(id)) #define WIDGET_IS_COPIER(id) (WIDGET_IS_AIF_OR_DAI(id) || (id) == snd_soc_dapm_buffer) -#define SOF_DAI_CLK_INTEL_SSP_MCLK 0 -#define SOF_DAI_CLK_INTEL_SSP_BCLK 1 +#define SOF_DAI_PARAM_INTEL_SSP_MCLK 0 +#define SOF_DAI_PARAM_INTEL_SSP_BCLK 1 enum sof_widget_op { SOF_WIDGET_PREPARE, @@ -208,7 +208,7 @@ struct sof_ipc_tplg_widget_ops { * @widget_setup: Function pointer for setting up setup in the DSP * @widget_free: Function pointer for freeing widget in the DSP * @dai_config: Function pointer for sending DAI config IPC to the DSP - * @dai_get_clk: Function pointer for getting the DAI clock setting + * @dai_get_param: Function pointer for getting the DAI parameter * @set_up_all_pipelines: Function pointer for setting up all topology pipelines * @tear_down_all_pipelines: Function pointer for tearing down all topology pipelines * @parse_manifest: Function pointer for ipc4 specific parsing of topology manifest @@ -229,7 +229,7 @@ struct sof_ipc_tplg_ops { int (*widget_free)(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget); int (*dai_config)(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget, unsigned int flags, struct snd_sof_dai_config_data *data); - int (*dai_get_clk)(struct snd_sof_dev *sdev, struct snd_sof_dai *dai, int clk_type); + int (*dai_get_param)(struct snd_sof_dev *sdev, struct snd_sof_dai *dai, int param_type); int (*set_up_all_pipelines)(struct snd_sof_dev *sdev, bool verify); int (*tear_down_all_pipelines)(struct snd_sof_dev *sdev, bool verify); int (*parse_manifest)(struct snd_soc_component *scomp, int index, From patchwork Mon May 27 19:35:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 799892 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 D3F77C25B78 for ; Mon, 27 May 2024 19:39:40 +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 450FFDEE; Mon, 27 May 2024 21:39:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 450FFDEE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1716838779; bh=idMrl9zK4G+zC54METxzu7CjjMB3d2KiXfv/+/cCTQQ=; 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=sos7CgHqiN9zFzNDRQaMBLllZbpqK9x5QvqlgIq7qRxXF7DDbcXdENk0LuNv+JfVT PJ6xgo5Y7HmoLyXCbbJeCMsAMMfNLHQv9MfkpgMrtLMcJ/DegZ14y5GhqLwrdGFVpB s/9bX/7Tu+ghJewTbIgdp8WywdmpljaesdXEl+DM= Received: by alsa1.perex.cz (Postfix, from userid 50401) id CAA3CF80726; Mon, 27 May 2024 21:37:01 +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 8019AF8070C; Mon, 27 May 2024 21:37:01 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8A196F806E7; Mon, 27 May 2024 21:36:57 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 9F794F80525 for ; Mon, 27 May 2024 21:36:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9F794F80525 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=WmP0n4LN DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716838584; x=1748374584; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=idMrl9zK4G+zC54METxzu7CjjMB3d2KiXfv/+/cCTQQ=; b=WmP0n4LNTWlJFk6j+HCYJNgxDpq/HGnpdQvCBnuIVc4t74vSF2zWOjcY I4ZAuQ3+d7efUk55xkleFYFcg+vd475NI1is4ApDzHXQm5MpI4uMGgel9 Fi1ztaW48kNxrQ2wC+kC51KY5C8TTq3icyKUPft8JBTbd/cWWq3qXVawC SO+zbBPkTAGpbWd/YYZ0PLrWj/Zj5Qn3yOH3I82NiFRcr+CT9GDS6jir+ UxIkVVzvNhEgk52MN/wXDOKB0OM6LGwwU39Oi+AeriDkzmzA/UYzvrMNN 1jAIVlP9hxPtQlCL949pgd9SOpga0AFMmUonFLUS3Tebovfe8EIcgZeO4 A==; X-CSE-ConnectionGUID: fMkCwQvwTMerz5Vw1rA4Sg== X-CSE-MsgGUID: jrYhVor/TSy1g31b+ZIIOA== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13339381" X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="13339381" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:19 -0700 X-CSE-ConnectionGUID: dgaJvZ/bTNyiyEGIQkJ3Fg== X-CSE-MsgGUID: IH8YwbcjRkCzIfjJqEg1fQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="58029781" Received: from unknown (HELO pbossart-mobl6.lan) ([10.125.110.221]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:18 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 13/18] ASoC: SOF: sof-audio: add sof_dai_get_tdm_slots function Date: Mon, 27 May 2024 14:35:47 -0500 Message-ID: <20240527193552.165567-14-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> References: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: QDJG7VKIVCCMWUCKJ6D2QTQWBP76WBWJ X-Message-ID-Hash: QDJG7VKIVCCMWUCKJ6D2QTQWBP76WBWJ X-MailFrom: pierre-louis.bossart@linux.intel.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: From: Brent Lu An new interface, sof_dai_get_tdm_slots(), is added for machine driver to get tdm slot number from topology. The dai_get_param() callback needs to support new parameter type SOF_DAI_PARAM_INTEL_SSP_TDM_SLOTS by returning the tdm slot number of specific SSP port. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- include/sound/sof.h | 1 + sound/soc/sof/sof-audio.c | 10 ++++++++++ sound/soc/sof/sof-audio.h | 5 +++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/include/sound/sof.h b/include/sound/sof.h index ec6c30d54592..64fd5504cb2b 100644 --- a/include/sound/sof.h +++ b/include/sound/sof.h @@ -173,5 +173,6 @@ struct sof_dev_desc { int sof_dai_get_mclk(struct snd_soc_pcm_runtime *rtd); int sof_dai_get_bclk(struct snd_soc_pcm_runtime *rtd); +int sof_dai_get_tdm_slots(struct snd_soc_pcm_runtime *rtd); #endif diff --git a/sound/soc/sof/sof-audio.c b/sound/soc/sof/sof-audio.c index 2421a115747e..881eec38c2e2 100644 --- a/sound/soc/sof/sof-audio.c +++ b/sound/soc/sof/sof-audio.c @@ -1016,3 +1016,13 @@ int sof_dai_get_bclk(struct snd_soc_pcm_runtime *rtd) return sof_dai_get_param(rtd, SOF_DAI_PARAM_INTEL_SSP_BCLK); } EXPORT_SYMBOL(sof_dai_get_bclk); + +/* + * Helper to get SSP TDM slot number from a pcm_runtime. + * Return 0 if not exist. + */ +int sof_dai_get_tdm_slots(struct snd_soc_pcm_runtime *rtd) +{ + return sof_dai_get_param(rtd, SOF_DAI_PARAM_INTEL_SSP_TDM_SLOTS); +} +EXPORT_SYMBOL(sof_dai_get_tdm_slots); diff --git a/sound/soc/sof/sof-audio.h b/sound/soc/sof/sof-audio.h index abb2a00c520d..49be02234fc3 100644 --- a/sound/soc/sof/sof-audio.h +++ b/sound/soc/sof/sof-audio.h @@ -44,8 +44,9 @@ #define WIDGET_IS_AIF_OR_DAI(id) (WIDGET_IS_DAI(id) || WIDGET_IS_AIF(id)) #define WIDGET_IS_COPIER(id) (WIDGET_IS_AIF_OR_DAI(id) || (id) == snd_soc_dapm_buffer) -#define SOF_DAI_PARAM_INTEL_SSP_MCLK 0 -#define SOF_DAI_PARAM_INTEL_SSP_BCLK 1 +#define SOF_DAI_PARAM_INTEL_SSP_MCLK 0 +#define SOF_DAI_PARAM_INTEL_SSP_BCLK 1 +#define SOF_DAI_PARAM_INTEL_SSP_TDM_SLOTS 2 enum sof_widget_op { SOF_WIDGET_PREPARE, From patchwork Mon May 27 19:35:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 799269 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 A531AC25B74 for ; Mon, 27 May 2024 19:39:30 +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 1D6C493A; Mon, 27 May 2024 21:39:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1D6C493A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1716838769; bh=pT8b6UcO81biTjXtBIqTvq5DBJ9GY2SYfo6YadyiA1k=; 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=jcgeOqmNUlGM7ylXA5O2qQLV2cZTlW50OvS9fBMx09f92QF/hqvXcCRGPlDMBtXb0 +TBroNbybh2BgTPf+DUq+GUivEpa49owKQWKUC58QxUXCPP7blW/nfA1fEKsfbm5JN 0pCwWt0at2axD+U3HUo+a8uFfRdrCFL+sd2CJ9EQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 81A33F806ED; Mon, 27 May 2024 21:37:00 +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 B435DF805C4; Mon, 27 May 2024 21:36:59 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 72043F806B4; Mon, 27 May 2024 21:36:55 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 3D944F8051F for ; Mon, 27 May 2024 21:36:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3D944F8051F Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=RpaMUaiv DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716838584; x=1748374584; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pT8b6UcO81biTjXtBIqTvq5DBJ9GY2SYfo6YadyiA1k=; b=RpaMUaivwC+wm5vRa2fF9Y33ylkXZ+pLvbNBOIBjCW5sRDUwGGbu0ufy iMCSDg2z+H1IzXi2wn9kZadzkj2KgfyJSKyLvv8bTaJmaqw6Qff06Au6b t+cSzbvAxls5rmazV2iK35V5/i5MfoZDm3WEcvUO919J/NF3wwPRxxee9 rbIr9L66PTEML6WKQaaKh5P/fgNUBfZwICZphYSLNQbGsZdjrZ2UMv/et my0HQGzK2iBDhAwvGWQmTStuXJd2VDCHSiijLs8Nh66hjRpv0kZw7Xq3p 1PQOzApOgpzCytAxzW99/+MuaqAN9SWnbCNWrRaSlPsOgOmQls6r/DP9A g==; X-CSE-ConnectionGUID: /+vPTS64SOCWphTdnQNqaw== X-CSE-MsgGUID: qvGZmXSMQiuGjXJ9UDrNuQ== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13339387" X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="13339387" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:20 -0700 X-CSE-ConnectionGUID: ybOwgpdeRLafsIn1uiQ2dg== X-CSE-MsgGUID: ceLCfibgSMaTf2xd0s1rYw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="58029785" Received: from unknown (HELO pbossart-mobl6.lan) ([10.125.110.221]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:19 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 14/18] ASoC: SOF: ipc3-topology: support tdm slot number query Date: Mon, 27 May 2024 14:35:48 -0500 Message-ID: <20240527193552.165567-15-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> References: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: P7SFMCSFLTVB45UEQDOFCZQJXUB34HXN X-Message-ID-Hash: P7SFMCSFLTVB45UEQDOFCZQJXUB34HXN X-MailFrom: pierre-louis.bossart@linux.intel.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: From: Brent Lu Support the new parameter type SOF_DAI_PARAM_INTEL_SSP_TDM_SLOTS in sof_ipc3_dai_get_param() function to get the tdm slot number of specific SSP port. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/ipc3-topology.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/sof/ipc3-topology.c b/sound/soc/sof/ipc3-topology.c index b68dea41cd95..be61e377e59e 100644 --- a/sound/soc/sof/ipc3-topology.c +++ b/sound/soc/sof/ipc3-topology.c @@ -2514,6 +2514,8 @@ static int sof_ipc3_dai_get_param(struct snd_sof_dev *sdev, struct snd_sof_dai * return private->dai_config->ssp.mclk_rate; case SOF_DAI_PARAM_INTEL_SSP_BCLK: return private->dai_config->ssp.bclk_rate; + case SOF_DAI_PARAM_INTEL_SSP_TDM_SLOTS: + return private->dai_config->ssp.tdm_slots; default: dev_err(sdev->dev, "invalid SSP param %d\n", param_type); break; From patchwork Mon May 27 19:35:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 799891 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 16BD4C25B74 for ; Mon, 27 May 2024 19:40:23 +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 40744829; Mon, 27 May 2024 21:40:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 40744829 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1716838821; bh=TmJuRDSQp2fRkO+qt84U2YXpR8Orn462Xy6kPz0SgRc=; 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=bLmlIE8EeESgdDFFri3t/eFhZXdPE5RPcNWoryYb4PocxuxQUhfN5PCb5xDV8YrGT MVwRbJiSmqrNsL85rJfXhcNsyblfZEbi69LsTz5YYgApuQxta7A2FApQyd+/RxqEDT 5Rj+PY5dgmFV+ShoRSY+HTAejt+xzK5rhKgBKy/k= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6C863F807CA; Mon, 27 May 2024 21:37:08 +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 4ECB4F807D0; Mon, 27 May 2024 21:37:08 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9A3D6F80737; Mon, 27 May 2024 21:37:03 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 A2256F80587 for ; Mon, 27 May 2024 21:36:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A2256F80587 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=VHqSqX9C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716838586; x=1748374586; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TmJuRDSQp2fRkO+qt84U2YXpR8Orn462Xy6kPz0SgRc=; b=VHqSqX9CakLPxXxPyC3hcnKhE9wKBwAJF+vIP7M2fNPRXNrUDSXSPdNP RTJ6VUFvRZkyj+lgPoXNArDe+Yvd3HtqQpAhQi8OqAmCWx66+ZsqsU/Zq FSZAw349URqZzrCeM0nnCM1xzEY2kZzugkLccMSjnzGeY8iYstfjSb2Se vJiO50MVh989D2CbLDDDJMwEFu31EzwNV42IPmIOiCit/qHx6of+2BJ61 +FSQtgTXxhSER7CZGl+cyv0ouTiCJyUyYOH1WjsQ4bKaEv5INGm2UpYNG XFRz5iUdA0IsMXp9qrLG00dXfsRm3OzuHcndSd5KeWygZOYYQcQKDrew/ g==; X-CSE-ConnectionGUID: GzkD9pIoS82N/hC0wBxI6w== X-CSE-MsgGUID: jCVU2+5RTa6TCjM4nlUDrg== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13339392" X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="13339392" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:21 -0700 X-CSE-ConnectionGUID: iZyAspuQS/ya86+gCyQHLA== X-CSE-MsgGUID: +UoF/mOtQkiChc2Lm36tnQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="58029789" Received: from unknown (HELO pbossart-mobl6.lan) ([10.125.110.221]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:20 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 15/18] ASoC: SOF: ipc4-topology: support tdm slot number query Date: Mon, 27 May 2024 14:35:49 -0500 Message-ID: <20240527193552.165567-16-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> References: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: GY6MUN2WMMUOGGQH3UXFAET4ILSE22WU X-Message-ID-Hash: GY6MUN2WMMUOGGQH3UXFAET4ILSE22WU X-MailFrom: pierre-louis.bossart@linux.intel.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: From: Brent Lu Support the new parameter type SOF_DAI_PARAM_INTEL_SSP_TDM_SLOTS in sof_ipc4_dai_get_param() function to get the tdm slot number of specific SSP port. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/ipc4-topology.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/sof/ipc4-topology.c b/sound/soc/sof/ipc4-topology.c index 67e34fd559f2..df4344f7d547 100644 --- a/sound/soc/sof/ipc4-topology.c +++ b/sound/soc/sof/ipc4-topology.c @@ -3174,6 +3174,8 @@ static int sof_ipc4_dai_get_param(struct snd_sof_dev *sdev, struct snd_sof_dai * return le32_to_cpu(hw_config->mclk_rate); case SOF_DAI_PARAM_INTEL_SSP_BCLK: return le32_to_cpu(hw_config->bclk_rate); + case SOF_DAI_PARAM_INTEL_SSP_TDM_SLOTS: + return le32_to_cpu(hw_config->tdm_slots); default: dev_err(sdev->dev, "invalid SSP param %d\n", param_type); break; From patchwork Mon May 27 19:35:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 799268 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 A634AC25B78 for ; Mon, 27 May 2024 19:39:57 +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 6974485D; Mon, 27 May 2024 21:39:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6974485D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1716838795; bh=U3Rbt/6smxjRheL/77eROvvMmUYTv45AaEcSrIsRTY0=; 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=XopLxc5YxAsi+0a7nQrQ/sEqOY1iOwnDtXPmqMkQMKGIKUcgqGiISXxW1j13KZPZm rdDg/52iXAAylFEeIjuYEHl7FKqpITe7y56hCqJPoLokZV7fj++gbEj0xCrH8h0GZ2 Lwo+I0ixxQlN+LED6hHBXWjw3Fw3bn9ItwQJYy+I= Received: by alsa1.perex.cz (Postfix, from userid 50401) id E5DDFF80587; Mon, 27 May 2024 21:37:06 +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 9B3B5F8076C; Mon, 27 May 2024 21:37:06 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6BCFDF80746; Mon, 27 May 2024 21:37:02 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 9B4D6F805AA for ; Mon, 27 May 2024 21:36:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9B4D6F805AA Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=A8DCBEll DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716838586; x=1748374586; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=U3Rbt/6smxjRheL/77eROvvMmUYTv45AaEcSrIsRTY0=; b=A8DCBElljfJnjeSDM9xTZ2uyj1iviBi2Ws68GKgHsN1iDyuRrTNteEwd IfzRPLcmVA7Cpy68IDjKP3GZ5Ze0BRIor0/T6NCdFrSKfxHN647Zefe/g smDCRBCkYkVeZqzeoWGyojCzS75hcKMTVn00auN/IBN1K8f6H0T8KwFOQ VLSBg5HtY6TQHCZYq3BPrDbPcrrXGqo/TSR5Ihp8j1JIvqRp9f7tOvXxb oBWgW0eO7Tl4Zx5VM5uISLmyen0RInYL/hFzXIDzXXdezfvfLbGVTdVRT yH7pgbXAQf+lvP1G/I2Z7mP4J3w4O2h1tiut8r2aLvjtlwh8IzwfVPG0X g==; X-CSE-ConnectionGUID: trahBHSbRgSbvr7OsFvCwQ== X-CSE-MsgGUID: U2imboXZTaiHjWEo8F6Edw== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13339396" X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="13339396" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:22 -0700 X-CSE-ConnectionGUID: irAPE2IESt+QlpW+NtAvog== X-CSE-MsgGUID: BMzUnfFcTmmCq2zlcx5/Rg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="58029794" Received: from unknown (HELO pbossart-mobl6.lan) ([10.125.110.221]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:21 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 16/18] ASoC: Intel: maxim-common: rewrite max_98373_hw_params function Date: Mon, 27 May 2024 14:35:50 -0500 Message-ID: <20240527193552.165567-17-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> References: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: Y7CRQRDTHD4U5JCWB6KEUNLQIYQKDHDK X-Message-ID-Hash: Y7CRQRDTHD4U5JCWB6KEUNLQIYQKDHDK X-MailFrom: pierre-louis.bossart@linux.intel.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: From: Brent Lu Rewrite max_98373_hw_params() function to get tdm slot number from topology in runtime because earlier platforms use 4-slot setting instead of 8. Also check if the interface is configured in TDM mode before calling snd_soc_dai_set_tdm_slot() function. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_maxim_common.c | 84 +++++++++++++++++++---- 1 file changed, 72 insertions(+), 12 deletions(-) diff --git a/sound/soc/intel/boards/sof_maxim_common.c b/sound/soc/intel/boards/sof_maxim_common.c index 6c40ecc04723..f965b172fa36 100644 --- a/sound/soc/intel/boards/sof_maxim_common.c +++ b/sound/soc/intel/boards/sof_maxim_common.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include "../common/soc-intel-quirks.h" #include "sof_maxim_common.h" @@ -72,26 +73,85 @@ static struct snd_soc_dai_link_component max_98373_components[] = { }, }; +/* + * According to the definition of 'DAI Sel Mux' mixer in max98373.c, rx mask + * should choose two channels from TDM slots, the LSB of rx mask is left channel + * and the other one is right channel. + * + * For tx mask, each codec requires two channels: one for V-sense and the other + * one for I-sense. Must match the device property "maxim,vmon-slot-no" and + * "maxim,imon-slot-no" in ACPI table. + */ +static const struct { + unsigned int tx; + unsigned int rx; +} max_98373_tdm_mask[] = { + {.tx = 0x03, .rx = 0x3}, + {.tx = 0x0c, .rx = 0x3}, +}; + static int max_98373_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); + struct snd_soc_dai_link *dai_link = rtd->dai_link; struct snd_soc_dai *codec_dai; + int i; + int tdm_slots; int ret = 0; - int j; - for_each_rtd_codec_dais(rtd, j, codec_dai) { - if (!strcmp(codec_dai->component->name, MAX_98373_DEV0_NAME)) { - /* DEV0 tdm slot configuration */ - ret = snd_soc_dai_set_tdm_slot(codec_dai, 0x03, 3, 8, 32); - } else if (!strcmp(codec_dai->component->name, MAX_98373_DEV1_NAME)) { - /* DEV1 tdm slot configuration */ - ret = snd_soc_dai_set_tdm_slot(codec_dai, 0x0C, 3, 8, 32); + for_each_rtd_codec_dais(rtd, i, codec_dai) { + if (i >= ARRAY_SIZE(max_98373_tdm_mask)) { + dev_err(codec_dai->dev, "only 2 amps are supported\n"); + return -EINVAL; } - if (ret < 0) { - dev_err(codec_dai->dev, "fail to set tdm slot, ret %d\n", - ret); - return ret; + + switch (dai_link->dai_fmt & SND_SOC_DAIFMT_FORMAT_MASK) { + case SND_SOC_DAIFMT_DSP_A: + case SND_SOC_DAIFMT_DSP_B: + /* get the tplg configured tdm slot number */ + tdm_slots = sof_dai_get_tdm_slots(rtd); + if (tdm_slots <= 0) { + dev_err(rtd->dev, "invalid tdm slots %d\n", + tdm_slots); + return -EINVAL; + } + + /* + * check if tdm slot number is too small for channel + * allocation + */ + if (fls(max_98373_tdm_mask[i].tx) > tdm_slots) { + dev_err(codec_dai->dev, "slot mismatch, tx %d slots %d\n", + fls(max_98373_tdm_mask[i].tx), tdm_slots); + return -EINVAL; + } + + if (fls(max_98373_tdm_mask[i].rx) > tdm_slots) { + dev_err(codec_dai->dev, "slot mismatch, rx %d slots %d\n", + fls(max_98373_tdm_mask[i].rx), tdm_slots); + return -EINVAL; + } + + dev_dbg(codec_dai->dev, "set tdm slot: tx 0x%x rx 0x%x slots %d width %d\n", + max_98373_tdm_mask[i].tx, + max_98373_tdm_mask[i].rx, + tdm_slots, params_width(params)); + + ret = snd_soc_dai_set_tdm_slot(codec_dai, + max_98373_tdm_mask[i].tx, + max_98373_tdm_mask[i].rx, + tdm_slots, + params_width(params)); + if (ret < 0) { + dev_err(codec_dai->dev, "fail to set tdm slot, ret %d\n", + ret); + return ret; + } + break; + default: + dev_dbg(codec_dai->dev, "codec is in I2S mode\n"); + break; } } return 0; From patchwork Mon May 27 19:35:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 799267 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 CCFDFC25B74 for ; Mon, 27 May 2024 19:40:33 +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 EA9F9DF9; Mon, 27 May 2024 21:40:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EA9F9DF9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1716838832; bh=lw+prEpe7Ix+5pRhOT5340vUgwTIFSCUbquZ/PYAjDI=; 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=G0OQZ4htiqM+z8rhdiNKIQfP8ibrMRxH9Om+47zDdsEaxiNAuz/jouXuFfLxfSrvp fdhbL7rBnWyUeJFOegEf+ApfZ3SQQp29AR7CWHg6lvI15JA9Btgp1N5BfTFhU7FiyM 9v1FNllqZXI1ul/xra+w0I6nif9ycGAd7G6Iu4OE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id C7F49F80807; Mon, 27 May 2024 21:37:11 +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 56A1EF80806; Mon, 27 May 2024 21:37:11 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id DE019F80772; Mon, 27 May 2024 21:37:07 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 37A04F805C5 for ; Mon, 27 May 2024 21:36:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 37A04F805C5 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=k8MyzLgs DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716838586; x=1748374586; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lw+prEpe7Ix+5pRhOT5340vUgwTIFSCUbquZ/PYAjDI=; b=k8MyzLgsDFeht6I9f8jjWw3XXueCGPuHhQUAd8YAA5gsYLPvPThQuj0Y Pe6jyIxJl+j/6qqRtX5As4jETuQMwZ9ejs9BugVn3BHp5o7h3i5ABo95n bgL+jsrSd5YRiZzFcgjKmArh1qSThLaalbRFlT186ttQwlYNDCFkny0xm vlzpIjOcppyah4qC3kywskmN/fhz74yjSuYnq39KD7dUDZ5HOSqComaLg WtZqLv4PBc37mz8Bz+503pEuyCW3FFkiroCpbAkVueGGcFay+NZ1X0pe2 ag9w0u41va5SllP6Y+uomziQ1z0fIsLU9jf7IgNtRw3XN6dQrDfzIWKvV g==; X-CSE-ConnectionGUID: SY0WkWFLQBG5sdhBPbK0RA== X-CSE-MsgGUID: aOj0IMByRlyb7nuWmCaeRA== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13339400" X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="13339400" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:22 -0700 X-CSE-ConnectionGUID: jY6XLPGMRjWg04bM6vQt4w== X-CSE-MsgGUID: qTBBpu8UQb+QOmigmDFwIQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="58029798" Received: from unknown (HELO pbossart-mobl6.lan) ([10.125.110.221]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:21 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 17/18] ASoC: Intel: sof_da7219: remove local max98373 ops Date: Mon, 27 May 2024 14:35:51 -0500 Message-ID: <20240527193552.165567-18-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> References: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: 3Y56NF5YEUB26LQKT3MTGSLBASTUVDU4 X-Message-ID-Hash: 3Y56NF5YEUB26LQKT3MTGSLBASTUVDU4 X-MailFrom: pierre-louis.bossart@linux.intel.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: From: Brent Lu Since maxim-module could detect tdm slot number in runtime, we could remove local ops and use maxim-module to handle max98373. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_board_helpers.h | 2 - sound/soc/intel/boards/sof_da7219.c | 44 ---------------------- 2 files changed, 46 deletions(-) diff --git a/sound/soc/intel/boards/sof_board_helpers.h b/sound/soc/intel/boards/sof_board_helpers.h index dfcc2c5c25cc..faba847bb7c9 100644 --- a/sound/soc/intel/boards/sof_board_helpers.h +++ b/sound/soc/intel/boards/sof_board_helpers.h @@ -86,12 +86,10 @@ enum { /* * sof_da7219_private: private data for da7219 machine driver * - * @is_jsl_board: true for JSL boards * @mclk_en: true for mclk pin is connected * @pll_bypass: true for PLL bypass mode */ struct sof_da7219_private { - bool is_jsl_board; bool mclk_en; bool pll_bypass; }; diff --git a/sound/soc/intel/boards/sof_da7219.c b/sound/soc/intel/boards/sof_da7219.c index 886771e9b9d6..0e3c352a1672 100644 --- a/sound/soc/intel/boards/sof_da7219.c +++ b/sound/soc/intel/boards/sof_da7219.c @@ -178,40 +178,6 @@ static void da7219_codec_exit(struct snd_soc_pcm_runtime *rtd) snd_soc_component_set_jack(component, NULL, NULL); } -static int max98373_hw_params(struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *params) -{ - struct snd_soc_pcm_runtime *runtime = snd_soc_substream_to_rtd(substream); - int ret, j; - - for (j = 0; j < runtime->dai_link->num_codecs; j++) { - struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(runtime, j); - - if (!strcmp(codec_dai->component->name, MAX_98373_DEV0_NAME)) { - /* vmon_slot_no = 0 imon_slot_no = 1 for TX slots */ - ret = snd_soc_dai_set_tdm_slot(codec_dai, 0x3, 3, 4, 16); - if (ret < 0) { - dev_err(runtime->dev, "DEV0 TDM slot err:%d\n", ret); - return ret; - } - } - if (!strcmp(codec_dai->component->name, MAX_98373_DEV1_NAME)) { - /* vmon_slot_no = 2 imon_slot_no = 3 for TX slots */ - ret = snd_soc_dai_set_tdm_slot(codec_dai, 0xC, 3, 4, 16); - if (ret < 0) { - dev_err(runtime->dev, "DEV1 TDM slot err:%d\n", ret); - return ret; - } - } - } - - return 0; -} - -static const struct snd_soc_ops max98373_ops = { - .hw_params = max98373_hw_params, -}; - static int card_late_probe(struct snd_soc_card *card) { return sof_intel_board_card_late_probe(card); @@ -276,14 +242,6 @@ sof_card_dai_links_create(struct device *dev, struct snd_soc_card *card, break; case CODEC_MAX98373: max_98373_dai_link(dev, ctx->amp_link); - - if (ctx->da7219.is_jsl_board) { - ctx->amp_link->ops = &max98373_ops; /* use local ops */ - } else { - /* TBD: implement the amp for later platform */ - dev_err(dev, "max98373 not support yet\n"); - return -EINVAL; - } break; case CODEC_MAX98390: max_98390_dai_link(dev, ctx->amp_link); @@ -388,8 +346,6 @@ static int audio_probe(struct platform_device *pdev) break; } } else if (board_quirk & SOF_DA7219_JSL_BOARD) { - ctx->da7219.is_jsl_board = true; - /* overwrite the DAI link order for JSL boards */ ctx->link_order_overwrite = JSL_LINK_ORDER; From patchwork Mon May 27 19:35:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 799890 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 9002BC25B78 for ; Mon, 27 May 2024 19:40:50 +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 948A2DF9; Mon, 27 May 2024 21:40:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 948A2DF9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1716838848; bh=xbtyfMP+dOw4ckNn9T0gy9jjMzAo2gIJpbMQ1H4TmOA=; 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=MPduNByBG7wXcUSi2gSfSLt8ogWN3ECoNJPceF9HrvuxjQ+v8ht95bKiTCO8Ttvmf QzQUiAC6NkgPtu/mYOZKCKbwgEEsizIfT/sQ6kvUr2PCe+WTCNQWLr7ny/WLPdS4E0 Dzcrptj2VWSmMa03SPd3VO2InijCjbyM2tNw2SzU= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 45F80F8085C; Mon, 27 May 2024 21:37:13 +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 34C07F8083F; Mon, 27 May 2024 21:37:13 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7EC9CF807D0; Mon, 27 May 2024 21:37:09 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (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 9D67AF805BD for ; Mon, 27 May 2024 21:36:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9D67AF805BD Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=DRqsHOcb DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716838588; x=1748374588; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xbtyfMP+dOw4ckNn9T0gy9jjMzAo2gIJpbMQ1H4TmOA=; b=DRqsHOcbqSdgei/mijkfK2I0zgu+1FAaFEkvks8y1Iggid4mn7y8eA3D RxOdchKn5DHrPeVtPEgBoObFxLdbJvwh0wiL4sBnwtwAOZpekLbAKvo0s aD7cS1W3PH/S0c5DxfiBt8iwpf1+7r5ThNYqQ8JQnXNl6Zw+RQfXEHlBY vlymWZiV4bye2D0q4Iiw0jRcCp7I42hfuNej1ilEuUX5WcC8yw30zkArR PN9kYknqbS4HMJugyyzwZruajl8z1E6y/T58BcCJTLZeWp00wR2x3SSQg H5v+URlrNUv0+03qEt/XXrmmIZ1eVJuxXrPVWuc5RvOLUAjhoFgh/ova1 w==; X-CSE-ConnectionGUID: 5HQBGACbRSOnIvApB1C9kA== X-CSE-MsgGUID: LFIOYnfuQ0iZUMCJ4YbWGQ== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13339405" X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="13339405" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:23 -0700 X-CSE-ConnectionGUID: kgm4U/XGRfKKkf10mf7Q6Q== X-CSE-MsgGUID: JhswT7RSRQ+jrCL2p9xU+g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,193,1712646000"; d="scan'208";a="58029803" Received: from unknown (HELO pbossart-mobl6.lan) ([10.125.110.221]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 12:36:22 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 18/18] ASoC: Intel: sof_da7219: disable max98373 speaker pins in late_probe Date: Mon, 27 May 2024 14:35:52 -0500 Message-ID: <20240527193552.165567-19-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> References: <20240527193552.165567-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: G4A7HVYBVKSJL577K5E7D3647TQWKN2J X-Message-ID-Hash: G4A7HVYBVKSJL577K5E7D3647TQWKN2J X-MailFrom: pierre-louis.bossart@linux.intel.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: From: Brent Lu Commit 94d2d0897474 ("ASoC: Intel: Boards: tgl_max98373: add dai_trigger function") disables speaker pins in late_probe to allow DSP to enter low power state. Add same code to sof_da7219 driver. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_da7219.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sound/soc/intel/boards/sof_da7219.c b/sound/soc/intel/boards/sof_da7219.c index 0e3c352a1672..fa1f7d2d8278 100644 --- a/sound/soc/intel/boards/sof_da7219.c +++ b/sound/soc/intel/boards/sof_da7219.c @@ -180,6 +180,19 @@ static void da7219_codec_exit(struct snd_soc_pcm_runtime *rtd) static int card_late_probe(struct snd_soc_card *card) { + struct sof_card_private *ctx = snd_soc_card_get_drvdata(card); + struct snd_soc_dapm_context *dapm = &card->dapm; + int err; + + if (ctx->amp_type == CODEC_MAX98373) { + /* Disable Left and Right Spk pin after boot */ + snd_soc_dapm_disable_pin(dapm, "Left Spk"); + snd_soc_dapm_disable_pin(dapm, "Right Spk"); + err = snd_soc_dapm_sync(dapm); + if (err < 0) + return err; + } + return sof_intel_board_card_late_probe(card); }