Commit graph

4,193 commits

Author SHA1 Message Date
Manoj Kumar N D
70a4c76545 ASoC : Add macro to differentiate auto code
Macro needed for differentiation of auto code as the
file is shared for non auto code as well.

Signed-off-by: Manoj Kumar N D <quic_mnd@quicinc.com>
Change-Id: I8b464d5cacd2b5bcf51c54a3e50c930d9cb54e41
2024-01-04 15:06:39 +05:30
Manoj Kumar N D
eb8bc3afa1 ASoC: msm: get CoPP index based on FE id
Get the CoPP idx based on FE id before sending the channel
mixer settings during runtime.

Signed-off-by: Manoj Kumar N D <quic_mnd@quicinc.com>
Change-Id: I2a0fc517bf3e53523679e3108ca6849d2f96e79d
(cherry picked from commit e9c96f97eda6069576731984a146343ccb32d900)
(cherry picked from commit d6d824a975955075d02e2ed3b51f8ef4d6f202b7)
2023-12-18 22:58:32 -08:00
Kumar Anurag Singh
1fe88adb32 asoc: codecs: add array bound check
Add bound check to avoid out of bound access for array.

Change-Id: Ia43a50dc0c4e956be00fba92ba6819dbcc9b0ee3
Signed-off-by: Kumar Anurag Singh <quic_kumaranu@quicinc.com>
2023-12-04 00:09:44 -08:00
qctecmdr
14eead1136 Merge "asoc : add configuration about SLIMBUS_7_TX" 2023-11-14 00:30:35 -08:00
Soumya Managoli
750376e36a soc: Address SWR rate mismatch interrupt
Handle DOUT_RATE_MISMATCH irq.

Change-Id: I06c113a9aa54add123b6b28f15b12263bcb63c60
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-11-10 10:18:54 +05:30
Changxiang Wang
b243c8109b asoc : add configuration about SLIMBUS_7_TX
- Add configuration about SLIMBUS_7_TX.

Change-Id: Ic74ed0f5d63ddfa253b1f3577f7bce947f99f5c8
2023-11-10 11:53:23 +08:00
qctecmdr
b95c5084ce Merge "asoc: lahaina: add support for aud_ref_clk_sel mux" 2023-11-09 07:20:36 -08:00
qctecmdr
60285a247b Merge "dsp: afe: add support for aud_ref_clk_sel mux" 2023-11-09 06:37:15 -08:00
qctecmdr
a6d6790bb0 Merge "ASoC: dsp: Release lock before return" 2023-11-09 05:01:01 -08:00
qctecmdr
0d69ba7dc7 Merge "asoc: lahaina: fractional sample rate support for TDM" 2023-11-09 04:54:52 -08:00
qctecmdr
ba72ce6dab Merge "dsp: q6voice: Handle mutex lock-unlock" 2023-11-09 04:49:18 -08:00
Abhilash Sathyanarayana
df00ab04b1 asoc: lahaina: add support for aud_ref_clk_sel mux
External mclk to audiocc can be routed via
ext_mclk1_a or ext_mclk1_b gpio on lahaina by configuring
aud_ref_clk_sel mux. Add changes to configure aud_ref_clk_sel
mux in machine driver based on DT property.

Change-Id: I606cb148113263a53d6ad02011db0c5c8d042126
2023-11-09 17:13:32 +05:30
Abhilash Sathyanarayana
a64408fc2f dsp: afe: add support for aud_ref_clk_sel mux
External mclk to audio interfaces can be routed via
different gpios as per platform by configuring
aud_ref_clk_sel mux. Add support in q6afe to expose
new set_param from DSP.

Change-Id: I0677877d2ad0cabdf00a7b213652db4b62f0d8b5
Signed-off-by: Abhilash Sathyanarayana <quic_abhisath@quicinc.com>
2023-11-09 16:38:29 +05:30
Soumya Managoli
82a064bd22 ASoC: dsp: Release lock before return
Before return with error, release the mutex.

Change-Id: I034a90f9c4f52df8bc8e30312f5241ac4ba7bba0
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-11-07 11:25:59 +05:30
qctecmdr
aec1e8f2cf Merge "ASoC: bolero: Add check for CMPDR switch" 2023-11-03 10:16:43 -07:00
qctecmdr
156ce8973c Merge "ASoC: wcd937x: Add flag to decide RX_MUTE for HPHL and EAR" 2023-11-03 10:16:42 -07:00
qctecmdr
f15dbf3313 Merge "ASoC : add support of HDMI controller for rb3gen2 platform" 2023-11-03 04:49:03 -07:00
Soumya Managoli
9d1d4d6fb0 ASoC: wcd937x: Add flag to decide RX_MUTE for HPHL and EAR
Check if HPHL or EAR is enabled before sending RX_MUTE event.

Change-Id: I4ffc42a0d79c8edea77745a2f52361a4cf3dddaa
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-10-31 18:04:51 +05:30
Soumya Managoli
5f2bfaae5b ASoC: bolero: Add check for CMPDR switch
Do not disable CMPDR for EAR if ear mode is on
as it can lead to mute issues on ear.

