Commit Graph

708 Commits

Author SHA1 Message Date
Aditya Bavanari
8ff86d20ee ASoC: tegra: Fix ret in dpcm_runtime_set_dai_fmt
- snd_soc_dapm_dai_get_connected_widgets returns
number of valid paths which is being returned
as an error code to the mixer control put callbacks
of codec master mode and frame mode controls leading
to them not set properly.
- If the master mode mixer control is set before the
frame mode control, this issue will not be observed
as the fmt value is still updated in hardware. User
space though, will show a wrong value.
- Internal I2S loopback failed in Android sanity
as the frame mode control is set before
the master mode.
- Modify the return value to 0 if it is >0
to fix this issue.

Bug 5705385

Change-Id: I6662057503b9d5be6b71dfdb219334267ea9b9bc
Signed-off-by: Aditya Bavanari <abavanari@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3503844
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Sheetal . <sheetal@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sheetal . <sheetal@nvidia.com>
2025-12-03 05:57:59 -08:00
Sheetal
f2c7bd17be ASoC: tegra: Fix memory leak in OOT machine driver
Fix a memory leak in the NVIDIA Tegra ASoC machine driver where
allocated DAPM widget lists were never freed. The function
dpcm_runtime_set_dai_fmt() calls snd_soc_dapm_dai_get_connected_widgets()
which allocates memory for a widget list, but was returning without
calling snd_soc_dapm_dai_free_widgets() to free this memory.

The leak was detected by kmemleak:
  unreferenced object 0xffff00008fc7e300 (size 192):
    comm "alsactl", pid 812, jiffies 4294900395
    backtrace:
      kmemleak_alloc+0xc0/0xe8
      __kmalloc+0x2e0/0x4c8
      snd_soc_dapm_dai_get_connected_widgets+0x108/0x2a0

Fix this by using snd_soc_dapm_dai_free_widgets() on
success or failure to ensure the widget list is always freed
before returning.

