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>
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>
enable dma_set_mask_and_coherent call even
if CONFIG_SND_SOC_TEGRA210_ADSP_ALT
is not enabled, This will allow pcm
driver to start allocations start from the
specified address and downwards.
Bug 200423087
Change-Id: Ib1a2f2361f15d1191258fbb0ca4a620d1b2a7c8b
Signed-off-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1809568
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Not all platforms have to support modules such as AMX, ADX, MVC, and
etc, so selecting all the audio modules by default is wasting memory
for them.
This patch drops DMIC, AMX, ADX, AFC, MVC, OPE and ADSP from CONFIG
SND_SOC_TEGRA_T210REF_MOBILE_ALT, and keeps only essential ones. In
order not to break any exisiting use case, these CONFIGs will be set
to "def_tristate" so all platforms build them as usual. This means
anyone who does not need them will need to specifically disable them
in the defconfig.
Meanwhile, this patch adds IS_ENABLED() check at corresponding files.
Bug 2284925
Change-Id: I2e3853b5499046fc8de7256899c30d764160aebe
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1803446
Reviewed-by: Dara Ramesh <dramesh@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>
Suspending all the DAI links for Tegra on entering suspend is taking
between 1-2 seconds which is far too long. To ensure that any active
audio playback and/or capture resumes following suspend, it is only
necessary to suspend the DAI links for ADMAIF and it is safe to set
the '.ignore_suspend' flag for all the other DAI links.
With this change the min/ave/max time for executing the 'snd_soc_suspend()'
function is reduced from 419ms/1056ms/2021ms to 49ms/287ms/766ms. This is
measured using the ftrace function graph feature to measure the total time
for 'snd_soc_suspend()' to execute.
Bug 200390943
Change-Id: I498643eb069a1bc72d72b86930ab5b6e54e44b76
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1799943
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>
The Tegra machine driver controls and widgets are generic and can be
used by any board that uses the generic machine driver. Therefore
consolidate the controls and widgets used for all boards.
This also fixes a problem for the Tegra194 Rey platform which does not
have an on-board RT5658 codec and so the generic controls and widgets
are not populated. These controls and widgets are still needed for
testing I2S, DMIC and DSPK.
Finally, to improve the readability don't use 'snd_soc_tegra_card' in
the function dai_link_setup() and just use the 'card' pointer instead.
Bug 200417361
Change-Id: I863a0d5c03a61fe5b9e36fdfd5356900aac9d456
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1775296
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Mono playback via the RT5658 codec on the Jetson TX1/TX2/Xavier is
distorted. Although the RT5658 codec is configured for standard I2S
timings (implying 2 channels), the Tegra XBAR should convert the mono
audio track from one channel to two channels. The problem is caused
because the 'CHANNEL_BIT_CNT' field in the I2S Timing Register is
being configured incorrectly. For mono playback in I2S mode (or LRCK
mode) the CHANNEL_BIT_CNT is being set to 31 instead of 15 by fixing
this mono playback works as expected.
Please note that the 'bitcnt' value programmed into the I2S Timing
Register is verified to see that it is not bigger than the mask for
the CHANNEL_BIT_CNT field. However, this is done before we shift the
bitcnt by 1 for I2S mode. Therefore, ensure the bitcnt is shifted by
1 before we do the check.
Mono playback has been tested by playing the following audio clip ...
aplay -D hw:1,0 /usr/share/sounds/alsa/Front_Center.wav
Bug 2257806
Change-Id: I4d306ccef891282e96c300d90bad2a5b6efc9968
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1777096
Reviewed-by: Sameer Pujar <spujar@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 Tegra186 ARAD driver lists the TEGRA186_ARAD_LANE_ENABLE register
as volatile implying that the register has status bits that may change
automatically. The ARAD Lane Enable register for both Tegra186 and
Tegra194 have 6 bits which are enable bits and no status bits.
Therefore, this register is not volatile and should not be listed as
volatile. Furthermore, during overnight stress testing, I sometimes see
one of the ARAD lanes become enabled randomly (by diff'ing the ALSA
state, as shown below, before and after running a test that is not using
ARAD). So far after making the ARAD Lane Enable register non-volatile
this has no longer been seen.
Now that jack-detection across suspend for the RT565x has been fixed in
the RT565x codec driver, we no longer need to call the
'trigger_jack_status_check' function from the Tegra machine driver.
Bug 2208756
Change-Id: I79961f9eb99c629eaace9ca35f8bb8a984c4dd38
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1758197
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
For Tegra194 Galen there can be multiple RT565x codecs if the audio
supermodule is connected and therefore, the RT565x sound card can
have multiple jacks. Add support for multiple jacks by allocating
the jack structure dynamically and creating the jack mixer control
dynamically.
Bug 2187533
Change-Id: Ia17cf4ddb1bb971e0973ea5b03f0c2cd6d9b1d5e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1748233
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
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>
For debug/testing purposes the Tegra audio machine driver creates a
'Jack-state' mixer control to allow the user to query/set the jack
state. Currently, the machine driver assumes that there is only one
jack, but on Galen there can be two jacks if the supermodule is used.
Therefore, add a helper function to create the 'Jack-state' mixer
control dynamically and append the codec prefix-name to the mixer
control name so that it has a unique name.
Bug 2187533
Change-Id: Iac4351c319944e3d2c01d053fce9ea390c3f8db1
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1748232
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
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>