Currently adsp pcm device allows only S16_LE. For rest of format
it throws not supported error. Change will allow playback and
capture for S8/S24/S32 formats also.
However machine driver should make sure same format info is
configured for ADSP-ADMAIFx and ADMAIFx dai-links.
Bug 1756112
Change-Id: Iac76d022adc57ea88e6208a66086fdb29bff8c66
Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-on: http://git-master/r/1156127
(cherry picked from commit 39bc390bce81ea8538b3bca0116e3e7c4fa2745e)
Reviewed-on: http://git-master/r/1238420
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
amdaif fifo sizes and start addresses were being
set such that amdaif x and admaif x+16 fifos were
overlapping causing audio data corruption when used
simultaneously.
use the reset values for fifo sizes and start
adddresses to avoid this overlap
Bug 1748018
Change-Id: I8a87e83d1cbebcd6dc2f487a5925756fd47004a3
Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-on: http://git-master/r/1171651
(cherry picked from commit efef0eaf1434b550e93016264491a16555d7b3de)
Reviewed-on: http://git-master/r/1238417
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nitin Pai <npai@nvidia.com>
As adma plugin allocates static ARAM memory, having single plugin for both
rx and tx will be waste of ARAM memory, as MEM to AHUB don't need to allocate
memory during plugin loading.
Bug 200220099
Change-Id: I5d713ebd5718e751d341d8d64889a36327277b1c
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: http://git-master/r/1184236
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shashank Verma <shashankv@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Expose mixer controls for i2s sample rate, channel and
channel conversion in rx/tx i2s cif. This is required
to support routing of audio to codec from i2s6.
Bug 1792012
Reviewed-on: http://git-master/r/1227399
(cherry picked from commit 76118138b12220a2cdf25d44fd58fcd83090577c)
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Change-Id: I4e5471b7ca8fcf6d72ab2e0e27ed16b6adb8c94d
Reviewed-on: http://git-master/r/1201220
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
fixing kernel warnings of the form
"tegra210-i2s tegra210-i2s.[0-9]+:
Missing prop fsync-width for I2S
Either we can set the property to a value of 31
or we can make these dev_warn as dev_info.
We are going with the second option.
Bug 200178609
Change-Id: I29285925a8a88ab8119ec655133462b0714c5092
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1207583
(cherry picked from commit c2bf779f429f5fb02a787026bcc99a22e7a647b4)
Reviewed-on: http://git-master/r/1210057
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
These warnings do not cause any issue.
Making them as dev_info.
Bug 1774835
Change-Id: I04357d9465d0113d262f9d1034233ce59b82ee2a
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1201945
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Use the tegra-path function to compute the path to external projects.
That allows the external projects to be collaped into this project without
needing to modify the Makefiles.
Also, add both the external and internal path to headers to the include
path.
Bug 1783210
Signed-off-by: dmitry pervushin <dpervushin@nvidia.com>
Change-Id: Ie085a74cf3097c47a0eeb7cbd0ad653db88ea953
Reviewed-on: http://git-master/r/1174846
Reviewed-on: http://git-master/r/1177283
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alexander Van Brunt <avanbrunt@nvidia.com>
Tested-by: Alexander Van Brunt <avanbrunt@nvidia.com>
Reviewed-on: http://git-master/r/1183037
Earlier -1 is used to reset amx byte map, this change use 256 to
disable amx byte map.
Valid values are from 0 to 255, setting value to 256 disables
corresponding byte.
Change-Id: I05667b1cf7b3da8dc1bdfa68ca787e3d86422f0c
Signed-off-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-on: http://git-master/r/1182785
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Support dynamic pinmux settings for dspk, this change will help
to runtime configure the pinmux register to use pinmuxed path.
Change-Id: Ice8236e17e55f9fb58566f65a638b750fc7bdd00
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: http://git-master/r/1181863
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Support dynamic pinmux settings for dmic, this change will help
to runtime configure the pinmux register to use pinmuxed path like
either AODMIC/DMIC3 etc..
Bug 200119874
Change-Id: Iaebb453293a1c957ae44bc709fa776d28c189b33
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: http://git-master/r/1180530
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Add support for channel select control to choose between
left and right, If the capture channels are > 1 then
the stereo channel settings is selected by default.
Bug 1782976
Change-Id: Ife7f554c93741a3232ae0b65b44eaeb9e4215c98
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: http://git-master/r/1176100
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
The adsp audio driver is not hot-pluggable at the moment.
It might cause issues if the driver has to be loaded or
unloaded. The remove() callback is disabled until we have
proper support for hot-plug.
Bug 1779074
Change-Id: I530d50bc1cad3917c712a4322f27256166422bd5
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: http://git-master/r/1168492
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Driver binding/unbinding is causing crash on the driver. The bind/unbind
options are supressed from the driver until there is plan to support this,
since it requires to take care of lot of other dependencies.
Bug 1779074
Change-Id: I61b41d425dac21b1bae1a21d36d0ca22dd4c7c20
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: http://git-master/r/1166724
Reviewed-by: Viraj Karandikar <vkarandikar@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Memory for widget names is allocated statically by default widget
name "PLUGINx". If a plugin has longer widget name, then it will
corrupt the widget name memory and tegra210_adsp_routes. This
creates issue in DAPM and playback fails.
Use long name as default plugin name: PLUGINx-PLACE-HOLDER to have
bigger memory. Also add a length check on plugin's widget name.
Bug 200207626
Change-Id: I2442b07492a795ed120766eaee3a0083f80f6cf3
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/1164763
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Currently adsp_audio rely on xbar device to keep clock enable.
For some of corner cases it is observed that xbar devices gets to
suspend state leading to disabling of ahub clock, however nvadma
still trying to program adma. This leads to adsp crash.
This change adds support for adsp_audio to enable and disable
clocks as per its runtime_resume and runtime_suspend calls.
Bug 1756112
Change-Id: I5697853d901eed1059bd1ce29099a74cf62d46a3
Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-on: http://git-master/r/1149568
(cherry picked from commit 17d84bd026751e1bc380d69bd89c4a034d9398fc)
Reviewed-on: http://git-master/r/1155917
(cherry picked from commit 0ef2ab54b1da6a9573c863ac8e60e7192ae3b2d6)
Reviewed-on: http://git-master/r/1163157
GVS: Gerrit_Virtual_Submit
Tested-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
This commit has changes needed for audio on kernel 4.4
- select SND_DYNAMIC_MINORS for tegra-alt
- use snd_soc_new_compress callback function in snd_soc_dai_driver
instead of setting compress_dai = 1
- use snd_soc_dapm_to_codec() to access codec from widget
Bug 200193757
Change-Id: I1744ca93786086691cb6eabdde33125a995de9e7
Signed-off-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-on: http://git-master/r/1158639
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
1. clang found out that this header is unprotected.
Fix it by correcting the typo.
2. clang incorrectly warns about overflow in DMA_BIT_MASK(64)
This is incorrect. So, ignore it.
bug 200174682
Change-Id: Ib6294dad8e92844a04fad46d49f801cd2a32c866
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/1150396
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
i2s clock is required to be configured
only when controller is programmed as master.
Also when clock source is sync clock need to
program the sync clock selector to pick correct
external clk.
Bug 1747842
Change-Id: Iadddebb21f7b0990114f4ad25093638ab996ce9f
Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-on: http://git-master/r/1139580
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Tested-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Nitin Pai <npai@nvidia.com>
Fixed following sparse warning by making local
function static:
$TOP/kernel-3.18/sound/soc/tegra-alt/tegra210_adsp_alt.c:2846:5:
warning: symbol 'tegra210_adsp_tlv_callback' was not declared.
Should it be static?
Bug 200088648
Change-Id: Ia4d78e297da3aa3bd9fe9effd64ddec30c2b67fc
Signed-off-by: Gaurav Tendolkar <gtendolkar@nvidia.com>
Reviewed-on: http://git-master/r/1131635
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Nitin Pai <npai@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
This reverts commit f75f4be594f2182d6c422d94fd11f88211b58ed0.
Original change was reverted because dependency was not
integrated from main to dev-kernel and original change
was causing GVS failures. Now putting it back.
Bug 1723185
Change-Id: Ifffcfb019237b448ba6ccd9bcae0423d36eb788e
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/1127945
GVS: Gerrit_Virtual_Submit
Reviewed-by: Gaurav Tendolkar <gtendolkar@nvidia.com>
Reviewed-by: Nitin Pai <npai@nvidia.com>
Added support in i2s driver to have an option
to drive an i2s in master mode from another
i2s sync clock
Bug 1733691
Change-Id: I2f2b7bbdbbdf8af97e6aef4563d5729b8f2d8c52
Signed-off-by: Sidharth <svarier@nvidia.com>
Reviewed-on: http://git-master/r/1118980
Reviewed-by: Gaurav Tendolkar <gtendolkar@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Nitin Pai <npai@nvidia.com>
Instead of ape specific power domain apis use generic tegra
power domain APIs to add/remove devices to/from ape power domain
mentioned in DT. These apis internally set up tegra pd ops.
Bug 200178663
Change-Id: Ifd7c73a44d0d7b729f593e6e3047b56b7f773be4
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: http://git-master/r/1028814
Moving sw-reset at PRE_PMU stage where we
reset i2s controller it start of playback/
capture to clean up fifo's in case last run
was not good.
Bug 1736992
Bug 200181219
Change-Id: I716eb736242440360dc1e13426a69adfac08c6ed
Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-on: http://git-master/r/1112855
Reviewed-by: Nitin Pai <npai@nvidia.com>
After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks
depending on CONFIG_PM_RUNTIME may now be changed to depend on
CONFIG_PM.
Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under
sound/.
JIRA TPM-704
Change-Id: I5807fa8d35b3fbbd1afdb69d2dbba760abb80e27
Signed-off-by: Sumit Singh <sumsingh@nvidia.com>
Request acknowledge for params sent via mixer controls. This
ensures parameter messages are processed before suspend.
Use a default message handler to flag completion event when APM
is used in cases other than offload and PCM streams.
Send all messages (connect, io buffer etc.) immediately.
If message queue is full, then trigger APM via maibox interrupt,
wait and attempt to queue again.
Fix check for wait timeout.
Print error if message queues are not empty when suspending.
Bug 200149702
Change-Id: Iddb1d8d62c659949294cfe258f88bad22e28cc92
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/1112097
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Audience require 32 bits/channel for power optimized routes.
Added k-control to update 12S bit width. This change will also take care
of converting XBAR_BITS to CLIENT_BITS by padding zeros from LFSR to LSB
DAI format is hardcoded to 32 bits in Audience codec driver.
Bug 200118587
Change-Id: I3cf35977e8ba57d83084bd86ae6a2720a6acde7e
Signed-off-by: Srinivas Anne <sanne@nvidia.com>
Reviewed-on: http://git-master/r/830893
(cherry picked from commit a7b79a1b71e4e11cad1fb323e8ccbcd42894a2a0)
Reviewed-on: http://git-master/r/832487
Reviewed-on: http://git-master/r/1028395
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
"Min ADSP Clock" for the APM is set at the widget ON event, which
sometimes occurs immediately on closing the APM connections (like for
SPKPROT); allowing "Min ADSP Clock" setting only if APM is initialized
causes this to be missed at times
Allowing to set "Min ADSP Clock" before APM is initialized will ensure
that it's always available at the subsequent widget event
Bug 200170455
Change-Id: I5500484f42a23abb290431a8e329e57e741a0e14
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: http://git-master/r/1027039
(cherry picked from commit a3ceb08c60ecb398a192dc607c1587b797ca79b7)
Reviewed-on: http://git-master/r/1029374
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
APM input mode can be set to PUSH or PULL.
In PUSH mode, APM blocks if there is no input available. Usually
a continuous mode ADMA sends interrupt when input data is available.
In PULL mode, APM blocks only if there is no input available and
a input fetch request is pending. Usually a one shot mode ADMA
fetches input data when required and signals event to wake up APM.
Control "APMx Input Mode" is provided to set input mode.
Default mode remains PUSH.
Bug 200150727
Change-Id: I10efd78ab593beb2e8a4b999dfa088e48f1e965b
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/1017553
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
ADMAIF channels used by ADSP are enabled/disable from ADSP.
So mark ENABLE register as volatile to avoid CPU writing
incorrect values into it.
Bug 200173637
Change-Id: Ic441d890e90dd087ae6bdd2a0b9ef8ceec0bb333
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/1013345
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Support adma as a part iso client to calculate the adma bandwidth based
on the usecase on both cpu and adsp side. This will help the iso manager
to alter the emc frequency.
Bug 1675078
Change-Id: I301aa710929665ea56f8183de8d22851913afa9c
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: http://git-master/r/924061
Reviewed-by: Ayoosh Bansal <ayooshb@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Removes machine driver specific dependency
for having configs for each platform. Instead
this should be done from device tree.
Change-Id: I6d8ac10dc2d2e25b4882a5e6b163a1d8f042d4fb
Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-on: http://git-master/r/932743
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Nitin Pai <npai@nvidia.com>
Move register store/restore from pm API's to
runtime API's for platforms, with CONFIG_PM_SLEEP
not enabled, to work.
Bug 200166409
Change-Id: Ifcdd78206b3ac59edc8ba1279316cfa8c87e7204
Signed-off-by: Uday Gupta <udayg@nvidia.com>
Reviewed-on: http://git-master/r/932101
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Nitin Pai <npai@nvidia.com>