From patchwork Wed Mar 27 16:23:53 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: 13607042 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D9E1130E32 for ; Wed, 27 Mar 2024 16:24:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556671; cv=none; b=kiwWf66+DzfPaw/Uu29gLXwicSMTrh+XNbLw9v4KDRJEx2c1EyaHL/ukvKZMUvC2qBYdkqRaGeu6CID3fCIGrFr5Q6tlY3FaKzdZBExcPDpx2+ZVVyqQeTmVXQXqtbOZ85zAGhLKSk6YeZutCScezxplvKDgTXpHgaELnkEUcP0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711556671; c=relaxed/simple; bh=BJ7HzRmQEbYAxjspN0Di11yQZZpfAoPKaesEvkARWl4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rwkHW7w6cCWQsIQHk2xdGoMy5nGSZZiYcVur70CnE+usbpbDKMpS+9/Fw1SnoRQrTrNoyHTl7tOVuQZQytLysvkBZRaxWaNsRc8/mTI6BbpiYF44Aa986YIlWwZkVMWxAQy0amQSZ0j/dpDdfV1MSwEdwqGqgpADZEYP+2hLuFA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=F4cwf9xK; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="F4cwf9xK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711556670; x=1743092670; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=BJ7HzRmQEbYAxjspN0Di11yQZZpfAoPKaesEvkARWl4=; b=F4cwf9xKx77e+sF27cp1lt1Psw2fhnaF23PSeCPC3D6BPGgf6A0MULZQ e77NP2MhnLBdFwvuFfJPD1aGNc63BxU3FKH34qhnOzsOVGGqzSGFtcu8O uE/ssWbM5xQSostSmR4fSYIM9uDp4XqxxBzGXJiZ9k0UMPDVqn0yCheVN RPn3eUWLX1xLmbs3fnWChwNJFb+Lv2dZ6i4d2h5BCK3R+vp788MJVBXlz Qrv3G5L+D6ul8VKFEYsFOnSXc0Xn70tMiva6vHY33mUrIdIV+kOiUVpFG apDky43H49GQPW6zEoo/+X17L+hGl1Iytsxj5dX3ZkQOwZhFROhA/+NNc w==; X-CSE-ConnectionGUID: A/ujxxEFTs26yfsR+yV1zg== X-CSE-MsgGUID: zPFfkNRuQcelzqDpL03JjA== X-IronPort-AV: E=McAfee;i="6600,9927,11026"; a="17221490" X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="17221490" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,159,1708416000"; d="scan'208";a="53821256" Received: from ssherman-mobl.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.117.1]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 09:24:27 -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 , Pierre-Louis Bossart Subject: [PATCH 03/18] ASoC: Intel: ssp-common: naming convention change Date: Wed, 27 Mar 2024 11:23:53 -0500 Message-Id: <20240327162408.63953-4-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> References: <20240327162408.63953-1-pierre-louis.bossart@linux.intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Brent Lu As we moved ssp-common files to new locations with new names, changing the naming convention from sof_ssp_ to snd_soc_acpi_intel_. Reviewed-by: Pierre-Louis Bossart Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- include/sound/soc-acpi-intel-ssp-common.h | 17 ++++++++++------- sound/soc/intel/boards/sof_board_helpers.c | 13 +++++++------ sound/soc/intel/boards/sof_board_helpers.h | 4 ++-- .../intel/common/soc-acpi-intel-ssp-common.c | 17 ++++++++++------- 4 files changed, 29 insertions(+), 22 deletions(-) diff --git a/include/sound/soc-acpi-intel-ssp-common.h b/include/sound/soc-acpi-intel-ssp-common.h index ff84154ce60a..b568cda11051 100644 --- a/include/sound/soc-acpi-intel-ssp-common.h +++ b/include/sound/soc-acpi-intel-ssp-common.h @@ -3,8 +3,8 @@ * Copyright(c) 2023 Intel Corporation. */ -#ifndef __SOF_SSP_COMMON_H -#define __SOF_SSP_COMMON_H +#ifndef __LINUX_SND_SOC_ACPI_INTEL_SSP_COMMON_H +#define __LINUX_SND_SOC_ACPI_INTEL_SSP_COMMON_H /* Cirrus Logic */ #define CS35L41_ACPI_HID "CSC3541" @@ -37,7 +37,7 @@ #define RT5682_ACPI_HID "10EC5682" #define RT5682S_ACPI_HID "RTL5682" -enum sof_ssp_codec { +enum snd_soc_acpi_intel_codec { CODEC_NONE, /* headphone codec */ @@ -65,9 +65,12 @@ enum sof_ssp_codec { CODEC_RT1308, }; -enum sof_ssp_codec sof_ssp_detect_codec_type(struct device *dev); -enum sof_ssp_codec sof_ssp_detect_amp_type(struct device *dev); +enum snd_soc_acpi_intel_codec +snd_soc_acpi_intel_detect_codec_type(struct device *dev); +enum snd_soc_acpi_intel_codec +snd_soc_acpi_intel_detect_amp_type(struct device *dev); -const char *sof_ssp_get_codec_name(enum sof_ssp_codec codec_type); +const char * +snd_soc_acpi_intel_get_codec_name(enum snd_soc_acpi_intel_codec codec_type); -#endif /* __SOF_SSP_COMMON_H */ +#endif /* __LINUX_SND_SOC_ACPI_INTEL_SSP_COMMON_H */ diff --git a/sound/soc/intel/boards/sof_board_helpers.c b/sound/soc/intel/boards/sof_board_helpers.c index 586600680e84..8819ab5694bf 100644 --- a/sound/soc/intel/boards/sof_board_helpers.c +++ b/sound/soc/intel/boards/sof_board_helpers.c @@ -103,13 +103,13 @@ static struct snd_soc_dai_link_component platform_component[] = { }; static int set_ssp_codec_link(struct device *dev, struct snd_soc_dai_link *link, - int be_id, enum sof_ssp_codec codec_type, + int be_id, enum snd_soc_acpi_intel_codec codec_type, int ssp_codec) { struct snd_soc_dai_link_component *cpus; dev_dbg(dev, "link %d: ssp codec %s, ssp %d\n", be_id, - sof_ssp_get_codec_name(codec_type), ssp_codec); + snd_soc_acpi_intel_get_codec_name(codec_type), ssp_codec); /* link name */ link->name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d-Codec", ssp_codec); @@ -259,12 +259,13 @@ static int set_idisp_hdmi_link(struct device *dev, struct snd_soc_dai_link *link } static int set_ssp_amp_link(struct device *dev, struct snd_soc_dai_link *link, - int be_id, enum sof_ssp_codec amp_type, int ssp_amp) + int be_id, enum snd_soc_acpi_intel_codec amp_type, + int ssp_amp) { struct snd_soc_dai_link_component *cpus; dev_dbg(dev, "link %d: ssp amp %s, ssp %d\n", be_id, - sof_ssp_get_codec_name(amp_type), ssp_amp); + snd_soc_acpi_intel_get_codec_name(amp_type), ssp_amp); /* link name */ link->name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d-Codec", ssp_amp); @@ -598,8 +599,8 @@ sof_intel_board_get_ctx(struct device *dev, unsigned long board_quirk) if (!ctx) return NULL; - ctx->codec_type = sof_ssp_detect_codec_type(dev); - ctx->amp_type = sof_ssp_detect_amp_type(dev); + ctx->codec_type = snd_soc_acpi_intel_detect_codec_type(dev); + ctx->amp_type = snd_soc_acpi_intel_detect_amp_type(dev); ctx->dmic_be_num = 2; ctx->hdmi_num = (board_quirk & SOF_NUM_IDISP_HDMI_MASK) >> diff --git a/sound/soc/intel/boards/sof_board_helpers.h b/sound/soc/intel/boards/sof_board_helpers.h index 34ea974c8493..644f6b4a1b7b 100644 --- a/sound/soc/intel/boards/sof_board_helpers.h +++ b/sound/soc/intel/boards/sof_board_helpers.h @@ -132,8 +132,8 @@ struct sof_card_private { struct snd_soc_jack headset_jack; struct sof_hdmi_private hdmi; - enum sof_ssp_codec codec_type; - enum sof_ssp_codec amp_type; + enum snd_soc_acpi_intel_codec codec_type; + enum snd_soc_acpi_intel_codec amp_type; int dmic_be_num; int hdmi_num; diff --git a/sound/soc/intel/common/soc-acpi-intel-ssp-common.c b/sound/soc/intel/common/soc-acpi-intel-ssp-common.c index 37758f4e3f32..716243a4fc9a 100644 --- a/sound/soc/intel/common/soc-acpi-intel-ssp-common.c +++ b/sound/soc/intel/common/soc-acpi-intel-ssp-common.c @@ -19,7 +19,7 @@ struct codec_map { const char *name; const char *acpi_hid; - enum sof_ssp_codec codec_type; + enum snd_soc_acpi_intel_codec codec_type; }; static const struct codec_map codecs[] = { @@ -64,7 +64,8 @@ static const struct codec_map amps[] = { CODEC_MAP_ENTRY("RT1308", RT1308_ACPI_HID, CODEC_RT1308), }; -enum sof_ssp_codec sof_ssp_detect_codec_type(struct device *dev) +enum snd_soc_acpi_intel_codec +snd_soc_acpi_intel_detect_codec_type(struct device *dev) { int i; @@ -78,9 +79,10 @@ enum sof_ssp_codec sof_ssp_detect_codec_type(struct device *dev) return CODEC_NONE; } -EXPORT_SYMBOL_NS(sof_ssp_detect_codec_type, SND_SOC_INTEL_SOF_SSP_COMMON); +EXPORT_SYMBOL_NS(snd_soc_acpi_intel_detect_codec_type, SND_SOC_INTEL_SOF_SSP_COMMON); -enum sof_ssp_codec sof_ssp_detect_amp_type(struct device *dev) +enum snd_soc_acpi_intel_codec +snd_soc_acpi_intel_detect_amp_type(struct device *dev) { int i; @@ -94,9 +96,10 @@ enum sof_ssp_codec sof_ssp_detect_amp_type(struct device *dev) return CODEC_NONE; } -EXPORT_SYMBOL_NS(sof_ssp_detect_amp_type, SND_SOC_INTEL_SOF_SSP_COMMON); +EXPORT_SYMBOL_NS(snd_soc_acpi_intel_detect_amp_type, SND_SOC_INTEL_SOF_SSP_COMMON); -const char *sof_ssp_get_codec_name(enum sof_ssp_codec codec_type) +const char * +snd_soc_acpi_intel_get_codec_name(enum snd_soc_acpi_intel_codec codec_type) { int i; @@ -115,7 +118,7 @@ const char *sof_ssp_get_codec_name(enum sof_ssp_codec codec_type) return NULL; } -EXPORT_SYMBOL_NS(sof_ssp_get_codec_name, SND_SOC_INTEL_SOF_SSP_COMMON); +EXPORT_SYMBOL_NS(snd_soc_acpi_intel_get_codec_name, SND_SOC_INTEL_SOF_SSP_COMMON); MODULE_DESCRIPTION("ASoC Intel SOF Common Machine Driver Helpers"); MODULE_AUTHOR("Brent Lu ");