summaryrefslogtreecommitdiff
path: root/sound/soc/soc-pcm.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2024-10-24 01:29:13 +0000
committerMark Brown <broonie@kernel.org>2024-11-01 14:48:09 +0000
commit40e47e2db6864aa053a62477bd71a16be9dd4066 (patch)
treee022b6f47c615468a0d615ac2cc93f0fad34db83 /sound/soc/soc-pcm.c
parent019610566757a749dde7e0c92777d2c1613afef8 (diff)
downloadlinux-40e47e2db6864aa053a62477bd71a16be9dd4066.tar.gz
linux-40e47e2db6864aa053a62477bd71a16be9dd4066.tar.bz2
linux-40e47e2db6864aa053a62477bd71a16be9dd4066.zip
ASoC: rename rtd->num to rtd->id
Current rtd has "num". It sounds/looks like size of rtd or something, but it will be mainly used at snd_pcm_new() as "device index". This naming is confusable. Let's rename it to "id" Some drivers are using rtd->num, so let's keep it so far, and remove it if all user was switched. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87zfmub85z.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r--sound/soc/soc-pcm.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 678400e76e53..81b63e547a09 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -2891,7 +2891,7 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd,
static int soc_create_pcm(struct snd_pcm **pcm,
struct snd_soc_pcm_runtime *rtd,
- int playback, int capture, int num)
+ int playback, int capture, int id)
{
char new_name[64];
int ret;
@@ -2901,13 +2901,13 @@ static int soc_create_pcm(struct snd_pcm **pcm,
snprintf(new_name, sizeof(new_name), "codec2codec(%s)",
rtd->dai_link->stream_name);
- ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, num,
+ ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, id,
playback, capture, pcm);
} else if (rtd->dai_link->no_pcm) {
snprintf(new_name, sizeof(new_name), "(%s)",
rtd->dai_link->stream_name);
- ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, num,
+ ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, id,
playback, capture, pcm);
} else {
if (rtd->dai_link->dynamic)
@@ -2916,9 +2916,9 @@ static int soc_create_pcm(struct snd_pcm **pcm,
else
snprintf(new_name, sizeof(new_name), "%s %s-%d",
rtd->dai_link->stream_name,
- soc_codec_dai_name(rtd), num);
+ soc_codec_dai_name(rtd), id);
- ret = snd_pcm_new(rtd->card->snd_card, new_name, num, playback,
+ ret = snd_pcm_new(rtd->card->snd_card, new_name, id, playback,
capture, pcm);
}
if (ret < 0) {
@@ -2926,13 +2926,13 @@ static int soc_create_pcm(struct snd_pcm **pcm,
new_name, rtd->dai_link->name, ret);
return ret;
}
- dev_dbg(rtd->card->dev, "ASoC: registered pcm #%d %s\n",num, new_name);
+ dev_dbg(rtd->card->dev, "ASoC: registered pcm #%d %s\n", id, new_name);
return 0;
}
/* create a new pcm */
-int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
+int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int id)
{
struct snd_soc_component *component;
struct snd_pcm *pcm;
@@ -2943,7 +2943,7 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
if (ret < 0)
return ret;
- ret = soc_create_pcm(&pcm, rtd, playback, capture, num);
+ ret = soc_create_pcm(&pcm, rtd, playback, capture, id);
if (ret < 0)
return ret;