From patchwork Tue Mar 26 16:04:22 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: 782649 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 5F1A9C54E67 for ; Tue, 26 Mar 2024 16:13:16 +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 46FDD2C21; Tue, 26 Mar 2024 17:13:04 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 46FDD2C21 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1711469594; bh=7er5XS8XPkq/Yfz89dHj6ZJt2ktjzUrDT8kk64LCDYc=; 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=Uao15jvQMPY9l2ydCo5GLLiVuUlQ7mlVdJxIdu2l7/q2C7JGefFtgAbLtiDnzm0/K ljUL+4rze0a07KT2ZGERSSOQZmOXDf9NFed+pwviSM9Ujtf82AKpxxRkSQIDznndUK ALJqWyYQLBiWiA/JhM1cr8yZ6ZSk9jRF+6VAiuB0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id B1F7DF8975E; Tue, 26 Mar 2024 17:07:21 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id BE63EF89771; Tue, 26 Mar 2024 17:07:20 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id ED791F8080A; Tue, 26 Mar 2024 17:06:40 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) (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 BC333F805F1 for ; Tue, 26 Mar 2024 17:05:54 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BC333F805F1 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=U2gwX66T DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711469156; x=1743005156; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7er5XS8XPkq/Yfz89dHj6ZJt2ktjzUrDT8kk64LCDYc=; b=U2gwX66T34ncJICPCAO6xttRyEBvKXCJB8N3XA809VtkSNjZKvllc7OD eo5ttpejVsRwhJbLqsjYxRU71t1nS3LJkEmULnQ60wPvPJaUfwPTKapml sC56eLtiXfjpq5VfNDNbxl6x8X+RmUWUT27QxBlAJTomXLP6MZhGzZ2L5 EcKs8gdNP7BcfKu6HWaKAzFbbj35vIKxEZOomx7w6pcZA7Y6hwa3GHz98 hI6ziXxdOZ434QRJnL435nYAUA6GZeM5GZb/F6jedtUr6h7KIW82DnPxv kYDd2sK5G+g/rxxoNzeZK8w2usGH2WxLFvLsy3iQQPrzBKyrybp/mQ33S w==; X-CSE-ConnectionGUID: tShHL5k6TH68AcPry0C5vw== X-CSE-MsgGUID: CJYEVTj9SR6zVD9OgC9cGA== X-IronPort-AV: E=McAfee;i="6600,9927,11025"; a="17260521" X-IronPort-AV: E=Sophos;i="6.07,156,1708416000"; d="scan'208";a="17260521" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2024 09:05:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,156,1708416000"; d="scan'208";a="20482425" Received: from bhubbert-mobl.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.65.108]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2024 09:05:01 -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 , Richard Fitzgerald , Shuming Fan , Jack Yu , Oder Chiou , Bard liao , Chao Song , =?utf-8?q?P=C3=A9ter_Ujfalusi?= , Pierre-Louis Bossart Subject: [PATCH 27/34] ASoC: Intel: sof_sdw_rt722_sdca: use rt_dmic_rtd_init Date: Tue, 26 Mar 2024 11:04:22 -0500 Message-Id: <20240326160429.13560-28-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240326160429.13560-1-pierre-louis.bossart@linux.intel.com> References: <20240326160429.13560-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: 5WI6RLKDD4R2HD56WOCQEYD6HGE3HEIF X-Message-ID-Hash: 5WI6RLKDD4R2HD56WOCQEYD6HGE3HEIF 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 rt_dmic_rtd_init() can be used for rt722 dmic, too. Reviewed-by: Chao Song Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_sdw.c | 2 +- sound/soc/intel/boards/sof_sdw_common.h | 1 - sound/soc/intel/boards/sof_sdw_rt722_sdca.c | 14 -------------- sound/soc/intel/boards/sof_sdw_rt_dmic.c | 1 + 4 files changed, 2 insertions(+), 16 deletions(-) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index bb8429a83467..3874da8d7fe4 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -917,7 +917,7 @@ static struct sof_sdw_codec_info codec_info_list[] = { .dai_name = "rt722-sdca-aif3", .dai_type = SOF_SDW_DAI_TYPE_MIC, .dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID}, - .rtd_init = rt722_sdca_dmic_rtd_init, + .rtd_init = rt_dmic_rtd_init, }, }, .dai_num = 3, diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h index 315b2a298195..2132d3fc42f8 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -183,7 +183,6 @@ int rt700_rtd_init(struct snd_soc_pcm_runtime *rtd); int rt711_rtd_init(struct snd_soc_pcm_runtime *rtd); int rt712_spk_rtd_init(struct snd_soc_pcm_runtime *rtd); int rt722_spk_rtd_init(struct snd_soc_pcm_runtime *rtd); -int rt722_sdca_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd); int rt_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd); int rt_amp_spk_rtd_init(struct snd_soc_pcm_runtime *rtd); int rt_sdca_jack_rtd_init(struct snd_soc_pcm_runtime *rtd); diff --git a/sound/soc/intel/boards/sof_sdw_rt722_sdca.c b/sound/soc/intel/boards/sof_sdw_rt722_sdca.c index 4947d16c70db..e5c2a36e400b 100644 --- a/sound/soc/intel/boards/sof_sdw_rt722_sdca.c +++ b/sound/soc/intel/boards/sof_sdw_rt722_sdca.c @@ -59,17 +59,3 @@ int rt722_spk_rtd_init(struct snd_soc_pcm_runtime *rtd) return ret; } -int rt722_sdca_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd) -{ - struct snd_soc_card *card = rtd->card; - struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); - struct snd_soc_component *component = codec_dai->component; - - card->components = devm_kasprintf(card->dev, GFP_KERNEL, - "%s mic:%s", - card->components, component->name_prefix); - if (!card->components) - return -ENOMEM; - - return 0; -} diff --git a/sound/soc/intel/boards/sof_sdw_rt_dmic.c b/sound/soc/intel/boards/sof_sdw_rt_dmic.c index 9091f5b5c648..5aec8422656c 100644 --- a/sound/soc/intel/boards/sof_sdw_rt_dmic.c +++ b/sound/soc/intel/boards/sof_sdw_rt_dmic.c @@ -15,6 +15,7 @@ static const char * const dmics[] = { "rt715", "rt712-sdca-dmic", + "rt722-sdca", }; int rt_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd)