712 Commits

Author SHA1 Message Date
Asha Talambedu
b4b4cc0717 ASoC: tegra: Handle adsp OS start crash
In case of nvadsp_os_start crash, the host adsp audio driver
is still getting registered and this is leading to kernel
panic during shutdown. Added code to propgate start status to
probe so host adsp audio driver register fails on adsp os crash

Bug 3391964

Change-Id: I361c1a1a0409e81ddfce2413debe63ba5d65d07d
Signed-off-by: Asha Talambedu <atalambedu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2627904
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-09-29 15:50:28 +05:30
Sheetal
99eec7ce60 ASoC: tegra: Fix mbdrc driver issues
- MBDRC status register should be defined as volatile.

- MBDRC master volume control was not working for
  expected volume range. Updated the control so that it can
  work for -256dB to 255dB gain. Control can take values
  from 0 to 512 that is mapped to -256 to 256dB. The dB
  info is added as metadata of control.

  kcontrol defination will look like below:
    amixer -c 1 cget name='OPE1 mbdrc master volume'
    numid=1187,iface=MIXER,name='OPE1 mbdrc master volume'
    ; type=INTEGER,access=rw---R--,values=1,min=0,max=512,step=0
    : values=256
    | dBminmax-min=-256.00dB,max=255.00dB

Bug 200753407

Signed-off-by: Sheetal <sheetal@nvidia.com>
Change-Id: I707a89074342083b71f906f15ead243ee317a43b
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2601115
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>
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
Asha Talambedu
719434d072 AsoC: tegra-alt: Update i2s rate setting logic
Earlier hardcoded pll base rates were leading to fractional divider
values for i2s multichannel config while deriving i2s bclk.
Hence updated clock rates and logic  for >2 channel configs for t186ref
and higher boards such that the dynamic range between max plla and min plla
is < 35 MHz. Also, if desired bclk is above limit, the case will be
declared as not supported. Note that new facility will be used only in l4t
machine driver.

Bug 200702569

Change-Id: I83aba425f6dde30a1f29f85b16a1bbbebba14198
Signed-off-by: Asha Talambedu <atalambedu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2491744
(cherry picked from commit e0fe51d5e7ced073eb618e19836f88a023f70bdc)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2613507
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-09-29 15:50:28 +05:30
Asha Talambedu
39cc4081e3 ASoC: tegra: Add shutdown callback
- Added mutex protection for init_done flag reads in
  mixer control callbacks relevant to "ADSP init". Otherwise
  during shutdown sequence that includes alsa store service,
  this leads to inconsistent behaviour
- Shutdown callback is added to deinit ADSP OS during
  abrupt shutdown.
- In case ADSP OS is crashed during boot/boot has not
  started yet, shutdown does not issue OS deinit as
  init is not complete yet

Bug 3391964

Change-Id: I207e2141af9386f5914e07a8dd231d0fcd803a6e
Signed-off-by: Asha Talambedu <atalambedu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2607727
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-09-29 15:50:28 +05:30
Sameer Pujar
9d520f3d07 ASoC: tegra: Don't deprecate master volume control
There was a plan to deprecate master volume control since it was thought
that per channel control will be sufficient and master volume application
can be emulated in user space by programming same volume to all channels.
But this means we would not really use a HW feature which has a provision
to automatically apply CH0 volume settings to all remaining channels.

HW has a per channel control bit, based on which it decides to apply a
channel specific setting or a common setting across all channels. Driver
has both master volume and per channel volume mixer controls. Based on
the control user updates, enable or disable the per channel control.

Use below scheme for volume updates:

 * If master volume mixer control is updated, disable per channel control
   and only CH0 volume register is programmed. SW can store same volume
   across all channels.

 * If a channel specific control is updated, enable per channel control
   and program specific channel volume register.

Above applies to mute/unmute functions as well and thus corresponding
control blocks are similarly updated.

The volume settings are stored in SW and the same is used for the user
space queries via mixer controls. But mute settings are not stored in
SW and are always directly read from HW since it belongs to a volatile
register. The mute control read function is modified to return proper
settings when queried from user space.

Bug 200766084

Change-Id: Iad8b5c09c424731e841863bfd5ce32d07ff9e684
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2599601
Reviewed-by: Sheetal . <sheetal@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Asha Talambedu <atalambedu@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@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
Sameer Pujar
042747e4d8 ASoC: tegra: DAI link params support from DT
In current production software we support DAI link params from DT.
This is useful when operating Tegra in hostless mode, where params
(sample rate, channels and sample format) passed from DT are applied
to the DAI links. In this way DT can provide control to operate DAI
links in a required config.

