Merge remote-tracking branches 'asoc/fix/compress', 'asoc/fix/core', 'asoc/fix/dapm...
authorMark Brown <broonie@kernel.org>
Wed, 7 Feb 2018 11:21:02 +0000 (11:21 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 7 Feb 2018 11:21:02 +0000 (11:21 +0000)
1  2  3  4  5 
sound/soc/mediatek/mt8173/mt8173-rt5650.c
sound/soc/soc-compress.c

index e69c141d8ed4c9a72d18187d1701c903cec41331,e69c141d8ed4c9a72d18187d1701c903cec41331,e69c141d8ed4c9a72d18187d1701c903cec41331,45fc2d2640aee604f6e24fe95fd1b3b48c483df2,40ebefd625c1e4370e1f6527e3003b03fac4d34d..679fc8bea0a32fdff72dcef61673f42d401d3dd6
@@@@@@ -51,8 -51,8 -51,8 -51,8 -51,6 +51,6 @@@@@@ static const struct snd_soc_dapm_route 
        {"DMIC R1", NULL, "Int Mic"},
        {"Headphone", NULL, "HPOL"},
        {"Headphone", NULL, "HPOR"},
----    {"Headset Mic", NULL, "micbias1"},
----    {"Headset Mic", NULL, "micbias2"},
        {"IN1P", NULL, "Headset Mic"},
        {"IN1N", NULL, "Headset Mic"},
     };
@@@@@@ -274,15 -274,15 -274,15 -274,10 -272,15 +272,10 @@@@@@ static int mt8173_rt5650_dev_probe(stru
        }
        mt8173_rt5650_codecs[1].of_node = mt8173_rt5650_codecs[0].of_node;
     
--- -   if (of_find_node_by_name(platform_node, "codec-capture")) {
--- -           np = of_get_child_by_name(pdev->dev.of_node, "codec-capture");
--- -           if (!np) {
--- -                   dev_err(&pdev->dev,
--- -                           "%s: Can't find codec-capture DT node\n",
--- -                           __func__);
--- -                   return -EINVAL;
--- -           }
+++ +   np = of_get_child_by_name(pdev->dev.of_node, "codec-capture");
+++ +   if (np) {
                ret = snd_soc_of_get_dai_name(np, &codec_capture_dai);
+++ +           of_node_put(np);
                if (ret < 0) {
                        dev_err(&pdev->dev,
                                "%s codec_capture_dai name fail %d\n",
diff --combined sound/soc/soc-compress.c
index 1507117d1185156425d6a2d4fa176c5e3f7ea7ed,d9b1e6417fb947652f9186ea13c1845ca5882b85,d9b1e6417fb947652f9186ea13c1845ca5882b85,d9b1e6417fb947652f9186ea13c1845ca5882b85,81232f4ab614b3089fe1af42a5612f3a1cbd8fea..7973f92cd40f53ab756944dd2a45ab8bfe5421e4
@@@@@@ -944,7 -944,7 -944,7 -944,7 -944,7 +944,7 @@@@@@ static int soc_compr_copy(struct snd_co
        struct snd_soc_platform *platform = rtd->platform;
        struct snd_soc_component *component;
        struct snd_soc_rtdcom_list *rtdcom;
 ----   int ret = 0, __ret;
 ++++   int ret = 0;
     
        mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
     
                    !component->driver->compr_ops->copy)
                        continue;
     
 ----           __ret = component->driver->compr_ops->copy(cstream, buf, count);
 ----           if (__ret < 0)
 ----                   ret = __ret;
 ++++           ret = component->driver->compr_ops->copy(cstream, buf, count);
 ++++           break;
        }
 ++++
     err:
        mutex_unlock(&rtd->pcm_mutex);
        return ret;
@@@@@@ -1096,7 -1096,7 -1096,7 -1096,7 -1096,6 +1096,6 @@@@@@ static struct snd_compr_ops soc_compr_d
      */
     int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
     {
----    struct snd_soc_codec *codec = rtd->codec;
        struct snd_soc_platform *platform = rtd->platform;
        struct snd_soc_component *component;
        struct snd_soc_rtdcom_list *rtdcom;
        ret = snd_compress_new(rtd->card->snd_card, num, direction,
                                new_name, compr);
        if (ret < 0) {
++++            component = rtd->codec_dai->component;
                pr_err("compress asoc: can't create compress for codec %s\n",
----                    codec->component.name);
++++                    component->name);
                goto compr_err;
        }