Commit Graph

1700 Commits

Author SHA1 Message Date
qctecmdr
db55976826 Merge "asoc: wsa884x: add null check for wsa884x->component" 2023-04-16 08:07:36 -07:00
qctecmdr
8b0e3889df Merge "audio-kernel: remove unused uapi headers" 2023-04-16 08:07:36 -07:00
qctecmdr
d3f75e675d Merge "asoc: mbhc: enable l_det_en bit" 2023-04-16 08:07:35 -07:00
Prasad Kumpatla
1ea2687052 asoc: wcd939x: Update register sequences for wcd9395 v2.0
Check and update register sequences for wcd9395 version
2.0.

Change-Id: I85fc739744ee2ba2c5dbdc853eb639b84cac6478
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-04-15 07:55:43 -07:00
Prasad Kumpatla
1399d39839 asoc: mbhc: enable l_det_en bit
enable l_det_en bit while detecting the HS.

Issue: While removing HS some additional electrical interrupts
are triggered and reporting different events to userspace, which is
cause issues. To avoid this electrical interrupt flow, there is
a check in adc_hs_rem_irq for wcd_swch_level_remove() to check
for l_det_en bit status. Depends on this it will return from the
adc_hs_rem_irq() without going further.

Solution: Enabling the l_det_en bit will helps to avoid serving
electrical interrupt flow to further in adc_hs_rem_irq().So this
will helps to stop reporting different/unwanted events to user space.

Change-Id: I29d72b65ebb59969b69f3f8c7f4c7eb2debb0f1c
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-04-12 11:12:31 +05:30
Prasad Kumpatla
58a039c9e6 asoc: wsa884x: add null check for wsa884x->component
add null check before accessing for wsa884x->component.

Change-Id: I0694ad6426317f2f80d5084125c5b24876f96a65
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-04-11 13:43:09 +05:30
Phani Kumar Uppalapati
664c7a5ac6 audio-kernel: remove unused uapi headers
Remove unused uapi headers and structures for AudioReach
architecture.

Change-Id: I7b7718f118f2c7295aa0a741c1259ab76104de6c
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
2023-04-08 09:55:27 -07:00
Ganapathiraju Sarath Varma
7f605534e2 asoc: wsa88XX: Enable/Disable swr ports based on setbit.
During some concurrencies even though we are not
enabling the swrm port, we are trying to disable it.
which causes problem w.r.t clock disablement,
To avoid that we are updating the set bit only
when port is enabled, based on that bit we are taking
decision to disable or enable the port.

Change-Id: I6707c56c40dd3716917edc097c4b7bcad68261fd
Signed-off-by: Ganapathiraju Sarath Varma <quic_ganavarm@quicinc.com>
2023-04-04 22:20:42 +05:30
qctecmdr
04a1c53fe1 Merge "soc: define ratelimit for prints to avoid flooding of logs" 2023-03-31 06:25:59 -07:00
qctecmdr
d3f8aa4eb7 Merge "asoc: codec: Update wcd939x-usbss mode" 2023-03-30 08:32:56 -07:00
qctecmdr
f481fa25f5 Merge "asoc: wcd939x: Add xtalk cancellation gain updates" 2023-03-30 08:32:56 -07:00
qctecmdr
2bb2cabe85 Merge "asoc: wcd9395: Add support for WCD9395 EAR path" 2023-03-30 08:32:56 -07:00
Prasad Kumpatla
ecbb93d98d soc: define ratelimit for prints to avoid flooding of logs
Change-Id: I7aa38c992716152ebb336190d9d3cd2e9a60e8e0
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-03-30 05:33:58 -07:00
Phani Kumar Uppalapati
ec43052bb3 asoc: wcd9395: Add support for WCD9395 EAR path
Add support for WCD9335 EAR playback path.

Change-Id: I643beaa4d27f279621202893062419ce2a3e96ed
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
2023-03-29 22:13:16 -07:00
Yuhui Zhao
6b2a5ea4d9 asoc: lpass-cdc: add null pointer check in register_notifier func
Add null pointer check in register_notifier funcion.