Bug 5667057
Change-Id: Ied69968884fc0646a3041e54427736ff1fc232ac
Signed-off-by: Sheetal <sheetal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3500426
(cherry picked from commit 14b3fc2296967968d5972054bff38cf1bf4b518e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3502770
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-12-03 05:57:54 -08:00
Sheetal
a4125dd460 ASoC: tegra: Fix 24bit usecase
The tegra_dai_fixup function was incorrectly updating the format mask
when S24_LE format was requested and DAI has 32-bit sample width incase
the stream on that DAI is already running.

S24_LE format uses 32-bit physical width on the DAI interface, but
the format mask should remain as S24_LE to maintain proper format
negotiation. The fix adds a check to skip format mask updates when
S24_LE is requested and DAI sample_bits is 32.

This resolves issues with RT5640 and other codecs that support
24-bit audio formats on Tegra platforms.

Bug 5350165

Change-Id: Ie297a4176866c9bb3dbc9f40ac7b6d9051a879f6
Signed-off-by: Sheetal <sheetal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3396978
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
2025-07-24 10:20:36 +00:00
Jon Hunter
cdef2b63f6 drivers: Remove 'private' directories
Drivers in the NVIDIA OOT repository are public and so remove the
directories named 'private' to avoid any confusion once these sources
are released.

Bug 5054840

Change-Id: I9156e3b08df9ce3d90dc0a2b5e72416f28fac5f5
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3351272
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2025-07-24 10:19:19 +00:00
Jon Hunter
cf368bfa2b ASoC: tegra: Fix build for Linux v6.15
In Linux v6.15, the SOC_SINGLE_VALUE macro was updated and an 'xmin'
parameter was added. Add a conftest test to check for this and update
the Tegra ARAD driver accordingly.

JIRA LINQPJ14-47

Change-Id: I597104327dac9108a7ab106f0c3fec575947626d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3328425
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
2025-07-24 10:19:17 +00:00
Jon Hunter
990ce03a70 ASoC: tegra: Use inclusive definitions
In Linux v5.11, commit f026c123001b ("ASoC: topology: use inclusive
language for bclk and fsync") added definitions SND_SOC_DAIFMT_CBP_CFP
and SND_SOC_DAIFMT_CBC_CFC, to replace the legacy definitions
SND_SOC_DAIFMT_CBM_CFM and SND_SOC_DAIFMT_CBS_CFS, respectively. For
Linux v6.15, the legacy definitions have now been removed. Update the
Tegra ASoC machine driver to use the inclusive definitions. Note that
given that we don't support v5.x kernels any more we don't need to worry
about compatibility with older kernels.

JIRA LINQPJ14-47

Change-Id: I4dd38d6c5c9e4d37f4b28aed516c962bf87f2fbd
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3328424
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
2025-07-24 10:19:17 +00:00
Hirak Biswas
4c9bdb3715 ASoC: tegra: Enable ARAD controls
ARAD was disabled earlier because it was
non functional from audio server side.
Re-enabling since the issue is now fixed.

Jira TAS-2594

Change-Id: Idabb617ff3150368ea62d002c3cbdce131054611
Signed-off-by: Hirak Biswas <hbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3295702
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:16 +00:00
Jon Hunter
52a4903b87 ASoC: tegra: Fix build for Linux v6.13
In Linux v6.13, commit 1bd775da9ba9 ("ASoC: add symmetric_ prefix for
dai->rate/channels/sample_bits") added a 'symmetric_' prefix to some
member of the 'snd_soc_dai' structure. Use conftest to determine if
these structure members have the 'symmetric_' prefix and update the
Tegra Mixer Control driver accordingly.

Bug 4991705

Change-Id: I366595f31932caaa447033c0d0e3b1d2b8dba6e3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261697
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:11 +00:00
Jon Hunter
1bdabd6286 ASoC: tegra-virt-alt: Fix build for Linux v6.13
Building the tegra-virt-alt driver with Linux v6.13 fails because some
of the header files are not found ...

 sound/soc/tegra-virt-alt/tegra210_virt_alt_admaif.c:17:10: fatal error:
  tegra_pcm_alt.h: No such file or directory
   17 | #include "tegra_pcm_alt.h"
      |          ^~~~~~~~~~~~~~~~~

The 'tegra_pcm_alt.h' header is located in a 'include' sub-directory and
although the cflags add this path for find headers, the header is not
found because the '#include' of the file uses double-quotes and not
"<>". This could be fixed by simply updating the file with
'#include <tegra_pcm_alt.h>'. However, reviewing the code it simplifies
the Makefile to remove the 'include' sub-directory and directly include
the header files. Similarly, we can remove the search path of the
'nvaudio_ivc' headers and directly include these.

Bug 4991705

Change-Id: I1993d1f619698f33fc9edab05ad9235334fd3b5b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3260938
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-07-24 10:19:11 +00:00
Dara Ramesh
09d2e16146 tegra-virt-alt: Added support for T264 ADSP Audio
Added new DT compatible string for t264
Extended T210 MUX/CTRL to use for T264

Bug 4635899

Change-Id: Ia2b2c8bc77eba65bf3530f28ccb1d23bcf93e0dd
2025-07-24 10:19:09 +00:00
Dara Ramesh
ed4c071bfa tegra-virt-alt: T264 ADSP support for machine driver
Extended T210 ADSP DAI LINKS  to use for T264

Bug 4635899

Change-Id: I613698aef930458f031462ddc7fd8bfbe72768a3
2025-07-24 10:19:09 +00:00
Sheetal
7e6dc18387 tegra-virt-alt: Unify Mixer controls with L4T
- Rename the mixer controls to match with L4T mixer controls.
- As most of the controls are matching between t234 and t264,
  the difference controls are added as part of component driver
  probe.
- Comment ARAD and regdump controls as ARAD and regdump are
  non-functional currently.
- Remove unused controls. MIXER, ASRC and AMX Enable controls are
  not required to be set explicitly as AudioServer handles this.

Bug 4796520

Change-Id: Ia6fdd507819b1b354544b2b1217d9aa399e106b9
Signed-off-by: Sheetal <sheetal@nvidia.com>
2025-07-24 10:19:09 +00:00
Uday Gupta
c8cb7c0808 Updated changes for XBAR
Change-Id: Ibb90f15b2a1edad00abbd2c5a3ab149ba9b468a6
Signed-off-by: Uday Gupta <udayg@nvidia.com>
2025-07-24 10:19:09 +00:00
Sheetal
d727e987bb tegra-virt-alt: admaif: Add T264 support
- Update controls and DAIs based on AHUB modules instances updated.
- Update the ADMAIF CIF channels to 32.
- Update the ARAD sources.

Jira TAS-2330

Change-Id: I1a4c1184916b9b66d5180f3cfd2f94c26abe0074
Signed-off-by: Sheetal <sheetal@nvidia.com>
2025-07-24 10:19:09 +00:00
Sheetal
ecb8c0bb89 tegra-virt-alt: T264 support for machine driver
- Defined the 32 dai-links for T264.
- Add T264 soc_data to fetch the number of channels based on soc.

Jira TAS-2331

Change-Id: I75b331ef34b8015b30ec48c72e6adceded10924b
Signed-off-by: Sheetal <sheetal@nvidia.com>
2025-07-24 10:19:09 +00:00
Sheetal
1dfa6285d3 ASoC: tegra: T264 in tegra mixer control driver
Add I2S, AMX and ADX controls as chip specific data to fetch
controls based on Max number of channels supported by chip.

Jira TAS-2387

Change-Id: Ieac8f7d55581856a595ffff093fa9d1b8ef493f9
Signed-off-by: Sheetal <sheetal@nvidia.com>
2025-07-24 10:19:09 +00:00
pmedawala
4a8d285e19 tegra-virt-alt: Added changes for XBAR
Jira TAS-2292

Change-Id: I69c47dcfe4de3bf0c958dc0f9b0954b66dd52830
2025-07-24 10:19:09 +00:00
Sheetal
251e41bc50 tegra-virt-alt: Add minimal support for T264
- CIF register bitmask is updated in T264, it is mandatory
  to update it for T264 audio usecases.
- With this change all T234 AHUB usecases can be verified.

TAS-2330

Change-Id: I9b64fcb5725bfd4dd01ef29466f7255bdfd6a53f
Signed-off-by: Sheetal <sheetal@nvidia.com>
2025-07-24 10:19:09 +00:00
Sheetal
2e000ca873 ASoC: tegra: Fix ASRC ratio restore issue
"alsactl restore" was not able to restore the value
goes beyond the signed int range for Ratio control.
As Ratio control expected 64bit Integer, change the
type and bits to 64 for "ASRC1 Ratio<x>" controls.

Bug 4870215

Change-Id: I96967968af151fa7b00d1d63bacade4c4d1ccce4
Signed-off-by: Sheetal <sheetal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3221692
Reviewed-by: Hirak Biswas <hbiswas@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
2025-07-24 10:19:09 +00:00
Jon Hunter
f01227d4ea drivers: Drop inline from driver remove wrapper
The driver remove function is a function pointer and therefore, it does
not make sense to define the function as an 'inline'. Update the
coccinelle script and drivers to remove the inline statement.

Bug 4749580

Change-Id: Ia03691b75c4edffe609f27468b911a92a5ddbd68
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233980
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:08 +00:00
Sheetal
7d06982db7 ASoC: tegra: Fix Mixer fade status control
"MIXER1 Fade Status" was listing 30 entries but
MIXER has only 10 streams, hence it should show
10 entries. Update the control.

JIRA TAS-2467

Change-Id: I87eeeb64b4a32221ee630ad49c266972501fef96
Signed-off-by: Sheetal <sheetal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3220158
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
2025-07-24 10:19:07 +00:00
Hirak Biswas
4ed4816f4c ASoC: tegra: Add sound card driver name
Set audio card driver name to tegra-ape to avoid KWT errors
on GVS. The name is kept same as on L4T native drivers.

Bug 4755296

Change-Id: Id2e06c95703554119f8a7363a35d0c3041c7168e
Signed-off-by: Hirak Biswas <hbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3207867
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2025-07-24 10:19:07 +00:00
Jon Hunter
951b2423a8 drivers: Fix platform_driver remove for Linux v6.11
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. Update all the impacted drivers
as necessary to fix this.

Bug 4749580

Change-Id: I3bb5c549777f7ccad0e3f870373fdd25726ad7ed
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3182878
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Tested-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-08-11 17:20:34 -07:00
Aditya Bavanari
e7b93be004 ASoC: tegra: Invoke multi instance APIs
- Invoke the new multi instance ADSP OS and app
  APIs in the adsp and virt-alt adsp ASoC drivers.
- Currently, it is hardcoded to get the ADSP0 handle
  and invoke the respective APIs. Multi instance
  support is to be added later in these drivers.

Bug 4606840
Bug 4635899

Change-Id: I6c95693d738a2b77e953195698bfe2cab8f13dba
Signed-off-by: Aditya Bavanari <abavanari@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3145896
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
2024-08-09 21:41:31 -07:00
Sameer Pujar
ea7af586a7 ASoC: tegra: cleanup legacy code
Upstream sound card machine driver is used now and legacy machine driver
is not required anymore. Hence following cleanups are made:

  - Remove legacy machine driver 'tegra_machine_driver.c'.

  - With legacy driver removal many of the APIs in tegra_asoc_machine.c
    are not required. So remove all such APIs and update the header file
    as well.

  - The ASoC utils 'tegra_asoc_utils.c' is not needed after removal of
    legacy machine driver. Remove the corresponding header as well.

  - BW manager support needs to be pushed in upstream and it is needed
    for ADMAIF and ADSP ASoC drivers. The downstream BW manager code
    can't be used by the ADMAIF driver. So remove downstream BW manager
    code and put FIXME item in ADSP driver.

Bug 4596865

Change-Id: Iac154b00759571a5593c3d75bbacbae5a68385e2
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3110862
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-21 16:36:31 -07:00
Dara Ramesh
ee8a8e9853 ASoC: tegra: add adsp audio driver
Added ADSP audio driver support for tegra soc and tegra virt alt.

Below are the changes made with respect to Kernel 5.10:

- Removed the ADSP COMPR DAI links due to differences in compress DAI
  link registration in Android (ACK 6.6) which causes build issues.

- Omitted the callback function for dumping ADMA registers, as the
  upstream ADMA driver does not support it.

Bug 3910602
Bug 4635899

Change-Id: I63ea878ef2e9a960d127d02470e8048535878518
Signed-off-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3132128
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-10 04:30:57 -07:00
Sameer Pujar
33a45472ab ASoC: tegra: Add I2S controls for format/mode
There are test cases in ap_audio, which check for different data
formats and producer/consumer modes for Tegra I2S and external
codec I2S. Add these controls for a full GVS coverage.

Two types of DAI links are handled:

 - Normal/codec2codec DAI links where the DAI mapping is done
   by default between Tegra and external codec I2S. So just
   calling legacy tegra_machine_add_i2s_codec_controls() API
   from override driver is good enough.

 - For DPCM case, the DAIs are not directly mapped and thus
   codec is dummy for Tegra I2S. Hence for this DAPM function
   snd_soc_dapm_dai_get_connected_widgets() is used to find
   the connected codec widget and apply the complementary DAI
   format setting.

Also use this opportunity to cleanup Linux version code check.
It is now recommended to define a macro for the relevant kernel
version and macro name is related to what actually is changing
for a kernel version.

Bug 4451662
Bug 4453772

Change-Id: I881838411af5498e4d7f1dec76b3c11ad05de12b
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3097585
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
2024-04-19 00:18:59 -07:00
Jon Hunter
338d28218c ASoC: tegra: Drop 'oot' suffix for upstream drivers
When booting kernels that have both the upstream and out-of-tree audio
drivers for Tegra present the following errors are observed ...

 Error: Driver 'tegra210-ahub' is already registered, aborting...
 Error: Driver 'tegra210-amx' is already registered, aborting...
 Error: Driver 'tegra186-dspk' is already registered, aborting...
 Error: Driver 'tegra210-mvc' is already registered, aborting...
 Error: Driver 'tegra210-adx' is already registered, aborting...
 Error: Driver 'tegra210-ahub' is already registered, aborting...
 Error: Driver 'tegra210_mixer' is already registered, aborting...
 Error: Driver 'tegra186-asrc' is already registered, aborting...
 Error: Driver 'tegra210-dmic' is already registered, aborting...
 Error: Driver 'tegra210-i2s' is already registered, aborting...
 Error: Driver 'tegra210-admaif' is already registered, aborting...

The problem is that the upstream Tegra audio drivers are loaded first
and then the kernel attempts to load the out-of-tree variants because
they have a different name. The out-of-tree are installed under the
'updates' directory in the file-system and by dropping the 'oot' suffix
from the driver name, then depmod will not attempt to load both variants
of the audio drivers and prioritise loading the drivers in the 'updates'
directory.

Bug 4590647

Change-Id: I6c6fe1eb84bc9fdfa4a8f4abf1ce3a75f3bfba8a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3110266
(cherry picked from commit fc8c410eb6)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3112030
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-11 12:23:35 -07:00
Jian-Min Liu
1dc806cb91 Kleaf: add kernel modules in nvidia-oot
1. Add BUILD.bazel file.
2. Add build target of kernel module and required include folder
   srctree.* in Makefile to fix the build issue
3. The tr (a build tool defined by kleaf in the sandbox) which
   supported by toybox will cause the conversion of header files
   to file_define to fail. Fixed it by separating with two tr
   commands.

Bug 4344670

Change-Id: I56dcc148960f3b7703335943281589f42caa9af7
Signed-off-by: Jian-Min Liu <jianminl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3066225
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-19 06:50:10 -07:00
Sameer Pujar
0332fd555e ASoC: tegra: fix sound card dependency
There is GVS intermittency where few audio tests fail because there is
no APE sound card available. The card registration itself does not
happen because there is kernel data abort and following dump is seen:

 [   36.163223] Unable to handle kernel paging request at virtual address ffffffffffffffc0
 [   36.171180] Mem abort info:
 [   36.171182]   ESR = 0x0000000096000004
 [   36.171183]   EC = 0x25: DABT (current EL), IL = 32 bits
 [   36.171186]   SET = 0, FnV = 0
 [   36.174218]   EA = 0, S1PTW = 0
 [   36.174219]   FSC = 0x04: level 0 translation fault
 [   36.174221] Data abort info:
 [   36.174222]   ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
 [   36.174223]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
 [   36.174224]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
 [   36.174226] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000813b67000
 [   36.174228] [ffffffffffffffc0] pgd=0000000000000000, p4d=0000000000000000
 [   36.174234] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP

This seems to happen because mixer control override driver has the
dependency over the sound card and this dependency check is incorrect.
The attempt is made to register override controls before the sound card
is fully ready.

One option is to use 'card->instantiated' flag to add the dependency.
However this flag update is protected by card mutext and client_mutex
which is local to the core. So this flag check does not appear fully
reliable.

As a safer option, the override device is made child of sound device.
This way the probe order is ensured and override probe happens only
after a successful sound probe. This requires a change in machine driver
to allow probe() happen for child devices. This may be a concern during
usage of upstream machine driver which does not have provision for child
device probing. For now unblock the upstream AHUB usage by using this
safe option and investigate the best option to make the override driver
independent.

Bug 4508166
Bug 4451662
TAS-2251

Change-Id: Ib13f0a3a0ac272a0f2325b9d74efbc31128f0991
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3083180
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-07 21:47:19 -08:00
Sameer Pujar
72ed0ddf9d Revert "Revert "ASoC: tegra: Remove legacy AHUB OOT drivers""
This reverts commit 00c10d965b.
This is done to restore original commit of removing legacy AHUB OOT
drivers as the GVS intermittency issue is now root caused.

Bug 4508166

Change-Id: I0f0f9d34b0c408aa4fec20bc6df25ea23eac1189
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3083108
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-07 21:47:14 -08:00
Sameer Pujar
b0b6f09a6d Revert "Revert "ASoC: tegra: use upstreamed AHUB drivers""
This reverts commit 1d0f4c4ffc.
This is done to restore original commit of using upstreamed AHUB
drivers as the GVS intermittency issue is now root caused.

Bug 4508166

Change-Id: Iae064f8dae4cf79c639f060c3e24bda43a82b201
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3083109
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-03-07 21:47:09 -08:00
Sameer Pujar
1d0f4c4ffc Revert "ASoC: tegra: use upstreamed AHUB drivers"
This reverts commit 363a679975.
This is done to unblock gvs intermittency of audio test and
kernel warning test failure.

Bug 4508166

Change-Id: I99e2b879c7ba1c7987d859b4ae9fce0ea317e41e
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3082636
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Shubham Chandra <shubhamc@nvidia.com>
2024-02-23 08:27:14 -08:00
Sameer Pujar
00c10d965b Revert "ASoC: tegra: Remove legacy AHUB OOT drivers"
This reverts commit 289095dfc6.
This is done to unblock gvs intermittency of audio test and
kernel warning test failure.

Bug 4508166

Change-Id: I989c0467fb5f2d962fb980085a1652df892128f6
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3082635
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Shubham Chandra <shubhamc@nvidia.com>
Reviewed-by: Shubham Chandra <shubhamc@nvidia.com>
2024-02-23 08:27:03 -08:00
Sameer Pujar
289095dfc6 ASoC: tegra: Remove legacy AHUB OOT drivers
Most of the AHUB module drivers are already upstreamed and there are
alternate ways to have the same feature parity with the legacy OOT
drivers. Thus there is no need to maintain the legacy OOT drivers
going forward. This commit removes all AHUB drivers which are already
in upstream and the same have been enabled as a default choice for
Terga234 and later chips.

Removal of OOT versions of upstreamed drivers resulted in following
build errors:

  - AFC, IQC and machine driver include "tegra210_ahub.h". Due to
    the removal of AHUB driver, the header is not found. It is found
    that there is no actual dependency for these drivers on the AHUB
    header.

    Fix this by just removing the header inclusion.

  - ARAD driver has dependency on ASRC driver for few helper functions.
    Upstream ASRC driver does not expose these helpers yet, because
    these are only required by ARAD module and all of these should go
    together for upstream.

    Fix this build error by guarding the header 'tegra186_asrc.h'
    under macro 'CONFIG_SND_SOC_TEGRA186_ASRC_WAR'. The helper function
    calls in ARAD driver are guarded under the same macro and this macro
    is not enabled. This may leave ARAD broken with upstream ASRC driver
    which is fine since there is no ARAD productization yet and this
    will be taken care in bug 4432184.

Bug 4451662
Bug 4432184
TAS-2251

Change-Id: I5aa9ee1ae5ce58f3db8910f7e940dd2980da163a
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3074654
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: Sheetal . <sheetal@nvidia.com>
Reviewed-by: Manoj Gangwal <mgangwal@nvidia.com>
Reviewed-by: Aditya Bavanari <abavanari@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-20 18:40:09 -08:00
Sameer Pujar
363a679975 ASoC: tegra: use upstreamed AHUB drivers
There is plan to use OOT machine driver with upstream AHUB drivers
as a first step in alignment with upstream drivers. The machine driver
will be taken up after this.

To allow usage of upstream AHUB drivers, make following changes:

  - Update OOT PCM override driver to work with codec2codec links
    as well. Note that PCM override controls in the module drivers
    were rejected in upstream and it is one of the major differences
    between upstream and OOT AHUB drivers.

  - Register dummy DAI to use with I/O DAP DAI link. Exposure of
    dummy DAIs was not encouraged in upstream from the I/O module
    drivers. The codec2codec I/O links require a codec to be present.
    Hence expose dummy DAI from machine driver and use the same in
    I/O DAI links.

Bug 4451662
TAS-2251

Change-Id: If6904073eca29167620bf5d273cdcd306196f6ba
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3059819
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-02-20 18:40:04 -08:00
Jon Hunter
ab65399274 drivers: Fix missing headers for Linux v6.8
For Linux v6.8, commit ef175b29a242 ("of: Stop circularly including
of_device.h and of_platform.h") updated the OF headers included by these
header files. This breaks the build for various drivers and so fix this
by including the headers that are actually needed for each driver.

Bug 4448428

Change-Id: Ia40ab13f865d5631c96855ecc49145848f99c996
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3032442
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
2024-01-25 09:11:21 -08:00
Sameer Pujar
2a68fff8b8 ASoC: tegra: Add driver for DAI PCM overrides
Tegra audio uses multiple ASoC components in an audio path. In doing
so, each component may require a separate set of DAI PCM configurations.
Presently this is facilitated by exposing mixer control overrides from
each of the component drivers to override sample rate, channels or bits.

Above satisfies our needs. However this type of solution is rejected by
upstream maintainers. The suggestion is to not bypass the configurations
passed by ASoC framework via hw_params() calls.

With kernel OOT model gaining momentum in downstream, we are stuck with
partially upstreamed drivers where above mentioned feature is an
important missing item.

This commit adds a new driver to override DAI PCM parameters. Idea is to
use this as an OOT driver and insmod it for our downstream applications
or for testing.This comes with few limitations, mentioned below, which
is fine looking at the overall requirements.

  - Client overrides are not possible for AHUB internal modules. This is
    because DAI hw_param() call can carry one configuration and thus
    both XBAR and client setting overrides are not possible.

  - No overrides are provided for ADMAIF. The client configuration is
    passed by aplay/arecord applications and DAI hw_param() call carries
    the same.

  - The DAI overrides need to be set every time before any use case and
    these are not persistent. This is because when an use case ends ASoC
    core clears DAI runtime settings. If necessary, it can be improved
    later by storing all DAI settings in the driver.

This driver is intended to be used on both DPCM/DAPM solutions.

Bug 3583581

Change-Id: Ia05316a10eb9c298f2a56d2ef3ccaa37c5985ddd
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Signed-off-by: Sheetal <sheetal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3043569
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-15 09:01:45 -08:00
Laxman Dewangan
350a86106e sound: Use conftest to find if snd_soc_dai_ops has probe callback
Use conftest to find if struct snd_soc_dai_ops have the probe()
callback or not. In Linux 6.5, commit 516ee7009ff20 ("ASoC:
tegra: merge DAI call back functions into ops") added probe()
callback into the struct snd_soc_dai_ops.

Bug 4346767

Change-Id: If292f10d6e52a2cf80c7700ff7aba5805041531f
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028743
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-07 18:21:11 -08:00
Mohan Kumar
a9562a1c27 ASoC: tegra: avoid enabling aud_mclk during init
Enabling the aud_mclk clock during initialization of drivers
was done for T30 chip due to some external dependencies, now
it is not required for latest version of chips and also due
to this aud_mclk is kept always ON. Add check to avoid enabling
aud_mclk clock other than T30

Bug 4373898

Change-Id: If341b1b73051c5572c5551bf6d4659fab7a116d2
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3015891
(cherry picked from commit 7ffd0c9cfa)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3019489
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-12-07 07:53:53 -08:00
Laxman Dewangan
3013b107c1 sound: soc: Use conftest to find if asoc_simple_xxx renamed
In Linux v6.7, commit b5a95c5bf6d69 ("ASoC: simple_card_utils.h: convert
not to use asoc_xxx()") add new APIs to convert asoc_simple_xxx() to
simple_util_xxx().

Use the conftest to find if soc_snd_util_xxx() present.

Bug 4346767

Change-Id: I3b282eb08d51c997760cc0b9752438c94e3caae5
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028578
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-06 22:43:00 -08:00
Laxman Dewangan
e225408ff7 sound: Use conftest to find if snd_soc_xxx() present
In Linux 6.7, with change
commit 1d5a2b5dd0a8d2b2 ("ASoC: soc.h: convert asoc_xxx() to snd_soc_xxx()")
asoc_xxx() calls are replaced by snd_soc_xxx() calls.

Use conftest to findout this change.

Bug 4346767

Change-Id: I8cd5ac5a5befa83c139dbf8f6253840a97c1d4be
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028577
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-12-06 22:42:49 -08:00
Laxman Dewangan
36d1775879 sound: soc: Avoid uses of asoc_xxx()
From Linux 6.7, the asoc_xxx() is replaced by the various
function. Use the appropriate functions.

***
commit 1d5a2b5dd0a8d2b2b535b5266699429dbd48e62f
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

    ASoC: soc.h: convert asoc_xxx() to snd_soc_xxx()

Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

    ASoC: simple_card_utils.h: convert not to use asoc_xxx()

***

Bug 4346767

Change-Id: Ie3945f3997d745df8223fd31c1386a3db44e6ceb
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3019997
Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-11-23 11:09:22 -08:00
Laxman Dewangan
007b4eb4ae sound: soc: Add support to build with Linux 6.6
Moving the probe of DAI inside the ops based on change
done as follows:
----
commit 516ee7009ff20eb3f73a64a1fe2ffe10997696e6
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date:   Tue Aug 8 22:56:58 2023 +0000

    ASoC: tegra: merge DAI call back functions into ops

    ALSA SoC merges DAI call backs into .ops.
    This patch merge these into one.

    Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
    Link: https://lore.kernel.org/r/874jl9b0sl.wl-kuninori.morimoto.gx@renesas.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
-----

Change-Id: I2b4b8604a37cffbe9e1cc6af85f3443780d227ab
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3007245
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
2023-11-01 08:59:56 -07:00
Jon Hunter
59b14ea0b8 ASoC: tegra: Avoid kernel version checks
Rather than using kernel version checks to determine which kernel APIs
to use, add the necessary tests to the conftest script to determine
which kernel APIs are present in the kernel.

Note that the function snd_soc_dai_init_dma_data() has been present
in the Linux kernel since v3.13 and so use this for all kernel versions.
In Linux v6.3, the 'playback_dma_data' and 'capture_dma_data' members of
the snd_soc_dai_driver structure were replaced and so these could no
longer be set directly. However, the arguments to
snd_soc_dai_init_dma_data() have not changed and so can be used for
older kernels and well has the current.

This is beneficial for working with 3rd party Linux kernels that may
have back-ported upstream changes into their kernel and so the kernel
version checks do not work.

Bug 4221847

Change-Id: Ibac0c6bab78e93f03981dfe3d1b2025ea19d4c92
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2993795
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-10-12 20:29:24 -07:00
Jon Hunter
f926a58dd1 ASoC: tegra: Fix build for Linux v6.5
In Linux v6.5, the arguments to the function snd_soc_of_get_dai_name()
were updated and this is causing the Tegra ASoC machine driver build to
fail. Add a new test to the conftest script to check the arguments for
snd_soc_of_get_dai_name() and use the definition generated by the
conftest script accordingly.

Bug 4221847

Change-Id: I32772da12ab59eb09e2f9d8bc66471d859201f8e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2990531
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-10-07 13:04:11 -07:00
Jon Hunter
2cc58560db ASoC: tegra: Fix build for Linux v6.4
In Linux v6.4, the 'params' member of the snd_soc_dai_link was replaced
with the 'c2c_params' member. Add a new test to the conftest script that
checks if the 'c2c_params' structure member is present and use the
definition created by conftest to select which structure member is used.

Bug 4221847

Change-Id: I7ebb4187fd1cd70097bf65409bda3b2a6830a303
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2989731
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-10-07 13:03:26 -07:00
Sameer Pujar
1e35fdd8c5 ASoC: tegra: Align with upstream DT for compatible and clock name
It is nice to have downstream DTB working well with upstream kernel
drivers. This gives a flexibile option for users to choose between
out-of-tree and upstream audio drivers by selectively adding either
of these to deny list.

For clock PLLA_OUT0, upstream DT uses 'plla_out0' clock name where
as downstream uses 'pll_a_out0'. So aligning with upstream DT makes
probe to fail. Thus update the clock name in driver to match upstream
DT bindings.

The sound DT supports compatibles to either work with upstream or
downstream machine drivers. Earlier the source 'tegra_codecs.c' was
modified to make it potentially usable for upstream machine driver
as well and thus it has upstream compatible checks. This check is
now replaced with a flag which is known to be set only during
upstream machine driver probe.

Bug 4119612

Change-Id: Icd5d97343029e35a5702ff4dc527881fb9277346
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2948525
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-08-10 00:33:15 -07:00
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