aha/sound/soc
Shine Liu faf907c7ba ASoC: S3C platform: Fix s3c2410_dma_started() called at improper time
s3c24xx dma has the auto reload feature, when the the trnasfer is done,
CURR_TC(DSTAT[19:0], current value of transfer count) reaches 0, and DMA
ACK becomes 1, and then, TC(DCON[19:0]) will be loaded into CURR_TC. So
the transmission is repeated.

IRQ is issued while auto reload occurs. We change the DISRC and
DCON[19:0] in the ISR, but at this time, the auto reload has been
performed already. The first block is being re-transmitted by the DMA.

So we need rewrite the DISRC and DCON[19:0] for the next block
immediatly after the this block has been started to be transported.

The function s3c2410_dma_started() is for this perpose, which is called
in the form of "s3c2410_dma_ctrl(prtd->params->channel,
S3C2410_DMAOP_STARTED);" in s3c24xx_pcm_trigger().

But it is not correct. DMA transmission won't start until DMA REQ signal
arrived, it is the time s3c24xx_snd_txctrl(1) or s3c24xx_snd_rxctrl(1)
is called in s3c24xx_i2s_trigger().

In the current framework, s3c24xx_pcm_trigger() is always called before
s3c24xx_pcm_trigger(). So the s3c2410_dma_started() should be called in
s3c24xx_pcm_trigger() after s3c24xx_snd_txctrl(1) or
s3c24xx_snd_rxctrl(1) is called in this function.

However, s3c2410_dma_started() is dma related, to call this function we
should provide the channel number, which is given by
substream->runtime->private_data->params->channel. The private_data
points to a struct s3c24xx_runtime_data object, which is define in
s3c24xx_pcm.c, so s3c2410_dma_started() can't be called in s3c24xx_i2s.c

Fix this by moving the call to signal the DMA started to the DAI
drivers.

Signed-off-by: Shine Liu <liuxian@redflag-linux.com>
Signed-off-by: Shine Liu <shinel@foxmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-25 13:09:05 +01:00
..
atmel ASoC: Configure WM8731 SYSCLK at startup on AT91SAM9G20-EK 2009-07-08 18:41:05 +01:00
au1x ALSA: Add missing SNDRV_PCM_INFO_BATCH flag to some drivers 2009-04-28 15:06:44 +02:00
blackfin ASoC: Fix checkpatch issues and typos of ad1938 codec and bf5xx-tdm dai 2009-07-29 21:31:53 +01:00
codecs Merge branch 'topic/digital-mixing' into for-2.6.32 2009-08-24 20:44:41 +01:00
davinci ASoC: tlv320aic3x: fixup board device changes 2009-08-21 10:52:57 +01:00
fsl ASoC: MPC5200: Support for buffer wrap around 2009-08-05 22:10:14 +01:00
imx ASoC: Staticise unexported variables 2009-08-15 11:36:49 +01:00
omap ARM: OMAP: McBSP: Merge two functions into omap_mcbsp_start/_stop 2009-08-25 10:20:48 +01:00
pxa ASoC: Pass correct platform data from pxa2xx-ac97 2009-08-23 18:18:01 +01:00
s3c24xx ASoC: S3C platform: Fix s3c2410_dma_started() called at improper time 2009-08-25 13:09:05 +01:00
s6000 ASoC: tlv320aic3x: fixup board device changes 2009-08-21 10:52:57 +01:00
sh ASoC: Add FSI-AK4642 sound support for SuperH 2009-08-21 11:02:03 +01:00
txx9 ASoC: txx9aclc: dynamically allocate dmaengine devname 2009-06-25 21:06:30 +01:00
Kconfig ASoC: Hook i.MX into build 2009-08-15 11:37:30 +01:00
Makefile Merge branch 'for-2.6.32' into mxc 2009-08-15 11:20:44 +01:00
soc-cache.c ASoC: fix I2C build errors 2009-08-11 10:47:25 +01:00
soc-core.c ASoC: Add DAPM widget power decision debugfs files 2009-08-21 17:17:59 +01:00
soc-dapm.c Merge branch 'topic/digital-mixing' into for-2.6.32 2009-08-24 20:44:41 +01:00
soc-jack.c ASoC: jack: Fix race in snd_soc_jack_add_gpios 2009-07-31 22:38:43 +01:00