Commit Graph

1671 Commits

Author SHA1 Message Date
Prasad Kumpatla
575a0b0dd1 asoc: wcd939x: update compander settings for wcd9395 codec
Update compander settings for wcd9395 codec.Default values
are sufficient to achieve better THD+N at max. volume.

Change-Id: If04539fc2f5dd9fd398997dbb6a32487ce45b788
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-03-07 12:50:59 +05:30
Prasad Kumpatla
2a86f48992 asoc: wcd939x: add support to update power modes on wcd-usbss
Get the wcd939x power mode of from mixer ctls and configure
same power mode to wcd-usbss.

Change-Id: I9dc8fe586f7e7608da542b0986bb7c605fc552d4
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-03-05 21:34:57 -08:00
Eric Rosas
2c2db12700 asoc: codec: Unmute WSA for ADIE loopback
Unmute WSA after enabling main path for
ADIE loopback cases.

Change-Id: I850aa4dbcf77371811010c1d614c6c7e94736971
Signed-off-by: Eric Rosas <quic_erosas@quicinc.com>
2023-02-28 11:13:56 -08:00
qctecmdr
f11d3c6c07 Merge "asoc: wcd939x: remove unwant IRQ register" 2023-02-26 00:43:33 -08:00
qctecmdr
bcd24127e8 Merge "asoc: codec: Add 2Vpk support in WCD939X driver" 2023-02-15 11:11:23 -08:00
qctecmdr
14f6ed5be5 Merge "soc: Remove internal.h header" 2023-02-15 08:56:10 -08:00
qctecmdr
20d45c2bfa Merge "asoc: codec: Use regmap_update_bits on wsa884x post IRQ" 2023-02-15 05:28:03 -08:00
qctecmdr
a36b2763eb Merge "asoc: wcd939x: Disable legacy surge protection" 2023-02-15 05:28:03 -08:00
qctecmdr
1516ff4e23 Merge "asoc: codec: Fix wsa884x IRQ deinitialization" 2023-02-15 05:28:03 -08:00
Prasad Kumpatla
ace2dd19df asoc: wcd939x: remove unwant IRQ register
For wcd939x LDORT_SCD_INT IQR register is removed, so remove
LDORT_SCD_INT register to avoid CMD ignore errors from RX SWR
while booting.

Change-Id: I6dfe6a1c32fddbcdbbf388b47efde60b6b4b5f35
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-02-14 13:00:22 +05:30
Eric Rosas
9b11a9ddae asoc: codec: Fix wsa884x IRQ deinitialization
Fix wsa884x deinitialization to avoid double
free and use correct kfree function to prevent
crash.

Change-Id: If7e0e3ceb76f9a29fbafee274147f2992e02085f
Signed-off-by: Eric Rosas <quic_erosas@quicinc.com>
2023-02-13 16:14:44 -08:00
Eric Rosas
d898a57ffd asoc: codec: Use regmap_update_bits on wsa884x post IRQ
Change snd_soc_component_update_bits to
regmap_update_bits because wsa884x may not be
initalized post IRQ.

Change-Id: I3018c680e8b2db346e5acaefc330a5af98150cf2
Signed-off-by: Eric Rosas <quic_erosas@quicinc.com>
2023-02-10 16:03:25 -08:00
Eric Rosas
b1da4ef67d soc: Remove internal.h header
Remove soc/internal.h, which
is a duplicate of the internal regmap/internal.h.

Change-Id: I05b30b101382e68ced26343ef1278cecfd1b0ed3
Signed-off-by: Eric Rosas <quic_erosas@quicinc.com>
2023-02-08 22:50:57 -08:00
Sam Rainey
742849e4e9 asoc: wcd939x: Disable legacy surge protection
Disable legacy HPH surge protection
for certain platforms. Enable HPH over-current
protection for all platforms.

Change-Id: I147321417ad2152530a71b3990a7cbf064c9299f
Signed-off-by: Sam Rainey <quic_rainey@quicinc.com>
2023-02-08 17:10:00 -08:00
Sam Rainey
837696b627 asoc: codec: Add 2Vpk support in WCD939X driver
Add support for HPH 2Vpk output mode in the
WCD939X driver.

Change-Id: I44a84cde84f0feee6d7d1255e097a5ffb616f78e
Signed-off-by: Sam Rainey <quic_rainey@quicinc.com>
2023-02-07 02:52:07 -08:00
Fenglin Wu
8d450b9235 asoc: swr-haptics: keep in SWR PLAY_SRC when disabling SWR play
Currently, 0 is written into SWR_PLAY register when disabling SWR play,
it coincidently updates the PLAY_SRC to FIFO mode and disables it. If
there is a FIFO play triggered from SPMI address space, the FIFO play
will be disabled and the FIFO samples will be flushed. To avoid this,
keep in SWR PLAY_SRC when disabling SWR play.

