Commit graph

4,237 commits

Author SHA1 Message Date
Linux Build Service Account
6bdda76dfe Merge 98fd7ebdbc on remote branch
Change-Id: I6013b7afd4785d174da8a50628ce527f02e43d5d
2023-05-28 12:36:51 -07:00
qctecmdr
98fd7ebdbc Merge "ASoC: msm-pcm-voip: Avoid interger underflow" 2023-05-20 08:24:31 -07:00
qctecmdr
259e975f99 Merge "dsp: q6adm: Resolve mem corruption in adm cb" 2023-05-20 08:24:31 -07:00
qctecmdr
bec8d6d97f Merge "dsp: q6core: Avoid OOB access in q6core" 2023-05-20 08:24:31 -07:00
qctecmdr
e04569edc4 Merge "ASoC: msm-pcm-host-voice: Address buffer overflow in hpcm capture copy" 2023-05-20 08:24:31 -07:00
qctecmdr
3742f71065 Merge "dsp: q6voice: Add buf size check for cvs cal data" 2023-05-20 08:24:31 -07:00
Soumya Managoli
2f6eb70111 ASoC: msm-pcm-voip: Avoid interger underflow
There is no check for voip pkt pkt_len,if it contains the
min required data. This can lead to integer underflow.
Add check for the same.

Change-Id: I4f57eb125967d52ad8da60d21a440af1f81d2579
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-05-17 18:39:17 +05:30
Soumya Managoli
7756692d54 ASoC: msm-pcm-host-voice: Address buffer overflow in hpcm capture copy
There is no check for the copy data size of the
ADSP returned payload. Add check for the max
hpcm_buf_node size before copy to avoid
buffer out of bounds issue.

Change-Id: Id647888430ce302359a857ef54d321bee99889bf
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-05-17 18:32:01 +05:30
Soumya Managoli
3b0442cec3 dsp: q6core: Avoid OOB access in q6core
"num_services", a signed integer when compared
with constant results in conversion of signed integer
to max possible unsigned int value when "num_services"
is a negative value. This can lead to OOB read.
Fix is to handle this case.

Change-Id: Id6a8f150d9019c972a87f789e4c626337a97bfff
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-05-17 18:26:51 +05:30
Soumya Managoli
8c0d7cffab dsp: q6voice: Add buf size check for cvs cal data
Check for the max size of cvs command register
calibration data that can be copied else will
result in buffer overflow.

Change-Id: Id7a4c5a9795143798b68dfde779f17fb450e3848
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-05-17 15:59:27 +05:30
Soumya Managoli
3ebb66aa5d ASoC: msm-pcm-host-voice: Handle OOB access in hpcm_start
There is no error check for case when hpcm_start
is called for the same RX or TX tap points multiple times.
This can result in OOB access of struct vss_ivpcm_tap_point.
Handle this scenario with appropriate no_of_tp check.

Change-Id: Ib384d21c9bf372f3e5d78f64b5c056e836728399
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-05-17 13:35:43 +05:30
Linux Build Service Account
8e72f26fa8 Merge fad96773ea on remote branch
Change-Id: I345fe00664e898dbc5c3c39101a9758e71af1886
2023-05-01 11:52:41 -07:00
Soumya Managoli
dcfb376d70 dsp: q6adm: Resolve mem corruption in adm cb
Conversion of negative "num_modules" var value
will result in max possible unsigned int value
and hence can cause mem corruption when accessed.

Resolve this by assigning the same data type
to "num_modules" var as used in the calling fn.

Change-Id: I4c9d7215b9c7345637e1eb3a1992a41fef71c5cb
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-04-05 16:02:15 +05:30
qctecmdr
fad96773ea Merge "asoc: compress: Modify incorrect partial buffer size check" 2023-03-24 03:14:32 -07:00
qctecmdr
3a37affb89 Merge "dsp: Add check for negative value size" 2023-03-24 03:14:32 -07:00
Shalini Manjunatha
1b16d157fa asoc: compress: Modify incorrect partial buffer size check
Due to incorrect check for buffer size calculation during partial buffer size check,
which is part of code for gapless playback support in GKI mode,
partial buffers are missed from sending to DSP causing buffer handling issues.

Change-Id: Ic6f5a3ce6958ddc94dc7bb7e92ebb778aa13cb64
Signed-off-by: Shalini Manjunatha <quic_c_shalma@quicinc.com>
2023-03-20 12:17:44 +05:30
Long Li
b39f6924f3 asoc: msm-pcm-routing-auto: Add checks to enable senary port
Add checks to enable senary port.

