From patchwork Fri May 12 18:16:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 681839 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 18ED0C77B7C for ; Fri, 12 May 2023 18:19:35 +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 DE323EA0; Fri, 12 May 2023 20:18:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DE323EA0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1683915569; bh=ydK/r2JHXPfGT+V1IIADfAgM+ZsKbIkuXlTEsk1R7pM=; 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=j6rz//BJiFYpP6QaISJtDW2Z/rkoZaRN1yvHAiF2+6uU/obgvymoGJWch/3tf/JdF zBHMX8Zbf5P/Qe7tmRlyKZHZgGnV+3gelCyhdtvfTs6GSAvc27rntXBBbBhh/ggn3O B6Oc02kD82tqL5ZEOWCdoxLwo9k/LoKBoM477qdw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 94CBBF8055A; Fri, 12 May 2023 20:17:49 +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 10A48F8055A; Fri, 12 May 2023 20:17:49 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E10B1F8053B; Fri, 12 May 2023 20:17:42 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 BF6D3F8032D for ; Fri, 12 May 2023 20:17:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BF6D3F8032D 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=L6UUH6WQ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683915459; x=1715451459; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ydK/r2JHXPfGT+V1IIADfAgM+ZsKbIkuXlTEsk1R7pM=; b=L6UUH6WQKQJOGYYOJwKPDlPc3qB4wdK+U16SsWBI/SZbFn09/s6G86OE VASblqyaSolLQROtUYt9Aa8GpS2spt3y+JW3EyuIeIzw4o4oYbFR1+Hky wwsAA/XBA4mdsYCb38I3hjI9nMzwF3ZNvHOxpZREABjrLoRmW/T/euHo+ QO6C/YsPO3kZmV8TqNCUqorZUy4JUY1KZU3WXAp5LmIJhUyKnuwEJCLHC CfVdbZ+qYYUD42bnVvA3hf1HMXkHii7Bv/wndOCQwfMWYXqmJh5UKlMEG Nqrr2kq0gTwNpbicqMnlCpGSH7Yi8cPp2vwK8xgXkf5cPr9w7hxIynsPL A==; X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="331223194" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="331223194" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 11:17:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="769895047" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="769895047" Received: from winkelru-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.144.249]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 11:17:15 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: tiwai@suse.de, broonie@kernel.org, vkoul@kernel.org, Pierre-Louis Bossart , =?utf-8?q?P?= =?utf-8?q?=C3=A9ter_Ujfalusi?= , Ranjani Sridharan , Rander Wang , Bard Liao Subject: [PATCH 1/9] ASoC: SOF: Intel: hda-dai: simplify .prepare callback Date: Fri, 12 May 2023 13:16:54 -0500 Message-Id: <20230512181702.117483-2-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230512181702.117483-1-pierre-louis.bossart@linux.intel.com> References: <20230512181702.117483-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: ZAJWWBFKP3IPMC6RUO2GKIMRZZ6C774A X-Message-ID-Hash: ZAJWWBFKP3IPMC6RUO2GKIMRZZ6C774A 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: The code has been cleaned-up multiple times, but while adding the new abstractions for DMIC/SSP/SoundWire it appears that we don't really need a specific sequence for .prepare, and we can reuse what .hw_params already does. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Bard Liao --- sound/soc/sof/intel/hda-dai.c | 34 +++------------------------------- 1 file changed, 3 insertions(+), 31 deletions(-) diff --git a/sound/soc/sof/intel/hda-dai.c b/sound/soc/sof/intel/hda-dai.c index 44a5d94c5050..61eb25cfdbe1 100644 --- a/sound/soc/sof/intel/hda-dai.c +++ b/sound/soc/sof/intel/hda-dai.c @@ -188,14 +188,6 @@ static int hda_link_dma_hw_params(struct snd_pcm_substream *substream, return 0; } -static int hda_link_dma_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai) -{ - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); - int stream = substream->stream; - - return hda_link_dma_hw_params(substream, &rtd->dpcm[stream].hw_params, cpu_dai); -} - static int hda_dai_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai) { struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(cpu_dai->component); @@ -251,30 +243,10 @@ static int hda_dai_hw_params(struct snd_pcm_substream *substream, static int hda_dai_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { - struct snd_soc_dapm_widget *w = snd_soc_dai_get_widget(dai, substream->stream); - struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(dai->component); - const struct hda_dai_widget_dma_ops *ops = hda_dai_get_ops(substream, dai); - struct hdac_ext_stream *hext_stream; - struct snd_sof_dai_config_data data = { 0 }; - unsigned int flags = SOF_DAI_CONFIG_FLAGS_HW_PARAMS; - int ret; + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); + int stream = substream->stream; - hext_stream = ops->get_hext_stream(sdev, dai, substream); - if (hext_stream && hext_stream->link_prepared) - return 0; - - dev_dbg(sdev->dev, "prepare stream dir %d\n", substream->stream); - - ret = hda_link_dma_prepare(substream, dai); - if (ret < 0) - return ret; - - hext_stream = ops->get_hext_stream(sdev, dai, substream); - - flags |= SOF_DAI_CONFIG_FLAGS_2_STEP_STOP << SOF_DAI_CONFIG_FLAGS_QUIRK_SHIFT; - data.dai_data = hdac_stream(hext_stream)->stream_tag - 1; - - return hda_dai_config(w, flags, &data); + return hda_dai_hw_params(substream, &rtd->dpcm[stream].hw_params, dai); } /* From patchwork Fri May 12 18:16:55 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: 681220 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 5645FC77B7F for ; Fri, 12 May 2023 18:19:39 +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 3515DEAD; Fri, 12 May 2023 20:18:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3515DEAD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1683915577; bh=dUanq3yDptZuV/4GYL510FaJnL/T4c8BB1tvWWScv8U=; 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=u1y+oETp03/Y/a1PpqpYfqF11UTMDOixjeJlnZPBC+92wtsziUF9Tts+S/+cnbTIL UAsBaINF3Id25+EJoQ5J4zMurDtFSs4IY8Dk5fJ4j3exXplbcWtLFFSIMK/HF+3e10 rK3+HcVxrapx9iv2/79Mow+KZXJkfyf3sHcWoRwM= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5EA4DF8057C; Fri, 12 May 2023 20:17: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 B13ADF80579; Fri, 12 May 2023 20:17:52 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 606FCF80542; Fri, 12 May 2023 20:17:45 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 ACB12F8052E for ; Fri, 12 May 2023 20:17:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz ACB12F8052E 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=BNvH3hFT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683915461; x=1715451461; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dUanq3yDptZuV/4GYL510FaJnL/T4c8BB1tvWWScv8U=; b=BNvH3hFTdxG+7EweNvSkXRJbxP2boBfWSArgZrEnNXtb5k16Uo3cDYDA bvaDf/UIgfxD+6289aJZJGVxorOfuAlUmeOhexXT6/GTOdq5FaP9FY8Ml RkxvVIHRl1WgpB9DKWmzcQ2aC0cfjplgNJ2pPxtWuJ9tYuS4zNSX4WtnQ pKRUdDGMREs7NZGCVVDvJT4qsFXBo2FrBVSccEqmFdQwaIdbsZZ36j+e0 FAhr9uha47/TTGXUPi6UEtVS3NdbsxLghuBYm8pP7hqNhA8uff3kQallM 8Dl26ZiBXVbr63eSYeW0xGqJXEqs4QqPNsARSnj6IBxRe4GAOP7C2QMfD g==; X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="331223202" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="331223202" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 11:17:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="769895056" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="769895056" Received: from winkelru-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.144.249]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 11:17:16 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: tiwai@suse.de, broonie@kernel.org, vkoul@kernel.org, Pierre-Louis Bossart , Ranjani Sridharan , Rander Wang , Bard Liao Subject: [PATCH 2/9] ASoC: SOF: Intel: hda-dai: remove use of cpu_dai->component drvdata Date: Fri, 12 May 2023 13:16:55 -0500 Message-Id: <20230512181702.117483-3-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230512181702.117483-1-pierre-louis.bossart@linux.intel.com> References: <20230512181702.117483-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: CQIAFOQN6SPNWFGEBBIK6NLSG7JV3AUJ X-Message-ID-Hash: CQIAFOQN6SPNWFGEBBIK6NLSG7JV3AUJ 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: The existing code relies on conversions from cpu_dai to the sdev structure pointer based on the cpu_dai component. This works fine for HDaudio but will not work for SoundWire DAIs which are registered by a different component. That's a problem preventing reuse of the HDaudio DMA stream allocation for SoundWire DAIs starting with the LunarLake platform. This patch introduces a set of helpers to perform the conversion, and an indirect way of retrieving the sdev pointer based on the swidget->comp intermediate pointer. Suggested-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Bard Liao --- sound/soc/sof/intel/hda-dai.c | 40 ++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/sound/soc/sof/intel/hda-dai.c b/sound/soc/sof/intel/hda-dai.c index 61eb25cfdbe1..7e71cce7f531 100644 --- a/sound/soc/sof/intel/hda-dai.c +++ b/sound/soc/sof/intel/hda-dai.c @@ -27,20 +27,26 @@ static bool hda_use_tplg_nhlt; module_param_named(sof_use_tplg_nhlt, hda_use_tplg_nhlt, bool, 0444); MODULE_PARM_DESC(sof_use_tplg_nhlt, "SOF topology nhlt override"); +static struct snd_sof_dev *widget_to_sdev(struct snd_soc_dapm_widget *w) +{ + struct snd_sof_widget *swidget = w->dobj.private; + struct snd_soc_component *component = swidget->scomp; + + return snd_soc_component_get_drvdata(component); +} + int hda_dai_config(struct snd_soc_dapm_widget *w, unsigned int flags, struct snd_sof_dai_config_data *data) { struct snd_sof_widget *swidget = w->dobj.private; const struct sof_ipc_tplg_ops *tplg_ops; - struct snd_soc_component *component; struct snd_sof_dev *sdev; int ret; if (!swidget) return 0; - component = swidget->scomp; - sdev = snd_soc_component_get_drvdata(component); + sdev = widget_to_sdev(w); tplg_ops = sof_ipc_get_ops(sdev, tplg); if (tplg_ops && tplg_ops->dai_config) { @@ -57,14 +63,24 @@ int hda_dai_config(struct snd_soc_dapm_widget *w, unsigned int flags, #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC) +static struct snd_sof_dev *dai_to_sdev(struct snd_pcm_substream *substream, + struct snd_soc_dai *cpu_dai) +{ + struct snd_soc_dapm_widget *w = snd_soc_dai_get_widget(cpu_dai, substream->stream); + + return widget_to_sdev(w); +} + static const struct hda_dai_widget_dma_ops * hda_dai_get_ops(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai) { struct snd_soc_dapm_widget *w = snd_soc_dai_get_widget(cpu_dai, substream->stream); - struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(cpu_dai->component); struct snd_sof_widget *swidget = w->dobj.private; + struct snd_sof_dev *sdev; struct snd_sof_dai *sdai; + sdev = widget_to_sdev(w); + /* * The swidget parameter of hda_select_dai_widget_ops() is ignored in * case of DSPless mode @@ -96,14 +112,16 @@ static int hda_link_dma_cleanup(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai, struct snd_soc_dai *codec_dai) { - struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(cpu_dai->component); const struct hda_dai_widget_dma_ops *ops = hda_dai_get_ops(substream, cpu_dai); struct hdac_stream *hstream = &hext_stream->hstream; struct hdac_bus *bus = hstream->bus; struct sof_intel_hda_stream *hda_stream; struct hdac_ext_link *hlink; + struct snd_sof_dev *sdev; int stream_tag; + sdev = dai_to_sdev(substream, cpu_dai); + hlink = snd_hdac_ext_bus_get_hlink_by_name(bus, codec_dai->component->name); if (!hlink) return -EINVAL; @@ -140,7 +158,7 @@ static int hda_link_dma_hw_params(struct snd_pcm_substream *substream, unsigned int link_bps; int stream_tag; - sdev = snd_soc_component_get_drvdata(cpu_dai->component); + sdev = dai_to_sdev(substream, cpu_dai); bus = sof_to_bus(sdev); hlink = snd_hdac_ext_bus_get_hlink_by_name(bus, codec_dai->component->name); @@ -190,11 +208,11 @@ static int hda_link_dma_hw_params(struct snd_pcm_substream *substream, static int hda_dai_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai) { - struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(cpu_dai->component); const struct hda_dai_widget_dma_ops *ops = hda_dai_get_ops(substream, cpu_dai); struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); struct hdac_ext_stream *hext_stream; + struct snd_sof_dev *sdev = dai_to_sdev(substream, cpu_dai); if (!ops) { dev_err(sdev->dev, "DAI widget ops not set\n"); @@ -213,11 +231,11 @@ static int hda_dai_hw_params(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct snd_soc_dapm_widget *w = snd_soc_dai_get_widget(dai, substream->stream); - struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(dai->component); const struct hda_dai_widget_dma_ops *ops = hda_dai_get_ops(substream, dai); struct hdac_ext_stream *hext_stream; struct snd_sof_dai_config_data data = { 0 }; unsigned int flags = SOF_DAI_CONFIG_FLAGS_HW_PARAMS; + struct snd_sof_dev *sdev = widget_to_sdev(w); int ret; if (!ops) { @@ -255,16 +273,18 @@ static int hda_dai_prepare(struct snd_pcm_substream *substream, struct snd_soc_d */ static int hda_dai_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) { - struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(dai->component); const struct hda_dai_widget_dma_ops *ops = hda_dai_get_ops(substream, dai); struct hdac_ext_stream *hext_stream; struct snd_soc_pcm_runtime *rtd; struct snd_soc_dai *codec_dai; + struct snd_sof_dev *sdev; int ret; dev_dbg(dai->dev, "cmd=%d dai %s direction %d\n", cmd, dai->name, substream->stream); + sdev = dai_to_sdev(substream, dai); + hext_stream = ops->get_hext_stream(sdev, dai, substream); if (!hext_stream) return -EINVAL; @@ -344,7 +364,7 @@ static int hda_dai_suspend(struct hdac_bus *bus) codec_dai = asoc_rtd_to_codec(rtd, 0); w = snd_soc_dai_get_widget(cpu_dai, hdac_stream(hext_stream)->direction); swidget = w->dobj.private; - sdev = snd_soc_component_get_drvdata(swidget->scomp); + sdev = widget_to_sdev(w); sdai = swidget->private; ops = sdai->platform_private; From patchwork Fri May 12 18:16:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 681838 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 8A6EEC77B7F for ; Fri, 12 May 2023 18:19:54 +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 4A6F7EAC; Fri, 12 May 2023 20:19:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4A6F7EAC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1683915592; bh=FJlxJmEIMnW0fENAakGjAEqhkRggHLqa/ov+Yz2NMVE=; 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=buvQIBvVaPoiHoHPrm8XjyDgcAj8bDTId1VFnVh/9tre1y4QVot3Ln8FHPxZ1FV9Y MKmpeBRJOH4aije0Mxpv1akfDSCK2uJGzPZ99dGsQ23H7gmkE6UbVFCGroJzvcIJmo 7hIOByzixQUTBH/hhwplU0IFm8FWvBlqMkkMB1xs= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2129FF8057F; Fri, 12 May 2023 20:17:55 +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 80AEEF8057F; Fri, 12 May 2023 20:17:54 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id ECF49F80544; Fri, 12 May 2023 20:17:45 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 DC381F80534 for ; Fri, 12 May 2023 20:17:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DC381F80534 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=TK5lTduz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683915463; x=1715451463; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FJlxJmEIMnW0fENAakGjAEqhkRggHLqa/ov+Yz2NMVE=; b=TK5lTduzhxXiXj1/Hiil7Fdit/9+ua1bL9kul0vh/QP8foBukCAu8Pwj xApXrM21N1u5XVNR6f8vM547Ty/lVktxGE1p8mad4g68tWoOTh3vACPSh TXMAn84pKnzrat17ylr+tTQWtXiPX1YcL9PcnRfUc6SQTplmlwg4Aywhn BnAyGo6o7Rc+To47EgTqOEsmmhEdqafTjzuM2fC+rSRFt5lCdSVjBL3Gw FzFI3MAVQYkZkzjJEL+pM9tlCSe9fk7YlL48PPKAqEx2kGlaTQqWAMaUE S+k+dL4K7dddBeOGyi3cb1M3wLpl6YdLGnLKfBHfVN5zOrDqep5OfxjfX A==; X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="331223205" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="331223205" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 11:17:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="769895063" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="769895063" Received: from winkelru-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.144.249]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 11:17:17 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: tiwai@suse.de, broonie@kernel.org, vkoul@kernel.org, Pierre-Louis Bossart , =?utf-8?q?P?= =?utf-8?q?=C3=A9ter_Ujfalusi?= , Rander Wang , Bard Liao Subject: [PATCH 3/9] ASoC: SOF: Intel: fix DAI number mismatch Date: Fri, 12 May 2023 13:16:56 -0500 Message-Id: <20230512181702.117483-4-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230512181702.117483-1-pierre-louis.bossart@linux.intel.com> References: <20230512181702.117483-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: 5A7K3DW4F4FKUXJDMDZTGM7KX7YIXM25 X-Message-ID-Hash: 5A7K3DW4F4FKUXJDMDZTGM7KX7YIXM25 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: The number of DAIs was based on a Kconfig option and the declaration on another. Fix before changing the dependencies. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Reviewed-by: Bard Liao --- sound/soc/sof/intel/hda.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/intel/hda.h b/sound/soc/sof/intel/hda.h index c4befacde23e..65832a38bffa 100644 --- a/sound/soc/sof/intel/hda.h +++ b/sound/soc/sof/intel/hda.h @@ -414,7 +414,7 @@ (HDA_DSP_BDL_SIZE / sizeof(struct sof_intel_dsp_bdl)) /* Number of DAIs */ -#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA) +#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC) #define SOF_SKL_NUM_DAIS 15 #else #define SOF_SKL_NUM_DAIS 8 From patchwork Fri May 12 18:16:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 681218 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 2732DC77B7C for ; Fri, 12 May 2023 18:20:47 +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 4DBB4E96; Fri, 12 May 2023 20:19:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4DBB4E96 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1683915645; bh=SWaT+KWK+gJznrJ1pm6i8Ht5XwCojfVtHHqDXSfbHj4=; 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=XDVJfmH2GgovBJEUUc3YTbgUZyQA76xUHxJv1YqDfEltvER0MzcBJcGBdUOnUwxv2 hDKHaHYTEo+8NkypnQlApY75oGEhZfnPDmHp/6rGHNfp64sP/Cq43Woc8BN4kztk8j KeVLUc41bH/3M5taZRhqGQic7yjCzh5QknVbgfyo= Received: by alsa1.perex.cz (Postfix, from userid 50401) id CF27AF805BD; Fri, 12 May 2023 20:18:02 +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 71F46F805BD; Fri, 12 May 2023 20:18:02 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 27871F80570; Fri, 12 May 2023 20:17:50 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 00614F80087 for ; Fri, 12 May 2023 20:17:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 00614F80087 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=I7wy0ymt DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683915461; x=1715451461; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=SWaT+KWK+gJznrJ1pm6i8Ht5XwCojfVtHHqDXSfbHj4=; b=I7wy0ymtZvS+Jc10FkTeme9PdCeDx111NcC19HzxDQ95DscHzYrmLe2x RM3PazwMsTwNxqcDfIY9TCZBdCWaXGfniFFt1jdphlYbVVfLA85pf4xNw wZUOtxwX8U0AcovnGNyGNroIV9K6IXg/a12rMZw+ZQPMS660C/p87tPHq maGN0TspMJ+fTD/Xq3TZVp4wIOJYettnBR8COr2C++pJ60I5rshBPPHtm cKxiFw7oC2r9AOiYDMdVMfRtCL0N7TKA/6VI2VdWR/89mPKhsAor7c+9Q T2uPJNgkXnS/ne+ScerPpBr7p/5VZpSjxhZbi+vBV+eE5mfzyI1I6coYo A==; X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="331223210" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="331223210" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 11:17:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="769895076" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="769895076" Received: from winkelru-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.144.249]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 11:17:17 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: tiwai@suse.de, broonie@kernel.org, vkoul@kernel.org, Pierre-Louis Bossart , =?utf-8?q?P?= =?utf-8?q?=C3=A9ter_Ujfalusi?= , Rander Wang , Bard Liao Subject: [PATCH 4/9] ASoC: SOF: Intel: clarify initialization when HDA_AUDIO_CODEC is not used Date: Fri, 12 May 2023 13:16:57 -0500 Message-Id: <20230512181702.117483-5-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230512181702.117483-1-pierre-louis.bossart@linux.intel.com> References: <20230512181702.117483-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: OGM5TIPIHKATTVQEHYKYICACR54ZNNIA X-Message-ID-Hash: OGM5TIPIHKATTVQEHYKYICACR54ZNNIA 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: For LunarLake support, we need to enable HDA_LINK but we also want the ability to remove HDaudio codec support, e.g. for 'nocodec' tests. This requires a small change in the bus initialization without any codec-specific callbacks provided. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Reviewed-by: Bard Liao --- sound/soc/sof/intel/hda-bus.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sound/soc/sof/intel/hda-bus.c b/sound/soc/sof/intel/hda-bus.c index acb4b85868d0..fc63085d2d74 100644 --- a/sound/soc/sof/intel/hda-bus.c +++ b/sound/soc/sof/intel/hda-bus.c @@ -70,9 +70,14 @@ void sof_hda_bus_init(struct snd_sof_dev *sdev, struct device *dev) { struct hdac_bus *bus = sof_to_bus(sdev); +#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_LINK) #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC) snd_hdac_ext_bus_init(bus, dev, &bus_core_ops, sof_hda_ext_ops); -#else /* CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC */ +#else + snd_hdac_ext_bus_init(bus, dev, NULL, NULL); +#endif +#else + memset(bus, 0, sizeof(*bus)); bus->dev = dev; @@ -87,12 +92,12 @@ void sof_hda_bus_init(struct snd_sof_dev *sdev, struct device *dev) bus->idx = 0; spin_lock_init(&bus->reg_lock); -#endif /* CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC */ +#endif /* CONFIG_SND_SOC_SOF_HDA_LINK */ } void sof_hda_bus_exit(struct snd_sof_dev *sdev) { -#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC) +#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_LINK) struct hdac_bus *bus = sof_to_bus(sdev); snd_hdac_ext_bus_exit(bus); From patchwork Fri May 12 18:16:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 681217 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 84198C77B7C for ; Fri, 12 May 2023 18:21:12 +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 85547EBE; Fri, 12 May 2023 20:20:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 85547EBE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1683915670; bh=akOz3a5d3O+q+dKd9QYnOfikOKhBsr355TSnY2hpehE=; 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=fPPBg4i2D7q7tIeq0w0c/LHn0X6KGKv/Sq7kov1FHdJNl0344DSgdncCFRNRn3FI/ jiyabxIcXDyxf7N6At9EOs2KJ/pXB0DTMQOfyFq1usTzXYjiJbywMDZ8PENnekBwqS FeOWRjSKF0DtRTtbvTnEI+2elhULd19JSTQFcacU= Received: by alsa1.perex.cz (Postfix, from userid 50401) id BCDC1F805D5; Fri, 12 May 2023 20:18: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 4BFDFF805E1; Fri, 12 May 2023 20:18:06 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 49E08F8059F; Fri, 12 May 2023 20:17:55 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 932EFF802E8 for ; Fri, 12 May 2023 20:17:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 932EFF802E8 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=HkyImDvu DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683915463; x=1715451463; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=akOz3a5d3O+q+dKd9QYnOfikOKhBsr355TSnY2hpehE=; b=HkyImDvuhjpAStJsr3qlJnjD4PplfnMwisFEB/aWstsOP5/E4PBYwDyR fxvJ1ktOWrSCIbhV/YCAqPaMYTa6A4MxopyEbiv/KWw9O5Tl/mxGIFuud 8qQbMMX87TdASNPlE0ldWKkt/E+kpgewV46cdT5lKXgTopuK6BQh504xi vL/oP6DHOT1dP/NBbtZ/cuRYly+eWY4byzvBjOafY89gin21Dz3ER8DCi 15PsJhuPFHU7prB2WaZfEl/uSm4hTVB15WUu+mjK+KoZ+HSNO9dsDj1q3 ZNdhjHjTdZJgFUo6GbtREEtfIJv8R1pjvGT6Nxczoe/CX/juRI15nBlrw A==; X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="331223217" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="331223217" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 11:17:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="769895082" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="769895082" Received: from winkelru-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.144.249]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 11:17:18 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: tiwai@suse.de, broonie@kernel.org, vkoul@kernel.org, Pierre-Louis Bossart , =?utf-8?q?P?= =?utf-8?q?=C3=A9ter_Ujfalusi?= , Rander Wang , Bard Liao Subject: [PATCH 5/9] ASoC: SOF: Intel: Kconfig: move selection of PROBE_WORK_QUEUE Date: Fri, 12 May 2023 13:16:58 -0500 Message-Id: <20230512181702.117483-6-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230512181702.117483-1-pierre-louis.bossart@linux.intel.com> References: <20230512181702.117483-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: FDGTE5CSJILRVI5A4773Y4HIUC2OKI6A X-Message-ID-Hash: FDGTE5CSJILRVI5A4773Y4HIUC2OKI6A 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: The probe workqueue is only needed if we have a Display Audio codec. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Reviewed-by: Bard Liao --- sound/soc/sof/intel/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/intel/Kconfig b/sound/soc/sof/intel/Kconfig index f4eeacf1f281..88529a6cb20d 100644 --- a/sound/soc/sof/intel/Kconfig +++ b/sound/soc/sof/intel/Kconfig @@ -285,7 +285,6 @@ if SND_SOC_SOF_HDA_COMMON config SND_SOC_SOF_HDA_LINK bool "SOF support for HDA Links(HDA/HDMI)" depends on SND_SOC_SOF_NOCODEC_SUPPORT=n - select SND_SOC_SOF_PROBE_WORK_QUEUE help This adds support for HDA links(HDA/HDMI) with Sound Open Firmware for Intel(R) platforms. @@ -295,6 +294,7 @@ config SND_SOC_SOF_HDA_LINK config SND_SOC_SOF_HDA_AUDIO_CODEC bool "SOF support for HDAudio codecs" depends on SND_SOC_SOF_HDA_LINK + select SND_SOC_SOF_PROBE_WORK_QUEUE help This adds support for HDAudio codecs with Sound Open Firmware for Intel(R) platforms. From patchwork Fri May 12 18:16:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 681836 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 32A2CC7EE26 for ; Fri, 12 May 2023 18:21: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 9BD5CE9F; Fri, 12 May 2023 20:20:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9BD5CE9F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1683915663; bh=ye9jusbayFAN6BeKWnMrN/yfoHmOtz2V7Wbp+pSA61A=; 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=K86ISmsrUy373/yTh4AWzrYWzfS7AmKOGEVh6a65eBuN35dRJi3oLUwBGzkW1Pbfz RyIThaYrz8V/H4QO4gNaEPHDlwe2cILqA6L2EMyVm2he5PKTzMj5fc5NQti5GAoMPE n0vubkkWqdLjjdXomWurcVFIp5+GCXDtzizFk3XQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id D06EBF805D2; Fri, 12 May 2023 20:18:04 +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 7EC4FF805BA; Fri, 12 May 2023 20:18:04 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1A9A9F80587; Fri, 12 May 2023 20:17:54 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 E9766F8053B for ; Fri, 12 May 2023 20:17:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E9766F8053B 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=kH4XByKr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683915463; x=1715451463; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ye9jusbayFAN6BeKWnMrN/yfoHmOtz2V7Wbp+pSA61A=; b=kH4XByKrpjriIseJloPleBlo0mJN8QQ4BWab8e31VCzGfMZ57VNFqkbP VNGN60sRu0fv54PGY+VlXDjnaJ0Xu6nphIpG9v3mk2pn9ZJZjH3haIAcD tvB/EpbSxxmVznttErHswC8YBHbyHUS8nbGmu5lUGa2+VEhrXEE5NHK8E NLekUbi91euYVwAcwx3lvGYw8PonP+tapXkxVGRMJlhpic0FK4LOvbt4h i7iPE05mBauCVNtBOh4lO3L/dSlc3q7ZdLuWObk02ky7ESgWyDm8sCyHp mb5hCGhd6rEUbt1j2jt3C5yup/ao7cPBiF/W/5TVh/GDa4rWDQlyCp2lt Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="331223222" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="331223222" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 11:17:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="769895088" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="769895088" Received: from winkelru-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.144.249]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 11:17:19 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: tiwai@suse.de, broonie@kernel.org, vkoul@kernel.org, Pierre-Louis Bossart , =?utf-8?q?P?= =?utf-8?q?=C3=A9ter_Ujfalusi?= , Rander Wang , Bard Liao Subject: [PATCH 6/9] ASoC: SOF: Intel: hda-dai: move hda_dai_prepare() code Date: Fri, 12 May 2023 13:16:59 -0500 Message-Id: <20230512181702.117483-7-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230512181702.117483-1-pierre-louis.bossart@linux.intel.com> References: <20230512181702.117483-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: WH4SICZNRCHFOHXGRD3QBT7TY3LXE2VY X-Message-ID-Hash: WH4SICZNRCHFOHXGRD3QBT7TY3LXE2VY 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: Before we change the Kconfig support, move code around. No functionality change with this commit in isolation. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Reviewed-by: Bard Liao --- sound/soc/sof/intel/hda-dai.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sound/soc/sof/intel/hda-dai.c b/sound/soc/sof/intel/hda-dai.c index 7e71cce7f531..cdd842288811 100644 --- a/sound/soc/sof/intel/hda-dai.c +++ b/sound/soc/sof/intel/hda-dai.c @@ -259,14 +259,6 @@ static int hda_dai_hw_params(struct snd_pcm_substream *substream, return hda_dai_config(w, flags, &data); } -static int hda_dai_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) -{ - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); - int stream = substream->stream; - - return hda_dai_hw_params(substream, &rtd->dpcm[stream].hw_params, dai); -} - /* * In contrast to IPC3, the dai trigger in IPC4 mixes pipeline state changes * (over IPC channel) and DMA state change (direct host register changes). @@ -325,6 +317,14 @@ static int hda_dai_trigger(struct snd_pcm_substream *substream, int cmd, struct return 0; } +static int hda_dai_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) +{ + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); + int stream = substream->stream; + + return hda_dai_hw_params(substream, &rtd->dpcm[stream].hw_params, dai); +} + static const struct snd_soc_dai_ops hda_dai_ops = { .hw_params = hda_dai_hw_params, .hw_free = hda_dai_hw_free, From patchwork Fri May 12 18:17:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 681219 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 63012C77B7F for ; Fri, 12 May 2023 18:20:19 +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 29397E9D; Fri, 12 May 2023 20:19:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 29397E9D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1683915617; bh=DqoX+I1XAdcSnzKfH3JuoyUpgQ3+T416wika4LyKTc0=; 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=KmTfUVdZuxLkVXjr59DlXG2felAuihGDpHtC2uz/LOY6svdZ55z2kjVxukmRTObzH 3Cm5pNmNRzKuwVi2KdcbgBRH+m7aDRJStgx1vl4SYLAs4P+5MW6xoSjo+PBd8w5J2T stMtton7lymp5CDo6tq0tj2IKquEC8SoqqyU/4Ng= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 59CBDF805A8; Fri, 12 May 2023 20:17: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 D4A33F805A8; Fri, 12 May 2023 20:17:56 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id DACD9F8052E; Fri, 12 May 2023 20:17:47 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 87AABF8052E for ; Fri, 12 May 2023 20:17:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 87AABF8052E 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=O8fmBTWt DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683915465; x=1715451465; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=DqoX+I1XAdcSnzKfH3JuoyUpgQ3+T416wika4LyKTc0=; b=O8fmBTWtRlGJJvAkHI0lkTYmTPIPX3VFUBWQjD562kNnPuIojvngiqMw 2ArDG5RnPXacoMFqgmuUigMpV0srhnaJzG8ISz4bbA+AHCrqE1GgZuxMY fYnFG+2+mbljpb6Ku5nbsse1gzBjqdfq2BwlSZVaZGPsDKsgfJ8CIrkFm GCEe/iN4e9y8Gr5QDqkayAYKC+Qu8aKssRq3A0CyRgtlQAtgZYotjXSxp BAhthWtHtZLsX/WcI5gyDThrO60D8Qe2Zw2mwZgdNDJnmZqKa5yKP2oww M1uoUQ51afeX/vc0AB8vdHq/5f5SJjFwjuL03j4hGOl/vmYJ0xncFkW0e w==; X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="331223228" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="331223228" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 11:17:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="769895093" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="769895093" Received: from winkelru-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.144.249]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 11:17:20 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: tiwai@suse.de, broonie@kernel.org, vkoul@kernel.org, Pierre-Louis Bossart , =?utf-8?q?P?= =?utf-8?q?=C3=A9ter_Ujfalusi?= , Rander Wang , Bard Liao Subject: [PATCH 7/9] ASoC: SOF: Intel: hda-dai: mark functions as __maybe_unused Date: Fri, 12 May 2023 13:17:00 -0500 Message-Id: <20230512181702.117483-8-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230512181702.117483-1-pierre-louis.bossart@linux.intel.com> References: <20230512181702.117483-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: 5OVIHB5DNTNKESIHGMXGR6R3OOEVY3I3 X-Message-ID-Hash: 5OVIHB5DNTNKESIHGMXGR6R3OOEVY3I3 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: hda_dai_hw_params, hda_dai_trigger(), hda_dai_hw_free are currently only used for HDaudio codec support, but will be reused for SSP/DMIC/SoundWire in the LunarLake/ACE2.x case. To avoid 'defined but not used' errors or added complexity in Kconfig, mark all these functions as __maybe_used. When SSP/DMIC/SoundWire are added, some of these changes may be reverted. For now this avoids compilation warnings. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Reviewed-by: Bard Liao --- sound/soc/sof/intel/hda-dai.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sound/soc/sof/intel/hda-dai.c b/sound/soc/sof/intel/hda-dai.c index cdd842288811..729f750fe746 100644 --- a/sound/soc/sof/intel/hda-dai.c +++ b/sound/soc/sof/intel/hda-dai.c @@ -206,7 +206,8 @@ static int hda_link_dma_hw_params(struct snd_pcm_substream *substream, return 0; } -static int hda_dai_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai) +static int __maybe_unused hda_dai_hw_free(struct snd_pcm_substream *substream, + struct snd_soc_dai *cpu_dai) { const struct hda_dai_widget_dma_ops *ops = hda_dai_get_ops(substream, cpu_dai); struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); @@ -226,9 +227,9 @@ static int hda_dai_hw_free(struct snd_pcm_substream *substream, struct snd_soc_d return hda_link_dma_cleanup(substream, hext_stream, cpu_dai, codec_dai); } -static int hda_dai_hw_params(struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *params, - struct snd_soc_dai *dai) +static int __maybe_unused hda_dai_hw_params(struct snd_pcm_substream *substream, + struct snd_pcm_hw_params *params, + struct snd_soc_dai *dai) { struct snd_soc_dapm_widget *w = snd_soc_dai_get_widget(dai, substream->stream); const struct hda_dai_widget_dma_ops *ops = hda_dai_get_ops(substream, dai); @@ -263,7 +264,8 @@ static int hda_dai_hw_params(struct snd_pcm_substream *substream, * In contrast to IPC3, the dai trigger in IPC4 mixes pipeline state changes * (over IPC channel) and DMA state change (direct host register changes). */ -static int hda_dai_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) +static int __maybe_unused hda_dai_trigger(struct snd_pcm_substream *substream, int cmd, + struct snd_soc_dai *dai) { const struct hda_dai_widget_dma_ops *ops = hda_dai_get_ops(substream, dai); struct hdac_ext_stream *hext_stream; From patchwork Fri May 12 18:17:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 681835 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 5C1AAC77B7C for ; Fri, 12 May 2023 18:21:28 +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 4E6CDEC1; Fri, 12 May 2023 20:20:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4E6CDEC1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1683915686; bh=EtXzLwzMdxRwbRgZD3mCOwT233lqZFKd7wEqPtTJ/l4=; 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=p92IJXs0LXcEq5mKD3ZYXbO6enQ3F4qE8BhQW/1zypm2FGSTJk1ci14sbgUlzIUog v8WP+wFzhzyVARbLzBgj8Ul+l4QScmHt4hKpuyMCIFFYxTmH++h0Mv3Q1XX4xWn8Rz XeMtomvvWddOuSBrfEQ2SQ+kXCTmTm+UzPSfUvAU= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 01815F805EB; Fri, 12 May 2023 20:18: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 C11FCF805E7; Fri, 12 May 2023 20:18:08 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9DBF0F805AB; Fri, 12 May 2023 20:17:57 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 CEF83F8032D for ; Fri, 12 May 2023 20:17:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CEF83F8032D 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=N5rG0b1x DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683915465; x=1715451465; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EtXzLwzMdxRwbRgZD3mCOwT233lqZFKd7wEqPtTJ/l4=; b=N5rG0b1xvCjJL4eEBUw246jBYJ7bSzJPfXdU3bUmfPbkZm5VSdDZfFJj ouQeOIMitlDA/gohDYKvQTCvETwI6EWiewB3exLO1Vb7aMztbIAFkDm78 RaizXWhkVpOl/VSdmdBq6Ptlt1Bbo9kfUKa4jnd4tBLLwkUDLpfW6K2e9 vtev1knAIQcNmJpjhlTqgJpSJ+wncRY65211skwGxygbreFZ07tPvtm99 2NCirmwEEWybBWLNskHQf/Y9MczoyOxfiuoLPwf5Jt99CiIkXxzsiUPzM cXx01JqxINs0zmCe83/Lfq08UHXzb30iIuNG9zXZ+lkSIaAbVw7muS+cG A==; X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="331223235" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="331223235" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 11:17:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="769895101" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="769895101" Received: from winkelru-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.144.249]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 11:17:21 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: tiwai@suse.de, broonie@kernel.org, vkoul@kernel.org, Pierre-Louis Bossart , =?utf-8?q?P?= =?utf-8?q?=C3=A9ter_Ujfalusi?= , Rander Wang , Bard Liao Subject: [PATCH 8/9] ASoC: SOF: Intel: hda-dai: use HDA_LINK instead of HDA_AUDIO_CODEC Date: Fri, 12 May 2023 13:17:01 -0500 Message-Id: <20230512181702.117483-9-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230512181702.117483-1-pierre-louis.bossart@linux.intel.com> References: <20230512181702.117483-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: L2P2YNOTK7QJCDAPEIKCWL5SCZYUKD2Y X-Message-ID-Hash: L2P2YNOTK7QJCDAPEIKCWL5SCZYUKD2Y 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: For LunarLake support, we will have to use HDAudio DMA-based DAIs even for SSP/DMIC/SoundWire. That's completely different to the HDA_AUDIO_CODEC, the DAI ops deal with DMA configuration and that can happen in the absence of any HDAudio codec. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Reviewed-by: Bard Liao --- sound/soc/sof/intel/hda-dai-ops.c | 4 ++-- sound/soc/sof/intel/hda-dai.c | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sound/soc/sof/intel/hda-dai-ops.c b/sound/soc/sof/intel/hda-dai-ops.c index 4b39cecacd68..d711351137f2 100644 --- a/sound/soc/sof/intel/hda-dai-ops.c +++ b/sound/soc/sof/intel/hda-dai-ops.c @@ -16,7 +16,7 @@ #include "hda.h" /* These ops are only applicable for the HDA DAI's in their current form */ -#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC) +#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_LINK) /* * This function checks if the host dma channel corresponding * to the link DMA stream_tag argument is assigned to one @@ -350,7 +350,7 @@ static const struct hda_dai_widget_dma_ops hda_dspless_dma_ops = { const struct hda_dai_widget_dma_ops * hda_select_dai_widget_ops(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget) { -#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC) +#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_LINK) struct snd_sof_dai *sdai; if (sdev->dspless_mode_selected) diff --git a/sound/soc/sof/intel/hda-dai.c b/sound/soc/sof/intel/hda-dai.c index 729f750fe746..09d8ee98581d 100644 --- a/sound/soc/sof/intel/hda-dai.c +++ b/sound/soc/sof/intel/hda-dai.c @@ -61,7 +61,7 @@ int hda_dai_config(struct snd_soc_dapm_widget *w, unsigned int flags, return 0; } -#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC) +#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_LINK) static struct snd_sof_dev *dai_to_sdev(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai) @@ -319,6 +319,8 @@ static int __maybe_unused hda_dai_trigger(struct snd_pcm_substream *substream, i return 0; } +#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC) + static int hda_dai_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); @@ -334,6 +336,8 @@ static const struct snd_soc_dai_ops hda_dai_ops = { .prepare = hda_dai_prepare, }; +#endif + static int hda_dai_suspend(struct hdac_bus *bus) { struct snd_soc_pcm_runtime *rtd; @@ -582,7 +586,7 @@ int hda_dsp_dais_suspend(struct snd_sof_dev *sdev) * Since the component suspend is called last, we can trap this corner case * and force the DAIs to release their resources. */ -#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC) +#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_LINK) int ret; ret = hda_dai_suspend(sof_to_bus(sdev)); From patchwork Fri May 12 18:17:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 681837 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 81ADCC77B7C for ; Fri, 12 May 2023 18:20:25 +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 74C53E91; Fri, 12 May 2023 20:19:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 74C53E91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1683915623; bh=hCDHpIYOYSSnE/xPKLb7169z5P2gyjKEPF4IguhCs98=; 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=p5qYD4NWfaU3nnATEltnpPPmrpEihYvtXueIRXL10eIK0SCjg6JwSr/Fd7isszXpd VmSsuupixQcLyODY9CpBjqptY8L9BEH3tPdKBBRDjOOkH+lA2NAf7ryYFOI8mVOTnX 3oRW6TfWuTucmLOMk85EDQnru1H0iE/Mv/FGvl7s= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 44230F805B6; Fri, 12 May 2023 20:18: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 CACE7F805AC; Fri, 12 May 2023 20:17:59 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id AFF6CF8055B; Fri, 12 May 2023 20:17:48 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 1947EF8053D for ; Fri, 12 May 2023 20:17:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1947EF8053D 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=d6otz8MB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683915465; x=1715451465; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hCDHpIYOYSSnE/xPKLb7169z5P2gyjKEPF4IguhCs98=; b=d6otz8MBjbEoUEkvmod5HIWkixjQVscBhsq8dSCZZQGOqyxSM7YCkbYL vTeGdAmrbO4gBPYHkdN64NTMGaZ8773xRtJVT2L+dGya442EcgKlHVhiD Ob6jB3beU62Maw1zugYNF4qU6/DtC2ABQF+Paj0ADyispEYZl+ieoyGGz DREr8Gbgp3pLMqCpabPtnLQi0tPYx9CeAoSwkLvBzCn2fGKkMWNeD6uQI 8g1rcVfSaLvxtOCD2S8ZlbiXWTnOwSnzVGN1UzVPsSCVhdABKCtOwKuBC YXUaQGbLTrtSTuN/VFQ8CRCx6LcLqM7IBeLGyS7/Uxuck6mro9h1Wa7JO g==; X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="331223240" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="331223240" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 11:17:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="769895112" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="769895112" Received: from winkelru-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.144.249]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 11:17:22 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: tiwai@suse.de, broonie@kernel.org, vkoul@kernel.org, Pierre-Louis Bossart , =?utf-8?q?P?= =?utf-8?q?=C3=A9ter_Ujfalusi?= , Rander Wang , Bard Liao Subject: [PATCH 9/9] ASoC: SOF: Intel: remove mutual exclusion between NOCODEC and HDA_LINK Date: Fri, 12 May 2023 13:17:02 -0500 Message-Id: <20230512181702.117483-10-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230512181702.117483-1-pierre-louis.bossart@linux.intel.com> References: <20230512181702.117483-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: QQASYAVECDPB2XVJLEACH3OMDWKEGRFA X-Message-ID-Hash: QQASYAVECDPB2XVJLEACH3OMDWKEGRFA 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: The nocodec mode served two purposes so far a) generate a test driver for DMIC/SSP without any codec connected b) make sure the use of snd_hdac_ libraries was contained b) is no longer an option for LunarLake, the HDaudio DMA is used for DMIC/SSP and the HDA_LINK option needs to be enabled. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Rander Wang Reviewed-by: Bard Liao --- sound/soc/sof/intel/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/sof/intel/Kconfig b/sound/soc/sof/intel/Kconfig index 88529a6cb20d..69c1a370d3b6 100644 --- a/sound/soc/sof/intel/Kconfig +++ b/sound/soc/sof/intel/Kconfig @@ -284,7 +284,6 @@ if SND_SOC_SOF_HDA_COMMON config SND_SOC_SOF_HDA_LINK bool "SOF support for HDA Links(HDA/HDMI)" - depends on SND_SOC_SOF_NOCODEC_SUPPORT=n help This adds support for HDA links(HDA/HDMI) with Sound Open Firmware for Intel(R) platforms.