Merge remote-tracking branches 'asoc/topic/of-graph', 'asoc/topic/pxa', 'asoc/topic...
authorMark Brown <broonie@kernel.org>
Mon, 12 Dec 2016 15:53:07 +0000 (15:53 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 12 Dec 2016 15:53:07 +0000 (15:53 +0000)
1  2  3  4  5 
include/sound/soc.h
sound/soc/codecs/Kconfig
sound/soc/codecs/Makefile
sound/soc/qcom/lpass-platform.c
sound/soc/soc-core.c

Simple merge
Simple merge
Simple merge
index 420d200f9a0533bd335224784c2e7933a0c8c3b1,e2ff538a8aa5b63c4117f35365c39057b1f5360a,e2ff538a8aa5b63c4117f35365c39057b1f5360a,ca5e19f55a280cc2dbfcc33a2ee028ed75051bdd,e2ff538a8aa5b63c4117f35365c39057b1f5360a..dd5bdd0da73048c627417c45980dde5032043656
@@@@@@ -61,44 -61,7 -61,7 -60,37 -61,7 +60,41 @@@@@@ static int lpass_platform_pcmops_open(s
     {
        struct snd_pcm_runtime *runtime = substream->runtime;
        struct snd_soc_pcm_runtime *soc_runtime = substream->private_data;
 -- -   int ret;
 ++ +   struct snd_soc_dai *cpu_dai = soc_runtime->cpu_dai;
 ++ +   struct lpass_data *drvdata =
 ++ +           snd_soc_platform_get_drvdata(soc_runtime->platform);
 ++ +   struct lpass_variant *v = drvdata->variant;
 ++ +   int ret, dma_ch, dir = substream->stream;
 ++ +   struct lpass_pcm_data *data;
 ++ +
 ++ +   data = devm_kzalloc(soc_runtime->dev, sizeof(*data), GFP_KERNEL);
 ++ +   if (!data)
 ++ +           return -ENOMEM;
 ++ +
 ++ +   data->i2s_port = cpu_dai->driver->id;
 ++ +   runtime->private_data = data;
 ++ +
 ++++   dma_ch = 0;
 ++ +   if (v->alloc_dma_channel)
 ++ +           dma_ch = v->alloc_dma_channel(drvdata, dir);
 ++++   else
 ++++           dma_ch = 0;
 ++++
 ++ +   if (dma_ch < 0)
 ++ +           return dma_ch;
 ++ +
 ++ +   drvdata->substream[dma_ch] = substream;
 ++ +
 ++ +   ret = regmap_write(drvdata->lpaif_map,
 ++ +                   LPAIF_DMACTL_REG(v, dma_ch, dir), 0);
 ++ +   if (ret) {
 ++ +           dev_err(soc_runtime->dev,
 ++ +                   "%s() error writing to rdmactl reg: %d\n",
 ++ +                   __func__, ret);
 ++ +                   return ret;
 ++ +   }
 ++ +
-       if (dir == SNDRV_PCM_STREAM_PLAYBACK)
-               data->rdma_ch = dma_ch;
-       else
-               data->wrdma_ch = dma_ch;
+++ +   data->dma_ch = dma_ch;
     
        snd_soc_set_runtime_hwparams(substream, &lpass_platform_pcm_hardware);
     
        return 0;
     }
     
-       int dma_ch, dir = substream->stream;
 ++ +static int lpass_platform_pcmops_close(struct snd_pcm_substream *substream)
 ++ +{
 ++ +   struct snd_pcm_runtime *runtime = substream->runtime;
 ++ +   struct snd_soc_pcm_runtime *soc_runtime = substream->private_data;
 ++ +   struct lpass_data *drvdata =
 ++ +           snd_soc_platform_get_drvdata(soc_runtime->platform);
 ++ +   struct lpass_variant *v = drvdata->variant;
 ++ +   struct lpass_pcm_data *data;
-    
-       if (dir == SNDRV_PCM_STREAM_PLAYBACK)
-               dma_ch = data->rdma_ch;
-       else
-               dma_ch = data->wrdma_ch;
-    
-       drvdata->substream[dma_ch] = NULL;
-    
 ++ +
 ++ +   data = runtime->private_data;
 ++ +   v = drvdata->variant;
-               v->free_dma_channel(drvdata, dma_ch);
+++ +   drvdata->substream[data->dma_ch] = NULL;
 ++ +   if (v->free_dma_channel)
+++ +           v->free_dma_channel(drvdata, data->dma_ch);
 ++ +
 ++ +   return 0;
 ++ +}
 ++ +
     static int lpass_platform_pcmops_hw_params(struct snd_pcm_substream *substream,
                struct snd_pcm_hw_params *params)
     {
Simple merge