#include <linux/device.h>
#include <linux/delay.h>
#include <linux/clk.h>
+#include <linux/version.h>
#include <asm/dma.h>
#include <sound/core.h>
{
return 0;
}
-
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35))
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ dai->cpu_dai->playback.dma_data = i2s->dma_playback;
+ else
+ dai->cpu_dai->capture.dma_data = i2s->dma_capture;
+#else
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
dai->cpu_dai->dma_data = i2s->dma_playback;
else
dai->cpu_dai->dma_data = i2s->dma_capture;
+#endif
/* Working copies of register */
iismod = readl(&(pheadi2s->I2S_TXCR));
struct snd_pcm_runtime *runtime = substream->runtime;
struct rockchip_runtime_data *prtd = runtime->private_data;
struct snd_soc_pcm_runtime *rtd = substream->private_data;
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35))
+ struct rockchip_pcm_dma_params *dma = snd_soc_dai_get_dma_data(rtd->dai->cpu_dai, substream);
+#else
struct rockchip_pcm_dma_params *dma = rtd->dai->cpu_dai->dma_data;
+#endif
unsigned long totbytes = params_buffer_bytes(params);
int ret = 0;