Change-Id: I100d785842780ad32e8693f3b4a77dbfb0d5746b
Signed-off-by: Long Li <quic_lonli@quicinc.com>
2023-03-13 15:40:26 +05:30
Linux Build Service Account
c460b4272c Merge 819940c283 on remote branch
Change-Id: Ia685afd33886f1c45473f92771b377f8efc7b4d9
2023-03-10 13:55:58 -08:00
Linux Build Service Account
bc75553836 Merge 60eaf5fe50 on remote branch
Change-Id: Ie95d4f114d593e5744a0b1c77809c261af94ab14
2023-03-01 21:35:26 -08:00
Sujin Panicker
2bd17f3f0d dsp: Add check for negative value size
There is a possibility where an access
to /dev/msm_audio_cal from third party
could pass negative size which would
lead to crash.
Avoid this by negative value size check.

Change-Id: Id36c5f10dccbd7d0ee85aa3310badec6815237a2
Signed-off-by: Sujin Panicker <quic_spanic@quicinc.com>
2023-02-22 22:02:36 -08:00
qctecmdr
819940c283 Merge "asoc: Fix possible overflow in routing driver" 2023-02-22 02:44:15 -08:00
Kishan Kumar Majeti
6a133ce3b4 asoc: Fix possible overflow in routing driver
Send SOC_NO_PM in reg filed to avoid overflow in DAPM operation

Change-Id: Id4845f1513612b54c7949d7c5c921f0529e5b847
Signed-off-by: Kishan Kumar Majeti <quic_kkmajeti@quicinc.com>
2023-02-21 13:46:56 +05:30
Manoj Kumar N D
8440c8f137 asoc : Update proper comment for endpoint 2
Update proper description to explain
the usage of endpoint ID 2.

Change-Id: I45a52ef43c3fcd42f97de37e7bb80517dfe09db3
Signed-off-by: Manoj Kumar N D <quic_mnd@quicinc.com>
2023-02-19 22:56:12 -08:00
Manoj Kumar N D
60eaf5fe50 asoc : mark used cal block as stale
Mark the used cal block as stale so that it is not reused.

Change-Id: I142d21d6d32a1b5ad24c3a2708b1df023d70947e
Signed-off-by: Manoj Kumar N D <quic_mnd@quicinc.com>
2023-02-13 05:16:11 -08:00
qctecmdr
381b946f06 Merge "asoc: Add build option for qcs6490" 2023-02-08 22:34:31 -08:00
qctecmdr
7d18564cd4 Merge "asoc: kona: Add QUAD I2S EBIT clk define to kona" 2023-02-08 10:19:23 -08:00
Boyuan Yan
8972574067 asoc: Add build option for qcs6490
Add build option for qcs6490.

Change-Id: I2cd3ac1e296c8eb64702d26d0cb461052bc3ade2
Signed-off-by: Boyuan Yan <quic_boyuyan@quicinc.com>
2023-02-07 01:37:53 -08:00
ronghuiz
b12f10836f asoc: kona: Add QUAD I2S EBIT clk define to kona
Hdmi-in used QUAD-I2S to input, need configure I2S
to slave mode.

Change-Id: I1d27d51c766538bb8f61cd74c5dcb6cc18954e81
Signed-off-by: ronghuiz <quic_ronghuiz@quicinc.com>
2023-02-02 10:06:33 +08:00
qctecmdr
0013cdbfbe Merge "ASoC: msm-pcm-q6-v2: Add dsp buf check" 2023-01-24 05:25:22 -08:00
Soumya Managoli
89e9d61385 ASoC: Add check for pm_qos_req before removal
Check if pm_qos_req is active before removal.

Change-Id: I0076a73ffa6310dbb4cb207ca7a651aa1d3fdf04
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-01-22 21:08:01 -08:00
Soumya Managoli
02230ca65b ASoC: msm-pcm-q6-v2: Add dsp buf check
Current logic copies user buf size of data
from the avail dsp buf at a given offset.
If this offset returned from DSP in READ_DONE event
goes out of bounds or is corrupted, then it can lead to
out of bounds DSP buffer access, resulting in memory fault.
Fix is to add check for this buf offset, if it is within
the buf size range.

Change-Id: I7753cc6db394704dbb959477150141d42b836bef
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-01-18 22:21:41 -08:00
Manoj Kumar N D
7d196f8368 dsp : assign null to pointer that has freed address
After freeing up the memory assign null to the pointer
that had the address.

Change-Id: I242a936c434dc449ec9fd19b0c34e843c3cf0913
Signed-off-by: Manoj Kumar N D <quic_mnd@quicinc.com>
2023-01-16 02:44:59 -08:00
Manoj Kumar N D
9e949d228f asoc : send chanel mixer while rerouting sound device
Channel mixer has to sent while the sound devices are rerouted
as capture/playback prepare will not be called during rerouting.

