aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-pcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r--sound/soc/soc-pcm.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 903d737c352f..54d18f22a33e 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -1018,21 +1018,12 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card,
1018} 1018}
1019 1019
1020static inline struct snd_soc_dapm_widget * 1020static inline struct snd_soc_dapm_widget *
1021 rtd_get_cpu_widget(struct snd_soc_pcm_runtime *rtd, int stream) 1021 dai_get_widget(struct snd_soc_dai *dai, int stream)
1022{ 1022{
1023 if (stream == SNDRV_PCM_STREAM_PLAYBACK) 1023 if (stream == SNDRV_PCM_STREAM_PLAYBACK)
1024 return rtd->cpu_dai->playback_widget; 1024 return dai->playback_widget;
1025 else 1025 else
1026 return rtd->cpu_dai->capture_widget; 1026 return dai->capture_widget;
1027}
1028
1029static inline struct snd_soc_dapm_widget *
1030 rtd_get_codec_widget(struct snd_soc_pcm_runtime *rtd, int stream)
1031{
1032 if (stream == SNDRV_PCM_STREAM_PLAYBACK)
1033 return rtd->codec_dai->playback_widget;
1034 else
1035 return rtd->codec_dai->capture_widget;
1036} 1027}
1037 1028
1038static int widget_in_list(struct snd_soc_dapm_widget_list *list, 1029static int widget_in_list(struct snd_soc_dapm_widget_list *list,
@@ -1082,14 +1073,14 @@ static int dpcm_prune_paths(struct snd_soc_pcm_runtime *fe, int stream,
1082 list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) { 1073 list_for_each_entry(dpcm, &fe->dpcm[stream].be_clients, list_be) {
1083 1074
1084 /* is there a valid CPU DAI widget for this BE */ 1075 /* is there a valid CPU DAI widget for this BE */
1085 widget = rtd_get_cpu_widget(dpcm->be, stream); 1076 widget = dai_get_widget(dpcm->be->cpu_dai, stream);
1086 1077
1087 /* prune the BE if it's no longer in our active list */ 1078 /* prune the BE if it's no longer in our active list */
1088 if (widget && widget_in_list(list, widget)) 1079 if (widget && widget_in_list(list, widget))
1089 continue; 1080 continue;
1090 1081
1091 /* is there a valid CODEC DAI widget for this BE */ 1082 /* is there a valid CODEC DAI widget for this BE */
1092 widget = rtd_get_codec_widget(dpcm->be, stream); 1083 widget = dai_get_widget(dpcm->be->codec_dai, stream);
1093 1084
1094 /* prune the BE if it's no longer in our active list */ 1085 /* prune the BE if it's no longer in our active list */
1095 if (widget && widget_in_list(list, widget)) 1086 if (widget && widget_in_list(list, widget))