mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 01:31:30 +03:00
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
4.2 KiB
4.2 KiB