]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'asoc/topic/samsung' into asoc-next
authorMark Brown <broonie@linaro.org>
Wed, 23 Oct 2013 15:44:43 +0000 (16:44 +0100)
committerMark Brown <broonie@linaro.org>
Wed, 23 Oct 2013 15:44:43 +0000 (16:44 +0100)
1  2 
sound/soc/samsung/i2s.c

diff --combined sound/soc/samsung/i2s.c
index 3e08b6c0f7baacf5ebfa145fa989c0af4332a6d6,32956df8f50ce3d50082f66cb5ad1fa89f8d2009..2c4d2505a19e3cce79a36bcb9b52d31df9df067d
@@@ -702,6 -702,13 +702,6 @@@ static int i2s_hw_params(struct snd_pcm
        }
        writel(mod, i2s->addr + I2SMOD);
  
 -      if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
 -              snd_soc_dai_set_dma_data(dai, substream,
 -                      (void *)&i2s->dma_playback);
 -      else
 -              snd_soc_dai_set_dma_data(dai, substream,
 -                      (void *)&i2s->dma_capture);
 -
        i2s->frmclk = params_rate(params);
  
        return 0;
@@@ -963,8 -970,6 +963,8 @@@ static int samsung_i2s_dai_probe(struc
        }
        clk_prepare_enable(i2s->clk);
  
 +      snd_soc_dai_init_dma_data(dai, &i2s->dma_playback, &i2s->dma_capture);
 +
        if (other) {
                other->addr = i2s->addr;
                other->clk = i2s->clk;
@@@ -1055,7 -1060,7 +1055,7 @@@ static struct i2s_dai *i2s_alloc_dai(st
        i2s->i2s_dai_drv.ops = &samsung_i2s_dai_ops;
        i2s->i2s_dai_drv.suspend = i2s_suspend;
        i2s->i2s_dai_drv.resume = i2s_resume;
-       i2s->i2s_dai_drv.playback.channels_min = 2;
+       i2s->i2s_dai_drv.playback.channels_min = 1;
        i2s->i2s_dai_drv.playback.channels_max = 2;
        i2s->i2s_dai_drv.playback.rates = SAMSUNG_I2S_RATES;
        i2s->i2s_dai_drv.playback.formats = SAMSUNG_I2S_FMTS;
@@@ -1138,9 -1143,9 +1138,9 @@@ static int samsung_i2s_probe(struct pla
                        dev_err(&pdev->dev, "Unable to get drvdata\n");
                        return -EFAULT;
                }
-               snd_soc_register_component(&sec_dai->pdev->dev,
-                                          &samsung_i2s_component,
-                                          &sec_dai->i2s_dai_drv, 1);
+               devm_snd_soc_register_component(&sec_dai->pdev->dev,
+                                               &samsung_i2s_component,
+                                               &sec_dai->i2s_dai_drv, 1);
                samsung_asoc_dma_platform_register(&pdev->dev);
                return 0;
        }
                goto err;
        }
  
-       snd_soc_register_component(&pri_dai->pdev->dev, &samsung_i2s_component,
-                                  &pri_dai->i2s_dai_drv, 1);
+       devm_snd_soc_register_component(&pri_dai->pdev->dev,
+                                       &samsung_i2s_component,
+                                       &pri_dai->i2s_dai_drv, 1);
  
        pm_runtime_enable(&pdev->dev);
  
@@@ -1289,7 -1295,6 +1290,6 @@@ static int samsung_i2s_remove(struct pl
        i2s->sec_dai = NULL;
  
        samsung_asoc_dma_platform_unregister(&pdev->dev);
-       snd_soc_unregister_component(&pdev->dev);
  
        return 0;
  }