For dev-main it was on hold since there was plan to use upstream
machine driver where upstream bindings can provide similar control.
Since this feature is required for a near customer release, it is
now ported to the dev-main driver.

Bug 200713904
Bug 200775355

Change-Id: I333cc60addc26ffc433f08b410fa076dc102282e
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2594849
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@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
Sheetal
f9f0e26a20 ASoC: tegra: Memory leak due to BE HW constraint
- The issue was happening because dapm core was not deallocating
  the hw contraints rules memory.
  Memory leak backtrace from cat /sys/kernel/debug/kmemleak:
    [<0000000046fdaf4f>] slab_post_alloc_hook+0x6c/0x3e0
    [<00000000989dfc0e>] __kmalloc_track_caller+0x1b8/0x400
    [<00000000505e39ec>] krealloc+0xe8/0x160
    [<000000009cc82a21>] snd_pcm_hw_rule_add+0x164/0x1a0
    [<00000000aa77851e>] snd_pcm_hw_constraint_list+0x28/0x30
    [<000000009b2cd5c6>] tegra210_ahub_write_ram+0xa8/0xb60
    [<00000000a61d7069>] snd_soc_dai_startup+0x40/0xa0
    [<00000000a7452879>] snd_soc_dai_link_event+0x334/0x600
    [<000000008c5771de>] dapm_seq_check_event+0x120/0x330
    [<00000000be740a3d>] dapm_seq_run_coalesced+0xb0/0x250
    [<0000000003732007>] dapm_seq_run+0xf0/0x510
    [<00000000cbb85eb0>] dapm_power_widgets+0x58c/0xac0
    [<00000000b96c5548>] snd_soc_dapm_stream_event+0x128/0x170
    [<0000000027bb14bc>] soc_pcm_prepare+0x70/0x110
    [<00000000d44b9075>] snd_pcm_do_prepare+0x34/0x50
    [<000000005664d4d5>] snd_pcm_action_single+0x4c/0xa0

- For BE dais HW constraints won't take any impact and only for FE
  dais it is required. So added it in component driver open callback.

Bug 200773796

Signed-off-by: Sheetal <sheetal@nvidia.com>
Change-Id: Ic4c1bf881b914bda03bda8e97816cf1c6dee4052
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2596443
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@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>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:50:28 +05:30
sheetal
78f655e85e ASoC: tegra: Add support for 24KHz and 64KHz rate
- Fix the issues with 24KHz and 64KHz sample rate.
- In machine driver, 24KHz and 64KHz were not supported, add
  the rates into the list.
- 24KHz is not supported by ALSA, to support it mentioned dai rates
  as SNDRV_PCM_RATE_KNOT. Using KNOT chip can support unconventional rates,
  defined in hw constraints list.
- The change is added for FE links only,  for BE links its not required as
  it will be taken care by FE links.

Bug 200757915

Change-Id: I348368420316ba78b303cd27a413048b6cab2dd7
Signed-off-by: sheetal <sheetal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2571687
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:50:28 +05:30
Mohan Kumar
85258fddea ASoC: tegra: Add support for S24_LE format
Add support for S24_LE format for all internal and IO AHUB
modules.
- Make the data to be S32_LE internal to AHUB modules.
- Conversion from 24 to 32 or vise-versa will happen at ADMAIF, or
at the IO modules CIF to maintain consistency across modules.

Bug 200755886

Change-Id: I175e4177ec76baf7ead9b89276a70a4b454756fa
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2578280
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-09-29 15:50:28 +05:30
Mohan Kumar
d3352a5e41 ASoC: tegra: xbar widgets for T234
Due to removal of SPDIF and SPKPROT HW IP, the xbar
switch register offset for few modules changed compared
to previous chip.

Bug 200762074

Change-Id: I7733a7d6db8d70b164d07e1b9668da3d342633d7
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2575517
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@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>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-09-29 15:50:28 +05:30
Mohan Kumar
30b5703537 ASoC: tegra: Add t234 chip check in asoc util
Add t234 chip compatible check in tegra asoc util file

Bug 200755886