Change-Id: Ibf54fe6f14c5f08c2004fae36204398109ad53c1
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-10-30 16:43:30 +05:30
Yanhong Wu
b8a853fbe6 ASoC : add support of HDMI controller for rb3gen2 platform
- add support for HDMI controller and
  HDMI external display detection mechanism
- add controls for HDMI

Change-Id: I5da8a12d337d649e49aa2e56c90566a530706287
2023-10-19 15:43:03 +08:00
Vijay Kumar Maddula
e30fce1a7d asoc: lahaina: fractional sample rate support for TDM
Fractional sample rate doesn't work due to GSDC is
not enabled.
Add vote for audio hw clk for fractional sample rate.

Change-Id: I12d5315b0f346d54e7f384b2e38bbfd0f35199ff
2023-10-19 12:26:15 +05:30
Vijay Kumar Maddula
a61f696990 asoc: support for fractional sample rate over tdm
Vote for audio hw clk while fractional sample rate
capture and playback over TDM interface.

Change-Id: I0df0b335f1abec8db6503e7c341ec7c082a8639a
2023-10-19 12:12:49 +05:30
Soumya Managoli
5a4223f249 Revert "asoc: msm-compress : Fix for CTS-on-gsi with gki"
This reverts commit 2c817ed5d8.

Reason for revert: Reverting it untill the dependent gerrit https://review-android.quicinc.com/c/kernel/msm-5.4/+/4887724 is not merged

Change-Id: I6774e50ffb263a42e4bb0fef5d36ce8982b224f9
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-10-18 17:30:03 +05:30
qctecmdr
bed4a769f2 Merge "asoc: msm-compress : Fix for CTS-on-gsi with gki" 2023-10-17 03:17:45 -07:00
qctecmdr
d473924db3 Merge "audio-kernel:swr: Add dynamic SWRM clk support" 2023-10-17 03:17:43 -07:00
Harendra Gautam
5206840c7d audio-kernel:swr: Add dynamic SWRM clk support
- Add support to load dynamic soundwire master clk
  from devicetree file.

Change-Id: I59527f42aa7d3a7b00a0b161c3867c16aaecb263
Signed-off-by: Harendra Gautam <quic_hgautam@quicinc.com>
2023-10-15 22:06:10 -07:00
Abhilash Sathyanarayana
bc1ce40dc0 asoc: codec: make mclk freq configurable in Bolero
Add support to make mclk freq configurable in Bolero
Macros - VA, TX and RX. Fallback to 9.6MHz if mclk
frequency is not defined in DTSI.

Change-Id: I27034d6bd31e1ed225adfc8de1b43cd68da84db3
Signed-off-by: Abhilash Sathyanarayana <quic_abhisath@quicinc.com>
2023-10-11 19:06:07 +05:30
Abhilash Sathyanarayana
981ef85c0e asoc: lahaina: Add ext clk source support
For audio interfaces to be sourced from an external clock, one needs to
configure clock attributes such as the clock root and RCG registers for
operation at an appropriate clock frequency. Add support for this by
registering for a callback with Q6AFE driver which during clock enable,
provides clock attribute values and toggles the GPIO pin sourcing the
external clock.

Change-Id: I64a849e045a13dedd876b6a82c727a0e0610cbb7
Signed-off-by: Abhilash Sathyanarayana <quic_abhisath@quicinc.com>
2023-10-10 08:52:09 -07:00
Abhilash Sathyanarayana
789301acc7 asoc: ext-clk: Add support for configuring ext clk
In the case an external clock is used to source the MCLK, configure
additional clock attributes to be sent to the DSP. Introduce parsing of
new DT properties about the external clock frequency which is required
to find the appropriate clock attributes whilst providing backward
compatibility to not send any additional clock attributes to the DSP.

Change-Id: I029080fe509f9545fb9785bf4a9225e9bb7dff46
Signed-off-by: Abhilash Sathyanarayana <quic_abhisath@quicinc.com>
2023-10-10 08:46:02 -07:00
Abhilash Sathyanarayana
bfe2d34ede dsp: afe: Enhance and expose API for configuring ext clk
To configure the external clock, the client (machine driver) is expected
to configure the clock attributes (M, N, D, div2x, clk root, etc.) and if
required, to toggle the external clock source in the registered callback
function, before sending the param to the DSP. Expose the API to the
clock driver for the same. During clock disable, the sequence of
operations is reversed.

Change-Id: I289625e40c3a9c102270eae3c10ad7bf1a112f4f
Signed-off-by: Abhilash Sathyanarayana <quic_abhisath@quicinc.com>
2023-10-10 08:45:39 -07:00
Soumya Managoli
71d95e95f3 dsp: q6voice: Handle mutex lock-unlock
Release lock before return from function.

Change-Id: I7889ae660c7062514159013bbd78d4731de49fd7
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-09-27 10:59:17 +05:30
Vaibhav Raut
2c817ed5d8 asoc: msm-compress : Fix for CTS-on-gsi with gki
compress_pause was failing on gki mode due to change in
stream state. The change is done to enable pausing even
when the stream state is in the draining state.

