Commit Graph

179 Commits

Author SHA1 Message Date
Prasad Kumpatla
2fc4076bff asoc: codec: lpass: Update input mux config controls per HW version
Update MUX config controls for WSA macro per HW version.

Change-Id: I9fb083c776da531d9e2422af639f3a4af5c178ef
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2024-04-19 05:11:54 -07:00
sarath varma ganapathiraju
a1c0d5b7bb asoc: cdc: wsa-macro: add 1msec delay before resetting FS cntrl
added 1msec delay before resetting FS cntrl, to ensure no
glitch at the start of VI feedback.

Change-Id: Ia9ae296f336e4deb4b8bedb718316a6772466a95
Signed-off-by: sarath varma ganapathiraju <quic_ganavarm@quicinc.com>
2024-03-17 23:56:47 -07:00
qctecmdr
b561c6e890 Merge "asoc: codec: Enable RX1 mix path" 2024-02-06 04:54:40 -08:00
sarath varma ganapathiraju
86102f43f6 asoc: codec: Enable RX1 mix path
Enable WSA RX1 mix path to ensure DMA is enabled
properly and data is consumed to drive right channel
using wsa mix path.

Change-Id: I2b0bc92eeaa82734254ceda96de39f20a761dc75
Signed-off-by: sarath varma ganapathiraju <quic_ganavarm@quicinc.com>
2024-01-31 10:50:52 -08:00
Ravulapati Vishnu Vardhan Rao
f27ffc6243 asoc: lpass-cdc-rx-macro: DRE return for SWR PCM and PDM data transport cases
DRE is not disabled properly on targets where kcontrols are not exposed.
Add separate check for both SWR PCM and PDM data transport cases to
avoid having dependency on kcontrol.

Change-Id: Ifbd9aaa8213540c9cc19690ef70b30336580116a
Signed-off-by: Ravulapati Vishnu Vardhan Rao <quic_visr@quicinc.com>
2024-01-23 16:09:18 +05:30
qctecmdr
465958d84d Merge "asoc: codec: lpass: add support bolero v2p1" 2024-01-07 02:11:24 -08:00
qctecmdr
0549c98fff Merge "asoc: add version flag to enable LPASS 2P6" 2024-01-07 02:11:24 -08:00
qctecmdr
a30841251b Merge "asoc: codec: wcd9378: optimize the micbias usage set logic" 2024-01-07 02:11:24 -08:00
Prasad Kumpatla
e8c72f5698 asoc: codec: lpass: add support bolero v2p1
add support bolero v2p1 in lpass rsc driver.

Change-Id: I6441a20e824dd61670ec7020ae17eb5bc93c5ea1
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2024-01-03 07:44:47 -08:00
Vangala, Amarnath
2792b38785 asoc: lpass-cdc: changes for bolero v2.2
Implement changes to make the driver compatible with bolero V2.2.

Change-Id: If2797a80f775c685ff2a6912de189b1d9b4906d0
Signed-off-by: Vangala, Amarnath <quic_avangala@quicinc.com>
2024-01-02 19:49:30 +05:30
Prasad Kumpatla
d36fc5c57f asoc: add audio kernel config files for pitti
add audio kernel config files for pitti.

Change-Id: I2ef71e7ce42b6083c099558bd0d14f49800d3e3a
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2023-12-29 14:52:53 +08:00
yuayang
568d8d0822 asoc: audio-kernel: Remove trace_printk
Remove trace_printk point.

Change-Id: I76b53eda77bc41c75e06a885084022d74c248188
Signed-off-by: yuayang <quic_yuayang@quicinc.com>
2023-12-21 16:26:31 +08:00
qctecmdr
119e420617 Merge "asoc: lpass-cdc-va-macro: revert reset Sampling rate" 2023-10-30 06:45:17 -07:00
sarath varma ganapathiraju
9bb0f01c5d pitti: Add compilation support for target pitti
Add Compilation support for target pitti.

Change-Id: Ibb06ace7332aa87eb5f8082db95f0c0f8b3deb66
Signed-off-by: sarath varma ganapathiraju <quic_ganavarm@quicinc.com>
2023-10-19 22:01:23 -07:00
Vangala, Amarnath
daea160320 asoc: lpass-cdc-va-macro: revert reset Sampling rate
Sampling rate of the decimator is reset to hw reset value during
power down event in existing code. This code was implemented for
 a safety precaution.