Change-Id: Ib594df57835979a8832f2f7a1954ff36f643f724
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
2023-02-05 20:32:06 -08:00
qctecmdr
a116a9c2f0 Merge "asoc: wcd939x: update correct HPH class h power modes" 2023-02-03 11:08:36 -08:00
Eric Rosas
ebcfc03c12 asoc: codec: Change default CFG0 value
Change CFG0 register value from 0x07 to 0x05.

Change-Id: I0da0e7e754657c66679bd7844616328b2774301c
Signed-off-by: Eric Rosas <quic_erosas@quicinc.com>
2023-02-01 22:58:15 -08:00
Prasad Kumpatla
df0977f834 asoc: wcd939x: update correct HPH class h power modes
update HPH power mode comparison with mixer ctls enum names,
so this will pick the correct compander coeff values depends on modes.

Change-Id: I42cdfeceda4c4bac960b71bbd62d0e8528680490
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-01-31 00:27:37 +05:30
Prasad Kumpatla
1cb456dd0e asoc: wcd939x: update power mode for LOHIF
update power mode for LOHIFI.

Change-Id: Ifc7a3061a3c54d768976e7ae3a1378ff3e907d5a
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-01-23 11:02:34 -08:00
qctecmdr
12791e2324 Merge "Asoc: lpass-cdc: Synchronize lpass-cdc register macro function" 2023-01-19 07:20:26 -08:00
Yuhui Zhao
b78dc76483 Asoc: lpass-cdc: Synchronize lpass-cdc register macro function
lpass_cdc_register_macro can be called simultaneously by different
macros as bootup resulting in inconsistent value of
num_macros_registered. This will result in one of macro going ahead and
registering lpass-cdc component and other macro failing to register which
will cause probe of other macro to fail. Protect function with mutex lock
so that macros access it sequentially

Change-Id: I9d3811eeceb06b6a7e66d79a1b899b2c4283bb52
Signed-off-by: Yuhui Zhao <quic_yuhuzhao@quicinc.com>
2023-01-19 17:21:20 +08:00
Soumya Managoli
1622b6d883 ASoC: codecs: Allow register write via debugfs
Add support for QTI regmap debugfs register write
access on wcd937x codec.

Change-Id: I04e3d98ec308c5cbf9f140c6fcfb1ab5fbe5fd50
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-01-18 19:55:11 -08:00
Sam Rainey
6b5e8148d4 asoc: lpass-cdc: Fix digital volume range
Remove platform_max setting in WSA/WSA2 drivers
to correct the volume range for digital volume.

Change-Id: Ia87c9fbeacc7bbb37b02f707b5c624a4091251d9
Signed-off-by: Sam Rainey <quic_rainey@quicinc.com>
2023-01-12 10:40:21 -08:00
Prasad Kumpatla
17a7fb3f4d asoc: Add support for 11P2896MHz RX clk config
1. Update RX CLK config for 11P2896MHz.
2. Add condition to update Droop sel coeffs for 11P28MHz
   and 9P6MHz RX CLK.
3. Upate SWR port config for 44.1Khz sample rate usecase.
4. Unselect RX_TOP.SWR_CTRL(0x6AC0008) for RX CLK 11P28MHz.
5. Update HD2_CTL L/R registers as per latest seq version.

Change-Id: Ifac2c03e3d1bf522fe2a4d942341d9071a1e6239
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-01-11 11:19:54 +05:30
qctecmdr
a2a930663f Merge "asoc: wcd-mbhc: Disable moisture detect and duty cycle" 2023-01-10 03:41:48 -08:00
qctecmdr
98153803c3 Merge "asoc: codec: lpass: add support to select PDM vs PCM path" 2023-01-10 03:41:47 -08:00
Prasad Kumpatla
33f464c16b asoc: wcd939x: for PCM mode no need to enbale PDM interrupts
For PCM mode no need to enbale PDM interrupts, so add condition
to skip for register of PDM interrupts. Also avoid unwanted register
writes for PCM mode.

Change-Id: I4675a7ffe94d1f8628a4f539829f5aa83544cf8d
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-01-06 00:09:59 -08:00
Prasad Kumpatla
d6ccee90de asoc: codec: lpass: add support to select PDM vs PCM path
add support to select PDM or PCM path in rx macro with the help
of mixer ctls.

Change-Id: I803e0bf440c1b3546cbda23e49736addb9083d92
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-01-06 13:38:00 +05:30
Prasad Kumpatla
59bb6d4de4 asoc: wcd939x: update registers based on latest version
update register based on latest version and add conditional
check to enable PCM path.

Change-Id: Ib2fe0b477adfa07bef52954993fbd6aae011500a
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-01-06 13:31:11 +05:30
Prasad Kumpatla
d4626706b1 asoc: wcd939x: update port config for pcm path
update port config parameters for hph pcm path.

Change-Id: I2f8fd56a4d562f92c80c8997a98f5f3436411dfa
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-01-05 00:37:50 -08:00
Prasad Kumpatla
334bb47082 asoc: codec: update registers based on hph mode
update registers based on specific hph mode before compander
config.

