Merge remote-tracking branches 'asoc/topic/adsp' and 'asoc/topic/amd' into asoc-next
authorMark Brown <broonie@kernel.org>
Mon, 11 Jan 2016 13:54:32 +0000 (13:54 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 11 Jan 2016 13:54:32 +0000 (13:54 +0000)
1  2  3 
sound/soc/Kconfig
sound/soc/Makefile
sound/soc/codecs/wm5110.c

Simple merge
Simple merge
index f276d2dd1683c38b919618fe102476c4af8ad2a6,61fa7cc91d15a5cda175ce90627a33c4c1af9b75,c04c0bc6f58ad434de2bbe5825be1b41182b1c24..6088d30962a953cab19ee561ee288cca142dfccf
@@@@ -2131,48 -2135,60 -1996,8 +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);
@@@@ -2263,18 -2293,20 -2088,6 +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);