summaryrefslogtreecommitdiffstats
path: root/sound/soc/s3c24xx/s3c-i2s-v2.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: S3C lrsync function made to work with IRQs disabled.Jassi2009-09-151-6/+10
| | | | | | | | | | | s3c2412_snd_lrsync() maybe reached with IRQs disabled and if LRCLK is dead due to improper initialization of CPU or CODEC, the system gets stuck in the loop because jiffies may never get updated. Implemented counter based wait mechanism for atleast the same timeout period. Signed-off-by: Jassi <jassi.brar@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Fix s3c-i2s-v2 buildMark Brown2009-08-261-0/+1
| | | | | | We now need the PCM header to kick the DMA. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: S3C platform: Fix s3c2410_dma_started() called at improper timeShine Liu2009-08-251-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ASoC: Fix data format configuration for S3C64XX IISv2Joonyoung Shim2009-08-181-3/+3
| | | | | | | | | | The data format configuration for S3C64xx IISv2 was hardcoded for IISMOD register. This patch changes to the defined values it. And instead of bits 9 and 10 of IISMOD we should clear bits 13 and 14. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: correct print specifiers for unsignedsRoel Kluin2009-05-281-2/+2
| | | | | | | | Unsigned variables should use `%u' rather than `%d'. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Staticise txctrl and rxctrl for S3C IISv2Mark Brown2009-04-301-8/+12
| | | | | | | | | | They aren't used by anything external and aren't prototyped; if any users appear they can be exported again for them. Also report what modes we have a problem with when we encounter invalid mode configurations. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Display S3C IISv2 mode and MS errors by defaultMark Brown2009-04-301-2/+2
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Display the clock rate used as the basis for rate calculationMark Brown2009-04-301-0/+2
| | | | | | Aids debugging. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Allow use of resource from the platform device for S3C IISv2Mark Brown2009-04-301-0/+18
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Fix boot warnings from S3C IISv2Mark Brown2009-04-301-1/+6
| | | | | | | | | On startup we try to make sure that the port is quiesced but if the port is already stopped then this will generate a warning about the RX/TX mode configuration. Configure the mode before doing the teardown to suppress these warnings. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Fix data format configuration for S3C64xx IISv2 and add 24 bitMark Brown2009-04-301-1/+21
| | | | | | | | | | | | | | The data format configuration for S3C64xx IISv2 is completely different to that for S3C24xx. Instead of a single bit configuration in bit 0 of IISMOD we have format selection in bits 13 and 14 and bit clock rate selection in bits 1 and 2. While we're here add support for 24 bit samples in S3C64xx. At some point it may be desirable to expose the bit clock rate selection to users but given the limited configuration options that may not be required. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Check for supported CPUs when building s3c-i2s-v2Mark Brown2009-04-301-0/+14
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Use our registration function for S3C64xxMark Brown2009-04-271-12/+6
| | | | | | Make sure we get the DAI operations initialised. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: s3c-i2s-v2 diagnostic improvementsMark Brown2009-04-271-6/+12
| | | | | | | Say what invalid values we're seeing when we see an invalid value and ensure that errors are displayed by default. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: s3c-i2s-v2 needs to declare a license for modular buildsMark Brown2009-04-231-1/+2
| | | | | | It relies on EXPORT_SYMBOL_GPL() symbols. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Fix s3c-i2s-v2.c snd_soc_dai changesBen Dooks2009-04-161-4/+6
| | | | | | | | Fix the build error in s3c-i2s-v2.c caused by a change to the snd_soc_dai ops field. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: s3c-i2s-v2.c fix for s3c_i2sv2_iis_calc_rateBen Dooks2009-04-161-4/+4
| | | | | | | | | The definition of s3c_i2sv2_iis_calc_rate was never renamed from s3c2412_iis_calc_rate, so rename this to allow the build to work. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Fix logging severity for some S3C error messagesMark Brown2009-03-061-1/+1
| | | | | | | 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>
* ASoC: Re-remove hand-rolled pr_debug() macrosMark Brown2009-03-061-28/+21
| | | | | | | | 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>
* ASoC: Split s3c2412-i2s.c into core and SoC specific partsBen Dooks2009-03-061-0/+645
The S3C2412 I2S (IIS) interface is replicated on further Samsung SoC parts in a broadly compatible way, so split the common code out into a core called s3c-i2s-v2.[ch] so that the newer SoCs such as the S3C6410 can make use of it. As such, all the original s3c2412 functions are currently being left with their original names, and will be renamed later in the series. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>