Change-Id: Iea4f2bc5521dc701bd52ce8fe24323b1f9d96045
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-01-05 00:36:42 -08:00
Prasad Kumpatla
7934eb5971 asoc: codec: add support to enable/disable HPH PCM path
add mixer ctl to enable/disable HPH PCM path on WCD939x.

Change-Id: I4b3eadf4f57813b0a861848e0a0cb842749ff764
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-01-05 00:32:21 -08:00
Prasad Kumpatla
76f60e792b asoc: codecs: add support for xtalk
add support for xtalk on wcd939x.

Change-Id: I3aac6196363f2032e8ff453ca3cf52143bafcd0e
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-01-05 00:32:05 -08:00
Prasad Kumpatla
d0220474be asoc: codec: add support for compander enable and disable
add support for compander to enable and disable for HPHL and HPHR
in wcd939x.

Change-Id: Ib7aa96bd9faac7389b38f01baff0a93c646f84f2
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-01-05 00:31:42 -08:00
Prasad Kumpatla
afcd8c5178 asoc: wcd-mbhc: Disable moisture detect and duty cycle
Disable moisture detect and duty cycle for WCD USB AATC HS.

Change-Id: I7bb0d5f2aaa52368f2a00bc99b066eb459c72094
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-01-05 13:33:23 +05:30
qctecmdr
17be5c5a10 Merge "Revert "audio-kernel: Remove HDMI DLKM for pineapple"" 2022-12-21 18:14:25 -08:00
Ganapathiraju Sarath Varma
1649620274 asoc: va-macro: Enable VA_CORE_CLK for VA LPI usecases.
Use VA_CORE_CLK without LPI Enable mixer cntl for SVA usecases,
To keep usecase in LPI mode even in corner cases.

Change-Id: I45da244b8a992b1ff043ab4b401903376c5cff90
Signed-off-by: Ganapathiraju Sarath Varma <quic_ganavarm@quicinc.com>
2022-12-21 02:58:00 -08:00
qctecmdr
04f11e2667 Merge "dsp: increase the spf close all command timeout" 2022-12-20 08:14:04 -08:00
Phani Kumar Uppalapati
ec17358caf asoc: set hwparams for dummy platform for hdmi backend
Set runtime hwparams for dummy platform components used
for hdmi backend.

Change-Id: Ide66c43d715d2db2599918275139dea5bbe7c7f1
2022-12-15 18:53:55 -08:00
Prasad Kumpatla
2937a09ddc asoc: wcd-mbhc: Ignore mech plug irq for AATC HS
WCD USB AATC does not require mech plug irq, UCSI
layer will help to get the events to process insert/remove
of AATC HS.

Change-Id: Ie1b14703605be294471303b6454f94b55e9f932d
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2022-12-14 23:47:05 +05:30
Phani Kumar Uppalapati
988ffe7fbf Revert "audio-kernel: Remove HDMI DLKM for pineapple"
This reverts commit 658c4603bd.
Enable external display audio support for pineapple target.

Change-Id: Ibc03794b90c2ba83e4e3d27bbf997f86588e63c2
2022-12-08 09:21:11 -08:00
Phani Kumar Uppalapati
dc970caadb Revert "audio kernel: add null point check for lpass cdc."
This reverts commit bfbf93e9f8.

Change-Id: Id5e9e84b18e809831618639a0bf8f0497eb82bd3
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
2022-11-30 13:26:49 -08:00
Prasad Kumpatla
8dcd87dafa asoc: wcd939x: update variant as per wcd codec
On wcd939x contains only one variant. Sometimes reading
for codec variant which is giving incorrect/unsupported,
due to this incorrect mixer ctl are picked. So Wcd939x 
is updated with supported variant WCD9395.

Change-Id: Ie556350b3630b6f1f76a4b2af1db795f908f13d4
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2022-11-29 10:52:17 +05:30
Prasad Kumpatla
fdf073a765 asoc: codec: wcd939x: update register name in regmap and tables
update register name in regmap and tables.

Change-Id: Ia1da74478b51dd094da2be74d621f91cf4e22ff9
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2022-11-23 20:56:14 +05:30
Prasad Kumpatla
0d0a99faa0 asoc: codec: wcd939x: update the register with correct addresses
update the register with correct addresses.

Change-Id: Ia0ff16aecd4afe0421ef4d0a8cf00bd1c704dd52
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2022-11-23 12:58:14 +05:30
qctecmdr
da4943cefd Merge "audio kernel: add null point check for lpass cdc." 2022-11-22 22:10:11 -08:00
qctecmdr
8a3a2be86e Merge "asoc: wcd: add NULL pointer check for wcd component" 2022-11-22 07:28:44 -08:00
qctecmdr
bca378d01d Merge "asoc: codec: Add support for 2S battery configuration in the WSA884x driver" 2022-11-22 07:23:41 -08:00
qctecmdr
5454ad283a Merge "asoc:codecs: Update exit section in device init." 2022-11-22 07:18:39 -08:00