712 Commits

Author SHA1 Message Date
Sameer Pujar
38c963de57 ASoC:tegra: Remove OOT reference from compatibles
Kernel OOT audio support uses different compatibles to pick specific
OOT drivers for audio. This method requires additional compatible
overrides in the DT overlay which is not a very flexible way to pick
driver modules.

It is possible to pick specific driver modules by adding the not
needed ones to the denylist in the configuration files in the
'/etc/modprobe.d/'. This means different compatibles are not
necessary and modules can be filtered based on the name in
configuration files. With this it will be easier to switch between
driver modules and also will reduce the overrides in the overlay.
Thus remove all 'oot' reference from the driver compatibles.

Bug 4119612

Change-Id: I9496a7daf8b9c75c68b83557198a59f7d3903522
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2927028
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sheetal . <sheetal@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Tested-by: Sheetal . <sheetal@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-07-05 14:42:00 -07:00
Jon Hunter
deffbf24ab virt: tegra: Ensure functions stubs are defined
When building the out-of-tree drivers with virtualization support
disabled, symbols for some of the virtualization functions are not found
...

 nvgpu: Unknown symbol tegra_hv_mempool_unreserve (err -2)
 nvgpu: Unknown symbol is_tegra_hypervisor_mode (err -2)
 nvgpu: Unknown symbol tegra_hv_mempool_reserve (err -2)
 nvhost_pva: Unknown symbol is_tegra_hypervisor_mode (err -2)
 mc_utils: Unknown symbol is_tegra_hypervisor_mode (err -2)
 mc_utils: Unknown symbol is_tegra_hypervisor_mode (err -2)

Update the hv-ivc.h header to ensure that these function stubs are
defined when virtualization support is disabled and only build the
hv-ivc driver if virtualization is enabled.

Finally, move populating the ccflags to the top-level Makefile and use
the subdir-ccflags directive to ensure the ccflags are passed to all
sub-directories.

Bug 4159372
Bug 4170085

Change-Id: I35edb91007524c3143dff7564f9ad545bd34e969
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2921199
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-07-05 14:34:15 -07:00
Laxman Dewangan
06a354f741 ASoC: tegra: Get rid of explicit header inclusion
The required headers for sound driver are already
included in the master makefile. Hence, it is not
required to add include path explicitly.

Bug 4087103

Change-Id: Ia5c2b9c7b9be0b060b171c48cbc9a084847cbb8e
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894630
Reviewed-by: Sheetal . <sheetal@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-28 02:20:27 -07:00
Laxman Dewangan
48e336f384 tegra: isomgr: Use SPDX license GPL 2.0 format
Use SPDX license GPL-V2.0 format and change Nvidia
copyright year to include 2023.

Bug 4078035

Change-Id: I6ba874843e12f3f6df21de4e937fbd3c795c72ae
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2892620
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-23 05:43:11 -07:00
Mohan Kumar
e2e48eebb6 ASoC: tegra: Migrate to upstream ICC
Migrate the ahub bandwidth management driver to align with upstream
ICC apis.

Bug 3997304

Change-Id: Ifaf25030b8cc4f467cdc737e034e0215413acf38
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2873866
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Sumit Gupta <sumitg@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-04-05 05:59:25 -07:00
Sameer Pujar
66a89e5506 ASoC: tegra: Add 'oot' suffix in compatibles
The audio drivers are getting upstreamed continuously with incremental
feature support. However, the OOT version of driver will be used till
all features are available from upstream driver.

Add the "-oot" prefix in the driver's name so that OOT version of driver
can be selected from the device tree file.

Bug 3583581