Remove this code as it is causing a side effect for VA use cases.

Side effect of existing code: during successive VA use cases runs,
Sampling rate is not updated as the device is not closed completely.
Due to this, decimator runs with incorrect sampling rate for
 successive runs and causes failure.

Change-Id: I5e60c656043d06c3d999de183698adfffdaa44d1
Signed-off-by: Vangala, Amarnath <quic_avangala@quicinc.com>
2023-10-11 12:04:26 +05:30
Vangala, Amarnath
3c259f7f3b asoc: codecs: lpass-cdc: remove pre ssr notifier call
Remove the PRE_SSR blocking notifier call.
This is not required as early down event is not handled.

Change-Id: Ie448fa2af92edd484d282200cf350c6bddc5f99d
Signed-off-by: Vangala, Amarnath <quic_avangala@quicinc.com>
2023-09-25 01:40:12 -07:00
Vangala, Amarnath
c2e7e60fde asoc: codecs: lpass-cdc: reset the decimator sampling rate to default
While disabling the Decimator, reset the sampling rate to default value.

Change-Id: If07aeb69ddff459d0fdf8dfd4ccb7b3d8ed97743
Signed-off-by: Vangala, Amarnath <quic_avangala@quicinc.com>
2023-08-15 17:22:27 +05:30
Vangala, Amarnath
a267ec5239 asoc: lpass-codec: enable TX Core clock before codec reg access
Enable the TX Core clock to enable access to lpass-cdc registers.

Change-Id: I3088e06e9e77ef24b2e4e802852cc3bb65542f5c
Signed-off-by: Vangala, Amarnath <quic_avangala@quicinc.com>
2023-07-25 09:27:58 +05:30
qctecmdr
69a087fc8e Merge "asoc: lpass-cdc: Add check for array bound overflow" 2023-06-29 01:12:50 -07:00
qctecmdr
b0ea759df3 Merge "asoc: lpass_cdc: Program FS_CTL reg based on input used" 2023-06-28 13:17:46 -07:00
Deepali Jindal
3daac9507a asoc: lpass-cdc: Add check for array bound overflow
In lpass_cdc_wsa_macro_config_compander function,
add check for wsa_sys_gain array's index to make sure
it won't go out of bound.

Change-Id: I9d8512726de959e7a0d9e875e966140d70412e25
Signed-off-by: Deepali Jindal <quic_deepjind@quicinc.com>
2023-06-22 10:53:05 +05:30
Ganapathiraju Sarath Varma
d41a40721c asoc: lpass_cdc: Program FS_CTL reg based on input used
Program WSA_DATA_FS_CTL reg based on input used(wsa rx/wsa2 rx)
and also update the channelmap based on mixer cntl.

Change-Id: I0cfac1d9b25dd1211824bcea2753bb6c1131f767
Signed-off-by: Ganapathiraju Sarath Varma <quic_ganavarm@quicinc.com>
2023-06-13 07:57:21 -07:00
Faiz Nabi Kuchay
e460678dab soc: codecs: remove redundant WSA AIF_CPS control
Remove redundant WSA AIF_CPS control.

Change-Id: Iae150ed81acfa4013a08b90e10744e6c49b30537
Signed-off-by: Faiz Nabi Kuchay <quic_fkuchay@quicinc.com>
2023-06-11 22:50:04 -07:00
Faiz Nabi Kuchay
42973a5dfc asoc: codecs: Enable main path clk before enabling mix path
Mix path clk is gated by main path clk, as per current logic we are not
enabling main path clk for mix path use-cases.

Enable main path clk before enabling mix path for UPD dedicated backend
to work.

Change-Id: I209d1eaf25f4ef08bbd534f5ecc858e465ce7e18
Signed-off-by: Faiz Nabi Kuchay <quic_fkuchay@quicinc.com>
2023-06-06 11:39:25 -07:00
Kunlei Zhang
de2c1d0cf9 asoc: lpass-cdc: clear active channel cnt if channel is active
Clear active channel cnt if the channel has enabled.

Change-Id: I364f4253398e8d42c3d9e3d44cce7f65c5863bf7
2023-05-09 10:32:39 +08:00
Yuhui Zhao
5990a54d8e asoc: lpass-cdc: add enable check before tx mixer put
Check whether tx channel had been enabled or disabled before
tx channel set.

