This nice finding was done by @lostark13 and published at [1]. Let's reuse
this change but reduce sleep range
[1] 91cf3ba1b1
See-Also: https://github.com/nE0sIghT/android_kernel_xiaomi_msm8953/issues/11
Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: I301955c1456000b7ce5f82c9be11694b55d5a0cc
Signed-off-by: TogoFire <togofire@mailfence.com>
Signed-off-by: Sorayukii <sorayukii69@gmail.com>
Yuri Konotopovauthored and Sorayukiicommited 2026-05-15 17:48:19 +07:00
This silences the following compiler warning:
../techpack/audio/asoc/codecs/wsa881x.c:392:9: error: 'snprintf' size argument
is too large; destination buffer has size 20, but size argument is 25
[-Werror,-Wfortify-source]
len = snprintf(tmp_buf, 25, "0x%.3x: 0x%.2x\n", i,
^
Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
Signed-off-by: Sorayukii <sorayukii69@gmail.com>
0ctobotauthored and Sorayukiicommited 2026-05-15 17:48:19 +07:00
ANC headphones are no longer supported, removed dead code related to the feature.
Change-Id: I3dd51b5b1d9f77fd870947608f8a14fc3f7aeed0
Signed-off-by: Akhil Karuturi <akarutur@codeaurora.org>
Akhil Karuturiauthored and Michael Bestascommited 2026-01-06 16:27:33 +02:00
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.
Original-Change-Id: I7753cc6db394704dbb959477150141d42b836bef
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
(cherry-picked from 28658bc2a0a290fdfcab61bed67e89874e99ca47)
[ Re-picking to adapt 1ee23bd8c3 for dsp buf check ]
Change-Id: Ie028d928492e5d113285416226abbeee8e6bfc20
Signed-off-by: Han Sol Jin <hansol@hansol.ca>
Soumya Managoliauthored and Han Sol Jincommited 2024-07-21 16:18:11 -07:00
Avoid copy to user more than requested buffer size
to avoid memory corruption.
Change-Id: Ibf1607f777a358ebd16fd8b8728809afda34eba7
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Laxminath Kasamauthored and Han Sol Jincommited 2024-07-21 16:04:03 -07:00
tinycap test can attempt with different size to
read from driver and need to avoid access more
than period size.
Change-Id: Ifa4ddfb086bd83aa981da62e88da3a9395f5aabc
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Laxminath Kasamauthored and Han Sol Jincommited 2024-07-21 16:03:38 -07:00
Sometimes during device switch in recording,
observe size 0 is return from DSP due to EOS
handling. For ALSA pcm_read to unblock, buffer
appl_ptr is elapsed without actually updating
the buffer. And userspace copies the stale
data(old buffer) causing issue sometimes.
Reset the buffer for that period_size in
such cases instead of transfer stale data.
Change-Id: I0d3ac133a8d95fad0710586e3e947410a41c9c5a
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Laxminath Kasamauthored and Han Sol Jincommited 2024-07-21 16:03:38 -07:00
techpack/audio/asoc/codecs/wcd_cpe_services.c:658:17: error: implicit
conversion from enumeration type 'enum cpe_svc_result' to different
enumeration type 'enum cmi_api_result' [-Werror,-Wenum-conversion]
notif.result = result;
~ ^~~~~~
techpack/audio/asoc/codecs/wcd_cpe_services.c:1350:8: error: implicit
conversion from enumeration type 'enum cpe_svc_result' to different
enumeration type 'enum cpe_process_result' [-Werror,-Wenum-conversion]
rc = cpe_send_msg_to_inbox(t_info, 0, m);
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
Change-Id: Ib9fce60017066e9c96e79195d7dba9ffb9177148
siimsekauthored and Sebastiano Barezzicommited 2024-02-12 18:21:06 +01:00
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>
Soumya Managoliauthored and Michael Bestascommited 2024-01-04 19:23:58 +00:00
There is no check for voip pkt pkt_len,if it contains the
minimum required data. This can lead to integer underflow.
Add check for the same.
Change-Id: I91d4f2ad8dfb060cdb2ab9e36dc9f886ea40908a
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
Soumya Managoliauthored and Michael Bestascommited 2023-11-07 01:14:05 +02:00
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>
Soumya Managoliauthored and Michael Bestascommited 2023-11-07 01:13:50 +02:00
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>
Soumya Managoliauthored and Michael Bestascommited 2023-06-06 17:43:24 +03:00
ASoC CTLs with negative minimum values were changed to use S8_TLV
controls on the upstream audio-kernel.
This is a backport of the upstream change [1] as it didn't land
into any sdm845 tag.
[1] 30fad2dc20
Change-Id: Id4b3038eb5d79a027f063869136ecebc83ee873d
Tan Nayirauthored and Michael Bestascommited 2023-05-20 17:47:47 +03:00
This patch fixes an issue with all the functions defined in
scripts/Makefile.lib gets called everytime when this makefile is
included thus causing the build to slow down.
Bug: 118818737
Change-Id: I4929e64d53a0bc865b12a27cce37520be52c9744
Signed-off-by: Thierry Strudel <tstrudel@google.com>
Thierry Strudelauthored and Michael Bestascommited 2023-01-09 18:44:13 +02:00
"LA.UM.10.3.r1-01000-sdm845.0"
* tag 'LA.UM.10.3.r1-01000-sdm845.0' of https://source.codeaurora.org/quic/la/platform/vendor/opensource/audio-kernel:
dsp: adm: add to check output/input channel
Asoc: check for invalid voice session id
asoc: add code change for pseudo playback and capture BE DAIs.
Change-Id: Ic53db8ee0144214c719593b442d25b24fe651ceb
* tag 'LA.UM.9.3.r1-01600-sdm845.0' of https://source.codeaurora.org/quic/la/platform/vendor/opensource/audio-kernel:
dsp: add change to enable preemption at cal_utils_dealloc_cal.
dsp: add change to handle use-after-free in cal_utils_is_cal_stale
dsp: q6adm: add ADM_LSM_AUDPROC_PERSISTENT cal type
dsp: q6adm: add ADM_LSM_AUDPROC_PERSISTENT cal type
uapi: msm_audio_calibration: add new cal type for ADM_LSM
uapi: msm_audio_calibration: add new cal type for ADM_LSM
dsp: add change to enable preemption at cal_utils_dealloc_cal.
dsp: add change to handle use-after-free in cal_utils_is_cal_stale
Change-Id: Iebd2905a0e98737416b255dd3b4110fcb5b7d422
This patch addresses the following locking error:
msm-lsm-client.c:337 lsm_event_handler() warn: inconsistent returns
'spin_lock:&prtd->event_lock'
Bug: 77543262
Test: build & boot
Change-Id: I6e492df8f90ba25ec17d548249b29b8ba1a87a29
Signed-off-by: David Lin <dtwlin@google.com>
David Linauthored and Michael Bestascommited 2021-03-31 23:58:20 +03:00
This patch addresses the following locking error:
q6asm_callback() warn: inconsistent returns 'irqsave:flags'
Bug: 77543262
Test: build & boot
Change-Id: Iecf73f5985e2a7dfe96bafcf7cf387631a33677d
Signed-off-by: David Lin <dtwlin@google.com>
David Linauthored and Michael Bestascommited 2021-03-31 23:58:19 +03:00
This removes the following logspam on boards without WSA codec:
[ 6.548448] msm_init_wsa_dev: Max WSA devices is 0 for this target?
[ 8.354834] msm_init_wsa_dev: Max WSA devices is 0 for this target?
[ 8.501192] msm_init_wsa_dev: Max WSA devices is 0 for this target?
[ 8.643592] msm_init_wsa_dev: Max WSA devices is 0 for this target?
[ 8.870054] msm_init_wsa_dev: Max WSA devices is 0 for this target?
[ 9.007772] msm_init_wsa_dev: Max WSA devices is 0 for this target?
[ 9.144575] msm_init_wsa_dev: Max WSA devices is 0 for this target?
[ 13.487951] msm_init_wsa_dev: Max WSA devices is 0 for this target?
[ 14.061869] Sound card sdm845-tavil-tdm-snd-card registered
Change-Id: Ifc29034e23d6b968c473e9f2d0f312cae27c49b5
Signed-off-by: David Lin <dtwlin@google.com>
David Linauthored and Michael Bestascommited 2021-03-31 23:58:14 +03:00
../techpack/audio/asoc/codecs/wsa881x.c:392:9: error: 'snprintf' size argument is too large; destination buffer has size 20, but size argument is 25 [-Werror,-Wfortify-source]
len = snprintf(tmp_buf, 25, "0x%.3x: 0x%.2x\n", i,
^
1 error generated.
The warnings are correct. Fix the size arguments by only allowing the
amount of bytes that the size of the char arrays are.
Signed-off-by: shagbag913 <sh4gbag913@gmail.com>
Signed-off-by: Khusika Dhamar Gusti <mail@khusika.com>
Change-Id: I31366b5cd2f13f6d168111a4b0a2f013bd6b92f7
shagbag913authored and Michael Bestascommited 2021-01-17 05:14:18 +02:00
This is the only way to solve the mess that happens whenever
we try to rebuild the kernel without mrproper'ing it first.
It's the most dirty thing on Earth, but it's really the only
possible option.
Change-Id: Ie72adbb63d8c0a9c2d53cd4a9e8610ad9ccfef9b
Angelo G. Del Regnoauthored and Michael Bestascommited 2020-06-30 02:48:34 +03:00
* tag 'LA.UM.8.3.r1-07900-sdm845.0' of https://source.codeaurora.org/quic/la/platform/vendor/opensource/audio-kernel:
asoc: msm-compress: Add lock in controls _put() and _get() callback
Revert "rtac: Add mutex protection for rtac cal apis"
asoc: msm-routing: Fix array out of bounds issue.
asoc: msm-compress: Replace goto with return in case of invalid value.
asoc: fix for fm not routing to speaker
asoc: msm-compress: Added missing mutex initialization for pdata
rtac: Add mutex protection for rtac cal apis
ASoC: fix compilation warnings after enabling LLVM
Change-Id: Ib02bb0c221bb89d317cf79dc90476b6211819465
Enable tech packages to have kernel drivers that are physically
located in the kernel source tree but not present in the kernel
repository. This is done via a manifest line item to fetch a
techpackage-module into $KERNEL/techpack/$techpackage-module.
$KERNEL/techpack/Kbuild will automatically detect any
subdirectories and link them to the kernel's kbuild system.
The resulting layout of techpack within kernel source would be as
follows :-
kernel/
├── techpack/
├── Kbuild
└── stub
│ ├── Makefile
│ ├── include
│ │ └── uapi
│ │ └── Kbuild
└── stub.c
├── techpackage-module
├── Makefile
├── include
│ └── uapi
│ ├── Kbuild
$KERNEL/techpack only contains Kbuild (no Makefile) at the
toplevel and this Kbuild takes care of both compiling the
subdirectories and of exporting the needed header files therein.
The reason for having only Kbuild at the top is that Kbuild
and Makefile cannot exist together in same directory and Makefile
doesn't cater to uapi header installation.
stub is an empty techpackage-module which serves both as a sample
layout and satisfies the requirement of kernel build system, by
providing necessary buit-in.o, when no other techpackage-module has
been pulled under techpack/.
$KERNEL/techpack/techpackage-module should have a Makefile at the
top and Kbuild under $KERNEL/techpack/techpackage-module/include/uapi
directory. The uapi headers pertaining to a techpackage-module
should reside under $KERNEL/techpack/techpackage-module/include/uapi
and associated Kbuild should have necessary rules to export it.
Change-Id: I0d0ced38566907d2074831edde0934833f666eff
Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
Signed-off-by: Imran Khan <kimran@codeaurora.org>
Bryan Huntsmanauthored and Imran Khancommited 2017-07-26 16:31:52 +05:30