Change-Id: I3c29236298f4257f3606827cd82f1b962b6ad802
Signed-off-by: Vaibhav Raut <quic_vraut@quicinc.com>
2023-09-26 11:10:30 +05:30
Soumya Managoli
cc879c910d ASoC: msm-pcm-host-voice: Handle mutex lock-unlock
Return error when dai_data is NULL thereby
avoiding mutex unlock when lock is not acquired.

Change-Id: Ica43cac41da5ff03847641ea5b8d40630976b451
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-09-13 13:23:27 +05:30
qctecmdr
c011875a23 Merge "ASoC: msm-audio-effects-q6-v2: Add BPF order check" 2023-08-23 04:09:20 -07:00
qctecmdr
7baccc0c3b Merge "Asoc: add functionality to get source Track data from FNN module" 2023-08-17 00:26:46 -07:00
Sandhya Mutha Naga Venkata
a225b1346d ASoC: msm-audio-effects-q6-v2: Add BPF order check
Added check for bandpassfilter order in order to avoid
coeff len going out of bounds thereby leading to
memory overflow issues.

Change-Id: I401f5f38a3d54d9d6af66e770d03629ed5e1a2bd
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-08-16 22:11:43 -07:00
qctecmdr
bc70019600 Merge "dsp: add support to get Source Track data from FNN module" 2023-08-15 23:55:03 -07:00
qctecmdr
2ed57ce4a0 Merge "asoc: Add jitter cleaner external clock switch" 2023-08-15 23:55:03 -07:00
Hari Krishna Chowdary Yennana
20af3e7715 Asoc: add functionality to get source Track data from FNN module
- Add support to get Source track data from Adsp's FNN module

Change-Id: Icea13a0ab036d753a4343be04f4ff58bbe3b747c
2023-08-16 12:14:47 +05:30
Hari Krishna Chowdary Yennana
a1937b4242 dsp: add support to get Source Track data from FNN module
- Add support for both audio record and voip call usecases to get STT
  params from dsp.

Change-Id: Ifde484be0109ca25fb7cb9572abc506c1a70e4a4
2023-08-15 22:19:43 -07:00
Vijay Kumar Maddula
782c8273ed asoc: lahaina: add 16 channel support on tdm interface
Added support for 16 channel playback and capture support
on tdm interface

Change-Id: Idbfe55f5ee29c3f01a379e24e85288321dbeee3b
2023-08-13 23:29:40 -07:00
Jing Wang
69a16a0e0f asoc: Add jitter cleaner external clock switch
Add jitter cleaner external clock switch.

Change-Id: Iacdaef52ca0d00bb4423cb8a719ef5e955711619
Signed-off-by: Jing Wang <quic_c_jingwa@quicinc.com>
2023-08-11 04:00:11 -07:00
qctecmdr
7198399f4e Merge "ASoC: msm-pcm-host-voice: Check validity of session idx" 2023-08-11 00:27:08 -07:00
Soumya Managoli
9c91c3d179 dsp: q6asm: Add check for ADSP payload size
There is no check for the ADSP returned payload size
for ASM_SESSION_CMD_GET_MTMX_STRTR_PARAMS_V2 cmd response.
This can lead to buffer overread. Fix is to address this.

Change-Id: I0bd6ee7f19823addc5dde1dfbb32b8a9b102a725
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-08-09 05:16:23 -07:00
qctecmdr
1c04162edc Merge "dsp: Address information leak in dsp drivers" 2023-08-07 22:28:10 -07:00
qctecmdr
7e844dff13 Merge "dsp: q6afe: Add check for fbsp state" 2023-08-07 04:32:12 -07:00
Soumya Managoli
eb692cb343 ASoC: msm-pcm-host-voice: Check validity of session idx
Added check for voice session index.

Change-Id: Ifff36add5d62f2fdc3395de1447075d297f2c2df
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-08-04 20:03:16 -07:00
Soumya Managoli
56fd62a423 dsp: Address information leak in dsp drivers
Due to uninitialised variables used in q6voice
and q6usm drivers, there is a possibility of stack
information leak whenever lesser size data is copied.
Fix is to address this.

Change-Id: I6888b468ce50114be3139111ccf4696827540cfd
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-08-04 12:05:44 +05:30
Soumya Managoli
79f709cdec dsp: q6lsm: Address use after free for mmap handle
The global declared mmap_handle can be left dangling
for case when the handle is freed by the calling function.
Fix is to address this. Also add a check to make sure
the mmap_handle is accessed legally.

Change-Id: I367f8a41339aa0025b545b125ee820220efedeee
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-08-03 03:11:49 -07:00
Soumya Managoli
48f5d8b079 dsp: q6afe: Add check for fbsp state
Added check for fbsp state in get_calib_data functions
to avoid OOB read issues.

Change-Id: I6e818892a6b76497aa41241db3849802f394160a
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-08-03 14:59:41 +05:30