Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
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
|
|
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>
|
|
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>
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|