Change-Id: Iecf59cf78c8359b86668fcbaf4bdb5bd50b49271
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2572441
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@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>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-09-29 15:50:28 +05:30
Sameer Pujar
ae473fa8b4 ASoC: tegra: OPE DAPM path uses wrong regmap
OPE enable is not happening even though the DAPM path is complete.
This seems to happen because ASoC core does not use correct regmap
interface for the DAPM route listed by driver. The driver makes use
of multiple regmap interfaces (one each for OPE, PEQ and MBDRC).
The core populates component regmap using dev_get_regmap(), which
actually returns the last registered interface in the OPE driver
probe() call.

Since the same callback function is not available in later versions
of kernel for component driver, use component probe() call to setup
the regmap.

Bug 200750067
Jira EMA-393

Change-Id: Ib509a9f95f4c152c2210f88975a1f7572d79ba08
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: http://git-master/r/1318570
(cherry picked from commit 545ee019fc4a7c5b0b92a488cd3d16dbbcefbba9 in
partial and updated logic for it to work on newer kernel)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2558375
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sheetal . <sheetal@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: Sheetal . <sheetal@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-09-29 15:50:28 +05:30
Sameer Pujar
42782c7dcd ASoC: tegra: Provision for fixed PLL config
Tegra Audio HW subsystem has many I/O module instances and currently a
single PLL source is used for all these modules. Any I2S configuration
is supported now by dynamically updating PLL base rate. But as of today
this has few limitations.

  - AUD_MCLK factor is not considered while updating PLL base rate.

  - Two module instances can request conflicting PLL base rate and
    the last request overrides existing session. This would also mean
    simultaneous 8x and 11x configurations are not possible.

  - Tegra210 has problems with specific PLL requests.

Multiple PLLs would be required if concurrent audio sessions need to be
supported and dynamic rate update is needed to support any configuration.
But this has few limitions too.

  - Since number of available PLLs for modules are limited, specific PLL
    cannot be dedicated to a module. The PLL would be shared and may
    cause problems when there are simultaneous conflicting requirements.

  - Logic for runtime distribution of PLLs to modules and rate updates
    has to be managed in module drivers only as machine driver does not
    have intelligence to know for which audio path exactly the hw_param()
    call comes. This can make the code complicated and buggy where each
    module driver tries to control specific PLL.

Instead the problem can be simplified by fixing PLL rates in DT. User
can employ one or more PLLs to realize their design. Of course this won't
support all configurations simultaneously since this is not what users
require generally. They have specific requirements which can be addressed
via DT configurations. For example,

  - Some users may use single PLL and decide on compatible set of audio
    configurations for their use cases.

  - Some users may want to use two PLLs, one each for 8x and 11x. Then
    via DT specific modules can use specific PLL sources to realize
    simultaneous 8x and 11x configurations. In fact two PLLs can be
    used when there are conflicting requirements which cannot be met
    by a single PLL source.

To realize above add new DT property "fixed-pll" and bypass PLL rate
updates from the driver. Users can populate this in their platform
sound DT node, whenever static configurations are preferred.

Bug 200726704

Change-Id: I0416f201fd26c49bb6c09594d86394c46a0bbad2
(cherry-picked from commit 0c84a3fe1e2e40d20ddb449a948da6fdebd85efe)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2548361
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Change-Id: I51d5b502f728baee2d6d075951dc186503cbf76f
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2556536
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:50:28 +05:30
Sameer Pujar
d36392a61a ASoC: tegra: Parse DAI format using core API
The simple-card helper asoc_simple_parse_daifmt() expects "bitclock-master"
and "frame-master" DT properties in DAI link node with phandle references
or supports legacy style in codec subnode. Current platforms describe these
properties in DAI link subnode which are not in expected style and thus
these are not taking any effect.

It can be addressed by updating platform DT files. But since audio-graph
is planned in future, it is simpler to keep current bindings as they are
and just fix driver to work with current style. This can be achieved by
using ASoC core helper, instead of simple-card helper, for parsing the DAI
format.

Bug 200749671

Change-Id: I86564321bb41344ef9d5c1c26aeaf363e67cc666
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2556106
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-09-29 15:50:28 +05:30
Mohan Kumar
cd65fe9fd2 ASoC: tegra: fix mbdrc out of bound warning
UBSAN tool reporting shift out of bound warning during the
boot for mbdrc driver. Used 64 bit variable to avoid issue,
but still it reporting issue which got reslved after typecasting.

Bug 200750363

Change-Id: I4f3cfc8aded4b9d4ac18af76888389adbfafe411
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2556009
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:50:28 +05:30
sheetal
1f4d0af515 ASoC: tegra: Fix ASRC SLCG and CIF registers
- SLCG should be enabled by default. Update the default value
  to 1.