Change-Id: Icba3776cbf33095dc8bdf32ed7b6c749e639a11b
2023-03-29 21:41:20 -07:00
Sam Rainey
bdf4011578 asoc: wcd939x: Add xtalk cancellation gain updates
Add scale and alpha register value updates based
on computed digital xtalk cancellation gain.

Change-Id: I8c12e2ba7c1566476741fec5459a74549f19cf5f
Signed-off-by: Sam Rainey <quic_rainey@quicinc.com>
2023-03-29 16:48:50 -07:00
Eric Rosas
f66738f4db asoc: codec: Update wcd939x-usbss mode
Update wcd939x-usbss mode on PA enable and disable.

Change-Id: I73a19ea73102ced5c8011a5a1567ebfa372b2e44
Signed-off-by: Eric Rosas <quic_erosas@quicinc.com>
2023-03-29 13:41:27 -07:00
qctecmdr
3038c0281b Merge "asoc: wsa884x: update uvlo registers for wsa884x" 2023-03-29 05:37:18 -07:00
qctecmdr
ed2fbe492d Merge "asoc: lpass-cdc : Enable wsa clks during DAPM powerup sequence" 2023-03-29 05:37:18 -07:00
qctecmdr
02975b1480 Merge "asoc: mbhc: change the logic of cross_conn checking" 2023-03-29 05:37:18 -07:00
Yuhui Zhao
b9ca5f9eea asoc: mbhc: change the logic of cross_conn checking
Change the logic of cross_conn checking from or to and

Change-Id: Ic91ab177d6e6997dc0c5cb496c611a6cccd027e1
2023-03-28 17:55:50 +08:00
Prasad Kumpatla
c11ffbb93b asoc: adc: check the interrupt status bit for hs_ins
usbc USCI event gets called and removal is reported, where bit
0 of mbhc->intr_status i.e. (WCD_MBHC_ELEC_HS_INS) will be set to 0.
So in adc_hs_ins_irq() we can check if the WCD_MBHC_ELEC_HS_INS bit
is 0 or not, if 0 we just ignore the and return.

Change-Id: I5a7753a077f53c5cd26c8ad199899ff9c81ef7b8
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-03-28 14:47:04 +05:30
Phani Kumar Uppalapati
f4a5ac64cc asoc: wsa884x: update uvlo registers for wsa884x
update uvlo registers for wsa884x codec.

Change-Id: I225403378b2e2774fb069446fa2072eb27da0ee7
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
2023-03-27 15:58:09 -07:00
Ganapathiraju Sarath Varma
70ea54b385 asoc: lpass-cdc : Enable wsa clks during DAPM powerup sequence
enable the wsa and wsa2 clk as per  sequence.

Change-Id: Ieefa4b6ea7aec535d940d780b0ed923483b4d3ee
Signed-off-by: Ganapathiraju Sarath Varma <quic_ganavarm@quicinc.com>
2023-03-27 11:49:47 -07:00
qctecmdr
79093cd45d Merge "asoc: wcd939x: use half rate selection for HPH DAC" 2023-03-21 10:01:36 -07:00
qctecmdr
dcf234a8a6 Merge "asoc: wcd-mbhc: check mbhc pointer to null before access" 2023-03-21 10:01:36 -07:00
Phani Kumar Uppalapati
10371b0909 asoc: wcd-mbhc: check mbhc pointer to null before access
Check MBHC structure pointer to null before accessing.

Change-Id: I21230b524a702dc5880904160d80f9f19564fc3a
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
2023-03-20 13:22:38 -07:00
Eric Rosas
de7502fc0c asoc: codec: Remove unused header import
Remove drivers/clk/qcom/common.h, which is an
internal header that is unused in audio-ext-clk-up.c.

Change-Id: I62dbdfd87c717ec60461a32505cba1b603c5e512
Signed-off-by: Eric Rosas <quic_erosas@quicinc.com>
2023-03-16 19:30:05 -07:00
Phani Kumar Uppalapati
ce393052e3 asoc: wcd939x: use half rate selection for HPH DAC
Harmonium supports full and half rate modes for DAC.
Update DAC rate to swr clkdiv2 to achieve better
power performance.

Change-Id: I136a064dc258ee839ea78c9f1051ba34521ac871
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
2023-03-09 11:43:24 -08:00
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