summaryrefslogtreecommitdiff
path: root/sound/soc/tegra/tegra_pcm.c
AgeCommit message (Collapse)Author
2014-07-08AC97 working capture deviceDaniel Kochmanski
2012-11-12Merge branch 'l4t/l4t-r16-r2' into colibriMarcel Ziswiler
Conflicts: arch/arm/mach-tegra/tegra3_usb_phy.c arch/arm/mach-tegra/usb_phy.c drivers/usb/gadget/tegra_udc.c drivers/usb/otg/Makefile drivers/video/tegra/fb.c sound/soc/tegra/tegra_pcm.c
2012-09-10Merge branch 'l4t/l4t-r16' into colibriMarcel Ziswiler
Merge with latest NVIDIA L4T R16. Only real conflict concerning inverted VBUS gpio support.
2012-09-04ASoC: Tegra: Add ALSA ctl to set DMA addressSumit Bhattacharya
Add support for setting of DMA address through alsa control for AVP rendering. This is required to directly do DMA from IRAM to I2S. Bug 1024403 Change-Id: I6b79ae6e9a562160a19d238b817e1a8b407ac208 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-on: http://git-master/r/127436 (cherry picked from commit f270f46bef98a56f44432e608041adb617c22559) Signed-off-by: Chandrakanth Gorantla <cgorantla@nvidia.com> Change-Id: I195aae9043f967273283579f44d5367fe73d542f Reviewed-on: http://git-master/r/129159 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Scott Peterson <speterson@nvidia.com>
2012-06-22asoc: tegra2: ac97 audio capture functionalityMarcel Ziswiler
Migrate AC97 audio capture aka record functionality.
2012-05-28ASoC: Tegra: Add support for AVP renderingSumit Bhattacharya
Add alsa controls to specify which alsa device is used by AVP to render audio. Also add support for disabling DMA interrupt when AVP renders audio. Also add couple of alsa controls to query DMA channel ID and DMA buffer physical address. Bug 968814 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Change-Id: If593329db72bf00d97f7433f5c54e13500281253 Reviewed-on: http://git-master/r/97916 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2012-05-14asoc: tegra: pcm: Add support for setting bias levelAnkit Gupta
Allow setting bias level to turn off clock extern1 when codec is idle for Enterprise (Maxim 98088 codec). Bug 984678 Signed-off-by: Ankit Gupta <ankitgupta@nvidia.com> Change-Id: I09538dafe6c6f01547ff989de3c23933c9745db0 Reviewed-on: http://git-master/r/100286 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Scott Peterson <speterson@nvidia.com> Reviewed-by: Manoj Gangwal <mgangwal@nvidia.com> Tested-by: Ankit Gupta (Engrg-SW) <ankitgupta@nvidia.com>
2012-05-08asoc: tegra: pcm: If there is no dma information exit from triggerNikesh Oswal
If there is no dma information exit from trigger, this is required for the dummy voice call playback and capture streams Change-Id: I5276e7ebb72c17268a9785204fea9f395b2e5d3a Signed-off-by: Nikesh Oswal <noswal@nvidia.com> Reviewed-on: http://git-master/r/101235 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Scott Peterson <speterson@nvidia.com>
2012-05-01asoc: tegra: pcm: Add support for setting bias levelManoj Gangwal
Allow setting bias level to turn off clock extern1 when codec is idle. Bug 964287 Change-Id: I48056b86a9fdaea70202bee9326debaaddf69c0c Signed-off-by: Manoj Gangwal <mgangwal@nvidia.com> Reviewed-on: http://git-master/r/99665 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-05-01asoc: tegra: Add PCM driver for TDM modeNitin Pai
Modified existing pcm driver to take dma mode/ hw structure. Exported the functions needed for other pcm mode driver. Added new TDM mode hw param structure. Added pass SINGLE/DOUBLE buffered dma mode params. Bug 948478 Change-Id: I58309d52748f813b3303a8d6a052fbb6cc7ca87a Signed-off-by: Nitin Pai <npai@nvidia.com> Reviewed-on: http://git-master/r/99146 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-04-26ASoC: Tegra: Make dma_req count easily configurableSumit Bhattacharya
Instead of always using 2 dma_req count pass max dma_req_count through a macro. Ensure dma_req_count does not cross period_count. Bug 968814 Change-Id: Iddfbd77017992ccb8c90441213e191133dadb347 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-on: http://git-master/r/97915 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com>
2012-04-05sound: soc: tegra: Use tegra_dma_cancel() to abort requestLaxman Dewangan
To terminate request from dma, use the tegra_dma_cancel() inplace of tegra_dma_dequeue(). The api tegra_dma_dequeue() is getting to be obsolete. Change-Id: Id2a888a726086fb1e4ade04ac047442554188bee Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/91754 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com>
2012-03-02ASOC: Tegra: Fix Tegra20 BT SCO playback/recordSumit Bhattacharya
Set I2s FIFO attention level based on sample size and channel count. Also set playback DMA destination bus width and capture DMA source bus width based on sample size. These changes are needed to have proper BT SCO playback and record which uses 16bit-mono format. Bug 934101 Bug 874428 Bug 927978 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-on: http://git-master/r/84817 (cherry picked from commit 3ca2eb665af450d7e8f3bf6f2471e31203052641) Change-Id: I95c10716eaa990adb8b6ae535ce6acfca122a609 Reviewed-on: http://git-master/r/87192 Tested-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com>
2012-02-03arm: tegra: dma: read transfer count without stopping dma.Laxman Dewangan
Dma user must call the function tegra_dma_get_transfer_count() for knowing transferred count without stopping dma. Change-Id: I5e0060fd8163b285496442268548a90bdd0e294c Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/77800 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2012-01-30Revert "ASoC: Tegra: Acquire wake_lock during playback capture"Sumit Bhattacharya
This reverts commit 78d27b4b610fbe7d77e3cf43a3b82e15cf879d37. Bug 916409 Reviewed-on: http://git-master/r/76446 Change-Id: I4288dc4d90b393dd8dbefd7e997b9bfceb49d564 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/77305 Reviewed-by: Automatic_Commit_Validation_User
2011-12-15ASoC: Tegra: return accurate pcm pointer positionSumit Bhattacharya
Use DMA driver tegra_dma_get_transfer_count api to get current DMA position and use it to return accurate PCM poiter position. Change-Id: I28906a1f2dd47dd91f03b8a79f53196752be6083 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-on: http://git-master/r/68692 Reviewed-by: Lokesh Pathak <lpathak@nvidia.com> Tested-by: Lokesh Pathak <lpathak@nvidia.com>
2011-12-15ASoC: Tegra: Acquire wake_lock during playback captureSumit Bhattacharya
Acquire wake_lock from alsa kernel when pcm playback/capture starts and hold it until playack/capture ends. It is needed to prevent device from going into suspend state in middle of audio playback. Change-Id: I71e5fae0268f73a3e57f8d886c1b228d46899ea4 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-on: http://git-master/r/68671 Reviewed-by: Nikesh Oswal <noswal@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com>
2011-11-30ASoC: tegra: configure the dma request if dma data is setNikesh Oswal
configure the dma request if dma data is set by the cpu dai. In voice call use case we open a pcm device with alsa driver which has a codec dai for configuring the codec and a dummy cpu dai, which had no dma data since we dont want any dma for this device as the flow of data is directly between the baseband and codec. Bug: 862023 Change-Id: Ia64dee48ff5e102b334f4a3d64286787e6db415b Signed-off-by: Nikesh Oswal <noswal@nvidia.com> Reviewed-on: http://git-master/r/62621 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Rebase-Id: Rb144e52e059eb7240e09ac0d63825a490e3542af
2011-11-30ASoC: tegra: Support Tegra20 mono playback/captureSumit Bhattacharya
Add support for Tegra20 mono playback/capture. Mono is only supported using DSP mode. Also reduce minimum period bytes limit to 128 to have an acceptable latency value for 8kHz-mono playback/capture. Bug 872652 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Change-Id: I715a6995506f0ae036579d181392251a51d3a5c2 Reviewed-on: http://git-master/r/62016 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: R06beebb87c426eb010f1fb28aa521af25d51e2a7
2011-11-30ASoC: tegra: Constraint period size to be multiple of 8Sumit Bhattacharya
Constraint period size to be multiple of 8 as Tegra DMA double continuous mode needs transfer size to be multiple of 8. Bug 872652 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Change-Id: I848373d7d137200589c0ae3cd239cd2d29499d48 Reviewed-on: http://git-master/r/61914 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: R49ecf7654c0d2e8d72bf1b6cb71d56cb66d37875
2011-11-30CHROMIUM: ASoC: Tegra: Double-buffer DMA in HWStephen Warren
Avoid audio FIFO underflow due to DMA ISR latency. MODE_ONESHOT works like this: * CPU tells DMA HW to make a transfer . * DMA HW performs the transfer, fires an interrupt, and goes idle. * Interrupt latency (including e.g. LP2 exit time) is seen here. * DMA driver ISR programs the next transfer, from a SW transfer queue. In that model, the interrupt latency must be hidden by the I2S FIFO, which is 16 samples IIRC, i.e. a very short time (~0.3mS @ 48KHz). MODE_CONTINUOUS_SINGLE works like this: * CPU tells DMA HW to make a transfer . * CPU tells DMA HW to make a second transfer. * DMA HW performs the transfer, fires an interrupt, and starts the second transfer immediately. * DMA driver ISR programs the next (third) transfer, while the second is in progress, from a SW transfer queue. Thus any DMA ISR latency is seen between transfer N completing and transfer N+2 starting (rather than N+1), since the HW itself already knows how to perform transfer N+1 before transfer N completes. Hence, the system is tolerant of much larger latencies. BUG=chromium-os-partner:3294 TEST=Seaboard clamshell: "aplay sin-500hz-48000-60s.wav" multiple times while system idle and power LED flickering indicating CPU power saving. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Olof Johansson <olofj@chromium.org> Rebase-Id: R4063e2abdf57f47ebe4dc63488056268747bea82
2011-11-30arm: tegra: dma: Adding client name with dma allocation.Laxman Dewangan
By changing the dma allocation API to take the client name, it is easy to track who is allocated the DMA channels when we run out of the DMA channels. Original-Change-Id: I016011cfd74089fed0da1bc0f121800017ce124a Reviewed-on: http://git-master/r/28031 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Original-Change-Id: I048bcb87f95ee6d8ad2fdce993a1758dc5071666 Rebase-Id: Rf6d68d90cb4a8e91be3ec921cadc116f3a36184c
2011-08-09ASoC: Tegra: tegra_pcm_deallocate_dma_buffer: Don't OOPSStephen Warren
Not all PCM devices have all sub-streams. Specifically, the SPDIF driver only supports playback and hence has no capture substream. Check whether a substream exists before dereferencing it, when de-allocating DMA buffers in tegra_pcm_deallocate_dma_buffer. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-06-07ASoC: core - Optimise and refactor pcm_new() to pass only rtdLiam Girdwood
Currently pcm_new() passes in 3 arguments :- card, pcm and DAI. Refactor this to only pass in 1 argument (i.e. the rtd) since struct rtd contains card, pcm and DAI along with other members too that are useful too. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-28ASoC: Tegra: Fix error handling in DMA channel allocStephen Warren
tegra_dma_allocate_channel() returns NULL on errors, not an error pointer. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-13ASoC: Tegra: Add MODULE_ALIASStephen Warren
With the appropriate MODULE_ALIAS in place, the audio modules will be automatically loaded; there is no longer a need for manual modprobes. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-10ASoC: tegra: Add tegra-pcm driverStephen Warren
This provides an ASoC platform driver that manages Tegra's APB DMA controller. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>