Error in app loading skips loading of other apps and
disables further use of ADSP. This prevents use of
other successfully loaded apps which could have worked
fine.
Avoid skipping of remaining apps when loading fails for
one app. Failed app will anyway throw error whenever
user attempts to use it. This also allows adding entries
for optional apps.
Check if app was loaded when calling app_init().
Bug 200100724
Change-Id: I70a818df6fdeb54f94700e6c5f10a1dd1b269b72
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/736736
(cherry picked from commit 5387c9989420525b6ce7eaafd2ddb913f496740d)
Reviewed-on: http://git-master/r/740608
Reviewed-on: http://git-master/r/750726
Tested-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Capture using last ADMA plugin was failing due to incorrect
condition in for loop. Fix it by changing condition.
Increase max number of ADSP ADMA plugins to 10 to support
additional use cases.
Bug 200056741
Change-Id: Ifbc45ee2ad8093f67d357543fa2ffe3597cf77e8
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/735456
(cherry picked from commit d233ba3302b9cda9f8d5e7ef57d005a646c7047c)
Reviewed-on: http://git-master/r/740607
Reviewed-on: http://git-master/r/750725
Tested-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
This reverts commit e88ffa5fc211e68b888027ede341e264717a57d6.
If system is suspended before autosuspend time expires,
runtime_suspend does not get called and ADSP does not get
suspended. This breaks audio playback after resume due to
incorrect state of ADSP after system resume.
Originally autosuspend delay was added to avoid frequent
OS suspend and resume. No functionality issues were/are
seen even without autosuspend delay. So removing
autosuspend delay to avoid this issue.
Remove unnecessary debug print.
Bug 200090996
Change-Id: I9bfb5056e74690cf29a56273a825705cbecc0ac1
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/731620
(cherry picked from commit 53d141ffa25c4e89625bfef8d299da452d8859a4)
Reviewed-on: http://git-master/r/740606
Reviewed-on: http://git-master/r/750724
Tested-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Add pm runtime callbacks for ADSP OS start/suspend.
Stop ADSP OS if app load fails.
Call to runtime_suspend after stream stop doesn't happen
when audio adsp driver is under APE PD because ADSP os
driver holds APE PD count during nvadsp_os_start() which
prevents APE PD from calling suspend. So do not add audio
driver to APE PD.
Add validity check for prtd in message handler.
Bug 200087374
Change-Id: Ie813e834f4f71fee5bbd4699cbc887e6fe8397f8
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: http://git-master/r/720215
(cherry picked from commit f49832b8b51b657dc4e3367268788641a9ed4892)
Reviewed-on: http://git-master/r/715488
Reviewed-on: http://git-master/r/750721
Tested-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
snd_kcontrol_chip(kcontrol) no more returns pointer to dapm_widget_list
from kernel 3.18 onwards, which is used to get pointer to soc_platform,
instead now use snd_soc_dapm_kcontrol_dapm(kcontrol).
Change-Id: I85457b4edb0d163b77cc9362df6bd0ef2ad39213
Signed-off-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-on: http://git-master/r/738921
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
- removed snd_soc_codec_set_cache_io function
- use snd_soc_kcontrol_codec instead of snd_kcontrol_chip
- use codec->component.val_bytes instead of codec->val_bytes
- use devm_ioremap_resource instead of devm_request_and_ioremap
- snd_soc_dapm_mux_update_power prototype is changed
Change-Id: Ieb699a0e8a12b341c6823337ef2deb0d99292240
Signed-off-by: Ravindra Lokhande <rlokhande@nvidia.com>
Set the plugin params only if ADSP is booted and plugin
is loaded
Bug 200075850
Change-Id: Ib174afe270357ae3c21e50b9e0e85348024ec681
Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Reviewed-on: http://git-master/r/715944
There is a scenario where SPK/HP routing change triggers
hw_params callback and DAPM widget events for ADSP stream
while stream is in paused/running state. Call to hw_params,
can re-assign a different ADMA channel than what was
assigned at start of playback. This happens when there
are multiple ADMA apps running on ADSP (eg. 3 in case of
offload + speaker protection). This change of ADMA channel
while stream is in running/paused state is unsupported and
unnecessary.
Avoid re-assignment of ADMA channel and other possible
issues by allocating ADMA channel in ADMA app init and
releasing it in app deinit.
Bug 200082413
Change-Id: I869c2a1c9e92e74e5ab2c6b9893ebd3e664def91
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/713112
Reviewed-by: Uday Gupta <udayg@nvidia.com>
Reviewed-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
With multiple APM's present, plugin addition
or removal does not work.
Fix it by checking only for ADSP_APP when
trying to find the APM of which the plugin
is part of.
Bug 1605750
Change-Id: I457b04a5f1ead9ac682f734b0d145f5250c411a9
Signed-off-by: Uday Gupta <udayg@nvidia.com>
Reviewed-on: http://git-master/r/714834
Reviewed-by: Omar Nemri <onemri@nvidia.com>
Tested-by: Omar Nemri <onemri@nvidia.com>
Reviewed-by: Stephen Holmes <sholmes@nvidia.com>
Reviewed-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Tested-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Do not send message to inactive state transition and flush.
APM moves to inactive state on its own.
Convert sample rate from index to value when sending to user.
Bug 200082504
Change-Id: I9ee1c4a995940882e7cf163ab90fc59ffd0804df
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/710381
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Stephen Holmes <sholmes@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
1. Fix ADSP crash due to reorder of mixer commands
2. Add support to track the PCM paths constructed, have a
record of FE/BE connections made by the user.
3. Support ADSP pipeline breakage, linkage, modifications
4. Plugin params can be set at any time
This change depends on http://git-master/r/#/c/709103/
functionality wise.
Bug 1605750
Bug 1605316
Bug 200075850
Change-Id: I24af6177f8ae21e7a352a58056a7267a129c3846
Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Reviewed-on: http://git-master/r/710448
Actmon logic takes time to increase ADSP clock in case of sudden
load. This causes initial glitches in audio. Request higher ADSP
clock at stream start to avoid this. After initial boost, actmon
controls ADSP frequency based on load.
Higher ADSP clock is requested only when using ADSP speaker
protection path.
Bug 200077167
Change-Id: I8d2eae7f1c7e789a1d2012b2fd9b7cf27d6ac851
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/710727
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Uday Gupta <udayg@nvidia.com>
Reviewed-by: Puneet Saxena <puneets@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
set params format for the plugin is as follows
@byte_format: <param1>,..<paramN>
@int_format: <plugin_method>,<#params>,<param1>,..<paramN>
Default parameter type for plugins is @byte_format
Bug 1587869
Change-Id: Ie1b8fc4c9229e8b149ea0ff7a985e9e99ab26fc1
Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Reviewed-on: http://git-master/r/676566
Make local data and funcs static.
Bug 200032218
Change-Id: Ib2270a19df65b53f1b547efd3f4bc7bcfc0f15a4
Signed-off-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-on: http://git-master/r/600190
1. Add APE power domain support to xbar and adsp driver.
2. Also add runtime PM support in adsp audio driver to ensure APE PM
domain works properly.
3. Add code in xbar system suspend callback to support calling of all
xbar child driver system suspend. This is required to properly
support APE PM domain.
Bug 200039212
Change-Id: Ieb937b05e39d4e980872745e3b6580bca3eb6956
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/555433
Renaming MSGQ_MSG_SIZE to MSGQ_MSG_WSIZE as this macro returns the
size in word rather in bytes.
Bug 200025742
Bug 1526538
Change-Id: I7f1dd858fa9c8fc779d80afda95b66d66d7bd554
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>
Reviewed-on: http://git-master/r/558844
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Do not initialize ADSP using work queue. Initialization will be
done from userspace by setting mixer control "ADSP init" to 1.
Bug 1552863
Change-Id: I0fd435b581a4fb9e851e8505e451c52cf0746df2
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/499313
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Add decoder and APM input paths to SPKPROT-SW so that it can be
used in CPU playback path.
Change-Id: I072f0532bfdbb2d4f40af5b9ee4ebd03ad5e9689
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/491628
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
- Combine read & write position into one method
- Define & use separate macro for pin type
- Use set_position for sending notifications from ADSP to CPU
- Use set_eos for sending EOS reached from ADSP to CPU
Change-Id: I7df817a8e82a3564380ce712fbab202f0bee9551
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/428915
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Stephen Holmes <sholmes@nvidia.com>
GVS: Gerrit_Virtual_Submit
Add first version of tegra210 ADSP audio ALSA driver. This driver is
responsible for handling all ADSP side audio usecases and for exposing
related control parameters to user-space.
Both compressed and PCM playback is supported by this driver.
Change-Id: Ia447a2261cd689adaf86502fa80d5f60669ac2ff
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/422758
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>