Change-Id: Iacc55c05bf07d6cc4a0d9745903b0fa92e60d9b3
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2866070
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Sheetal . <sheetal@nvidia.com>
Tested-by: Mohan Kumar D <mkumard@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-31 13:27:13 -07:00
Jon Hunter
7f2c6fcd8c ASoC: tegra: Fix build for Linux v6.3
Upstream Linux commit ("3653480c6812 ASoC: soc-dai.h: cleanup
Playback/Capture data for snd_soc_dai") removes the capture_dma_data
and playback_dma_data variables from snd_soc_dai structure and this
breaks building the Tegra210 ADMAIF driver. Fix this by using the
appropriate API for Linux v6.3.

Bug 4014315

Change-Id: I76c8401571130a3d7ebaecacdfc299d59c1eaf8e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2867123
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-03-18 16:18:39 -07:00
Mohan Kumar
dab2a32da0 ASoC: tegra-virt-alt: Fix coverity issue
Fix uninitialized scalar variable in adsp_admaif_dt_params structure

CID 10166577

Bug 3952896

Change-Id: Ief007160f049ab34d2d3a50e20895dbd3c73efe7
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2868887
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-17 10:06:12 -07:00
Dipesh Gandhi
e7a37d936b kernel-nvidia: Read ivc response
- RD sends a response back to gos for every ivc sent to audio-server
- Changing gos side to read response for amixer commands for admaif
  set rxcif/txcif, i2s set loopback & set route.
- for asrc, arad and mixer commands
- Change API to ivc_send_receive for rest of the messages.

This commit is a cherry-pick/squash of following 3 changes -

https://git-master.nvidia.com/r/c/linux-nvidia/+/2824045
https://git-master.nvidia.com/r/c/linux-nvidia/+/2838626
https://git-master.nvidia.com/r/c/linux-nvidia/+/2849664

Bug 3663881
Bug 3930086
Bug 3917240

Signed-off-by: Niranjan Dighe <ndighe@nvidia.com>
Change-Id: If943e50eda081cd7db4022a34d104e143c9e48d2
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2869777
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-by: Swati Sachdeva <ssachdeva@nvidia.com>
Reviewed-by: Uday Gupta <udayg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-03-15 01:57:24 -07:00
Sameer Pujar
2edfbcdf39 ASoC: tegra: Fix uninitialized array index read
The index of the override arrays is related to stream direction.
The variable used to read these array index is not initialized
and is reported by coverity scan. The variable assignment code
is misplaced. Fix this by moving this code to make sure that
the array index read happens after the variable assignment.

CID 10162269
Bug 3952896

Change-Id: I7e8d000860e799a93437d6eb9d1b788cda118c14
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2860609
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-22 00:45:40 -08:00
Bitan Biswas
35c308a22c Revert "ASoC: tegra: Fix coverity issue"
This reverts commit b284ab0c11.

Reason for revert: Null pointer exception during boot l4t k515 concord

bug 3990297

Change-Id: I8354b0dc28e88aa3c23adfdce84fa5cb96f88fdb
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2859511
Reviewed-by: Akhil R <akhilrajeev@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-18 02:30:17 -08:00
Mohan Kumar
b284ab0c11 ASoC: tegra: Fix coverity issue
Fix the unchecked return error from of_property_read_u32
function.

CID 10162254

Bug 3952896

Change-Id: Ifaa0cfc275e7a70896fd1f41ed12fcffd76395bd
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2856343
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-16 00:07:49 -08:00
Sheetal
d89c0fcf3b ASoC: tegra: Update mux name as per upstream
- Change the Mixer, AMX, ADX, ASRC, OPE, MVC and SFC dai names
  as per upstream.
- Split Mixer, ASRC, OPE, MVC and SFC input and output names to
  RX and TX

Note -
 As per downstream kernel code there will be routing issue
 if DAI names are updated for SFC, MVC and OPE input and
 output. Due to that added those modules output DAIs just to keep
 similar to upstream kernel. Single DAI is used for input and
 output for SFC, MVC and OPE.

Bug 3592105
Bug 3896761

Signed-off-by: Sheetal <sheetal@nvidia.com>
Change-Id: I1bcc141627b9123c4c3921c87c279dbd41f757bc
(cherry picked from commit ae0f5a2b7cfc56b5c53f05aca50fb5f32bac7eca)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2835313
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2856573
Tested-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-15 04:31:28 -08:00
Sheetal
69a7eaf40a ASoC: tegra: Update ASRC and OPE control name
Updated ASRC and OPE control names as per upstream kernel.
To simplify the unification of audio scripts

Bug 3592105
Bug 3896761

Change-Id: If9449baed51d59a33efdadff6c7ba3d2858299ca
Signed-off-by: Sheetal <sheetal@nvidia.com>
(cherry picked from commit 524e22f44cdf68ca4eb05a690b89d8ca6e4886d1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2844839
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2856572
Tested-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-15 04:31:23 -08:00
pmedawala
e6e4bbc853 nvidia: oot: add tegra-virt-alt as OOT module
Combined nvaudio-ivc with tegra-virt-alt.

Bug 3735757

Change-Id: I9642c5367e43bfc470c70641fa22e50a4ae0e992
Signed-off-by: pmedawala <pmedawala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2800354
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Uday Gupta <udayg@nvidia.com>
Reviewed-by: Niranjan Dighe <ndighe@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2022-12-21 11:58:23 -08:00
Mohan Kumar
c9217a1b82 ASoC: tegra: Fix build for Linux v6.1
Upstream Linux kernel commit 3989ade2d1e7 ("ASoC: soc.h: remove
num_cpus/codecs") removes the 'num_cpus' member from the
'snd_soc_pcm_runtime' structure because this is also available under the
dai_link structure. This breaks building the Tegra ASoC drivers for
Linux v6.1 and so update the Tegra ASoC drivers to align the latest
mainline.

Bug 3772918
Bug 3890034

Change-Id: If436222ec9e9a97acf82d50c5f9ce80e08ca1f1c
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2819691
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-12-07 01:54:06 -08:00
Mohan Kumar D
f9d418aa6a Revert "Revert "ASoC: tegra: Single cpu multi codec dai support""
This reverts commit 43ae0060cd.

Reason for revert: Fixed the build issue on sidecar branch

Bug 3772918

Change-Id: Ib02496f93fe79aec04f3b5b1c78a5681b1e56819
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2819603
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-12-07 01:53:53 -08:00
Armandeep Singh
43ae0060cd Revert "ASoC: tegra: Single cpu multi codec dai support"
This reverts commit dc9fe67430.

Reason for revert: Causing GVS build failure

Change-Id: I7d021a38792cb928461ef4acc1f9f8443b9ede8d
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2819363
Tested-by: Armandeep Singh <armandeeps@nvidia.com>
Reviewed-by: Armandeep Singh <armandeeps@nvidia.com>
2022-11-30 17:34:53 -08:00
Mohan Kumar
dc9fe67430 ASoC: tegra: Single cpu multi codec dai support
Add driver support for single cpu dai connected to multiple
codec dai.

Tested on Concord board with one DSPK cpu dai connected to
two TAS2552 codec dai present on Super-io module connected
to 40 pin header.

Bug 3772918

Change-Id: I6cf33c2a4736dc27a44b5db136ebabe88f55ab65
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2795021
(cherry picked from commit 8e2485e8ff53581acb4aa6fae739114490c77238)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2815755
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-11-30 06:24:18 -08:00
Jon Hunter
ded768ff77 sound: tegra-safety: Fix build for Linux v5.17+
Starting with Linux kernel v5.17, the 'slave_id' member is removed from
the DMA Engine 'dma_slave_config' structure. Building the Tegra Safety
Audio driver against Linux v5.17, v5.18 and v5.19 breaks because this
filed is not defined. There are already comments in the driver to not
used the 'slave_id' field and move to using device-tree to get this
information. For now, fix the build by not using the 'slave_id' field
for Linux v5.17+.

Bug 3820317
Bug 3735757

Change-Id: I2fb8317604b0a797f4e1b22a53994ec0085ea584
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2796900
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-26 16:48:41 -07:00
pmedawala
2852d2419f nvidia: oot: add tegra-safety-audio build support
Copied sound/tegra-safety-audio source files to nvidia-oot folder

Bug 3735757

Change-Id: I8a18ee25a6c33a00e6b28a2e09b6576197a35652
Signed-off-by: pmedawala <pmedawala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2783432
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Uday Gupta <udayg@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Uday Gupta <udayg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-21 20:25:14 -07:00
Sameer Pujar
19292f7cb8 ASoC: tegra: Fix PCM and Compress device IDs
DAI links are getting parsed in a reverse order with Kernel OOT,
where the DAI link nodes are now defined in overlays which gets
applied to the upstream DTB. Due to this PCM and compress devices
get a very large number which makes existing applications fail.

This seems to be expected as the overlay subnodes are merged just
after the parent properties. Each subnode comes just after the
properties. Because of this the later merged subnodes come before
the earlier merged nodes and eventually the DAI link nodes, in
this case, get reversed.

Given above it would be better to not assume DAI link node order.
To fix this use full name of DAI link nodes and identify the DAI
link index from it during parsing in kernel. The DAI link nodes
are named as 'nvidia-audio-card,dai-link@<xxx>', where <xxx>
signifies link index. Parse this info and store it under DAI link
ID. With this the PCM and Compress device IDs do not depend anymore
on the parsing order of DAI links.

Bug 3583581

Change-Id: I3d0e7ed9fb0edfe1f066e12527b44a85c2716df0
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2776061
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-10-21 20:23:55 -07:00
Jon Hunter
541420a420 ASoC: tegra: Fix build for Linux v6.1
Upstream Linux kernel commit 3989ade2d1e7 ("ASoC: soc.h: remove
num_cpus/codecs") removes the 'num_cpus' member from the
'snd_soc_pcm_runtime' structure because this is also available under the
dai_link structure. This breaks building the Tegra ASoC drivers for
Linux v6.1 and so update the Tegra ASoC drivers to align the latest
mainline. Note that this also works for earlier kernel versions and so
no need to check for kernel version.

Bug 3835208

Change-Id: Ib846e937d761b65276ace73f7817ef8bd21c21d8
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2795754
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-21 05:54:58 -07:00
Sameer Pujar
47b127bd17 ASoC: tegra: Fix build errors with kstable
Build errors seen in following contexts with kstable:

  - The 'non_legacy_dai_naming' flag is not available in struct
    'snd_soc_component_driver' in v6.0. Instead it is replaced
    with flag 'legacy_dai_naming' and default value works fine.
    To fix build error on kstable exclude the removed flag for
    kernel v6.0 onward.

  - Signature of snd_soc_card_jack_new() has changed in v5.19
    which drops struct 'snd_soc_jack_pins' related members. These
    were unused for Tegra and is safe to just update the funcion
    call. Fix this by using correct function signature based on
    kernel version checks.

With above fixed now, remove workaround from Makefile and enable
Audio OOT driver builds again with kstable.

Bug 3831575

Change-Id: I7b65c89e8140f6e085528fb827d47c3909233db1
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2793430
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-19 11:57:01 -07:00
Sameer Pujar
c4ab6f5a0e ASoC: tegra: Align with new device model
PEQ and MBDRC are sub blocks of OPE module. So far, these sub blocks
were not represented by separate device nodes in DT. This has changed
now where PEQ and MBDRC are children of OPE block. For now the driver
structure is maintained as it is and explicitly parse PEQ and MBDRC
nodes to create corresponding regmap interfaces. With this there is
flexibility now to create separate device drivers for PEQ and MBDRC
if necessary in future.

Bug 3583581

Change-Id: I16ceb9b1a30b4ddb1a57fdef28db20c554c58b03
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2783022
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-01 10:51:57 -07:00
Sameer Pujar
1e77ef2504 ASoC: tegra: Remove slave_id access
The struct 'snd_dmaengine_dai_dma_data' no more has 'slave_id'
member in newer kernels. This presently causes build failure
in GVS for 'linux-stable'.

Remove access to this member to fix build issue with OOT driver.
Also upstream ADMA driver does not depend on it anymore, so
commit 32de4745e20a ("dmaengine: tegra210-adma: Override ADMA FIFO
size") needs to be backported to avoid related functional issue.

Bug 3583581

Change-Id: Ib865bdc5d2b2ceb9d57511c3618e5fe607acab09
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2776075
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-01 10:51:52 -07:00
Sameer Pujar
11a70ecd46 ASoC: tegra: Update compatible names
Following drivers are upstreamed (and present in v5.15) but not yet
feature complete:

  tegra186_dspk.c
  tegra210_admaif.c
  tegra210_ahub.c
  tegra210_dmic.c
  tegra210_i2s.c

To use these drivers, device nodes in DT can use OOT specific
compatibles. Update compatibles in drivers to facilitate this.

Bug 3583581

Change-Id: I1a9e31fc5f1b2d2539f644a413ba0c06c6da2110
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774435
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-01 10:51:48 -07:00
Sameer Pujar
4103ed0a7e ASoC: tegra: Enable OOT drivers build
All build errors have been now addressed by previous commits in the
series. Now enable OOT drivers build. To do so, update top level
makefile to include drivers path and update the internal makefile
to build individual drivers.

Some of the AHUB drivers are already upstreamed and are part of
v5.15 core kernel. But presently the drivers are copied to provide
full feature set. To differentiate core modules from OOT modules
the *.ko files here use "oot" string.

Bug 3583581

Change-Id: I21d51c542ed4ed7dddf7cf8d8202ebc496049fff
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774434
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-01 10:51:43 -07:00
Sameer Pujar
cb024c2001 TEMP: ASoC: tegra: Disable ADMA register dump call
tegra_adma_dump_ch_reg() is implemented by downstream ADMA driver only
which is not upstreamed yet. This causes build error with Kernel OOT
because upstream ADMA driver is used. Disable this call temporarily
until future is decided for this helper.

Bug 3583581
Bug 3798682

Change-Id: Ifb625509fe8354e65f40d4047e4e80ef6a5e287f
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774433
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-01 10:51:38 -07:00
Sameer Pujar
f4e2af6f57 ASoC: tegra: Fix build error due to tegra186_ahc.h
Add config based header inclusion for AHC driver. The ASRC and ARAD
drivers are not POR for L4T releases and also AHC driver is not yet
up with Kernel OOT. For now, ensure ASRC and ARAD functionality
without dependency on AHC driver. Later if there is a requirement
test functionality with AHC module.

Bug 3583581

Change-Id: I5e586886ae91b1dcaa9e3aa945364dc21a23f281
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774432
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-01 10:51:34 -07:00
Sameer Pujar
c61527fb8f ASoC: tegra: remove superflous code
This is inspired from following upstream commit:

------------------------------------------------------------------------
  commit 189364872fba07291db7f68fe0161f97e5b61bb1
  Author: Takashi Iwai <tiwai@suse.de>
  Date:   Mon Aug 2 09:28:09 2021 +0200

  ASoC: tegra: Use managed buffer allocation

  As the standard buffer allocation helper supports WC pages now, we can
  convert imx-pcm-rpmsg driver to use that.  This allows us to remove
  lots of superfluous code.

  Acked-by: Mark Brown <broonie@kernel.org>
  Link: https://lore.kernel.org/r/20210802072815.13551-10-tiwai@suse.de
  Signed-off-by: Takashi Iwai <tiwai@suse.de>
------------------------------------------------------------------------

Above is required to avoid build errors related to non existent
callbacks in 'snd_soc_component_driver' structure.

Bug 3583581

Change-Id: Id1a930db0e41a51be35813aed67183974d1eec57
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774431
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-01 10:51:29 -07:00
Sameer Pujar
4b2029fac6 ASoC: tegra: Fix symmetric rate flag
'symmetric_rates' member is not available now in 'snd_soc_dai_driver'
structure. Instead this is replaced by 'symmetric_rate'. Fix these
references to avoid build errors.

Bug 3583581

Change-Id: I6bacec5a15656724bf344c797db8c39015bd7b23
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774430
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-01 10:51:25 -07:00
Sameer Pujar
796fd3534c ASoC: tegra: Fix header paths
OOT drivers cannot directly access private headers of core kernel.
This is a standard policy adopted by kernel distributors and to
workaround this problem copy headers to OOT path. Update the usage
references as well.

Bug 3583581

Change-Id: I1b99e17c60294a1cb257eb5b80837faa896d3f8d
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774429
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-01 10:51:21 -07:00
Sameer Pujar
be149e044b ASoC: tegra: Remove legacy BW manager code
Kernel OOT POR is for Tegra234 and later. BW manager code for legacy
chips causes build error with Kernel OOT and Tegra234 uses interconnect
based BW requests. Since Tegra194 (and earlier) support is not needed,
remove the legacy code.

Bug 3583581

Change-Id: I04c6ca0bc58dad4de9daa6ab65b04ee01553724d
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774428
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-01 10:51:16 -07:00
Sameer Pujar
6684fbbedf ASoC: tegra: Fix build errors due to core helpers
snd_soc_of_parse_daifmt() is removed from later kernel versions and this
causes complilation error. Use asoc_simple_parse_daifmt() helper to
parse DAI format.

asoc_simple_canonicalize_platform() has a different signature now and
thus update the helper usage accordingly.

Bug 3583581

Change-Id: I9a99fc71849ddf460040f980aea7d4b9f8f80011
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2774427
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-10-01 10:51:12 -07:00
Mohan Kumar
54bd04b640 ASoC: tegra: Fix AHUB probe issue
Make sure to call pm_runtime_enable() before the
of_platform_populate() which will ensure ahub runtime
resume would be called to enable ahub clock before accessing
any ahub modules registers in modules probe. Calling
of_platform_populate() in parent driver probe results in all
of its child device probe to be completed before it exits the
parent probe call.

The issue caught during MVC child device probe tries to access a
register in probe call which depends on the ahub clock that gets
enabled during AHUB RPM resume. But ahub RPM resume not called as
pm_runtime_enable() in ahub parent driver happens after the
of_platform_populate(). This was observed when drivers were built
as part of kernel image.

Bug 3752938

Change-Id: Ifeb4085961d89877f79ff521adb6dfdf4e51907c
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2762027
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-09-29 15:57:12 +05:30
Sheetal
685ae3b3e1 ASoC: tegra: Fix hardcoded ARAM address
- ARAM start address is not same for all the chips and
  ARAM start address was hardcoded in asrc driver.
  To handle it for all the chips, moved ARAM start address
  info into compatible data of device.

Bug 3434231
Bug 3506754

Signed-off-by: Sheetal <sheetal@nvidia.com>
Change-Id: I860d2d299d11890c01187b19fac16f0d7b31e88c
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2704344
(cherry picked from commit 2b93c82cbdafd80859488cb51f41ae8d5341bb79)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2626008
Tested-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-09-29 15:57:12 +05:30
Sheetal
125740cada ASoC: tegra: Add support for 1.2GHz pll base rate
- For upcoming chips the PLLA base rates are different.
  Added entry to support 1.2GHz base rate.
- Base rate reference:
  Bug 3157662, Comment #77.

Bug 200741253
Bug 3506754

Signed-off-by: Sheetal <sheetal@nvidia.com>
Change-Id: Ib8554b3b6b2f1d0e35e328898f343b1f92870bda
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2704346
(cherry picked from commit 77ec9d06a5dc63d6687be0dfa60136af5e2f98ed)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2591781
Tested-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-09-29 15:57:12 +05:30
Sheetal
9841017f33 ASoC: tegra: Add internal PLL support for RT5640
RT5640 codec has internal PLL which can be used to
derive SYSCLK and internal PLL can take I2S BCLK as a
reference clock

Bug 3520437

Signed-off-by: Sheetal <sheetal@nvidia.com>
Change-Id: I3b88d3bf75146532bda669d961c6ff6bb52603f5
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2662478
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-09-29 15:57:12 +05:30
Rajesh Gumasta
0142517e63 Merge mainline tag v5.10.87 into dev-main-5.10
Merge remote-tracking branch 'origin/dev/linux-5.10.87'
into dev-main-5.10.87

Merge v5.10.66 to v5.10.87

Summary of changes since TOT revision v5.10.65

Changes in v5.10.87 (total commits 33)
arm: ioremap: don't abuse pfn_valid() to check if pfn is in RAM
arm: extend pfn_valid to take into account freed memory map alignment
fuse: make sure reclaim doesn't write the inode

Changes in v5.10.86 (total commits 1)
netfilter: selftest: conntrack_vrf.sh: fix file permission

Changes in v5.10.85 (total commits 132)
Documentation/Kbuild: Remove references to gcc-plugin.sh
MAINTAINERS: adjust GCC PLUGINS after gcc-plugin.sh removal
doc: gcc-plugins: update gcc-plugins.rst
kbuild: simplify GCC_PLUGINS enablement in dummy-tools/gcc
xhci: avoid race between disable slot command and host runtime suspend
dt-bindings: net: Reintroduce PHY no lane swap binding

Changes in v5.10.84 (total commits 125)
parisc: Mark cr16 CPU clocksource unstable on all SMP machines
serial: tegra: Change lower tolerance baud rate limit for tegra20 and tegra30
ASoC: tegra: Fix kcontrol put callback in AHUB
ASoC: tegra: Fix kcontrol put callback in DSPK
ASoC: tegra: Fix kcontrol put callback in DMIC
ASoC: tegra: Fix kcontrol put callback in I2S
ASoC: tegra: Fix kcontrol put callback in ADMAIF
ASoC: tegra: Fix wrong value type in DSPK
ASoC: tegra: Fix wrong value type in DMIC
ASoC: tegra: Fix wrong value type in I2S
ASoC: tegra: Fix wrong value type in ADMAIF

Changes in v5.10.83 (total commits 121)
net: ipv6: add fib6_nh_release_dsts stub
ipv6: fix typos in __ip6_finish_output()
mmc: sdhci: Fix ADMA for PAGE_SIZE >= 64KiB

Changes in v5.10.82 (total commits 153)
scsi: ufs: core: Fix task management completion timeout race
scsi: ufs: core: Fix task management completion
net: reduce indentation level in sk_clone_lock()
net-zerocopy: Refactor skb frag fast-forward op.
sched/core: Mitigate race cpus_share_cache()/update_top_cache_domain()

Changes in v5.10.81 (total commits 21)
thermal: Fix NULL pointer dereferences in of_thermal_ functions
PCI: Add MSI masking quirk for Nvidia ION AHCI
PCI/MSI: Deal with devices lying about their MSI mask capability
PCI/MSI: Destroy sysfs before freeing entries
loop: Use blk_validate_block_size() to validate block size

Changes in v5.10.80 (total commits 570)
soc/tegra: pmc: Fix imbalanced clock disabling in error code path
dmaengine: dmaengine_desc_callback_valid(): Check for `callback_result`
soc/tegra: Fix an error handling path in tegra_powergate_power_up()
rcu: Fix existing exp request check in sync_sched_exp_online_cleanup()
serial: core: Fix initializing and restoring termios speed

Changes in v5.10.79 (total commits 19)
printk/console: Allow to disable console output by using console="" or console=null

Changes in v5.10.78 (total commits 14)
scsi: core: Put LLD module refcnt after SCSI device is released

Changes in v5.10.77 (total commits 77)
net: Prevent infinite while loop in skb_tx_hash()
mmc: sdhci: Map more voltage level to SDHCI_POWER_330

Changes in v5.10.76 (total commits 94)
scsi: core: Fix shost->cmd_per_lun calculation in scsi_add_host_with_dma()
dma-debug: fix sg checks in debug_dma_map_sg()

Changes in v5.10.75 (total commits 101)
acpi/arm64: fix next_platform_timer() section mismatch error
platform/mellanox: mlxreg-io: Fix read access of n-bytes size attributes
platform/mellanox: mlxreg-io: Fix argument base in kstrtou32() call
net/mlx5e: Mutually exclude RX-FCS and RX-port-timestamp
net/mlx5e: Fix memory leak in mlx5_core_destroy_cq() error path

Changes in v5.10.74 (total commits 22)
sched: Always inline is_percpu_thread()
perf/core: fix userpage->time_enabled of inactive events

Changes in v5.10.73 (total commits 81)
RISC-V: Include clone3() on rv32
i2c: acpi: fix resource leak in reconfiguration device addition
net: prefer socket bound to interface when not in VRF
net/mlx5: E-Switch, Fix double allocation of acl flow counter
net/mlx5e: IPSEC RX, enable checksum complete

Changes in v5.10.72 (total commits 29)
tools/vm/page-types: remove dependency on opt_file for idle page tracking

Changes in v5.10.71 (total commits 92)
mm: don't allow oversized kvmalloc() calls
crypto: ccp - fix resource leaks in ccp_run_aes_gcm_cmd()
debugfs: debugfs_create_file_size(): use IS_ERR to check for error
cpufreq: schedutil: Destroy mutex before kobject_put() frees the memory
cpufreq: schedutil: Use kobject release() method to free sugov_tunables
tty: Fix out-of-bound vmalloc access in imageblit

Changes in v5.10.70 (total commits 102)
spi: Fix tegra20 build with CONFIG_PM=n
thermal/core: Potential buffer overflow in thermal_build_list_of_policies()

Changes in v5.10.69 (total commits 64)
sched/idle: Make the idle timer expire in hard interrupt context
thermal/core: Fix thermal_cooling_device_register() prototype
PM: sleep: core: Avoid setting power.must_resume to false

Changes in v5.10.68 (total commits 125)
PCI: Sync __pci_register_driver() stub for CONFIG_PCI=n
tracing/boot: Fix a hist trigger dependency for boot time tracing
PCI: tegra: Fix OF node reference leak
PCI: tegra194: Fix MSI-X programming
PCI: tegra194: Fix handling BME_CHGED event
fuse: fix use after free in fuse_read_interrupt()

Changes in v5.10.67 (total commits 305)
cpufreq: powernv: Fix init_chip_info initialization in numa=off
net/mlx5: DR, Enable QP retransmission
net/mlx5: DR, fix a potential use-after-free bug
mmc: core: Return correct emmc response in case of ioctl error
ARM: tegra: tamonten: Fix UART pad setting
ARM: tegra: acer-a500: Remove bogus USB VBUS regulators
media: tegra-cec: Handle errors of clk_prepare_enable()
arm64: tegra: Fix Tegra194 PCIe EP compatible string
pinctrl: single: Fix error return code in pcs_parse_bits_in_pinctrl_entry()
crypto: public_key: fix overflow during implicit conversion

Changes in v5.10.66 (total commits 4)
Revert "time: Handle negative seconds correctly in timespec64_to_ns()"
Revert "posix-cpu-timers: Force next expiration recalc after itimer reset"
Revert "block: nbd: add sanity check for first_minor"
Revert "Bluetooth: Move shutdown callback before flushing tx and rx queue"

Bug 200712834

Change-Id: Iaf76032e92a2e31d457bc39c5b110605f5e20f39
Signed-off-by: Rajesh Gumasta <rgumasta@nvidia.com>
2022-09-29 15:57:12 +05:30
Sameer Pujar
ba0e19874d ASoC: tegra: Fix kcontrol put callback in AHUB
commit a4e37950c9e9b126f9cbee79b8ab94a94646dcf1 upstream.

The kcontrol put callback is expected to return 1 when there is change
in HW or when the update is acknowledged by driver. This would ensure
that change notifications are sent to subscribed applications. Update
the AHUB driver accordingly.

Fixes: 16e1bcc2caf4 ("ASoC: tegra: Add Tegra210 based AHUB driver")
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Suggested-by: Jaroslav Kysela <perex@perex.cz>
Suggested-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/1637219231-406-12-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-29 15:56:06 +05:30
Sameer Pujar
4715358c19 ASoC: tegra: Fix kcontrol put callback in DSPK
commit d6202a57e79d102271d38c34481fedc9d4c79694 upstream.

The kcontrol put callback is expected to return 1 when there is change
in HW or when the update is acknowledged by driver. This would ensure
that change notifications are sent to subscribed applications. Update
the DSPK driver accordingly.

Fixes: 327ef6470266 ("ASoC: tegra: Add Tegra186 based DSPK driver")
Suggested-by: Jaroslav Kysela <perex@perex.cz>
Suggested-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/1637219231-406-11-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-29 15:56:06 +05:30
Sameer Pujar
0e4e80ba39 ASoC: tegra: Fix kcontrol put callback in DMIC
commit a347dfa10262fa0a10e2b1970ea0194e3d4a3251 upstream.

The kcontrol put callback is expected to return 1 when there is change
in HW or when the update is acknowledged by driver. This would ensure
that change notifications are sent to subscribed applications. Update
the DMIC driver accordingly.

Fixes: 8c8ff982e9e2 ("ASoC: tegra: Add Tegra210 based DMIC driver")
Suggested-by: Jaroslav Kysela <perex@perex.cz>
Suggested-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/1637219231-406-10-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-29 15:56:06 +05:30
Sameer Pujar
d473d42138 ASoC: tegra: Fix kcontrol put callback in I2S
commit f21a9df3f7cb0005947679d7b9237c90574e229a upstream.

The kcontrol put callback is expected to return 1 when there is change
in HW or when the update is acknowledged by driver. This would ensure
that change notifications are sent to subscribed applications. Update
the I2S driver accordingly.

Fixes: c0bfa98349d1 ("ASoC: tegra: Add Tegra210 based I2S driver")
Suggested-by: Jaroslav Kysela <perex@perex.cz>
Suggested-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/1637219231-406-9-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-29 15:56:06 +05:30
Sameer Pujar
67d8d5800e ASoC: tegra: Fix kcontrol put callback in ADMAIF
commit e2b87a18a60c02d0dcd1de801d669587e516cc4d upstream.

The kcontrol put callback is expected to return 1 when there is change
in HW or when the update is acknowledged by driver. This would ensure
that change notifications are sent to subscribed applications. Update
the ADMAIF driver accordingly.

Fixes: f74028e159bb ("ASoC: tegra: Add Tegra210 based ADMAIF driver")
Suggested-by: Jaroslav Kysela <perex@perex.cz>
Suggested-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/1637219231-406-8-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-29 15:56:06 +05:30
Sameer Pujar
9bd13cefe4 ASoC: tegra: Fix wrong value type in DSPK
commit 3aa0d5c8bb3f5ef622ec2764823f551a1f630711 upstream.

The enum controls are expected to use enumerated value type.
Update relevant references in control get/put callbacks.

Fixes: 327ef6470266 ("ASoC: tegra: Add Tegra186 based DSPK driver")
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/1637219231-406-5-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-29 15:55:17 +05:30
Sameer Pujar
44bb7bd10e ASoC: tegra: Fix wrong value type in DMIC
commit 559d234569a998a4004de1bd1f12da5487fb826e upstream.

The enum controls are expected to use enumerated value type.
Update relevant references in control get/put callbacks.

Fixes: 8c8ff982e9e2 ("ASoC: tegra: Add Tegra210 based DMIC driver")
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/1637219231-406-4-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-29 15:53:18 +05:30
Sameer Pujar
d7d7cc0ad3 ASoC: tegra: Fix wrong value type in I2S
commit 8a2c2fa0c5331445c801e9241f2bb4e0e2a895a8 upstream.

The enum controls are expected to use enumerated value type.
Update relevant references in control get/put callbacks.

Fixes: c0bfa98349d1 ("ASoC: tegra: Add Tegra210 based I2S driver")
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/1637219231-406-3-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-29 15:52:23 +05:30
Sameer Pujar
75d1e83e5e ASoC: tegra: Fix wrong value type in ADMAIF
commit 884c6cb3b7030f75c46e55b9e625d2372708c306 upstream.

The enum controls are expected to use enumerated value type.
Update relevant references in control get/put callbacks.

Fixes: f74028e159bb ("ASoC: tegra: Add Tegra210 based ADMAIF driver")
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/1637219231-406-2-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-29 15:50:28 +05:30
Sameer Pujar
7d0726f36b ASoC: tegra: Add support for RT5640 codec
Due to a shortage of RT5658 codec parts, search was going on for an
alternative codec. As a replacement, RT5640 codec is finalized now.
The upcoming Concord boards (EB3 to begin with) will have this codec.
This commit adds required support in the machine driver.

Machine driver update is needed for following reasons:
 * The RT5640 codec driver expects sysclk configuration from machine
   driver. This requirement is similar to what we have today for
   RT5658 codec. This handling is done under "rt5640-playback" DAI
   link name.

 * RT5640 DAI link init is added for jack setup. Since it is mostly
   similar to RT5658 handling, the existing init helper function is
   re-used. The component driver jack setup callback is used to make
   this simple.

Bug 200766032

Change-Id: I41ee0022c22fd50e9baf80aa765b2b3ede4e85c7
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2625064
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@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>
GVS: Gerrit_Virtual_Submit
2022-09-29 15:50:28 +05:30