Change-Id: I8473d89c7aff9f5f2a1dd2f3f4a8fa5d387b2429
Signed-off-by: Manoj Kumar N D <quic_mnd@quicinc.com>
2023-01-10 19:26:24 -08:00
qctecmdr
a716af0907 Merge "asoc: wcd938x/wcd937x: add null pointer check for mbhc variable" 2023-01-04 22:25:12 -08:00
qctecmdr
926f43b827 Merge "asoc: lahaina: set correct swr port map when wcd disabled" 2022-12-30 02:33:00 -08:00
Shalini Manjunatha
3aea11c50c asoc: lahaina: set correct swr port map when wcd disabled
When wcd is disabled, due to incorrect swr port map
being set, crash is seen. Hence set correct default
port map for SWR through corresponding bolero macro.

Change-Id: Ib17642832f98fb47c9e571cf7763f38a191bdfba
Signed-off-by: Shalini Manjunatha <quic_c_shalma@quicinc.com>
2022-12-21 14:49:28 +05:30
Shalini Manjunatha
7af6a8b6a4 asoc: wcd938x/wcd937x: add null pointer check for mbhc variable
Whenever MBHC is disabled through kernel config file,
particular vaiable of mbhc is not guarded for NULL
pointer check causing kernel panic,
Hence add NULL check for that pointer variable.

Change-Id: Iae4950ceb076239a130b4f033cb2f08cd65a92a9
Signed-off-by: Shalini Manjunatha <quic_c_shalma@quicinc.com>
2022-12-21 10:35:14 +05:30
Vaibhav Raut
065923bf1b asoc: wsa881x: Fix to set the correct volume level
To avoid mismatch  volume level on WSA8810, update
the enum.

Change-Id: I01f592d0817d83a1e0ea7b736c0c101e6903cceb
Signed-off-by: Shashi Kant Maurya <smaury@codeaurora.org>
2022-12-20 15:54:10 +05:30
qctecmdr
1ff3e5bc1f Merge "asoc : enable mclk after ssr for talos" 2022-12-15 01:36:17 -08:00
qctecmdr
e036791fd0 Merge "dsp: Remove lock in voice_map_cal_memory" 2022-12-11 20:54:55 -08:00
Manoj Kumar N D
9e4c582937 asoc : enable mclk after ssr for talos
Enable the mclk after the ssr for audio bring up in 6155.

Change-Id: I87d5bb2d16a24fd9618eae08e4be75f116ae1a5b
Signed-off-by: Manoj Kumar N D <quic_mnd@quicinc.com>
2022-12-07 20:04:36 -08:00
Srinivasa Reddy M N
7581982cee ASoC: Add support "adm cmd register" and "adm pp" events
Added support for "ADM_CMD_REGISTER_EVENT" and "ADM_PP_EVENT"
events.

Signed-off-by: Srinivasa Reddy M N <quic_c_mullan@quicinc.com>
Change-Id: I80d8dc6d9fccdac67ea616d19415aa2133a3f370
2022-12-05 21:48:56 -08:00
Linux Build Service Account
8ce6d5fb80 Merge 5fb54fcd05 on remote branch
Change-Id: I7923fdd1cfb7f70c01f01a014d0d770aba9747f8
2022-12-05 21:43:58 -08:00
Soumya Managoli
66c053253b dsp: Remove lock in voice_map_cal_memory
voice_map_cal_memory is already under
locked context of common_lock from fn
voc_register_vocproc_vol_table from where
it is invoked.
Remove locking the same lock again in
voice_map_cal_memory to avoid deadlock.

Change-Id: Ibd6c7169377418c7bda3310a0e422279fd4e7295
2022-12-04 20:03:25 -08:00
qctecmdr
5fb54fcd05 Merge "asoc : modify spf_machine_dlkm module name for GVM" 2022-11-24 20:26:46 -08:00
qctecmdr
931638c467 Merge "uapi:align msm_audio_ar.h with AR" 2022-11-21 19:25:19 -08:00
Hari Krishna chowdary Yennana
73e13435c9 asoc: Update wcd937x codec driver controls
Amic2 recording is failing due to missing of mixer controls.
Change is to add support of ADC and DMIC control for swr master
channel map.

Change-Id: I0377ec84a49d2eaa390872a29e2d8cf8909794b1
Signed-off-by: Hari Krishna Chowdary Yennana <quic_hyennnan@quicinc.com>
2022-11-17 23:12:03 -08:00
Jiazai Wu
457009dc94 uapi:align msm_audio_ar.h with AR
need to align msm_audio_ar.h with AR.

Change-Id: Ib3d7bad7e2e3b1320927d1d2ce7f891bfd7bd065
2022-11-17 17:16:54 +08:00
Kogara Naveen Kumar
b39574b943 asoc : modify spf_machine_dlkm module name for GVM
Suggested-by: Ahamed Rasim.

Change-Id : I642ddf5fd475ba5e6a1f27ab60339c0287fe5678
2022-11-09 23:53:11 -08:00
Linux Build Service Account
0ef5e3e513 Merge fed8cf2681 on remote branch
Change-Id: I039e883ed2fa1672d8a5f765d764edaa218efe0a
2022-11-08 00:49:14 -08:00