mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
DMIC controller can be configured to receive data in both left and right
channels or in just the left channel or the right channel. Currently we
have dmic->ch_select to configure the same. There are few issues w.r.t
the way this is used.
* dmic->ch_select overrides both client and audio channels of TX CIF.
* channels in params_channels(params) is not used and hence requested
number of channels in hw_param() callback is not considered.
* stereo to mono conversion at TX CIF is not supported
This patch addresses all above issues with following
* expose a mixer control, "Channel Select", for channel override for
CIF channels.
* dmic->ch_select is only used to override client channels.
* by default ch_select is set to stereo and "None" option is removed
* expose mixer control, "stereo to mono", for stere->mono conversion
This can be used to select one of the following methods for conversion
CH0 --> pick the first channel
CH1 --> pick the second channel
AVG --> (CH0 + CH1) / 2
* "None" is not required for mono->stereo and hence removed and only
below are sufficient.
ZERO --> zero out the second channel
COPY --> copy the first channel to the second channel
* Replaced "TX" prefix for mixer controls with "Capture". This aligns
with the policy we used for ADMAIF and I2S.
* "Channel Select" control is replaced with "Controller Channel Select",
as the control is related to DMIC controller and will be more
meaningful.
Bug 200520821
Bug 200503387
Change-Id: I8a103f67dc75ca651ee3df3d8594971327364c84
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2151729
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>