Merge remote-tracking branches 'asoc/fix/rt5659', 'asoc/fix/sigmadsp', 'asoc/fix...
authorMark Brown <broonie@kernel.org>
Wed, 10 Feb 2016 19:23:09 +0000 (19:23 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 10 Feb 2016 19:23:09 +0000 (19:23 +0000)
1  2  3  4  5  6 
sound/soc/codecs/wm5110.c
sound/soc/codecs/wm8960.c

index 6088d30962a953cab19ee561ee288cca142dfccf,c04c0bc6f58ad434de2bbe5825be1b41182b1c24,6088d30962a953cab19ee561ee288cca142dfccf,6088d30962a953cab19ee561ee288cca142dfccf,cd1b3080a497465ed4357094d98eb9a7c5c0b32e,c3640960183589eac7856e0edcbc77647c5e78f7..97c0f1e2388637dcdc686da1f1a5cf06037a6944
@@@@@@@ -2131,60 -1996,8 -2131,60 -2131,60 -2135,48 -2135,48 +2131,60 @@@@@@@ static struct snd_soc_dai_driver wm5110
                 },
                .ops = &arizona_simple_dai_ops,
        },
 +      {
 +              .name = "wm5110-cpu-voicectrl",
 +              .capture = {
 +                      .stream_name = "Voice Control CPU",
 +                      .channels_min = 1,
 +                      .channels_max = 1,
 +                      .rates = WM5110_RATES,
 +                      .formats = WM5110_FORMATS,
 +              },
 +              .compress_new = snd_soc_new_compress,
 +      },
 +      {
 +              .name = "wm5110-dsp-voicectrl",
 +              .capture = {
 +                      .stream_name = "Voice Control DSP",
 +                      .channels_min = 1,
 +                      .channels_max = 1,
 +                      .rates = WM5110_RATES,
 +                      .formats = WM5110_FORMATS,
 +              },
 +      },
      };
      
 +    static int wm5110_open(struct snd_compr_stream *stream)
 +    {
 +      struct snd_soc_pcm_runtime *rtd = stream->private_data;
 +      struct wm5110_priv *priv = snd_soc_codec_get_drvdata(rtd->codec);
 +      struct arizona *arizona = priv->core.arizona;
 +      int n_adsp;
 +    
 +      if (strcmp(rtd->codec_dai->name, "wm5110-dsp-voicectrl") == 0) {
 +              n_adsp = 2;
 +      } else {
 +              dev_err(arizona->dev,
 +                      "No suitable compressed stream for DAI '%s'\n",
 +                      rtd->codec_dai->name);
 +              return -EINVAL;
 +      }
 +    
 +      return wm_adsp_compr_open(&priv->core.adsp[n_adsp], stream);
 +    }
 +    
 +  ++static irqreturn_t wm5110_adsp2_irq(int irq, void *data)
 +  ++{
 +  ++  struct wm5110_priv *florida = data;
 +  ++  int ret;
 +  ++
 +  ++  ret = wm_adsp_compr_handle_irq(&florida->core.adsp[2]);
 +  ++  if (ret == -ENODEV)
 +  ++          return IRQ_NONE;
 +  ++
 +  ++  return IRQ_HANDLED;
 +  ++}
 +  ++
      static int wm5110_codec_probe(struct snd_soc_codec *codec)
      {
        struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
@@@@@@@ -2289,20 -2088,6 -2289,20 -2289,20 -2267,18 -2267,18 +2289,20 @@@@@@@ static struct snd_soc_codec_driver soc_
        .num_dapm_routes = ARRAY_SIZE(wm5110_dapm_routes),
      };
      
 +    static struct snd_compr_ops wm5110_compr_ops = {
 +      .open = wm5110_open,
 +      .free = wm_adsp_compr_free,
 +      .set_params = wm_adsp_compr_set_params,
 +      .get_caps = wm_adsp_compr_get_caps,
 +      .trigger = wm_adsp_compr_trigger,
 +  ++  .pointer = wm_adsp_compr_pointer,
 +  ++  .copy = wm_adsp_compr_copy,
 +    };
 +    
 +    static struct snd_soc_platform_driver wm5110_compr_platform = {
 +      .compr_ops = &wm5110_compr_ops,
 +    };
 +    
      static int wm5110_probe(struct platform_device *pdev)
      {
        struct arizona *arizona = dev_get_drvdata(pdev->dev.parent);
index ff237726775a16a4e66b8b104aaa878d9f187dab,056375339ea32948207723b1affd84ebdd0b1730,ff237726775a16a4e66b8b104aaa878d9f187dab,ff237726775a16a4e66b8b104aaa878d9f187dab,5380798883b5d342df4dee0ffdd54e3b474ceac6,4b440132959177917c621eaf2135a2cadf1c60de..d7f444f874604d7d8a6df4a05aa634fe5448fdfd
@@@@@@@ -238,15 -229,15 -238,15 -238,15 -229,15 -229,15 +238,15 @@@@@@@ SOC_DOUBLE_R_TLV("Capture Volume", WM89
      SOC_DOUBLE_R("Capture Volume ZC Switch", WM8960_LINVOL, WM8960_RINVOL,
        6, 1, 0),
      SOC_DOUBLE_R("Capture Switch", WM8960_LINVOL, WM8960_RINVOL,
 -      7, 1, 0),
 +      7, 1, 1),
      
----- SOC_SINGLE_TLV("Right Input Boost Mixer RINPUT3 Volume",
+++++ SOC_SINGLE_TLV("Left Input Boost Mixer LINPUT3 Volume",
               WM8960_INBMIX1, 4, 7, 0, lineinboost_tlv),
----- SOC_SINGLE_TLV("Right Input Boost Mixer RINPUT2 Volume",
+++++ SOC_SINGLE_TLV("Left Input Boost Mixer LINPUT2 Volume",
               WM8960_INBMIX1, 1, 7, 0, lineinboost_tlv),
----- SOC_SINGLE_TLV("Left Input Boost Mixer LINPUT3 Volume",
+++++ SOC_SINGLE_TLV("Right Input Boost Mixer RINPUT3 Volume",
               WM8960_INBMIX2, 4, 7, 0, lineinboost_tlv),
----- SOC_SINGLE_TLV("Left Input Boost Mixer LINPUT2 Volume",
+++++ SOC_SINGLE_TLV("Right Input Boost Mixer RINPUT2 Volume",
               WM8960_INBMIX2, 1, 7, 0, lineinboost_tlv),
      SOC_SINGLE_TLV("Right Input Boost Mixer RINPUT1 Volume",
                WM8960_RINPATH, 4, 3, 0, micboost_tlv),