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>
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>
For start of any usecase, the DMA and AHUB blocks
should be enabled in the order from sink to source.
For stop, blocks should be disabled from source
to sink.
Previously, DMA was triggered first then ADMAIF
enable/disable messages were done. Fixed order to:
Start:
- send start playback IVC
- trigger DMA by sending active state msg to ADSP
- send start capture IVC
Stop:
- send stop capture IVC
- trigger DMA by sending inactive state msg to ADSP
- send stop playback IVC
Bug 2407746
Change-Id: Icf25422eccb16af8fa40357910f79320dbd92a0f
Signed-off-by: Hariharan Sivaraman <hariharans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1932277
(cherry picked from commit efead3a657c2b38ec359ad19573d0b3f20e8fb49)
Reviewed-on: https://git-master.nvidia.com/r/1938889
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dipesh Gandhi <dipeshg@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>
Add support for secure audio playback in adsp driver
- Add Secure Mode control to set whether an APM memory will be APR or not.
- Send message for all the plugins within apm to allocate apr memory before
the start of pcm/compress playback.
Bug 200235401
Change-Id: I0aba7197b10a4aab05fff5564e33c529cd2f68f5
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1602237
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Clock resource is associated with a device and when the device
is unbound, the resource is freed. Drivers get the clock handle
by using devm_clk_get(). No need for an explicit devm_clk_put()
to release the clock, this is handled automatically when the
device lifetime ends.
Bug 200346429
Change-Id: I0885723e3a9a3fb41e54524ddacc3415f571576c
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1574311
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
xbar codec is registered as per the physical address and the same
is used while defining the dai links. This results in unnecessary
duplication of the code and this is not scalable for upcoming
platforms too. This patch removes such hardcodings for xbar and
adsp audio driver by using dev_set_name() api.
Bug 200346429
Change-Id: I16147b94cc1686ceb8b084ead91d2d35b1f0fbbd
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1568711
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Below are the hypothetical scenarios
- Drivers are in suspend state while reboot and PCM Open call from
userspace is received after driver shutdown [APE is power gated
already]
- PM domain handling doesn't ensure proper functionality after driver
shutdown is called
The change handles with the below fix
- Will prevent any reg access in runtime resume of drivers and avoid
opening pcm devices.
Bug 200333417
Change-Id: Ieba2a063342cd1e7becb79a0135cb2b8ec373a61
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1539396
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
For switch currently we rely on setting switch source
after playback has started in null-sink mode. However
this will leads to missing few frames of intial data.
Thus change adds support to allow setting source to
switch before playback is started.
Jira EMA-528
Change-Id: I2301da6d8b256bb188a8c442058bd87cac5a48ca
Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1517265
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
(cherry picked from commit 313c392daeeb84a12a01b1befc47ab1826c2126e)
Reviewed-on: https://git-master.nvidia.com/r/1533084
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Observing runtime crash in adsp-alt probe
as we are trying to update const char* strings
to update plugin names. Change assign new
memory for all such plugin name updation
and update the respective pointer.
Jira EMA-421
Change-Id: Idc9861b6d00c6b3bb7241edc93dfdcda48b12589
Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-on: https://git-master/r/1513420
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
(cherry picked from commit 216675854724320b66215395b1867fe825551f3a)
Reviewed-on: https://git-master.nvidia.com/r/1533082
GVS: Gerrit_Virtual_Submit
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Change allows support to select one FE among allowed
FE's to be routed to ahub, with rest of the inputs
in drain mode.
Jira EMA-389
Change-Id: I31889a52d67390dcfbf0f2d391acd86bb76cd64e
Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-on: http://git-master/r/1331535
Reviewed-by: Uday Gupta <udayg@nvidia.com>
Reviewed-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-by: Nitin Pai <npai@nvidia.com>
GVS: Gerrit_Virtual_Submit
There is a function exported from adsp os code, nvadsp_set_adma_dump_reg,
to set the function pointer for adma regdump callback.
This patch uses the above exported api and sets the callback to
tegra_adma_dump_ch_reg, which is implemented by adma driver.
This is done during tegra210_adsp_init.
Bug 200289390
Change-Id: If1c2826928d5e5d51a805ed0a2211c20a1ecf6f8
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: http://git-master/r/1484830
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Use devm_clk_get for t210 during probe. This is
required for successful probe as t210 and t186
use common clock framework on K4.4.
Enable ADSP driver for t210 config.
Bug 200297206
Change-Id: I56a7f6196c07edb00548217fac1f69b03de3a882
Signed-off-by: Diwakar Paliwal <dpaliwal@nvidia.com>
Reviewed-on: http://git-master/r/1471996
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Change remove dependency of ack by pcm ops to update
application pointer. MMAP mode can't be used with
ops ack. When trigger is called updated app pointer
info is passed to adma plugin. On adma period
completion callback, updated application pointer
is again passed to adma plugin.
Jira EMA-389
Change-Id: Iad1376cc218b2c7b49812db34e128ed43b10eddb
Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-on: http://git-master/r/1331554
Reviewed-by: Uday Gupta <udayg@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-by: Nitin Pai <npai@nvidia.com>
Change adds support on adsp-alt:
- allows pcm_open for upto 8 channel.
- adds option to pass burst_size for HV
- allows BE to be configured with FE's params
to be sent via ivc to audioserver.
Change-Id: Ib3ab3fb4d95bfc8335cd1d52eeb71cc4e5a538a5
Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-on: http://git-master/r/1317770
GVS: Gerrit_Virtual_Submit
Reviewed-by: Uday Gupta <udayg@nvidia.com>
Reviewed-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-by: Nitin Pai <npai@nvidia.com>
Make use of ARCH_TEGRA_210_SOC instead of ARCH_TEGRA_21x_SOC
so that we can get rid of redundant ARCH_TEGRA_21x_SOC.
ARCH_TEGRA_210_SOC aligns to up-stream as well.
Bug 1766370
Change-Id: I10a9d9bb63b1fbac358d85a228710a208d595281
Signed-off-by: Ishan Mittal <imittal@nvidia.com>
Reviewed-on: http://git-master/r/1306757
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>