ASoC: wcd9xxx: Enable headset in high performance

Invoke class AB sequence for headset path dynamically based on
module parameter. Change enables headset path in high performance
mode when module parameter is set to one.

Change-Id: If92d5c8516fbd903a9585785dba47c800be63dbc
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
ASoC: wcd9xxx: Enhance class H controller to support dynamic CP voltage

Codecs can operate at a lower voltage for vdd_buck, whereas
this voltage source being shared, it is not guaranteed that the
codec will always receive exactly the requested voltage. Add support
to class H controller to handle dynamic switching of the chargepump
voltage.

Change-Id: I68f93e0b070ec51db9b958f56c797edb5cbe0c85
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
ASoC: wcd9320: Update buck control and mode registers

Leave BUCK control registers as default and set to lower BUCK ref voltage
for avoid pop noise during playback initiation.

CRs-fixed: 506099
Change-Id: I47c068fc8344108dcd5b2c63f8a5c0a5e40a4c8b
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
ASoC: wcd9xxx: fix class H controller driver to handle concurrency

Fix class H controller driver's finite state machine to handle concurrent
playback.  This makes audio playback quality to be better with less power
consumption.

CRs-fixed: 506099
Change-Id: I621fa5a4df9964fda6c51c70e50ece2e783cafb6
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
ASoC: wcd9320: Set HPH bias currents to low power mode

Setup the headphone path PA and DAC bias currents to low power
mode to increase power consumption efficiency

CRs-fixed: 485961
Change-Id: I9492e70f404f96502c7283b38f0d1f3738647d4c
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
ASoC: wcd9320: Configure codec hardware in optimal mode

Update class H controller registers to configure codec in optimal mode.

CRs-fixed: 506099
Change-Id: I26ec0ad04bcec511ea2a37d2e357bae0345bd2a1
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
ASoC: wcd9xxx: Distortion in HPH LO combo device

Follow Class H sequence for headset, lineout and ear concurrency as per
the class H HW design sequence to avoid signal clipping.

CRs-Fixed: 602408,618992
Change-Id: I517a5df98708f7292111e5cf71ffcf6ef8c4b870
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
ASoC: wcd9xxx: Set HPH PA register to volatile

Set HPH PA register to volatile to make sure the register will be
updated with proper bits during bringup.

CRs-Fixed: 625324
Change-Id: I8334a66644dca536f0bcfef562b7f64372a47d32
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
ASoC: wcd9xxx: Change in sequence of HPH Rx path

Change HPH Rx path sequence to enable Rx clock and reset Rx interpolator
path before HPH DACs enable to avoid pop during bringup of device path.

CRs-Fixed: 616383
Change-Id: If2beefc300e11908e87c90f0ab0fab0bfaf968b1
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
ASoC: wcd9xxx: Enable headset in high performance

Invoke class AB mode for headset path when sample rate
is set to 192KHz and bit width is set to 24. Change enables
headset path in Ultra High Quality Audio(UHQA)mode.

Change-Id: I6cd05952114b88602fc9dcc883d83a39214311b9
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
ASoC: wcd9320: Add HD2 tuning coefficients for HPH path

Add 2nd Harmonic Distortion (HD2) tuning coefficients
for HPH path. HD2 coefficients get turned ON during HPH
enable and turned OFF during path tear down. Enabling HD2
coefficients would increase the Headphone PA efficiency during
audio playback.

Change-Id: I24bc053e6401d5b8f45dc62d88c7fe6a5ba01447
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
asoc: wcd9320: Use class AB headphone path for high-res formats

 * The class AB path is less efficient, but has a lower noise floor.
 * Enable this path for 24-bit or high (>96KHz) sample rate, as this
   tradeoff is worth it with lossless, high resolution music.

Change-Id: I0bf4e6f366e987f17d86b4e967e3bc8b40d86ed3
ASoC: wcd9xxx: Changes for High performance mode

Add changes for high performance audio playback on headset
for better audio quality during 192KHz/24bit audio playback.

CRs-Fixed: 706322
Change-Id: Ie79293f24114d5d81a610186d24b44b1550dae9c
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
ASoC: wcd9320: Change compander parameter for 192Khz playback

Update the meter rate parameter for compander in order to achieve
better performance with Compander support for headphone, lineout
and speaker paths for 192 KHz sampling rate. Update the static gain
offset accordingly depending on the buck voltage requested.

CRs-fixed: 481501
Change-Id: I4bb3c41e1042ba9327a21bf9375541d36487484e
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>