Renamed i2s clock parent's property name in DT and changed this driver
to reflect the same. Sync related clock usage is broken as of now. So DTs
have removed sync related entries. Modified driver code to not result in
error due to absence of sync clocks
Bug 200515690
Change-Id: Ifa32dc35b7fbda23574a576597c9cc9e79b00ada
Signed-off-by: Asha T <atalambedu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2137230
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
As part of support to Mystique platform DMIC enable/disable and a callback
helpers were provided (bug 200404157 and bug 200391366). Following commits
were pushed related to this.
commit b48f5902966a ("ASoC: tegra_alt: add DMIC enable/disable functions")
commit aac60cf54481 ("tegra-alt: dmic: add start callback support")
This patch removes references to above for following reasons,
* Mystqiue support is dropped
* Cleanup is required as part of DMIC upstream work
Bug 200520821
Bug 200503387
Change-Id: I626f65b06fce0d1cec916eb8d4a495d864256f62
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2143613
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Some of the macros defined in tegra210_xbar_alt.h are not used anywhere,
hence removed such macros. Also fixed lines to respect 80 character limit
per line.
Bug 200503387
Change-Id: Ieeb32ef62180fc6ae41e978ac54fb89d44a2486a
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2143068
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
The PCM open flags may be changed on the fly with ALSA calls like
snd_pcm_nonblock which only change the flags associated with file
descriptor and not the substream. Hence checking the flags before
wake_up may not be correct and leads to problem where processes may
remain blocked on path disconnect. Removing the check solves the problem.
Bug 2603764
Change-Id: I4abaa5448e4bfbdd304b80d02314ca48b26fa955
Signed-off-by: Niranjan Dighe <ndighe@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2126458
(cherry picked from commit 323eeb48634b9f6da890ce3a25fe616b9695d17d)
Reviewed-on: https://git-master.nvidia.com/r/2142901
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hariharan Sivaraman <hariharans@nvidia.com>
Reviewed-by: Nitin Pai <npai@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
OPE driver has soc_data structure to populate function pointers for PEQ
and MBDRC modules. Instead of using soc_data, the functionality can be
replicated with direct calls to the required helper functions. This in
turn helps to cleanup and remove soc_data code from the driver.
Bug 200503387
Change-Id: Ib37c33edb79a523f2d42f4cb4991c948c6303ddf
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2140591
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Some of the AHUB module drivers have soc_data information only
to define a function pointer for calling tegra210_xbar_set_cif().
This function is implemented in xbar utils driver and exported.
This patch removes function pointer reference to above and instead
make calls directly. This helps to cleanup soc_data for all modules
and further for few modules soc_data is completely removed.
Bug 200503387
Change-Id: If919e5f7a7a92351940bf46f7302fd40c76c7ea3
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2140228
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Separate compatible is not needed for Tegra186/Tegra194 i2s devices since
i2s_soc_data is now removed and they can rely on "nvidia,tegra210-i2s"
compatible property which is used by Tegra210 as well. The same needs to
be reflected in device tree too.
tegra210_xbar_auxdata is updated with regards to above, along with this
device names for i2s is updated in tegra186_xbar_codec_conf structure.
Bug 200503387
Change-Id: I2f6171d3df04b91cbfbaab6d8c0784ddcd529589
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2132447
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
When configuring the I2S DAI format, setting the loopback mode and
setting the frame-sync width the I2S driver unnecessarily resumes the
I2S controller to update the registers. This is not necessary because
the driver uses regmap and so if the device is disabled, the regmap
will not update the actual registers until the I2S controller is
resumed.
Furthermore, it was observed that when the I2S controller DAI format
is set, by resuming the I2S controller momentarily, this causes some
of the I2S pins (SCLK and FS) to toggle. Although this is probably
harmless, it is better to only resume the I2S controller when it is
actually being used.
Bug 2414131
Change-Id: I9989deed67db83e6b23d278ba3a130a8661d722a
Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2128015
(cherry picked from commit d8378bd21c39290072ad5d1e862d5386b2529a9f)
Reviewed-on: https://git-master.nvidia.com/r/2133385
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
soc_data structure for i2s appears to be redundant for following reasons.
* is_soc_t210 is unused. For older kernels this was added to implement
MBIST WAR, bug 200035860. WAR is not required for kernel > k4.4 and
hence cleaned up as part of bug 2485656.
* set_audio_cif and set_slot_ctrl point to the same functions for
Tegra210 and Tegra186. Thus there is no need to have soc_data members
for it.
Hence references to soc_data is removed from the i2s driver.
Bug 200503387
Change-Id: I597bd594da70f2d27d9c330b871d26cf3651f7af
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2132446
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Currently during fe playback path disconnect,
processes using snd_pcm_write times out after 10 seconds
while those using MMAP simply remain blocked. Fixing
issue by
- Set runtime state to SNDRV_PCM_STATE_DISCONNECTED
- Wakeup process blocked in poll() for mmap mode
- Wakeup process blocked on snd_pcm_write for normal mode.
Bug 2459153
Change-Id: Ieef6802e2ca19321c7ba061bfa7d2cbaaca4cc2c
Signed-off-by: Hariharan Sivaraman <hariharans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1975073
(cherry picked from commit 1c976b1de54ffe4b7d603a5ad7c8b6765a2ac8d5)
Reviewed-on: https://git-master.nvidia.com/r/2126290
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Uday Gupta <udayg@nvidia.com>
Reviewed-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-by: Nitin Pai <npai@nvidia.com>
Tested-by: Niranjan Dighe <ndighe@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
During pcm_open for ADSP pcm devices, the buffer allocated
is not constrained to be multiple of 4. This results in
the apm_process being called continuously for this APM since
data is available. However ADMA is not started because of
the size mismatch. Setting constraint of period and buffer size
(in frames) to be multiple of 4 fixes these issues
Bug 2599016
Change-Id: Idaabba29142d9577a4dc72d97aa6bb3cd4f791de
Signed-off-by: Hariharan Sivaraman <hariharans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2122112
(cherry picked from commit 82d702154bf2c1a903f32e50a9bc4afdf271d74f)
Reviewed-on: https://git-master.nvidia.com/r/2124176
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Uday Gupta <udayg@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nitin Pai <npai@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
If the pinctrl node is not present in device-tree for the DMIC, DSPK
or I2S, then the pinctrl states will not be initialised during device
probe. This can cause the kernel to crash by attempting to dereference
a NULL pointer when setting the pinctrl state. Fix this by verifying
that the pinctrl state is not an error pointer or NULL before attempting
to use it.
Bug 1665446
Change-Id: I917141325f12bbf87371eb59a320fe08e65f0934
Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2120320
(cherry picked from commit f3aa620e26af45a6bafe5acb65f2b06df0b877e8)
Reviewed-on: https://git-master.nvidia.com/r/2122730
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Late system sleep callbacks just invoke runtime PM calls if the device
is not in the desired state. There is no need to have separate APIs for
this, instead it can directly rely on pm_runtime_force_suspend/resume()
APIs to achieve similar behavior.
Another reason for this patch is, currently ACONNECT driver is using
pm_runtime_force_*() to indirectly invoke runtime PM callbacks. Runtime
suspend of ACONNECT fails complaining that there is an active child.
Though all XBAR devices are runtime suspended, the runtime PM state of
the corresponding device does not reflect it. Hence there is an error
in __pm_runtime_set_status() for ACONNECT. This is seen when the audio
playback is active and system tries to enter suspend. On system resume,
audio fails to resume playback and kernel panic is seen. Hence current
patch moves to pm_runtime_force_*() calls for system sleep for all XBAR
devices.
Bug 200509219
Bug 200503387
Change-Id: I5d531b0aa1a347686f7cca21fc40fe926b34f3a5
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2093331
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
The admaif cif conversion from mono to stereo and vise-versa config
will take effect only when client/xbar channels are 1/2 or 2/1. If
this condition doesn't satisfy, the configured bit-field for mono_conv
and stereo_conv in cif ctrl register will not take effect.
Considering this the current code needs to be fixed.
- For Playback path:
The Client and Audio channels won't be different as the data flows
from external memory to ahub. So override channel control have no say
on this path, for client_channel=1 and if "mono to stereo conv" control
was set then override audio_channel=2 for stereo conversion.
- For Capture path:
The Client channel will be based on params_channels() and the xbar
channels can be different from client channel as it comes from other
ahub modules which can output different channel number compared to
client, So the "ADMAIFx Channel" wil be used for capture path to feed
proper xbar channel available. During stereo to mono conversion i.e
when audio_channel=2 and client_channel=1, the configuration in the
bitfield mono_conv will take effect.
Bug 200500656
Change-Id: Ie61aed848eb35715414a7d8f0e00eae9066b32d3
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2080175
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
The regmap read, write and volatile callback functions are not
handling the register address checks correctly. Due to this the
regmap dump from sysfs node was not reflecting the correct state
of the register values. Fix the issue and makesure all regmap
register values are reflecting proper values.
Bug 200500656
Change-Id: Ifb5827d1b86384f835c010138275121a87a397ba
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2080753
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
The ADSP OS needs to be stopped during the flow of shutdown callback
of the system. Keeping the ADSP OS booted and in suspend mode during
the shutdown callback resulting in mc_err.
Bug 200499707
Change-Id: I80d0c7096b71e953143f70667cec936e6b787db8
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2076325
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
The function rt565x_manage_codec_sysclk() only exists in the downstream
kernel and is only currently used for the audio supermodule. It is not
necessary to port this function to the upstream kernel because we can
simply implement the same functionality within the machine driver by
calling the snd_soc_dai_set_pll() and snd_soc_dai_set_sysclk() APIs.
Therefore, update the Tegra machine to avoid using the function
rt565x_manage_codec_sysclk() so we can remove from downstream.
Bug 1665446
Change-Id: Id7e941368740f28cb74e6a04556e7b00abae119d
Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2073779
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Trivial clean-up to the tegra_alt_asoc_utils_init() function to improve
readability and simplify by ...
1. Removing 'goto' statements because we only return the error code on
error and there is no clean-up that needs to be done in the error
path.
2. Move the code to request the clk_cdev1_rst reset from under the
"data->soc > TEGRA_ASOC_UTILS_SOC_TEGRA210" check because we only
use this reset for Tegra186 and there is an additional check for this
device.
Bug 1665446
Change-Id: I23aa8978721f677204a929c8fdebea1f9081793f
Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2016370
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
The function tegra_alt_asoc_utils_set_parent() is only used by the Orca
Viper machine driver. Update the Orca Viper machine driver to use the
tegra_alt_asoc_utils_set_extern_parent() instead which also sets the
extern parent clock and remove the redundant
tegra_alt_asoc_utils_set_parent() function.
Please note that the Orca Viper platform is no longer supported and in
future will be removed.
Bug 1665446
Change-Id: I51ac355e92a1c3dbb65f94bff081edd1837f7bc6
Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2016369
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Remove unused variables for the various Tegra sound driver files. Note
that these variables are not flagged by the compiler because they are
initialised but they are not actually used anywhere.
Bug 1665446
Change-Id: Id10bb316780813565847492b19025ba369188c09
Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2016368
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This reverts commit 1114afa7e3d861631d0585d76ca54363f46361c3
(manual revert done to resolve conflicts)
Earlier suspend was ignored for Android because of high suspend
latency in snd_soc_suspend(), this was breaking system suspend
KPIs. This alone was contributing to around 3 seconds of latency.
One more reason to ignore suspend was, during Android playback or
capture, device cannot go suspend because of acquired wake locks.
There was an issue in ASoC core which is fixed now in upstream,
which helps to reduce the suspend times. The same is available
in downstream kernel and below is the commit.
"ASoC: core: Don't schedule DAPM work if already in target state"
With this patch suspend/Resume latency for ASoC in 3 trials are
7.362/0.091, 5.445/0.088 and 5.096/0.087 ms respectively.
Bug 200390814
Change-Id: Iae3b4f19f34568585ed120460f173d4b234a3eb1
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1971226
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Currently dynamic pinmux configuration for I2S, DMIC, DSPK modules
are present in runtime_resume() function which can be called even
without any audio usecase active on these modules. So this destroy
the purpose of programming pinmux only during stream active state.
This change has moved the dynamic pinmux code in these drivers to
dai ops callback of startup and shutdown which will ensure the
pinmux config happens only during the stream playback/capture.
Bug 200497486
Change-Id: I3c4e8a96d0d066b38c9aba5ffe530db5cf5246fc
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2029745
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Currently, the ADSP is not booted or if the ADSP is booted but the
plugin is not connected for the ADSP APP, then it is not possible to
configure the various ADSP parameter mixer controls. This causes a lot
of messages to be displayed when the ALSA restore systemd service is
enabled because on boot it will try to restore all mixer controls.
The ADSP mixer controls for setting APP parameters are by default
read/write, however, the function to return the current APP parameters,
tegra210_adsp_get_param(), simply returns zeros and not the actual
parameters. Therefore, make these mixer controls write-only so that
the ALSA restore service will not attempt to save and restore them.
Bug 200458098
Change-Id: Ia61329c4dc338a1973e755ece23082bd2411f9be
Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2019227
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Rather than displaying an error message is an app cannot be loaded,
print a message to indicate that an app was loaded successfully. For
L4T applications such as MP3 decode are not available and this avoids
unnecessary error messages.
Bug 200458098
Change-Id: I2e3acbf2977797c79a0eabee6b7c8c49b33b0df1
Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2007328
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Currently, the ADSP is not booted or if the ADSP is booted but the
plugin is not set for the ADSP APP, then it is not possible to
configure the various APM mixer controls. This causes a lot of
messages to be displayed when the ALSA restore systemd service is
enabled because on boot it will try to restore all mixer controls.
Rather than prevent the user from being able to set APM mixer
controls until the ADSP is booted and the plugin is set, always
store the APM settings. If the ADSP is booted or the plugin is not
set when the APM controls are set, then when the ADSP is booted and
the plugin is set, send the APM settings to the ADSP at this time.
Bug 200458098
Change-Id: I8899d876d1d10bd0e07e7c54d6674ca29aef0558
Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1973345
Reviewed-by: Hariharan Sivaraman <hariharans@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nitin Pai <npai@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
On k4.4 and earlier, t210 MBIST workaround was handled with notifier
callbacks within the drivers. Remove all such calls to the functions
slcg_register_notifier and slcg_unregister_notifier.
Also remove the functions nvhost_pd_slcg_install_workaround and
nvhost_pd_slcg_remove_workaround which ultimately call the
slcg_register_notifier and slcg_unregister_notifier functions
respectively.
Bug 2485656
Change-Id: I6445e07e5d2a4aa6360fff0bbd32ceebbc0e62e4
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2003556
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
The names of the I2S mixer controls for mono/stereo conversion are
confusing from a user perspective because the controls 'I2Sx TX mono
to stereo conv' and 'I2Sx TX stereo to mono conv' are for capture and
the controls 'I2Sx RX mono to stereo conv', 'I2Sx RX stereo to mono
conv' and 'I2Sx Rx fifo threshold' are for playback. The naming
convention for these controls comes from the XBAR CIF and makes sense
from that standpoint. However, from a user and userspace perspective
the names are confusing and misleading. Therefore, add new controls
that are explicitly named "Capture" and "Playback" so it is clear
which should be used.
The legacy controls will be kept for Android until the appropriate
userspace changes have been made so that these can be removed
completely.
Bug 200469957
Change-Id: I93ae9339128a056e2144ba751a86f9df21b3dfda
Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com>
(cherry picked from commit 843dfa3a418d336bca49144e065556dce8d0cd4e)
Reviewed-on: https://git-master.nvidia.com/r/2002204
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
When the number of channels for an I2S interface is overridden from
userspace, if the I2S interface is being used in TDM mode where there
are more than 2 channels, the I2S SLOT_CTRL register may not be
configured correctly.
For example, if using the AMX to the multiplex 4 mono channels into
a single 4 channel TDM stream that is then routed to an I2S interface,
the number of channels seen by the I2S interface is 4 where as each
input stream to the AMX only has a single channel. Therefore, the
number of channels for the I2S interface needs to be manually set to
4 from userspace. However, when this is done the I2S SLOT_CTRL
register is still configured with the default RX and TX slot mask.
To fix this, if the number of channels for the I2S interface is
overridden from userspace, then if using TDM modes, also override
the RX and TX slot mask.
Bug 2382530
Change-Id: I2df564c8e8ad5d7463a767a1e2197e26fe0c57e5
Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2000401
(cherry picked from commit b888cf568c726fed1e97882b9fe8deae4d6df6d9)
Reviewed-on: https://git-master.nvidia.com/r/2002199
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
The AMX driver provides userspace mixer controls for configuring the
module. This provides a much simpler way of configuring and using the
AMX versus the alternative where the AMX is configured via device-tree.
Currently, the ADX can only be configured by device-tree and so for
users that wish to use the ADX both the device-tree and audio machine
driver need to be updated. Add similar mixer controls for the ADX that
exist for the AMX so that the ADX can be easily configured via
userspace.
Bug 2382530
Change-Id: Idf8dc0ba3fe4bf30168c01318b9a5e169a8985d6
Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1987561
(cherry picked from commit 1b2a25b33f972193ce25ee0b61d612266a9cae05)
Reviewed-on: https://git-master.nvidia.com/r/1991929
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
The device data for a given driver must be set before enabling
runtime-pm otherwise this could results in a crash if the runtime-pm
callback is called before the device data is set where it is expected
that the device data has been initialised.
Furthermore, most drivers will directly call the runtime-pm callback
to power-up the device if runtime-pm is not enabled in the kernel
config and so many drivers would crash if runtime-pm is not enabled.
Fix this by setting the device data early in the driver probe.
Bug 2478690
Change-Id: I5beb1607aa4715651cf4b9ac8e8068e7f8e3a2a7
Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com>
(cherry picked from commit 9d656fcc96e85d38d120a430f83f2b734e19fe07)
Reviewed-on: https://git-master.nvidia.com/r/1991204
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
If the ADSP fail during the probe after the ADSP component is
registered, the ADSP component will not be unregistered and this will
cause the kernel to crash when attempting to the probe the component.
Furthermore, if the removal of the ADSP device, the component and codec
register by the ADSP driver are not removed. Fix these items by ensuring
the the ADSP component and codec are removed as necessary during the
probe failure path and driver removal.
Finally, clean-up some of the prints in the driver probe to drop the
unnecessary print when the netlink is created and use the dev_xxx
functions instead of the pr_xxx functions.
Bug 200458098
Change-Id: I4b51949e1c10c86952008ebe5676832e381a68f4
Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1974520
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Hariharan Sivaraman <hariharans@nvidia.com>
Reviewed-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
- Copied the adsp driver from tegra-alt to tegra-virt-alt
- Modified tegra-virt-alt Kconfig and Makefile to make it
dependent on SND_SOC_TEGRA_VIRT_T210REF_PCM and
TEGRA_NVADSP
- Make the drivers exclusive with respect to device tree
node compatibility
- Remove all the code guarded under SND_SOC_TEGRA_VIRT_IVC_COMM
from tegra-alt ADSP driver .
- Remove all the #ifdefs from the tegra-virt-alt ADSP driver.
- Change ADSP drv name used by dai_links
- Update dai_links with new name
- add -EPROBE_DEFER on sound card register failure. This may
be required if we decide to remove virt drivers from
/etc/modules and /etc/modprobe.d/blacklist.conf
- Cleanup in case of deferred probe
Jira: EMA-904
Jira: EMA-1158
Change-Id: I0e707eca1bfa27b3f1814e367baa16e97bf464e5
Signed-off-by: Niranjan Dighe <ndighe@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1966030
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hariharan Sivaraman <hariharans@nvidia.com>
Reviewed-by: Uday Gupta <udayg@nvidia.com>
Reviewed-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-by: Nitin Pai <npai@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reading the mixer RX Gain always returns 0 and this is because
the function to return the gain setting has not been implemented
completely. Fix this by returning the programmed gain value in the
function tegra210_mixer_get_format().
Bug 2438553
Change-Id: I4e6e5a6fe3373982cbb063ce3276428e0a1a2c1a
Signed-off-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1945622
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>