From: Mark Brown Date: Tue, 7 Jul 2009 18:18:46 +0000 (+0100) Subject: Merge branch 'davinci' into for-2.6.32 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3f405b46a91c0c4cdfa6077b4e1853f35a94e8ef;p=openwrt%2Fstaging%2Fblogic.git Merge branch 'davinci' into for-2.6.32 Conflicts: sound/soc/davinci/davinci-i2s.c --- 3f405b46a91c0c4cdfa6077b4e1853f35a94e8ef diff --cc sound/soc/davinci/davinci-i2s.c index 88ccef79a5eb,2f11970e6406..7c4839994e2f --- a/sound/soc/davinci/davinci-i2s.c +++ b/sound/soc/davinci/davinci-i2s.c @@@ -461,24 -435,40 +461,50 @@@ static int davinci_i2s_trigger(struct s return ret; } +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); +} + - static int davinci_i2s_probe(struct platform_device *pdev, - struct snd_soc_dai *dai) + #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);