- RXCIF and TXCIF registers client bit field is RO, should
  not be modified by driver to some other value other than
  5 (i.e. 24bits)

Bug 200683609

Change-Id: I42a96ff20b4952e5faca61a9bf3e3b1fa61a92d2
Signed-off-by: sheetal <sheetal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2548114
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:50:28 +05:30
Mohan Kumar
cc172ee03a ASoC: tegra: fix mbdrc driver
UBSAN tool reporting shift out of bound warning during the
boot for mbdrc driver. Use 64 bit variable to avoid issue.

Bug 200683609

Change-Id: I53808224584fc52614fd957eef371911f7dd144e
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2554092
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@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
Sameer Pujar
d940c0e813 ASoC: tegra: Generic compatible names for driver
The tegra_machine_driver.c now is a generic machine driver which is used
with multiple Jetson platforms and audio cards. Hence get rid of strings
like 'mobile' or 'rt565x' which are misleading in terms of usage domain.

Bug 200717065
Bug 200739452

Change-Id: Ifc2a5bf238cc222ca23681a9764809f6afb2de87
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2545307
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Asha Talambedu <atalambedu@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@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
Sameer Pujar
d0c00ff0a7 ASoC: tegra: Explicit driver name for sound card
This is inspired from following upstream commit:
https://lore.kernel.org/r/20210330180657.1867971-1-thierry.reding@gmail.com

For consistent audio configuration files between downstream and upstream
this change is required in downstream sound card driver as well.

Bug 200717065
Bug 200739452

Change-Id: Ibe37c0c892ab169eb9cf6fcf85015f22c4c7b658
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2545304
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@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
sheetal
47e3d32fc0 ASoC: tegra: Add MVC Bypass support
- Add "MVC Bypass" kcontrol to enable MVC Bypass
  mode.
- The change is required to verify MVC bypass mode
  during bring up.

Bug 200683609

Change-Id: Ic0f2c947fa2e9bd6e9b429b86ff35e053775ec80
Signed-off-by: sheetal <sheetal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2546568
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: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:50:28 +05:30
sheetal
9e4c08a7c2 ASoC: tegra: Update PLLA base rate for x8KHz
This change is decided as per Bug (Bug 200702569) and
it will keep the range for all channels within 35MHz.
Adding same change to make automation script to work.

Bug 200683609

Change-Id: Ibba3847133d643c0132e8660a8ae21c7383a8afd
Signed-off-by: sheetal <sheetal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2536432
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@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: Asha Talambedu <atalambedu@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:50:28 +05:30
Sameer Pujar
ae9fe52e1e ASoC: tegra: External codec setup in Tegra audio graph card
Tegra platforms support multiple external codecs which in some cases
require initial setup or runtime setup. Since common machine driver is
used, it uses DAI link names passed from DT to apply specific settings.
Use the same logic for Tegra audio graph card driver as well. In doing
so separate out codec setup part and move the same to tegra_codec.c
source file. This is reference in current downstream machine driver
and future Tegra audio graph card driver.

Going ahead alternate solution need to be identified to avoid dependency
on DAI link names. Upstream generic audio graph driver does not support
such method and passing DAI link names from DT won't be entertained in
upstream.

Bug 200692799

Change-Id: I40d134e89405fd8bb2d9aebfe2bce82816b545bd
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
2022-09-29 15:50:28 +05:30
Sameer Pujar
b754b2459e ASoC: tegra: Populate non_legacy_dai_naming flag for codec components
The simple-card or audio-graph-card mark the DAI links as codec2codec
if all the components in a link have "non_legacy_dai_naming" flag set.
Thus populate this flag for all codec components.

Bug 200692799

Change-Id: Iaf7a030a0603034a1c594b9952bd8dbcf0551ef8
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
2022-09-29 15:50:28 +05:30
Asha Talambedu
a740b0f4eb ASoC: tegra: Per channel vol/mute support
Per channel volume/mute control is possible with MVC
and the support is enabled through mixer ctrls for volume
settings of each channel and per channel mute mask
while retaining previous Mute and Vol controls.
Eventually Mute and Vol would be deprecated

Bug 200532059

