All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>
Subject: [PATCH 25/36] ASoC: tegra: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
Date: 23 Mar 2020 14:21:07 +0900	[thread overview]
Message-ID: <877dzbir3w.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <877dzbk5wm.wl-kuninori.morimoto.gx@renesas.com>

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/tegra/tegra_alc5632.c  | 2 +-
 sound/soc/tegra/tegra_max98090.c | 2 +-
 sound/soc/tegra/tegra_rt5640.c   | 2 +-
 sound/soc/tegra/tegra_rt5677.c   | 2 +-
 sound/soc/tegra/tegra_sgtl5000.c | 2 +-
 sound/soc/tegra/tegra_wm8753.c   | 2 +-
 sound/soc/tegra/tegra_wm8903.c   | 6 +++---
 sound/soc/tegra/trimslice.c      | 2 +-
 8 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/sound/soc/tegra/tegra_alc5632.c b/sound/soc/tegra/tegra_alc5632.c
index 9e8b1497efd3..ec39ecba1e8b 100644
--- a/sound/soc/tegra/tegra_alc5632.c
+++ b/sound/soc/tegra/tegra_alc5632.c
@@ -37,7 +37,7 @@ static int tegra_alc5632_asoc_hw_params(struct snd_pcm_substream *substream,
 					struct snd_pcm_hw_params *params)
 {
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
-	struct snd_soc_dai *codec_dai = rtd->codec_dai;
+	struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
 	struct snd_soc_card *card = rtd->card;
 	struct tegra_alc5632 *alc5632 = snd_soc_card_get_drvdata(card);
 	int srate, mclk;
diff --git a/sound/soc/tegra/tegra_max98090.c b/sound/soc/tegra/tegra_max98090.c
index 4954a33ff46b..d800b62b36f8 100644
--- a/sound/soc/tegra/tegra_max98090.c
+++ b/sound/soc/tegra/tegra_max98090.c
@@ -38,7 +38,7 @@ static int tegra_max98090_asoc_hw_params(struct snd_pcm_substream *substream,
 					struct snd_pcm_hw_params *params)
 {
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
-	struct snd_soc_dai *codec_dai = rtd->codec_dai;
+	struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
 	struct snd_soc_card *card = rtd->card;
 	struct tegra_max98090 *machine = snd_soc_card_get_drvdata(card);
 	int srate, mclk;
diff --git a/sound/soc/tegra/tegra_rt5640.c b/sound/soc/tegra/tegra_rt5640.c
index d46915a3ec4c..9878bc3eb89e 100644
--- a/sound/soc/tegra/tegra_rt5640.c
+++ b/sound/soc/tegra/tegra_rt5640.c
@@ -40,7 +40,7 @@ static int tegra_rt5640_asoc_hw_params(struct snd_pcm_substream *substream,
 					struct snd_pcm_hw_params *params)
 {
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
-	struct snd_soc_dai *codec_dai = rtd->codec_dai;
+	struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
 	struct snd_soc_card *card = rtd->card;
 	struct tegra_rt5640 *machine = snd_soc_card_get_drvdata(card);
 	int srate, mclk;
diff --git a/sound/soc/tegra/tegra_rt5677.c b/sound/soc/tegra/tegra_rt5677.c
index 81cb6cc6236e..5821313db977 100644
--- a/sound/soc/tegra/tegra_rt5677.c
+++ b/sound/soc/tegra/tegra_rt5677.c
@@ -42,7 +42,7 @@ static int tegra_rt5677_asoc_hw_params(struct snd_pcm_substream *substream,
 					struct snd_pcm_hw_params *params)
 {
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
-	struct snd_soc_dai *codec_dai = rtd->codec_dai;
+	struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
 	struct snd_soc_card *card = rtd->card;
 	struct tegra_rt5677 *machine = snd_soc_card_get_drvdata(card);
 	int srate, mclk, err;
diff --git a/sound/soc/tegra/tegra_sgtl5000.c b/sound/soc/tegra/tegra_sgtl5000.c
index e13b81d29cf3..dc411ba2e36d 100644
--- a/sound/soc/tegra/tegra_sgtl5000.c
+++ b/sound/soc/tegra/tegra_sgtl5000.c
@@ -36,7 +36,7 @@ static int tegra_sgtl5000_hw_params(struct snd_pcm_substream *substream,
 					struct snd_pcm_hw_params *params)
 {
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
-	struct snd_soc_dai *codec_dai = rtd->codec_dai;
+	struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
 	struct snd_soc_card *card = rtd->card;
 	struct tegra_sgtl5000 *machine = snd_soc_card_get_drvdata(card);
 	int srate, mclk;
diff --git a/sound/soc/tegra/tegra_wm8753.c b/sound/soc/tegra/tegra_wm8753.c
index f6dd790dad71..0d653a605358 100644
--- a/sound/soc/tegra/tegra_wm8753.c
+++ b/sound/soc/tegra/tegra_wm8753.c
@@ -40,7 +40,7 @@ static int tegra_wm8753_hw_params(struct snd_pcm_substream *substream,
 					struct snd_pcm_hw_params *params)
 {
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
-	struct snd_soc_dai *codec_dai = rtd->codec_dai;
+	struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
 	struct snd_soc_card *card = rtd->card;
 	struct tegra_wm8753 *machine = snd_soc_card_get_drvdata(card);
 	int srate, mclk;
diff --git a/sound/soc/tegra/tegra_wm8903.c b/sound/soc/tegra/tegra_wm8903.c
index f08d3489c3cf..b52397f56c5f 100644
--- a/sound/soc/tegra/tegra_wm8903.c
+++ b/sound/soc/tegra/tegra_wm8903.c
@@ -45,7 +45,7 @@ static int tegra_wm8903_hw_params(struct snd_pcm_substream *substream,
 					struct snd_pcm_hw_params *params)
 {
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
-	struct snd_soc_dai *codec_dai = rtd->codec_dai;
+	struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
 	struct snd_soc_card *card = rtd->card;
 	struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card);
 	int srate, mclk;
@@ -155,7 +155,7 @@ static const struct snd_kcontrol_new tegra_wm8903_controls[] = {
 
 static int tegra_wm8903_init(struct snd_soc_pcm_runtime *rtd)
 {
-	struct snd_soc_dai *codec_dai = rtd->codec_dai;
+	struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
 	struct snd_soc_component *component = codec_dai->component;
 	struct snd_soc_card *card = rtd->card;
 	struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card);
@@ -187,7 +187,7 @@ static int tegra_wm8903_remove(struct snd_soc_card *card)
 {
 	struct snd_soc_pcm_runtime *rtd =
 		snd_soc_get_pcm_runtime(card, &card->dai_link[0]);
-	struct snd_soc_dai *codec_dai = rtd->codec_dai;
+	struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
 	struct snd_soc_component *component = codec_dai->component;
 
 	wm8903_mic_detect(component, NULL, 0, 0);
diff --git a/sound/soc/tegra/trimslice.c b/sound/soc/tegra/trimslice.c
index 3f67ddd13674..f9834afaa2e8 100644
--- a/sound/soc/tegra/trimslice.c
+++ b/sound/soc/tegra/trimslice.c
@@ -35,7 +35,7 @@ static int trimslice_asoc_hw_params(struct snd_pcm_substream *substream,
 					struct snd_pcm_hw_params *params)
 {
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
-	struct snd_soc_dai *codec_dai = rtd->codec_dai;
+	struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
 	struct snd_soc_card *card = rtd->card;
 	struct tegra_trimslice *trimslice = snd_soc_card_get_drvdata(card);
 	int srate, mclk;
-- 
2.17.1


  parent reply	other threads:[~2020-03-23  5:32 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-23  5:16 [PATCH 00/36] ASoC: remove rtd->cpu/codec_dai{s} Kuninori Morimoto
2020-03-23  5:16 ` [PATCH 01/36] ASoC: soc-core: add asoc_rtd_to_cpu/codec() macro Kuninori Morimoto
2020-03-27 15:36   ` Applied "ASoC: soc-core: add asoc_rtd_to_cpu/codec() macro" to the asoc tree Mark Brown
2020-03-23  5:17 ` [PATCH 02/36] ASoC: amd: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:36   ` Applied "ASoC: amd: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:17 ` [PATCH 03/36] ASoC: atmel: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:36   ` Applied "ASoC: atmel: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:17 ` [PATCH 04/36] ASoC: au1x: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:36   ` Applied "ASoC: au1x: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:17 ` [PATCH 05/36] ASoC: bcm: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:36   ` Applied "ASoC: bcm: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:18 ` [PATCH 06/36] ASoC: cirrus: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:36   ` Applied "ASoC: cirrus: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:18 ` [PATCH 07/36] ASoC: dwc: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:36   ` Applied "ASoC: dwc: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:18 ` [PATCH 08/36] ASoC: fsl: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:36   ` Applied "ASoC: fsl: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:18 ` [PATCH 09/36] ASoC: generic: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:36   ` Applied "ASoC: generic: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:18 ` [PATCH 10/36] ASoC: img: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:36   ` Applied "ASoC: img: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:19 ` [PATCH 11/36] ASoC: intel: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:35   ` Applied "ASoC: intel: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:19 ` [PATCH 12/36] ASoC: kirkwood: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:35   ` Applied "ASoC: kirkwood: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:19 ` [PATCH 13/36] ASoC: mediatek: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:35   ` Applied "ASoC: mediatek: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:19 ` [PATCH 14/36] ASoC: meson: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:35   ` Applied "ASoC: meson: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:19 ` [PATCH 15/36] ASoC: mxs: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:35   ` Applied "ASoC: mxs: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:19 ` [PATCH 16/36] ASoC: pxa: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:35   ` Applied "ASoC: pxa: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:20 ` [PATCH 17/36] ASoC: qcom: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:35   ` Applied "ASoC: qcom: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:20 ` [PATCH 18/36] ASoC: rockchip: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:35   ` Applied "ASoC: rockchip: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:20 ` [PATCH 19/36] ASoC: samsung: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:35   ` Applied "ASoC: samsung: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:20 ` [PATCH 20/36] ASoC: sh: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:35   ` Applied "ASoC: sh: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:20 ` [PATCH 21/36] ASoC: sof: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:35   ` Applied "ASoC: sof: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:20 ` [PATCH 22/36] ASoC: sprd: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:35   ` Applied "ASoC: sprd: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:20 ` [PATCH 23/36] ASoC: stm: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:35   ` Applied "ASoC: stm: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:21 ` [PATCH 24/36] ASoC: sunxi: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:34   ` Applied "ASoC: sunxi: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:21 ` Kuninori Morimoto [this message]
2020-03-27 15:34   ` Applied "ASoC: tegra: " Mark Brown
2020-03-23  5:21 ` [PATCH 26/36] ASoC: ti: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:34   ` Applied "ASoC: ti: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:21 ` [PATCH 27/36] ASoC: txx9: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:34   ` Applied "ASoC: txx9: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:21 ` [PATCH 28/36] ASoC: uniphier: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:34   ` Applied "ASoC: uniphier: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:21 ` [PATCH 29/36] ASoC: ux500: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:34   ` Applied "ASoC: ux500: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:21 ` [PATCH 30/36] ASoC: xtensa: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:34   ` Applied "ASoC: xtensa: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:21 ` [PATCH 31/36] ASoC: arm: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:34   ` Applied "ASoC: arm: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:21 ` [PATCH 32/36] ASoC: codecs: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 15:34   ` Applied "ASoC: codecs: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer" to the asoc tree Mark Brown
2020-03-23  5:22 ` [PATCH 33/36] ASoC: soc: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer Kuninori Morimoto
2020-03-27 13:24   ` Mark Brown
2020-03-23  5:22 ` [PATCH 34/36] ASoC: soc-core: set rtd->num_cpu/codec at soc_new_pcm_runtime() Kuninori Morimoto
2020-03-23  5:22 ` [PATCH 35/36] ASoC: soc-core: tidyup soc_new_pcm_runtime() rtd setups Kuninori Morimoto
2020-03-23  5:22 ` [PATCH 36/36] ASoC: soc-core: remove cpu_dai/codec_dai/cpu_dais/codec_dais Kuninori Morimoto
2020-03-23 18:50   ` Pierre-Louis Bossart
2020-03-25 19:13 ` [PATCH 00/36] ASoC: remove rtd->cpu/codec_dai{s} Pierre-Louis Bossart
2020-03-25 20:31   ` Mark Brown

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=877dzbir3w.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.