diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2020-02-19 07:56:41 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-02-24 22:18:30 +0100 |
commit | 0c01f6ca8e4cc1e5505bf4657cf77fbfaa7b0bc2 (patch) | |
tree | 4de273f1ba2e4fd59a2f949cdbf37c0750ce5000 /sound/soc/soc-dapm.c | |
parent | ASoC: soc-pcm: cleanup soc_pcm_apply_msb() (diff) | |
download | linux-0c01f6ca8e4cc1e5505bf4657cf77fbfaa7b0bc2.tar.xz linux-0c01f6ca8e4cc1e5505bf4657cf77fbfaa7b0bc2.zip |
ASoC: soc-pcm: add snd_soc_dai_get_widget()
soc-pcm.c has dai_get_widget(), but it can be more generic.
This patch renames it to snd_soc_dai_get_widget(), and use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87d0abjca1.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 69eff234b26f..f2e678865480 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -2620,10 +2620,7 @@ static int dapm_update_dai_unlocked(struct snd_pcm_substream *substream, struct snd_soc_dapm_widget *w; int ret; - if (dir == SNDRV_PCM_STREAM_PLAYBACK) - w = dai->playback_widget; - else - w = dai->capture_widget; + w = snd_soc_dai_get_widget(dai, dir); if (!w) return 0; @@ -4389,10 +4386,7 @@ static void soc_dapm_dai_stream_event(struct snd_soc_dai *dai, int stream, struct snd_soc_dapm_widget *w; unsigned int ep; - if (stream == SNDRV_PCM_STREAM_PLAYBACK) - w = dai->playback_widget; - else - w = dai->capture_widget; + w = snd_soc_dai_get_widget(dai, stream); if (w) { dapm_mark_dirty(w, "stream event"); |