Change-Id: I1f2e0132f0905a53df989b5d52370c4dfdf7d99b
2023-05-04 12:10:41 -07:00
Soumya Managoli
5c3832c4a8 ASoC: lpass-cdc: Toggle WSA fs_cnt_clr bit
During spk playback and VA concurrency,
sometimes WSA CLK goes out of sync causing
VI_TX data mute. To resolve this, everytime
after WSA MCLK enable toggle fs_cnt_clr bit.

Change-Id: Ia936f1d4843890d2ae5c02b039f502941a5427b9
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-04-25 23:22:33 +05:30
qctecmdr
2bb2cabe85 Merge "asoc: wcd9395: Add support for WCD9395 EAR path" 2023-03-30 08:32:56 -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
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
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
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
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
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
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
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
qctecmdr
da4943cefd Merge "audio kernel: add null point check for lpass cdc." 2022-11-22 22:10:11 -08:00
qctecmdr
34e547a74b Merge "asoc: lpass-cdc: reset TX datapath during path teardown" 2022-11-22 07:03:43 -08:00
Phani Kumar Uppalapati
5555970830 audio-kernel: fix compilation issues for pineapple target
Fix compilation issues in audio-kernel for pineapple target.

Change-Id: I93fa4fb670989f82139dd2cd0dbe57b52ad52504
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
2022-11-18 11:58:44 -08:00
yuayang
bfbf93e9f8 audio kernel: add null point check for lpass cdc.
add null point check for lpass cdc.

Change-Id: I280d4dcb5a1e28336fd1b074231b28c398808880
2022-11-14 17:09:44 +08:00
Meng Wang
5938e32aac asoc: lpass-cdc: reset TX datapath during path teardown
When switching from 16KHz to 48KHz recording, mute issue happens.
Addd TX datapath reset during path teardown to resolve this issue.

Change-Id: I7445b397c20ce4e4968fec2326267f63dcba5a8c
Signed-off-by: Meng Wang <quic_mengw@quicinc.com>
2022-10-28 02:35:16 -07:00
Yuhui Zhao
19b039aa73 asoc: add config files to support pineapple target
add pineapple config file to all drivers:
Kbuild, including soc/dsp/ipc

Change-Id: I2357c7c96739bd42cb8764753d2a4fd5dd1c9634
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
2022-10-07 11:24:42 +05:30
Yuhui Zhao
1dacaf014f audio-kernel: Compilation fixes with "Break" and "fallthrough"
Compilation fixes with "Break" and "fallthrough".

Change-Id: Ica05d0410efc5e9dc52addcf4cd8c0253f49fada
2022-10-06 22:40:29 -07:00
Ganapathiraju Sarath Varma
8280a19ab8 asoc: lpass-cdc: Handle pbr clk based with its ref cnt.
Disable the common pbr clk register only when no one uses
RX0 and RX1 channels.

Change-Id: Ia5fab1d3e4be7d9ecb01ad0b612b9f6ef7406bea
Signed-off-by: Ganapathiraju Sarath Varma <quic_ganavarm@quicinc.com>
2022-09-13 10:55:09 -07:00
Ganapathiraju Sarath Varma
3533e47a4d ASoC: lpass_cdc: Disable va_swr gpio on clk failure
During SSR down event,
ensure swr gpios are put to sleep even in error conditions.

Change-Id: I649d088d0bc429c9b7a02304272eaea06774ca51
Signed-off-by: Ganapathiraju Sarath Varma <quic_ganavarm@quicinc.com>
2022-08-15 21:49:40 -07:00
Ganapathiraju Sarath Varma
dd683bb7fd asoc: lpass_cdc: Enable lpass cdc clk as per sequence
Enable the clk as per sequence.

Change-Id: I54d6981a70b218d4655514bb69ff39a7581264a2
Signed-off-by: Ganapathiraju Sarath Varma <quic_ganavarm@quicinc.com>
2022-08-10 14:11:37 +05:30
qctecmdr
290f69973e Merge "asoc: lpass: add pm stay awake to avoid suspend" 2022-07-20 23:00:34 -07:00
Ganapathiraju Sarath Varma
c7d5b69be6 asoc: update out of bound check for comp_mode.
updated the out of bound check for comp_mode
if any such occurence happens setting it to default mode.

Change-Id: Ie4a7275d45af6a96f1a2ec4b6ece6dc7a5dca464
Signed-off-by: Ganapathiraju Sarath Varma <quic_ganavarm@quicinc.com>
2022-07-20 12:54:13 +05:30