Commit Graph

4361 Commits

Author SHA1 Message Date
Linux Build Service Account
b2aebe2858 Merge 0fd04bae82 on remote branch
Change-Id: I276e5162fe5720cb986ab4440273b6dac247ac87
2025-03-11 18:59:50 -07:00
Linux Build Service Account
1989f99f98 Merge 5bd7691e3c on remote branch
Change-Id: I72dc5157dd3587d99d8151572ce5d85ebea5d8e3
2025-01-14 11:01:02 -08:00
Ratna Deepthi Kudaravalli
0fd04bae82 audio-kernel: avoid out of bound read while checking a bit
Check for calibration type is within a valid range
to avoid out of bound read in checking a bit in a bitmask.

Change-Id: Id8b3af47cd8077f460ac60a33d959ccbb6a21692
Signed-off-by: Shimana P <quic_shimp@quicinc.com>
(cherry picked from commit 544f150134722543d0f8c834164293de5b25e417)
Signed-off-by: Manish Kumar <quic_kmanis@quicinc.com>
2024-12-31 10:24:31 +05:30
Abinath S
921fe7a715 asoc: codec: avoid out of bound write to map array
added check for port num and channel iteration are lessthan 8
to avoid out of bound write to 8x8 map array.

Change-Id: I4c6fe13a5eb09be623a1c40ce16c5a5e4246e021
Signed-off-by: Abinath S <quic_abins@quicinc.com>
(cherry picked from commit 448a545731)
2024-11-10 05:31:45 -08:00
QCTECMDR Service
5bd7691e3c Merge "asoc: codec: avoid out of bound write to map array" 2024-10-30 02:37:19 -07:00
Abinath S
448a545731 asoc: codec: avoid out of bound write to map array
added check for port num and channel iteration are lessthan 8
to avoid out of bound write to 8x8 map array.

Change-Id: I4c6fe13a5eb09be623a1c40ce16c5a5e4246e021
Signed-off-by: Abinath S <quic_abins@quicinc.com>
2024-10-23 11:51:29 +05:30
Thrithendra Ungarala
c90d923bdd asoc: Fixed OOB issue in qcs405
Fixed OOB issue is in function msm_meta_mi2s_snd_shutdown

Change-Id: I8be7d019eb9b89baaef71fa53dd6c7f2383181c0
Signed-off-by: Thrithendra Ungarala <quic_tungaral@quicinc.com>
Signed-off-by: basappa <quic_basappa@quicinc.com>
2024-10-21 15:34:38 +05:30
QCTECMDR Service
8d2afad305 Merge "asoc: codec: wcd934x: enable auto recovery when port overflows" 2024-09-25 02:16:44 -07:00
Vijay Kumar Maddula
5759d8e289 asoc: codec: wcd934x: enable auto recovery when port overflows
Sometimes audio is mute while capturing from dmics
connected to wcd934x codec. Observed slimbus slave port
overflows in non working scenario.
Enable auto recovery from overflows on the slim slave port.

Change-Id: Iad18b80ea13432478fb8a8e1f07bdc354a7106b3
2024-09-23 23:42:15 -07:00
Linux Build Service Account
985dfe144f Merge f7d5c84156 on remote branch
Change-Id: I3a476a6f831778dadaf0339e6b10ceb2e6f7ac64
2024-08-30 04:29:35 -07:00
QCTECMDR Service
f7d5c84156 Merge "asoc: msm-lsm-client: check for param size before copying" 2024-08-06 01:17:21 -07:00
Shimana P
a7a8049215 dsp: q6voice: Add buf size check for cvp cal data
Check for the max size of cvp command register
calibration data that can be copied to avoid
buffer overflow.

Change-Id: I41793bef75095ef06d7dda171bd2eba158422cc9
Signed-off-by: Shimana P <quic_shimp@quicinc.com>
2024-08-02 00:34:08 -07:00
Shimana P
2bec615f5c asoc: msm-lsm-client: check for param size before copying
check for the proper param size before copying,
to avoid buffer overflow.

