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);