OSDN Git Service

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 47f2d93..5176be1 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 4abf7ef..6da8535 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 5a4a91c..29b601a 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 524a334..d07270d 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);