Change-Id: I7c731276cfc6df7d268e398215d18a978213e521
Signed-off-by: Asha Talambedu <atalambedu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2400678
(cherry picked from commit 74eaf197c10db33631b574c1c3ac8cce82af925a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2535583
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:50:28 +05:30
Sameer Pujar
b80b630e1d ASoC: tegra: Rename mixer controls of Mixer driver
Similar to upstreamed AHUB drivers, follow standard naming convention
for mixer controls used in Mixer driver. Thus update channel related
mixer controls.

Bug 200698314

Change-Id: I3d8ab06df7361a0d2bf8a732595fc1e1c8063c5d
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
2022-09-29 15:50:28 +05:30
Sameer Pujar
70cfefd042 ASoC: tegra: Cleanup macros in Mixer driver
Remove unused macros in Mixer driver and use shorter names for
remaining macros wherever possible. This makes code look relatively
compact and cleaner.

Bug 200698314

Change-Id: I0fd188413222acf3483b596380699272514bdf4b
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
2022-09-29 15:50:28 +05:30
Sameer Pujar
5604eb841f ASoC: tegra: Rename AMX/ADX mixer controls
Similar to upstreamed AHUB drivers, follow standard naming convention
for AMX/ADX mixer controls. Thus update channel mixer controls.

Bug 200698314

Change-Id: If1e2252392493435203e28cb9b232a8fcdf7fadc
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
2022-09-29 15:50:28 +05:30
Sameer Pujar
43b4285832 ASoC: tegra: Cleanup macros in AMX/ADX driver
Remove unused macros in AMX/ADX driver and use shorter names for
remaining macros wherever possible. This makes code look relatively
compact and cleaner.

Currently in AMX driver, Tegra210 regmap readable/writeable_reg()
callbacks use Tegra194 specific register range. As this looks
incorrect, maintain separate callbacks for readable/writeable_reg()
for Tegra210 and Tegra194. Use register range in these callbacks
to make it compact.

Bug 200698314

Change-Id: Iae466da9aaef722736ccaf49a490a3b24b6d683a
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
2022-09-29 15:50:28 +05:30
Sameer Pujar
72643a1be8 ASoC: tegra: Rename MVC mixer controls
Similar to upstreamed AHUB drivers, follow standard naming convention
for MVC mixer controls. Right now there is no requirement to have
separate channel or bit format controls on input/output and AHUB/client
side. Single channel or bit format control is used for all. Hence rename
bit format control to look consistent with channel control.

Bug 200698314

Change-Id: I76976823d03ef3e3a47346aa928c11f9b26052c6
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
2022-09-29 15:50:28 +05:30
Sameer Pujar
48bff81383 ASoC: tegra: Cleanup macros in MVC driver
Remove unused macros in MVC driver and use shorter names for remaining
macros wherever possible. This makes code look relatively compact and
cleaner. Also provide separate callbacks for readable/writable_reg()
and use register ranges for case statments.

Bug 200698314

Change-Id: Ia61a824fce5531b74b67b6ebf8e5216c7a982c17
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
2022-09-29 15:50:28 +05:30
Sameer Pujar
8c768c53df ASoC: tegra: Rename SFC stereo conversion strings
As per upstream suggestion (on upstreamed AHUB drivers), rename
following srings:
 'ZERO' -> 'Zero'
 'COPY' -> 'Copy'

Bug 200698314

Change-Id: I62ff2f370f505e8811b4405e4a6dc033ba791bc3
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
2022-09-29 15:50:28 +05:30
Sameer Pujar
99d23f60af ASoC: tegra: Use runtime PM get/put() on SFC device
SFC driver performs runtime PM operations on the parent device of SFC.
This is not necessary as runtime get/put() calls on the SFC device itself
would be sufficient. Because SFC device is child of AHUB device and
resuming child would resume parent device as well. This does not fix any
functional issue, but just makes code more easy to read.

Bug 200698314

Change-Id: Ia4ce4b45b8681d2db15af96f61433643dd4f3916
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
2022-09-29 15:50:28 +05:30
Sameer Pujar
9f635d7089 ASoC: tegra: Cleanup macros in SFC driver
Remove unused macros in SFC driver and use short names for remaining
macros by dropping 'AXBAR' characters from the name. This is similar
to what is done for other upstreamed AHUB drivers. This makes code to
look relatively compact and cleaner.

Bug 200698314

Change-Id: Ib30a482105f3b4864e14647b253f670a10f9030d
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
2022-09-29 15:50:28 +05:30
Sameer Pujar
121433e898 ASoC: tegra: Rename SFC mixer controls
Similar to upstreamed AHUB drivers, follow standard naming convention
styles for SFC mixer control names. Also put all get() operations under
a single function for a better readability. Do the same for put()
operations as well.

Bug 200698314

Change-Id: I4d0b1ad569b8845f137117caf75afb36c625cdd4
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
2022-09-29 15:50:28 +05:30
Sameer Pujar
576a3a348a ASoC: tegra: Simplify various API usage (Tegra210 and later)
Some of the upstream comments on intitial driver upstream phase were
generic and are equally applicable to remianing set of drivers. Thus
following changes are made based on this:

  - Remove explicit of_match_device() from drivers which don't have to
    maintain chip specific data.
  - Replace both platform_get_resource() and devm_ioremap_resource() with
    a single API devm_platform_ioremap_resource().
  - Use devm_snd_soc_register_component() and re-order pm_runtime_enable()
    in probe() function. The remove() path need not explicitly unregister
    the component.
  - Use 'err' variable instead of 'ret' for function returns and error
    checking.
  - Remove explicit runtime_suspend() call from remove() path.
  - Use consistent error print patterns across drivers
  - Some cosmetic changes

Bug 200698314

Change-Id: Id53420aab863062d7a5cf4aa5171b1af038ce83f
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
2022-09-29 15:50:28 +05:30
Sameer Pujar
b32bd99824 ASoC: tegra: Trivial cleanup (Tegra210 and later)
This performs following trivial cleanup:
  - Remove explicit THIS_MODULE assignment in platform_driver struct.
  - Remove DRV_NAME macro and assign the name directly in platform_driver
    struct.
  - Add SPDX-License-Identifier to header files
  - Sort header file inclusions

Bug 200698314

Change-Id: Ic1e2166b6a8257cd3b462cc8b2a9719e25c7bbb8
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
2022-09-29 15:50:28 +05:30
Sameer Pujar
12f7c17644 ASoC: tegra: Make AUD_MCLK an optional clock
Currently AUD_MCLK is controlled by kernel driver and it remains active
as long as an audio use case is running. This is the case most platforms
or audio codecs require. But some external codecs, depending on specific
platform, may want AUD_MCLK clock to be running always and do not require
a runtime control. Since kernel is common, we need a provision in DT to
differentiate both of the above requirements.

This can be achieved by making AUD_MCLK clock an optional property.
Platforms which don't require kernel control can simply exclude AUD_MCLK
clock entry. Respective call in kernel will not have any effect.

Note: We are using upstream utils driver now and update the references
wherever applicable. The changes need not be considered for upstream
because there is plan to use audio-graph-card based driver for Tegra210
and later, which already treats AUD_MCLK clock as optional. Thus no
explicit AUD_MCLK management is necessary. Also it is recommended that
codec driver should take the control of AUD_MCLK. Hence current change
is needed till mentioned transition happens.

Bug 200694208

Change-Id: I87e496515e02db4ded6209a336f6cfbaec034fa1
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2474868
(manually cherry picked from commit 8b2965341c1611b5984ff412f1d5001673396476)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2518783
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-09-29 15:50:28 +05:30
Bitan Biswas
c69eaecfd0 sound: tegra: isomgr: fix external profile build
Fix l4t k5.10 external profile build errors in isomgr

bug 200705253

Change-Id: I59fed5a5dbd31d5167a4d995bbc41d21d9e55dea
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2503928
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Manish Bhardwaj <mbhardwaj@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
Sameer Pujar
d4d56e2908 ASoC: tegra: Expose ack() callback for component
On later kernels 'snd_pcm_ops' structure is removed from the
'snd_soc_component_driver' and instead explicit callbacks were
provided in the component driver structure. In doing so ack()
callback was left out for PCM interface. This was probably
intentional because there are currently no users for this
callback in upstream.

But in downstream we have ADSP audio driver which relies on
this callback to communicate buffer positions with ADSP and
currently DMA transfer is not happening due to missing ack()
callback. Issue is fixed by exposing ack() callback from the
core.

Bug 200568556

Change-Id: I76e9fcf21e087bb2c470868a2bd1eb668345e382
Reported-by: Asha Talambedu <atalambedu@nvidia.com>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.9/+/2414392
Tested-by: Asha Talambedu <atalambedu@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Asha Talambedu <atalambedu@nvidia.com>
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2022-09-29 15:50:28 +05:30
Sameer Pujar
e834adbfba ASoC: tegra: Fix build warnings in ADMAIF driver
Following build warnings have popped up after 'is_isomgr_client' flag
is cleaned up from the ADMAIF driver.

  tegra210_admaif.c: In function ‘tegra_admaif_prepare’:
  tegra210_admaif.c:271:23: warning: unused variable ‘admaif'
    struct tegra_admaif *admaif = snd_soc_dai_get_drvdata(dai);
                       ^~~~~~
  tegra210_admaif.c: In function ‘tegra_admaif_shutdown’:
  tegra210_admaif.c:281:23: warning: unused variable ‘admaif’
    struct tegra_admaif *admaif = snd_soc_dai_get_drvdata(dai);
                       ^~~~~~
  tegra210_admaif.c: In function ‘tegra_admaif_remove’:
  tegra210_admaif.c:1141:23: warning: unused variable ‘admaif’
    struct tegra_admaif *admaif = dev_get_drvdata(&pdev->dev);
                       ^~~~~~

Fix these by removing unused variable ‘admaif' from above functions.

Jira TAS-1059

Change-Id: I323df87415727b3deae0e5ba2aa05ef735c047da
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.9/+/2414632
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:50:28 +05:30
Mohan Kumar
30706b0cef ASoC: tegra: Add Interconnect support for ADMA
Add Interconnect API support for ADMA Memory bandwidth requirement
handling.

From Kernel 4.14 and beyond
- On T23X and newer platforms, the interconnects driver will be initialized
  and calls to BWMGR will be stubbed out.
- On T194 and earlier platforms, BWMGR driver will be initialized and calls
  to interconnect framework will be stubbed out.

Jira TAS-1059

Change-Id: I7a26f61517937ac3103222a43f08ee7c4e4ad484
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.9/+/2408552
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:50:28 +05:30
Sameer Pujar
79d734adb3 ASoC: tegra: Rebase drivers with v5.9-rc4
Some of the audio drivers have been upstreamed recently as part of
following series, https://lkml.org/lkml/2020/7/21/1357.

In upstream, DPCM solution is proposed which is different from what
is currently used in downstream. Hence there are conflicts related
to audio routing. To resolve the differences use 'CONFIG_TEGRA_DPCM'
checks. Once the DPCM proposal gets accepted and all remaining
drivers are updated to work with DPCM, the config and legacy routing
can be dropped.

K5.9 removes snd_soc_component_read and uses prototype
of snd_soc_component_read32. Hence update the call in tegra210_ahub.c

Bug 200597174

Change-Id: I9e563e3d8a62f335ba8c22397c0750bf29810d3d
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
2022-09-29 15:50:28 +05:30
Bitan Biswas
4701ef0763 Merge tag 'v5.9-rc4' into dev-main-5.9
Linux 5.9-rc4

Change-Id: If605aee594aacf04e2e27863abf7bfddf3127dd3
2022-09-29 15:50:28 +05:30
Sameer Pujar
9f4e9f0c9b ASoC: tegra: Fix card registration failure on Tegra210
Commit cd6917c3e602 ("ASoC: tegra: Add admaif routes relevant to adsp")
added missing routes required for ADSP. This causes card registration
failure on Tegra210 platforms and probe() fails with following errors.

 ASoC: no source widget found for ADMAIF11 FIFO Transmit
 ASoC: Failed to add route ADMAIF11 FIFO Transmit -> direct -> ADMAIF11 FIFO RX
 ASoC: no sink widget found for ADMAIF11 CIF Receive
 ASoC: Failed to add route ADMAIF11 CIF TX -> direct -> ADMAIF11 CIF Receive
 ASoC: no source widget found for ADMAIF11 CIF Transmit
 ASoC: Failed to add route ADMAIF11 CIF Transmit -> direct -> ADMAIF11 CIF RX
 ASoC: no sink widget found for ADMAIF11 FIFO Receive
 ASoC: Failed to add route ADMAIF11 FIFO TX -> direct -> ADMAIF11 FIFO Receive
 ...
 (Similarly errors are seen for ADMAIF12, ADMAIF13 ... ADMAIF20)

This happens because a common structure is used for routes between Tegra210 and
Tegra186. Fix this problem by using appropriate size for routes which takes into
account of maximum available ADMAIF channels for a given SoC. This is inline
with what we have for previous kernels.

Bug 200628802

Change-Id: I18305e99781a0f91dc7886d3e06f2acaa5b69d9b
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.9/+/2407491
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@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:48:19 +05:30
Sameer Pujar
998afc8211 ASoC: tegra: Fix build error for MODS
MODS build has 'CONFIG_TEGRA_ISOMGR' enabled and it is resulting in
following build errors.

 ERROR: modpost: "tegra_isomgr_register"
     [sound/soc/tegra/snd-soc-tegra-utils.ko] undefined!
 ERROR: modpost: "tegra_set_latency_allowance"
     [sound/soc/tegra/snd-soc-tegra-utils.ko] undefined!
 ERROR: modpost: "tegra_isomgr_realize"
     [sound/soc/tegra/snd-soc-tegra-utils.ko] undefined!
 ERROR: modpost: "tegra_isomgr_reserve"
     [sound/soc/tegra/snd-soc-tegra-utils.ko] undefined!
 ERROR: modpost: "tegra_isomgr_unregister"
     [sound/soc/tegra/snd-soc-tegra-utils.ko] undefined!

This happens because TEGRA_ISOMGR is not functionally up on v5.9.
Actually it has dependency over 'CONFIG_NV_TEGRA_MC' and thus build
issue is fixed by adding an explicit check for it. On L4T this issue
is not seen because 'CONFIG_TEGRA_ISOMGR' is not enabled.

Bug 200622929

Change-Id: Iceebf0df6e33386a5df06c5263a4a46b5bcd5d42
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.9/+/2404198
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Rajesh Gumasta <rgumasta@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Rajesh Gumasta <rgumasta@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:48:19 +05:30
Asha Talambedu
8692668188 ASoC: tegra: Add admaif routes relevant to adsp
dapm routes in admaif driver used in ADSP audio path is enabled
through this patch

Bug 200568556

Signed-off-by: Asha Talambedu <atalambedu@nvidia.com>
Change-Id: I4a351a011172222f71d691706c5b2bc8031e25fe
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.9/+/2403773
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:48:19 +05:30
Sameer Pujar
196ee992c4 Revert "ASoC: tegra: disable jack detect (WAR)"
This reverts commit 45e13cf2a7c4e3f0b6e4e88050b93a4481b08bfa.

The original commit was earlier done to unblock kernel 5.9 bringup.
Revert the same to enable jack functionality now.

Bug 200610798

Change-Id: I7838e92f64140b5e563188d6f52455443685b116
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.9/+/2370730
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:46:21 +05:30
Takashi Iwai
d2d05a7f3c ASoC: tegra: tegra210_i2s: Fix compile warning with CONFIG_PM=n
Fix trivial compile warnings wrt unused functions by adding
__maybe_unused prefix:
  sound/soc/tegra/tegra210_i2s.c:167:12: warning: 'tegra210_i2s_runtime_suspend' defined but not used [-Wunused-function]
  sound/soc/tegra/tegra210_i2s.c:179:12: warning: 'tegra210_i2s_runtime_resume' defined but not used [-Wunused-function]

Fixes: c0bfa98349d1 ("ASoC: tegra: Add Tegra210 based I2S driver")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200803141850.23713-6-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-29 15:46:21 +05:30
Takashi Iwai
52135cf29e ASoC: tegra: tegra210_dmic: Fix compile warning with CONFIG_PM=n
Fix trivial compile warnings wrt unused functions by adding
__maybe_unused prefix:
  sound/soc/tegra/tegra210_dmic.c:43:12: warning: 'tegra210_dmic_runtime_suspend' defined but not used [-Wunused-function]
  sound/soc/tegra/tegra210_dmic.c:55:12: warning: 'tegra210_dmic_runtime_resume' defined but not used [-Wunused-function]

Fixes: 8c8ff982e9e2 ("ASoC: tegra: Add Tegra210 based DMIC driver")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200803141850.23713-5-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-29 15:46:21 +05:30
Takashi Iwai
e70092016e ASoC: tegra: tegra210_ahub: Fix compile warning with CONFIG_PM=n
Fix trivial compile warnings wrt unused functions by adding
__maybe_unused prefix:
  sound/soc/tegra/tegra210_ahub.c:567:12: warning: 'tegra_ahub_runtime_suspend' defined but not used [-Wunused-function]
  sound/soc/tegra/tegra210_ahub.c:579:12: warning: 'tegra_ahub_runtime_resume' defined but not used [-Wunused-function]

Fixes: 16e1bcc2caf4 ("ASoC: tegra: Add Tegra210 based AHUB driver")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200803141850.23713-4-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-29 15:46:21 +05:30