Change-Id: I3e41439fb747aeebe7677b32c768aea19fcea37c
Signed-off-by: Shimana P <quic_shimp@quicinc.com>
2024-08-02 00:33:30 -07:00
Linux Build Service Account
5f4c6f9118 Merge 14c551f6ab on remote branch
Change-Id: I79493575f272fa5eea21b6a5b0b629468ec09a3b
2024-07-22 00:57:23 -07:00
Shaik Jabida
14c551f6ab dsp: q6lsm: Check size of payload before access
check size of payload before access in q6lsm_mmapcallback.
The payload size can be either 4 or 8 bytes.
Code to verify the payload size is atleast 4 bytes is added.

Change-Id: I64b07f44b66fe6793bc80bc99a09fd0521342531
Signed-off-by: Shaik Jabida <quic_sjabida@quicinc.com>
2024-07-09 14:50:04 +05:30
Linux Build Service Account
dbbde3982b Merge bc4424fa22 on remote branch
Change-Id: I51eef51c87c459f5c5bd96cd250b543f3ad2d691
2024-07-02 06:51:43 -07:00
Abinath S
bc4424fa22 asoc: Fix out-of-bound write
Modified check to avoid out-of-bound write.

Change-Id: Ife5454d8de74b603291d3c129f03f1b901c6de8b
Signed-off-by: Abinath S <quic_abins@quicinc.com>
2024-05-28 12:12:53 +05:30
Ramireddy KrishnaKanth Reddy
4c2ad8cb15 dsp: q6voice: Adds checks for an integer overflow
there is no check for cvs_voc_pkt[2],when recieves
0xffffffff from ADSP which results in an integer overflow
Fix is to address this.

Change-Id: Ie935dd8823981ec260d77f5117f4ef0b0fc08f60
Signed-off-by: Ramireddy KrishnaKanth Reddy <quic_ramikris@quicinc.com>
2024-05-14 23:55:53 -07:00
Linux Build Service Account
a7687d992b Merge fa68ddc57b on remote branch
Change-Id: Ia0c005f129c866045453c7e3e9aff7e85a138184
2024-05-08 02:05:39 -07:00
qctecmdr
fa68ddc57b Merge "Asoc: dsp: Fix to check the list is empty or not" 2024-04-28 23:47:05 -07:00
Sandhya Mutha Naga Venkata
044504518a Asoc: dsp: Fix to check the list is empty or not
Added change to check the list before access it.

Change-Id: Ibbf80f157caf06453daefd3a38607b0460157123
Signed-off-by: Sandhya Mutha Naga Venkata <quic_smuthana@quicinc.com>
2024-04-22 12:37:28 +05:30
qctecmdr
71a6df5172 Merge "Fix for OOB access issue" 2024-04-18 20:56:54 -07:00
Kumar Anurag Singh
bbe748c8df dsp: q6lsm: Check size of payload before access
check size of payload before access in q6lsm_mmapcallback.

Change-Id: I6a755ca4cf54078f0d00f38e303f1b1da29b244c
Signed-off-by: Kumar Anurag Singh <quic_kumaranu@quicinc.com>
2024-04-15 00:50:50 -07:00
Linux Build Service Account
a57f3cdf41 Merge dcd49b01ee on remote branch
Change-Id: I47380ce7dc61900d35bfdff15b8ae808d9a99165
2024-04-12 08:30:40 -07:00
Kumar Anurag Singh
fb09ec8587 Fix for OOB access issue
Added payload size check to avoid OOB read issues.

