Merge branch 'davinci' into for-2.6.32
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 7 Jul 2009 18:18:46 +0000 (19:18 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 7 Jul 2009 18:18:46 +0000 (19:18 +0100)
Conflicts:
sound/soc/davinci/davinci-i2s.c

1  2 
sound/soc/davinci/davinci-i2s.c

index 88ccef79a5ebe12a9e711edc8344833346af096c,2f11970e6406595af1b4f9de7b4857895f55e4ac..7c4839994e2f6d79cbb19c69c893313763ee8393
@@@ -461,24 -435,40 +461,50 @@@ static int davinci_i2s_trigger(struct s
        return ret;
  }
  
- static int davinci_i2s_probe(struct platform_device *pdev,
-                            struct snd_soc_dai *dai)
 +static void davinci_i2s_shutdown(struct snd_pcm_substream *substream,
 +              struct snd_soc_dai *dai)
 +{
 +      struct snd_soc_pcm_runtime *rtd = substream->private_data;
 +      struct davinci_mcbsp_dev *dev = rtd->dai->cpu_dai->private_data;
 +      int playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK);
 +      davinci_mcbsp_stop(dev, playback);
 +}
 +
+ #define DAVINCI_I2S_RATES     SNDRV_PCM_RATE_8000_96000
+ static struct snd_soc_dai_ops davinci_i2s_dai_ops = {
+       .startup        = davinci_i2s_startup,
++      .shutdown       = davinci_i2s_shutdown,
++      .prepare        = davinci_i2s_prepare,
+       .trigger        = davinci_i2s_trigger,
+       .hw_params      = davinci_i2s_hw_params,
+       .set_fmt        = davinci_i2s_set_dai_fmt,
+ };
+ struct snd_soc_dai davinci_i2s_dai = {
+       .name = "davinci-i2s",
+       .id = 0,
+       .playback = {
+               .channels_min = 2,
+               .channels_max = 2,
+               .rates = DAVINCI_I2S_RATES,
+               .formats = SNDRV_PCM_FMTBIT_S16_LE,},
+       .capture = {
+               .channels_min = 2,
+               .channels_max = 2,
+               .rates = DAVINCI_I2S_RATES,
+               .formats = SNDRV_PCM_FMTBIT_S16_LE,},
+       .ops = &davinci_i2s_dai_ops,
+ };
+ EXPORT_SYMBOL_GPL(davinci_i2s_dai);
+ static int davinci_i2s_probe(struct platform_device *pdev)
  {
-       struct snd_soc_device *socdev = platform_get_drvdata(pdev);
-       struct snd_soc_card *card = socdev->card;
-       struct snd_soc_dai *cpu_dai = card->dai_link->cpu_dai;
+       struct snd_platform_data *pdata = pdev->dev.platform_data;
        struct davinci_mcbsp_dev *dev;
-       struct resource *mem, *ioarea;
-       struct evm_snd_platform_data *pdata;
+       struct resource *mem, *ioarea, *res;
        int ret;
  
        mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);