From patchwork Fri Jun 2 20:22:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 688251 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 07254C7EE29 for ; Fri, 2 Jun 2023 20:26:03 +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 2759C84A; Fri, 2 Jun 2023 22:25:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2759C84A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1685737561; bh=2YZ04moTsJmeoTiAF/tct/la9JlLVMwD3YOUVOAkf9A=; 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=OzYXxHwDX7cTJRN51XMdn3w4qA6KDkOpNf4Ae4+uhKr27txKD2BPwgialVhd8SOMd FieuT5KJQHx7EL+QkGJN3/Rw10oJDCwb2jnQvlpWk/H63KBH9LoPCPPKX29hSzvq8i 9k5ATxjVM8cejDzMTBIE9KpQTyHGi5tzyovzwYiI= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 790B6F805E2; Fri, 2 Jun 2023 22:23:39 +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 33F93F805D9; Fri, 2 Jun 2023 22:23:38 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 961B1F8047D; Fri, 2 Jun 2023 22:23:30 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 C5325F804DA for ; Fri, 2 Jun 2023 22:23:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C5325F804DA 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=bU6SJyJc DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685737390; x=1717273390; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2YZ04moTsJmeoTiAF/tct/la9JlLVMwD3YOUVOAkf9A=; b=bU6SJyJc1zUySfUQKw+ZklKH6jG9buftHRbRS4X2Z3wW8fhJjwCJO+z5 G9acNBSyLmCVhORl6DRMLGAZPcFvx5AF4dsb31EaU+GWlddYFNL0zP7QO AMF6T7ZenSGBszbdDcnJU33kx9Y7tcWdn585MnEO+IB/dzfQOUTwKuOzD 8kinvUGa6ls2NqcYRfQlR7SzQMq+K1PY/4Ug3N/Cgpr9qncm17WJdXuhI t15/FzEe9SD42M4jjGUx1t8KnFAC31FUa73BTDr6WBk9ofy/XGjWtPp5Q cJ14rF4/WT4vNM+q7neGdgCEwUN91Pvv2+Gf4Rh9P/vZz6AhcJBX7nXSi g==; X-IronPort-AV: E=McAfee;i="6600,9927,10729"; a="354811230" X-IronPort-AV: E=Sophos;i="6.00,214,1681196400"; d="scan'208";a="354811230" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2023 13:22:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10729"; a="773020014" X-IronPort-AV: E=Sophos;i="6.00,214,1681196400"; d="scan'208";a="773020014" Received: from clatorre-mobl1.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.190.110]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2023 13:22:49 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: tiwai@suse.de, broonie@kernel.org, Bard Liao , Pierre-Louis Bossart Subject: [PATCH 08/28] ASoC: Intel: sof_sdw: rename SOF_RT711_JDSRC to SOF_JACK_JDSRC Date: Fri, 2 Jun 2023 15:22:05 -0500 Message-Id: <20230602202225.249209-9-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230602202225.249209-1-pierre-louis.bossart@linux.intel.com> References: <20230602202225.249209-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: PXIGOZ7XLOCELKXN7E76WXDDS2TASS5G X-Message-ID-Hash: PXIGOZ7XLOCELKXN7E76WXDDS2TASS5G 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.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Bard Liao Jack Detection source can be applied to all jacks, not only rt711. No function changes. Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_sdw.c | 4 ++-- sound/soc/intel/boards/sof_sdw_common.h | 2 +- sound/soc/intel/boards/sof_sdw_rt711.c | 4 ++-- sound/soc/intel/boards/sof_sdw_rt711_sdca.c | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 8405c3231448..d925e3005394 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -24,9 +24,9 @@ MODULE_PARM_DESC(quirk, "Board-specific quirk override"); static void log_quirks(struct device *dev) { - if (SOF_RT711_JDSRC(sof_sdw_quirk)) + if (SOF_JACK_JDSRC(sof_sdw_quirk)) dev_dbg(dev, "quirk realtek,jack-detect-source %ld\n", - SOF_RT711_JDSRC(sof_sdw_quirk)); + SOF_JACK_JDSRC(sof_sdw_quirk)); if (sof_sdw_quirk & SOF_SDW_FOUR_SPK) dev_dbg(dev, "quirk SOF_SDW_FOUR_SPK enabled\n"); if (sof_sdw_quirk & SOF_SDW_TGL_HDMI) diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h index 65b3f6eee924..9640fd6dbd12 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -41,7 +41,7 @@ enum { SOF_I2S_SSP5 = BIT(5), }; -#define SOF_RT711_JDSRC(quirk) ((quirk) & GENMASK(3, 0)) +#define SOF_JACK_JDSRC(quirk) ((quirk) & GENMASK(3, 0)) #define SOF_SDW_FOUR_SPK BIT(4) #define SOF_SDW_TGL_HDMI BIT(5) #define SOF_SDW_PCH_DMIC BIT(6) diff --git a/sound/soc/intel/boards/sof_sdw_rt711.c b/sound/soc/intel/boards/sof_sdw_rt711.c index 8291967f23f3..2b05e2a707de 100644 --- a/sound/soc/intel/boards/sof_sdw_rt711.c +++ b/sound/soc/intel/boards/sof_sdw_rt711.c @@ -27,9 +27,9 @@ static int rt711_add_codec_device_props(struct device *sdw_dev) struct fwnode_handle *fwnode; int ret; - if (!SOF_RT711_JDSRC(sof_sdw_quirk)) + if (!SOF_JACK_JDSRC(sof_sdw_quirk)) return 0; - props[0] = PROPERTY_ENTRY_U32("realtek,jd-src", SOF_RT711_JDSRC(sof_sdw_quirk)); + props[0] = PROPERTY_ENTRY_U32("realtek,jd-src", SOF_JACK_JDSRC(sof_sdw_quirk)); fwnode = fwnode_create_software_node(props, NULL); if (IS_ERR(fwnode)) diff --git a/sound/soc/intel/boards/sof_sdw_rt711_sdca.c b/sound/soc/intel/boards/sof_sdw_rt711_sdca.c index cf8b9793fe0e..a9ae0aa5ce0a 100644 --- a/sound/soc/intel/boards/sof_sdw_rt711_sdca.c +++ b/sound/soc/intel/boards/sof_sdw_rt711_sdca.c @@ -27,10 +27,10 @@ static int rt711_sdca_add_codec_device_props(struct device *sdw_dev) struct fwnode_handle *fwnode; int ret; - if (!SOF_RT711_JDSRC(sof_sdw_quirk)) + if (!SOF_JACK_JDSRC(sof_sdw_quirk)) return 0; - props[0] = PROPERTY_ENTRY_U32("realtek,jd-src", SOF_RT711_JDSRC(sof_sdw_quirk)); + props[0] = PROPERTY_ENTRY_U32("realtek,jd-src", SOF_JACK_JDSRC(sof_sdw_quirk)); fwnode = fwnode_create_software_node(props, NULL); if (IS_ERR(fwnode)) @@ -143,7 +143,7 @@ int sof_sdw_rt711_sdca_exit(struct snd_soc_card *card, struct snd_soc_dai_link * if (!ctx->headset_codec_dev) return 0; - if (!SOF_RT711_JDSRC(sof_sdw_quirk)) + if (!SOF_JACK_JDSRC(sof_sdw_quirk)) return 0; device_remove_software_node(ctx->headset_codec_dev);