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: I0c7cda13ebf7318bb9d27549fc856d20ebd41cdc
Signed-off-by: Uday Gupta <udayg@nvidia.com>
Reviewed-on: http://git-master/r/932646
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Nitin Pai <npai@nvidia.com>
If ARAD lane gets locked before ASRC is enabled
the ASRC misses the ratio packet from ARAD and does
not lock. Requesting ratio packet again from ARAD
enables ASRC to lock in such cases.
Bug 200158741
Change-Id: I63841b46eec832f3f16be9fc78fa51d723d9e825
Signed-off-by: Gaurav Tendolkar <gtendolkar@nvidia.com>
(cherry-picked from commit 88eac6a1ffa5452c170756c1266eae388795689d)
Reviewed-on: http://git-master/r/842381
Tested-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nitin Pai <npai@nvidia.com>
Enable Werror for all the files under sound/soc/tegra-alt files,
so that all the warnings are treated as errors.
Bug 1454125
Change-Id: I71b761edeb5de94004b5f9868ca3c2f6fd2636f8
Signed-off-by: Sumit Singh <sumsingh@nvidia.com>
Reviewed-on: http://git-master/r/925848
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
add check for context pointer before accessing it in suspend.
Also move setting of driver data at the end of probe function.
Bug 200160608
Change-Id: I7ebee91b5f825575f1d8d84f3246b2e9f86da3ed
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: http://git-master/r/923079
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
GVS: Gerrit_Virtual_Submit
Marking ASRC_STREAM_LOCK_STATUS as volatile.
When asrc configured in HW mode, we want read
on ASRC_STREAM_LOCK_STATUS from hardware.
In SW mode we use ASRC_STREAM_LOCK_STATUS as
R/W register.
Bug Bug 200163397
Change-Id: I2960e9b7417c5c3017c87b4494b252e9668c4444
Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-on: http://git-master/r/926833
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nitin Pai <npai@nvidia.com>
Fixed the procedure for sw ratio update
Removed the steps of setting of asrc in UNLOCK state
and waiting it to go in UNLOCK state.
In UNLOCK state asrc stops sending samples which was
leading to audio glitches.
Bug 200154554
Change-Id: Idf7fe685709afcf4f72c3aab95dd5ee812871b92
Signed-off-by: Sidharth <svarier@nvidia.com>
(cherry picked from commit adbe2553c993327edd44408544628e8a7864ad51)
Reviewed-on: http://git-master/r/838743
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Shashank Sinha <shsinha@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nitin Pai <npai@nvidia.com>
Fix below build warnings:-
- 'tegra186_arad_get_lane_ratio_change_status' defined but not used
- 'struct tegra210_xbar_cif_conf' declared inside parameter list, its
scope is only this definition or declaration, which is probably not what
you want
Bug 1454125
Change-Id: I14375bad93b3b1f8cf79e5e8efcbe96166b5de37
Signed-off-by: Sumit Singh <sumsingh@nvidia.com>
Reviewed-on: http://git-master/r/838920
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Added mixer controls to set numerator and denominator
prescalar registes. This allows the corresponding
clocks to be scaled down before ratio calculation
Bug 1684121
Change-Id: I0f8769ed0f61722785ecaa2afec689bdb357e02f
Signed-off-by: Gaurav Tendolkar <gtendolkar@nvidia.com>
Reviewed-on: http://git-master/r/835222
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nitin Pai <npai@nvidia.com>
Making AGIC as interrupt parent to ARAD and hence by making this change,
the driver directly receives the virq, since the task of getting the virq
is handled by the gic drivers.
Also, for GIC PPI interrupts, the irq number that should be mentioned
should be irq - 32.
Bug 200146854
Change-Id: Ic3feb0f4ea46226f53a72c5789c69b5d6d7cdf01
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>
Reviewed-on: http://git-master/r/818988
(cherry picked from commit d35e14d26e55723be46d929d046610c05445165c)
Reviewed-on: http://git-master/r/830798
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Fixed the following sparse warning:
- warning: useless storage class specifier in empty declaration
Instance variable may be a static, but the definition doesn't need
the static storage specifier attached to it.
Bug 200088648
Change-Id: Id709a1d205987d19d8c415a18c03b8e24eb9d7b8
Signed-off-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-on: http://git-master/r/799165
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Add the Machine driver support for Quill board which has rt5658 codec
on it.
Bug 200127320
Change-Id: I871d436438dc5830eabe1e0616648bd05886ed6c
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: http://git-master/r/781091
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Issue is seen with ARAD/ASRC when it goes to
UNLOCK->LOCK.
- ASRC may not check for buffer thresholds once it
restarts processing after an UNLOCK->LOCK.
- ARAD will not get locked after an unlock
Bug 200118889
Change-Id: Ia16187df6955e79f93f3a7cb9061ea64a61c1d36
Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-on: http://git-master/r/764096
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Tested-by: Sumit Bhattacharya <sumitb@nvidia.com>
ASRC requires 36KB of ARAM for intermediate data.
Updating the start address of ARAM as per
the partion reserved for ASRC and ADSP usage
of ARAM.
Bug 200092561
Change-Id: Ifd4b9b866d518bbe3f6f94cdb974eddc0d1ef1ac
Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-on: http://git-master/r/766620
Reviewed-by: Nitin Pai <npai@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
The path to the main kernel repo is subject to change. Therefore, don't
hardcode the path. Instead use the $(srctree) macro.
Change-Id: Id1b3ffab668142addbc1a3a38e098b0bbf0e4cef
Signed-off-by: Adeel Raza <araza@nvidia.com>
Reviewed-on: http://git-master/r/763205
Reviewed-by: Alexander Van Brunt <avanbrunt@nvidia.com>
Tested-by: Alexander Van Brunt <avanbrunt@nvidia.com>
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation this program is
distributed in the hope that it will be useful but without any
warranty without even the implied warranty of merchantability or
fitness for a particular purpose see the gnu general public license
for more details you should have received a copy of the gnu general
public license along with this program if not write to the free
software foundation inc 51 franklin st fifth floor boston ma 02110
1301 usa
extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-only
has been chosen to replace the boilerplate/reference in 246 file(s).
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190530000436.674189849@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tegra124 introduces some small changes to the layout of some registers.
Modify the affected drivers to program those registers appropriately
based on which SoC they're running on.
Tegra124 also introduced some new modules on the AHUB configlink register
bus. These will require new entries in configlink_clocks[] in the AHUB
driver. However, supporting that change likely relies on switching Tegra
to the common reset framework, so I'll defer that change for now.
Based-on-work-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Based-on-work-by: Songhee Baek <sbaek@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Now that all of the Tegra device trees have been updated to represent
the required audio clocks, remove the compatibility code from the Tegra
ASoC utility code, and always use clk_get() rather than clk_get_sys().
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tegra114 requires different PLL rates. Modify the code to know about
this.
On Tegra114 only for now, use regular clk_get() rather than clk_get_sys()
to retrieve clocks. This assumes that the clocks will be represented in
device tree. We can assure that from the start of any Tegra114 audio
support. For older chips, I'll add the required clocks properties to the
device trees this kernel cycle, and switch this code to only support the
"new_clocks" path next cycle.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tegra only supports, and always enables, device tree. Remove all runtime
checks for DT support from the driver.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Recent list discussions concluded that drivers should not be calling
of_have_populated_dt(), and hence of_have_populated_dt() should not be
exported. Use a different mechanism to detect DT vs. non-DT boot.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tegra30 has some additional clocks that need to be manipulated, names
some clocks differently, runs PLLs at different base rates, etc. The
utility code needs to handle this.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Initialize the audio clock tree appropriately for some reasonable rate.
This makes sure the PLLs etc. are actually programmed to something
reasonable when the audio driver is loaded.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Lots of sound drivers were getting module.h via the implicit presence
of it in <linux/device.h> but we are going to clean that up. So
fix up those users now.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Only the clock programming code needs to know whether the clocks changed,
and that is encapsulated within tegra_asoc_utils_set_rate(). The machine
driver's call to snd_soc_dai_set_sysclk(codec_dai, ...) is safe
irrespective of whether the clocks changed.
(Applying Mark's TrimSlice review comments to the existing driver)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The utilities will be required by every machine driver. Including the
utility object directly into every machine driver causes a build failure
if the modules are actually built into the kernel, since each will define
the symbols exported by the utility file. Solve this by moving the
utility object into a separate module.
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>
Instead, have the machine driver provide storage for the utility data
somehow.
For Harmony in particular, store this within struct tegra_harmony, itself
referenced by snd_soc_card's drvdata.
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>
A recent discussion on linux-arm-kernel noted that the value returned by
clk_get_sys is an opaque token, and not strictly a pointer; it is
meaningful only to the clock API, clients should not dereference the value,
and the clock API must accept any non-IS_ERR value it returned.
Hence, only IS_ERR is appropriate to interpret the result, not
IS_ERR_OR_NULL.
I checked that clk_get_sys in both ASoC's for-next and Tegra's for-next
do behave as described; NULL is not returned in the case of error.
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>
Many portions of Tegra ASoC machine drivers will be similar or identical.
To avoid cut/paste, this file will act as a repository for all that common
code. For now, it solely includes code to reprogram the audio PLL for
44.1KHz- vs. 48KHz-based sample rates.
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>