Change-Id: I4f15bdfdcf15e388ebc49dd0e8cf7a99ed03d0d5
Signed-off-by: Kumar Anurag Singh <quic_kumaranu@quicinc.com>
2024-04-08 02:32:04 -07:00
qctecmdr
dcd49b01ee Merge "ASoC: msm-pcm-q6-v2: Add size check" 2024-03-11 05:19:38 -07:00
Jing Wang
19475bc169 dsp: q6asm increase the locking range
Increase the locking range to prevent shared resources from
being abnormal modified.

Change-Id: Icb7ecfd6110874e6ecfa5bea5c1bd2625127e08d
Signed-off-by: Jing Wang <quic_jingwa@quicinc.com>
(cherry picked from commit ebd90817721f88c9215b6e0511fcaff3125f8138)
2024-03-04 17:55:55 -08:00
Soumya Managoli
c17bb7ef22 ASoC: msm-pcm-q6-v2: Add size check
Check if buf size is valid before comparing
with buf offset.

Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
Change-Id: I8336be046c4922ce2f8bb333b58ca867059e9528
2024-03-03 19:27:32 -08:00
Manoj Kumar N D
8f7501ee82 ASoC : Add proper copyright marking.
Signed-off-by: Manoj Kumar N D <quic_mnd@quicinc.com>
Change-Id: I07448a2f065ff106b0d81ad4ac4e895b8c9151a8
2024-02-26 15:56:52 +05:30
qctecmdr
afdf8ce8e4 Merge "soc: pinctrl-lpi: remove pm ops" 2024-02-06 23:30:09 -08:00
qctecmdr
0f700f978a Merge "dsp: afe: Add check for num_spks" 2024-02-05 22:37:28 -08:00
Yanhong Wu
93604dbb19 dsp: afe: Add check for num_spks
- Check for valid num_spks before accessing.

Change-Id: Idec0edb1f2e6b37d75b007586f65f18c505772f9
Signed-off-by: Yanhong Wu <quic_yanhwu@quicinc.com>
2024-01-23 11:53:51 +08:00
Abhilash Sathyanarayana
f3c67e033c soc: pinctrl-lpi: remove pm ops
pm runtime resume and suspend operation uses
linux clock API to vote/unvote lpass hw resources.
When autosuspend funtionality is used, suspend op
is triggered from a worker thread upon timer expiration,
can block if there is an ongoing clock
operation holding global prepare/unprepare mutex
lock in common clock framwork. If the ongoing
clock operation calls get_sync on pinctrl-lpi,
the get_sync gets scheduled out due to ongoing suspend
by worker thread. This leads to dead lock between
get_sync and suspend, waiting for each other to
complete. Avoid using autosuspend functionality in
pinctrl-lpi to avoid race conditions in clock APIs.

As auto suspend functionality is not required, lpass
hw voting/devoting happens in synchronous manner, can
be done directly by calling DSP voting APIs. Hence remove
runtime pm ops in lpi pinctrl driver.

Change-Id: I86df5e8e502c6466feea196fe8649c34e046aa26
Signed-off-by: Abhilash Sathyanarayana <quic_abhisath@quicinc.com>
2024-01-22 13:24:42 +05:30
Vaibhav Raut
0fd8563254 asoc: msm-compress: Fix compress_pause failure on 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: I3285b84a1e17dc483bf35a45c8cee693f18671c5
Signed-off-by: Vaibhav Raut <quic_vraut@quicinc.com>
2024-01-16 22:39:33 +05:30
Raza Kamal
acb96a6c93 Audio legacy: Integer overflow in msm_lsm_ioctl_compat during audio playback usecase.
size = sizeof(p_info_32) + p_info_32.param_size;
This overflow issue may result heap overflow during copying the data:
memcpy(param_info_rsp, &p_info_32, sizeof(p_info_32));

The validation check is added so that heap overflow can be avoided.

Change-Id: I11dcbe7ebb33e349dfd9f347f3ef25bc781075fc
Signed-off-by: Raza Kamal <quic_razkam@quicinc.com>
2024-01-09 10:38:28 -08:00
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