kernel-fxtec-pro1x/sound/soc
Ben Gardiner 52e2c5d38e ASoC: davinci-pcm: convert to BATCH mode
The davinci-pcm driver's snd_pcm_ops pointer function currently calls into
the edma controller driver to read the current positions of the edma channels
to determine pos to return to the ALSA framework. In particular,
davinci_pcm_pointer() calls edma_get_position() and the latter has a comment
indicating that "Its channel should not be active when this is called" whereas
the channel is surely active when snd_pcm_ops.pointer is called.

The operation of davinci-pcm in capture and playback appears to follow close
the other pcm drivers who export SNDRV_PCM_INFO_BATCH except that davinci-pcm
does not report it's positions from pointer() using the last transferred
chunk. Instead it peeks directly into the edma controller to determine the
current position as discussed above.

Convert the davinci-pcm driver to BATCH mode: count the periods elapsed in the
prtd->period member and use its value to report the 'pos' to the alsa
framework in the davinci_pcm_pointer function.

There is a phase offset of 2 periods between the position used by dma setup
and the position reported in the pointer function. Either +2 in the dma
setup or -2 in the pointer function (with wrapping, both) accounts for this
offset -- I opted for the latter since it makes the first-time setup clearer.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: Steven Faludi <stevenfaludi@nanometrics.ca>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-05-25 19:14:31 +08:00
..
atmel ASoC: Merge branch 'for-2.6.39' into for-2.6.40 2011-04-18 18:07:43 +01:00
au1x ASoC: Remove -codec from WM8731 driver name 2011-03-30 07:15:33 +09:00
blackfin ASoC: Blackfin: push down SPORT settings from global variables 2011-03-30 07:20:05 +09:00
codecs Merge branch 'for-2.6.39' into for-2.6.40 2011-05-10 15:58:17 +02:00
davinci ASoC: davinci-pcm: convert to BATCH mode 2011-05-25 19:14:31 +08:00
ep93xx ASoC: Enable 192kHz sample rate for EP93xx. 2011-03-09 13:08:42 +00:00
fsl Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 2011-03-18 10:46:37 -07:00
imx ASoC: Merge branch 'for-2.6.39' into for-2.6.40 2011-04-18 18:07:43 +01:00
jz4740 Merge branch 'for-2.6.39' into for-2.6.40 2011-05-03 19:07:45 +01:00
kirkwood Fix common misspellings 2011-03-31 11:26:23 -03:00
mid-x86 Merge branch 'for-2.6.39' into for-2.6.40 2011-05-03 23:30:36 +01:00
nuc900 Merge branch 'for-2.6.37' into for-2.6.38 2010-11-30 11:35:43 +00:00
omap Fix common misspellings 2011-03-31 11:26:23 -03:00
pxa ASoC: Properly handle spitz MIC GPIO 2011-04-03 22:11:09 +09:00
s6000 ASoC: Remove needless inclusion of tlv320aic3x.h from machine drivers 2011-01-05 11:28:50 +00:00
samsung ASoC: Don't specify the DMA driver for Goni baseband link 2011-04-28 12:11:06 +01:00
sh ASoC: sh: fsi: add fsi_hw_startup/shutdown 2011-05-24 18:42:07 +08:00
tegra ASoC: tegra: TrimSlice machine support 2011-05-03 18:42:44 +01:00
txx9 ASoC: multi-component - ASoC Multi-Component Support 2010-08-12 14:00:00 +01:00
Kconfig ASoC: tegra: Kconfig and Makefile 2011-01-10 22:21:09 +00:00
Makefile ASoC: tegra: Kconfig and Makefile 2011-01-10 22:21:09 +00:00
soc-cache.c ASoC: Convert 16x16 write to use cpu_to_be16() 2011-05-24 18:41:09 +08:00
soc-core.c ASoC: Create codec DAPM widgets before calling the codecs probe function 2011-05-08 14:38:08 +01:00
soc-dapm.c ASoC: Implement mux control sharing 2011-05-03 19:29:15 +01:00
soc-jack.c ASoC: Merge branch 'for-2.6.39' into for-2.6.40 2011-04-18 18:07:43 +01:00
soc-utils.c ASoC: Work around allmodconfig failure 2011-04-28 12:09:06 +01:00