From: Cezary Rojewski <cezary.rojewski@intel.com>
To: broonie@kernel.org, linux-sound@vger.kernel.org
Cc: tiwai@suse.com, perex@perex.cz, amade@asmblr.net,
linux-kernel@vger.kernel.org,
Cezary Rojewski <cezary.rojewski@intel.com>
Subject: [PATCH 09/11] ASoC: Intel: avs: Streamline naming of hw_params variables
Date: Fri, 13 Nov 2026 12:38:38 +0100 [thread overview]
Message-ID: <20261113113840.3067489-10-cezary.rojewski@intel.com> (raw)
In-Reply-To: <20261113113840.3067489-1-cezary.rojewski@intel.com>
A number of different naming variations are used throughout the file.
The selected pattern is: fe_params for FE DAIs, be_params for BE ones.
Leave 'params' if a function is tied to no particular end.
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
---
sound/soc/intel/avs/pcm.c | 42 +++++++++++++++++++--------------------
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/sound/soc/intel/avs/pcm.c b/sound/soc/intel/avs/pcm.c
index 360cb8125bcc..b1a8e8b20cc8 100644
--- a/sound/soc/intel/avs/pcm.c
+++ b/sound/soc/intel/avs/pcm.c
@@ -166,9 +166,9 @@ static void avs_dai_shutdown(struct snd_pcm_substream *substream, struct snd_soc
}
static int avs_dai_hw_params(struct snd_pcm_substream *substream,
- struct snd_pcm_hw_params *fe_hw_params,
- struct snd_pcm_hw_params *be_hw_params, struct snd_soc_dai *dai,
- int dma_id)
+ struct snd_pcm_hw_params *fe_params,
+ struct snd_pcm_hw_params *be_params,
+ struct snd_soc_dai *dai, int dma_id)
{
struct avs_dma_data *data;
struct avs_path *path;
@@ -179,16 +179,16 @@ static int avs_dai_hw_params(struct snd_pcm_substream *substream,
dev_dbg(dai->dev, "%s FE hw_params str %p rtd %p",
__func__, substream, substream->runtime);
dev_dbg(dai->dev, "rate %d chn %d vbd %d bd %d\n",
- params_rate(fe_hw_params), params_channels(fe_hw_params),
- params_width(fe_hw_params), params_physical_width(fe_hw_params));
+ params_rate(fe_params), params_channels(fe_params),
+ params_width(fe_params), params_physical_width(fe_params));
dev_dbg(dai->dev, "%s BE hw_params str %p rtd %p",
__func__, substream, substream->runtime);
dev_dbg(dai->dev, "rate %d chn %d vbd %d bd %d\n",
- params_rate(be_hw_params), params_channels(be_hw_params),
- params_width(be_hw_params), params_physical_width(be_hw_params));
+ params_rate(be_params), params_channels(be_params),
+ params_width(be_params), params_physical_width(be_params));
- path = avs_path_create(data->adev, dma_id, data->template, fe_hw_params, be_hw_params);
+ path = avs_path_create(data->adev, dma_id, data->template, fe_params, be_params);
if (IS_ERR(path)) {
ret = PTR_ERR(path);
dev_err(dai->dev, "create path failed: %d\n", ret);
@@ -200,10 +200,10 @@ static int avs_dai_hw_params(struct snd_pcm_substream *substream,
}
static int avs_dai_be_hw_params(struct snd_pcm_substream *substream,
- struct snd_pcm_hw_params *be_hw_params, struct snd_soc_dai *dai,
- int dma_id)
+ struct snd_pcm_hw_params *be_params,
+ struct snd_soc_dai *dai, int dma_id)
{
- struct snd_pcm_hw_params *fe_hw_params = NULL;
+ struct snd_pcm_hw_params *fe_params = NULL;
struct snd_soc_pcm_runtime *fe, *be;
struct snd_soc_dpcm *dpcm;
@@ -211,10 +211,10 @@ static int avs_dai_be_hw_params(struct snd_pcm_substream *substream,
/* dpcm_fe_dai_open() guarantees the list is not empty at this point. */
for_each_dpcm_fe(be, substream->stream, dpcm) {
fe = dpcm->fe;
- fe_hw_params = &fe->dpcm[substream->stream].hw_params;
+ fe_params = &fe->dpcm[substream->stream].hw_params;
}
- return avs_dai_hw_params(substream, fe_hw_params, be_hw_params, dai, dma_id);
+ return avs_dai_hw_params(substream, fe_params, be_params, dai, dma_id);
}
static int avs_dai_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
@@ -234,7 +234,7 @@ static int avs_dai_prepare(struct snd_pcm_substream *substream, struct snd_soc_d
}
static int avs_dai_nonhda_be_hw_params(struct snd_pcm_substream *substream,
- struct snd_pcm_hw_params *hw_params, struct snd_soc_dai *dai)
+ struct snd_pcm_hw_params *be_params, struct snd_soc_dai *dai)
{
struct avs_dma_data *data;
@@ -243,7 +243,7 @@ static int avs_dai_nonhda_be_hw_params(struct snd_pcm_substream *substream,
return 0;
/* Actual port-id comes from topology. */
- return avs_dai_be_hw_params(substream, hw_params, dai, 0);
+ return avs_dai_be_hw_params(substream, be_params, dai, 0);
}
static int avs_dai_nonhda_be_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
@@ -401,7 +401,7 @@ static void avs_dai_althda_be_shutdown(struct snd_pcm_substream *substream, stru
}
static int avs_dai_hda_be_hw_params(struct snd_pcm_substream *substream,
- struct snd_pcm_hw_params *hw_params, struct snd_soc_dai *dai)
+ struct snd_pcm_hw_params *be_params, struct snd_soc_dai *dai)
{
struct avs_dma_data *data;
@@ -409,7 +409,7 @@ static int avs_dai_hda_be_hw_params(struct snd_pcm_substream *substream,
if (data->path)
return 0;
- return avs_dai_be_hw_params(substream, hw_params, dai,
+ return avs_dai_be_hw_params(substream, be_params, dai,
hdac_stream(data->link_stream)->stream_tag - 1);
}
@@ -643,9 +643,9 @@ static void avs_dai_fe_shutdown(struct snd_pcm_substream *substream, struct snd_
}
static int avs_dai_fe_hw_params(struct snd_pcm_substream *substream,
- struct snd_pcm_hw_params *hw_params, struct snd_soc_dai *dai)
+ struct snd_pcm_hw_params *fe_params, struct snd_soc_dai *dai)
{
- struct snd_pcm_hw_params *be_hw_params = NULL;
+ struct snd_pcm_hw_params *be_params = NULL;
struct snd_soc_pcm_runtime *fe, *be;
struct snd_soc_dpcm *dpcm;
struct avs_dma_data *data;
@@ -666,10 +666,10 @@ static int avs_dai_fe_hw_params(struct snd_pcm_substream *substream,
/* dpcm_fe_dai_open() guarantees the list is not empty at this point. */
for_each_dpcm_be(fe, substream->stream, dpcm) {
be = dpcm->be;
- be_hw_params = &be->dpcm[substream->stream].hw_params;
+ be_params = &be->dpcm[substream->stream].hw_params;
}
- ret = avs_dai_hw_params(substream, hw_params, be_hw_params, dai,
+ ret = avs_dai_hw_params(substream, fe_params, be_params, dai,
hdac_stream(host_stream)->stream_tag - 1);
if (ret)
goto create_err;
--
2.34.1
next prev parent reply other threads:[~2026-11-13 11:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 11:38 [PATCH 00/11] ASoC: Intel: avs: Renames and debug prints Cezary Rojewski
2026-11-13 11:38 ` [PATCH 01/11] ASoC: Intel: avs: Do not skip error reporting when an IPC timeouts Cezary Rojewski
2026-11-13 11:38 ` [PATCH 02/11] ASoC: Intel: avs: Do not skip errors from avs_path_pause() Cezary Rojewski
2026-11-13 11:38 ` [PATCH 03/11] ASoC: Intel: avs: Have one location for dumping path-errors Cezary Rojewski
2026-11-13 11:38 ` [PATCH 04/11] ASoC: Intel: avs: Small registers cleanup Cezary Rojewski
2026-11-13 11:38 ` [PATCH 05/11] ASoC: Intel: avs: Enrich missing-format and token-parsing messages Cezary Rojewski
2026-11-13 11:38 ` [PATCH 06/11] ASoC: Intel: avs: Unify code style for platform_device_id arrays Cezary Rojewski
2026-11-13 11:38 ` [PATCH 07/11] ASoC: Intel: avs: Streamline topology parser names Cezary Rojewski
2026-11-13 11:38 ` [PATCH 08/11] ASoC: Intel: avs: Streamline wording used for board configs Cezary Rojewski
2026-11-13 11:38 ` Cezary Rojewski [this message]
2026-11-13 11:38 ` [PATCH 10/11] ASoC: Intel: avs: Streamline spacing used in the avs_ids table Cezary Rojewski
2026-11-13 11:38 ` [PATCH 11/11] ASoC: Intel: avs: Remove soc-acpi-intel-match include Cezary Rojewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261113113840.3067489-10-cezary.rojewski@intel.com \
--to=cezary.rojewski@intel.com \
--cc=amade@asmblr.net \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®