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
2022-09-10 23:43:40 -07:00
2022-09-07 12:27:01 -07:00
Description
No description provided
34 MiB