ASoC: meson: use asoc_substream_to_rtd()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 20 Jul 2020 01:19:14 +0000 (10:19 +0900)
committerMark Brown <broonie@kernel.org>
Thu, 23 Jul 2020 18:07:35 +0000 (19:07 +0100)
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/875zaj0ysr.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/meson/axg-card.c
sound/soc/meson/gx-card.c
sound/soc/meson/meson-card-utils.c
sound/soc/meson/meson-codec-glue.c

index 47f2d93224fea963f851acff3d7e7db45985cc16..5176be165210d9da7f9eadbdd2253d65d551d877 100644 (file)
@@ -40,7 +40,7 @@ static const struct snd_soc_pcm_stream codec_params = {
 static int axg_card_tdm_be_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
        struct meson_card *priv = snd_soc_card_get_drvdata(rtd->card);
        struct axg_dai_link_tdm_data *be =
                (struct axg_dai_link_tdm_data *)priv->link_data[rtd->num];
index 4abf7efb7eacc54442ad7c3a662050d427086bbc..6da8535f4dd2393016cf60f019c4a07b7ede50f6 100644 (file)
@@ -29,7 +29,7 @@ static const struct snd_soc_pcm_stream codec_params = {
 static int gx_card_i2s_be_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_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
        struct meson_card *priv = snd_soc_card_get_drvdata(rtd->card);
        struct gx_dai_link_i2s_data *be =
                (struct gx_dai_link_i2s_data *)priv->link_data[rtd->num];
index 5a4a91c887347f5b37574cff2f9ada7c40ba0b5b..29b601a0e274548e7a58be362b324cdb68b2fd41 100644 (file)
@@ -13,7 +13,7 @@ int meson_card_i2s_set_sysclk(struct snd_pcm_substream *substream,
                              struct snd_pcm_hw_params *params,
                              unsigned int mclk_fs)
 {
-       struct snd_soc_pcm_runtime *rtd = substream->private_data;
+       struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
        struct snd_soc_dai *codec_dai;
        unsigned int mclk;
        int ret, i;
index 524a33472337388666f83ebf9026a71a2ad6d5fb..d07270d17cee7b3cf2f28527ee56b87bfad25a22 100644 (file)
@@ -98,7 +98,7 @@ EXPORT_SYMBOL_GPL(meson_codec_glue_input_set_fmt);
 int meson_codec_glue_output_startup(struct snd_pcm_substream *substream,
                                    struct snd_soc_dai *dai)
 {
-       struct snd_soc_pcm_runtime *rtd = substream->private_data;
+       struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
        struct meson_codec_glue_input *in_data =
                meson_codec_glue_output_get_input_data(dai->capture_widget);