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>
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>
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>
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>
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>
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>