summaryrefslogtreecommitdiff
path: root/sound/soc/s3c24xx/s3c24xx-pcm.c
AgeCommit message (Collapse)Author
2009-11-18ASoC: Rename 's3c24xx-pcm' driver to 's3c-dma'Jassi Brar
Making room for namespace for the PCM Controller driver the platform driver(s3c24xx-pcm) has been renamed to SoC agnostic name 's3c-dma'. Signed-off-by: Jassi Brar <jassi.brar@samsung.com> Acked-by: Ben Dooks <ben-linux@fluff.org> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-18ASoC: Rename s3c24xx_pcm prefix to s3c_dmaJassi Brar
The s3c24xx_pcm prefix for the soc_platform is inappropriate when some Samsung SoCs have PCM controllers which will eventually have drivers and hence namespace ambiguities. To resolve naming ambiguities in future the following have been renamed in order 1) s3c24xx_pcm_dma_params -> s3c_dma_params 2) s3c24xx_pcm_preallocate_dma_buffer -> s3c_preallocate_dma_buffer 3) s3c24xx_pcm_dmamask -> s3c_dma_mask 4) s3c24xx_pcm_XXX -> s3c_dma_XXX Signed-off-by: Jassi Brar <jassi.brar@samsung.com> Acked-by: Ben Dooks <ben-linux@fluff.org> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-06Merge branch 'for-2.6.32' into for-2.6.33Mark Brown
2009-10-28ARM: S3C: Add info for supporting circular DMA buffersBen Dooks
The S3C64XX DMA implementation will work a lot better with the ability to enqueue circular buffers as the hardware can do it's own linked-list management. Add a function s3c_dma_has_circular() to show that the system can do this and a flag for the channel. Update the s3c24xx/s3c64xx I2S DMA code to deal with this. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Ben Dooks <ben-linux@fluff.org> Acked-by: Mark Brown <broonie@@opensource.wolfsonmicro.com>
2009-10-13ASoC: S3C: Remove <plat/audio.h>Ben Dooks
Remove the <plat/audio.h> include from arch/arm/plat-s3c/include/plat/audio.h as it provides nothing to the current kernel and is not in any future plans for the system. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Simtec Linux Team <linux@simtec.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-25ASoC: S3C platform: Fix s3c2410_dma_started() called at improper timeShine Liu
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-20ASoC: S3C24XX : Align the peroid size to the buffer sizeShine Liu
> Then it's a driver bug. If unaligned period size is allowed, it means > that the irq is really generated in that period, not at the buffer > boundary. Otherwise, it must have a proper hw-constraint to align the > period size to the buffer size. This patch will fix the bug metioned in the above mail. Force the peroid size to be aligned with the buffer size. Based and tested on linux-2.6.31-rc6. Signed-off-by: Shine Liu <shinel@foxmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-01[ARM] S3C24XX: Remove hardware specific registers from DMABen Dooks
calls The S3C24XX DMA API channel configuration registers are being passed values comprised of register values which makes it hard to move the API to cover both the S3C24XX and S3C64XX. These values can be calculated from knowing which device the channel is connected to, so remove them from the two calls s3c2410_dma_config and s3c2410_dma_devconfig. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-04-07dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)Yang Hongyang
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-06ASoC: Fix logging severity for some S3C error messagesMark Brown
Upgrade the severity of some failure messages from debug level so they're displayed by default. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-06ASoC: Re-remove hand-rolled pr_debug() macrosMark Brown
The recent set of S3C64xx patches re-added a lot of uses of DBG() that had previously been removed - revert this so the standard pr_debug() macro is used. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-06Merge commit 's3c-iis-header' into HEADMark Brown
2009-03-05S3C: Move <mach/audio.h> to <plat/audio.h>Ben Dooks
The <mach/audio.h> file needs to be common to both ARCH_S3C2410 and ARCH_S3C64XX as they share common driver code, so move it to <plat/audio.h>. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-28ASoC: Fix copyright statements on Simtec filesBen Dooks
Fix the copyright statements in two of the S3C24XX ASoC files that have (c) when we require the full word. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-10ALSA: ASoC - Fix wrong section typesTakashi Iwai
The module init entries should be __init instead of __devinit. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-09ASoC: Register platform driversMark Brown
This is done at modprobe time, mirroring current behaviour, except for mpc5200_psc_i2s where we do registration at the same time as we register with soc-of-simple. Since the core currently ignores registration this has no practical impact. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-14ASoC: Revert "ASoC: Add new parameter to s3c24xx_pcm_enqueue"Mark Brown
This reverts commit 8dc840f88d9c9f75f46d5dbe489242f8a114fab6. Christian Pellegrin <chripell@gmail.com> reported that on some systems the patch caused DMA to fail which is much more serious than the original skipped audio issue. Further investigation by Dave shows that the behaviour depends on the clock speed of the SoC - a better fix is neeeded. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-05ASoC: Add new parameter to s3c24xx_pcm_enqueueDavid Anders
The S3C24xx dma does not allow more than one buffer to be enqueue prior to the dma transfers starting. This patch adds an additional parameter to s3c24xx_pcm_enqueue() to allow for passing an initial dma maximum load value. Signed-off-by: David Anders <danders at amltd.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-08-07[ARM] Move include/asm-arm/arch-* to arch/arm/*/include/machRussell King
This just leaves include/asm-arm/plat-* to deal with. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-07[ARM] Remove asm/hardware.h, use asm/arch/hardware.h insteadRussell King
Remove includes of asm/hardware.h in addition to asm/arch/hardware.h. Then, since asm/hardware.h only exists to include asm/arch/hardware.h, update everything to directly include asm/arch/hardware.h and remove asm/hardware.h. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-07-10ALSA: asoc: s3c24xx - merge structs snd_soc_codec_dai and snd_soc_cpu_dai.Liam Girdwood
This patch merges struct snd_soc_codec_dai and struct snd_soc_cpu_dai into struct snd_soc_dai for the S3C24xx platform. Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-19[ALSA] ASoC: Remove in-code changelogsMark Brown
The overwhelming majority just say 'initial version' anyway. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-05[ALSA] soc - fix s3c2410 PCM breakageDavide Rizzo
S3C2410 pcm doesn't work. s3c2410_dma_request() now returns the channel number and not 0 if OK. Signed-off-by: Davide Rizzo <davide@elpa.it> Acked-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-30[ALSA] soc - s3c24xx-pcm - Fix checkpatch warningsMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] soc - s3c24xx - Improve diagnostic outputTim Niemeyer
Add some debug messages for suspend/resume and to add a clear prefix to s3c24xx-i2s and s3c24xx-pcm. Signed-off-by: Tim Niemeyer <reddog@mastersword.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] sound: replace remaining __FUNCTION__ occurencesHarvey Harrison
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-01-31[ALSA] soc - Reinitialise DMA on every resumeGraeme Gregory
This one changes the DMA initialisation as it turns out the DMA driver in s3c24xx doesnt store registers between suspend/resume so you have to re-initialise the channels on every resume. Signed-off-by: Graeme Gregory <graeme@openmoko.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] Remove sound/driver.hTakashi Iwai
This header file exists only for some hacks to adapt alsa-driver tree. It's useless for building in the kernel. Let's move a few lines in it to sound/core.h and remove it. With this patch, sound/driver.h isn't removed but has just a single compile warning to include it. This should be really killed in future. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2007-10-16[ALSA] s3c24xx-pcm: fix hw_params dma handlingHarald Welte
Since the PCM emulation can call multiple times to hw_setup(), but we can only once allocate/request the DMA channel, we have to handle this gracefully. Signed-off-by: Harald Welte <laforge@openmoko.org> Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-31[ALSA] Fix ASoC s3c24xx-pcm spinlock bugZoltan Devai
This should fix a spinlock lockup bug on the s3c24xx arch. From: Zoltan Devai <zdevai@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11[ALSA] ASoC Samsung S3c24xx updates - audio DMA cleanupGraeme Gregory
This patch cleans up the audio DMA for the Samsung S3C24xx platform. Signed-off-by: Graeme Gregory <gg@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11[ALSA] ASoC Samsung S3C24xx audio DMABen Dooks
This patch by Ben Dooks from Simtec Electronics adds ASoC audio DMA support for the Samsung S3C24xx CPU. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Graeme Gregory <gg@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>