mm, hugetlb: remove useless check about mapping type
[platform/adaptation/renesas_rcar/renesas_kernel.git] / sound / soc / soc-pcm.c
index f4f68cb..330c9a6 100644 (file)
@@ -1833,18 +1833,10 @@ static int dpcm_run_old_update(struct snd_soc_pcm_runtime *fe, int stream)
 /* Called by DAPM mixer/mux changes to update audio routing between PCMs and
  * any DAI links.
  */
-int soc_dpcm_runtime_update(struct snd_soc_dapm_widget *widget)
+int soc_dpcm_runtime_update(struct snd_soc_card *card)
 {
-       struct snd_soc_card *card;
        int i, old, new, paths;
 
-       if (widget->codec)
-               card = widget->codec->card;
-       else if (widget->platform)
-               card = widget->platform->card;
-       else
-               return -EINVAL;
-
        mutex_lock_nested(&card->mutex, SND_SOC_CARD_CLASS_RUNTIME);
        for (i = 0; i < card->num_rtd; i++) {
                struct snd_soc_dapm_widget_list *list;
@@ -2028,6 +2020,16 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
                        capture = 1;
        }
 
+       if (rtd->dai_link->playback_only) {
+               playback = 1;
+               capture = 0;
+       }
+
+       if (rtd->dai_link->capture_only) {
+               playback = 0;
+               capture = 1;
+       }
+
        /* create the PCM */
        if (rtd->dai_link->no_pcm) {
                snprintf(new_name, sizeof(new_name), "(%s)",