80 Commits

Author SHA1 Message Date
Tashfin Shakeer Rhythm
a9566ccc56 msm-4.14: Make macros no-op using ((void)0)
Do not solely rely on compiler optimizations to get the workaround
of having macros do nothing using an empty do-while loop. It's
inefficient.

Use ((void)0) to which the standard assert macro expands when NDEBUG
is defined.

No functional change intended.

[mcdofrenchfreis]:
Implement this patch to tree using the command:
git grep -l "do {} while (0)" | xargs sed -i "s/do {} while (0)/((void)0)/g"

Change-Id: I9615c62c46670e31ed8d0d89d195144541baa3e6
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
Signed-off-by: mcdofrenchfreis <xyzevan@androidist.net>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2025-01-17 00:51:10 -03:00
danielml
751e08750f ASoC: Fix stub functions declarations
Change-Id: Ia725b0079107af67b3e114a419e346c3d9b26865
Signed-off-by: danielml <daniel@danielml.dev>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-31 01:57:46 -03:00
Meng Wang
09a5126321 ASoC: codecs: Update SOC_SINGLE_SX_TLV to SOC_SINGLE_S8_TLV
Update SOC_SINGLE_SX_TLV to SOC_SINGLE_S8_TLV to make codec
driver compatiable with upstream driver.

Change-Id: I4061b015d715978f3b294ad630f53b64bf66c2b7
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-31 01:57:34 -03:00
Shalini Manjunatha
99dc9bc583 ASoC: msm-pcm-q6-v2: Add dsp buf check
Fix is to add check for this ADSP returned buf offset + size,
if it is within the available buf size range

Change-Id: I400cc4f5c07164f0a9b405ebea144ea0ae4b6cf2
Signed-off-by: Shalini Manjunatha <quic_c_shalma@quicinc.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-31 01:57:27 -03:00
Laxminath Kasam
f356db9d3c ASoC: msm-pcm-q6-v2: Update copy_to_user to requested buffer size
Avoid copy to user more than requested buffer size
to avoid memory corruption.

Change-Id: Ibf1607f777a358ebd16fd8b8728809afda34eba7
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-31 01:57:21 -03:00
Laxminath Kasam
3603a8088b ASoC: msm-pcm-q6-v2: Update memset for period size
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>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-31 01:57:17 -03:00
Laxminath Kasam
bd5e12849c ASoC: msm-pcm-q6-v2: Reset the buffer if size is partial or zero
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>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-31 01:57:11 -03:00
Soumya Managoli
a1345bf0fd ASoC: msm-pcm-host-voice-v2: Address buffer overflow in hpcm copy
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>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-31 01:57:03 -03:00
Shalini Manjunatha
161a471b31 dsp: q6afe: Check for param size before copying
Check for the proper param size before copying,
to avoid buffer overflow.

Change-Id: Ic7fa9b3dd047d8eeba3cea02b99d6bc5b9df8daf
Signed-off-by: Shalini Manjunatha <quic_c_shalma@quicinc.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-31 01:56:52 -03:00
Karthikeyan Mani
bd3214aa83 dsp: q6afe: Check for payload size before payload access
Check if payload data is big enough before accessing
the data in it.

Change-Id: I939f205a8cebf6ef4859f81fae5429bca013d540
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-31 01:56:39 -03:00
siimsek
d05adcaac1 ASoC: wcd_cpe_services: Fix enum-conversion warnings
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
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-31 01:56:30 -03:00
Soumya Managoli
4f44375c05 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>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-31 01:56:01 -03:00
Soumya Managoli
fbd9928150 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>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-31 01:55:56 -03:00
Arian
b395d9793d ASoC: wcd_cpe_core: Fix snprintf size
techpack/audio/asoc/codecs/wcd_cpe_core.c:1981:2: error: 'snprintf' size argument is too large; destination buffer has size 11, but size argument is 13 [-Werror,-Wfortify-source]
        snprintf(proc_name, (sizeof("cpe") + sizeof("_state") +
        ^
1 error generated.

Change-Id: I976c005263f44d7a97f1496304acf28df30232a1
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-31 01:55:50 -03:00
Soumya Managoli
34dedb32a5 ASoC: msm-pcm-routing-v2: Fix overflow error in routing driver
The reg in soc_dapm_mux is 32-bit. The BE DAI ID passed
as shift(to be operated on the reg) may be more than 31,
which may cause overflow.
Set reg field to SND_SOC_NOPM to avoid any DAPM operation
while passing BE IDs in shift_l field and hence avoid overflow.

Change-Id: Ibbbca04c61b7c56eb4c5a7485a4e93dc28a09709
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-31 01:55:40 -03:00
Sultan Alsawaf
f920e63f4c ASoC: msm-pcm-routing-v2: Fix non-blocking if-statement warning
Change-Id: Ia33743c8770dbb3cffe52aa1b57faa3267f37d8f
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-31 01:55:34 -03:00
lybxlpsv
fb520a1b30 ASoC: wcd934x: Increase volume to 27
Change-Id: Iebd3f08d5928ce3bd52570447872f935080e6c65
Signed-off-by: Jebaitedneko <Jebaitedneko@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-28 02:16:27 -03:00
Jebaitedneko
54555b5247 ASoC: tas256x: Silence logspams
Change-Id: Ic974961b4501276dcdb3e400215b1f2d8de62776
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-28 02:16:24 -03:00
Alexander Winkowski
da232f8a33 Revert "soc: pinctrl-lpi: Initialise at late_initcall"
This reverts commit ee046b18191656af4230d15006bd5957e5b6289e.

The issue has been fixed properly in Idafc26a739df1831d04ea2fde4625e8f9ca1a0ae.

Change-Id: I8275c11660af6cd03907970dea020897b66ceaa3
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-28 02:16:15 -03:00
Angelo G. Del Regno
b570d4a04e ASoC: audio_notifier: Defer external notifier registration if not inited
If the driver is not yet initialized, return EPROBE_DEFER to the
external driver trying to register a notification, so that we
don't miss any.

Change-Id: Idafc26a739df1831d04ea2fde4625e8f9ca1a0ae
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-28 02:16:13 -03:00
Vignesh Kulothungan
a5dd700205 ASoC: swr-mstr-ctrl: Add check condition before enabling IRQ
Enable interrupt request only when the interrupt is
in disabled state.

Change-Id: I67795bf0ee344661e02b0fec3181cd7980d56652
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-28 02:16:08 -03:00
Andrzej Perczak
c866236258 ASoC: bolero-cdc: Fix unitialized rwsem usage
Change-Id: I2bf6f64d34eb082521c92c0b6c22b904d5f73302
Signed-off-by: Andrzej Perczak <linux@andrzejperczak.com>
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-12-28 02:16:03 -03:00
Sultan Alsawaf
a574c44fa6 techpack/audio: Remove unused transcode_loopback_session_lock mutex
Change-Id: I827ac7b62f64bb4166896b4cedcfadd525282c11
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-11-01 20:31:16 -03:00
Akhil Karuturi
8f3809bc55 ASOC: Remove support for ANC headphones
ANC headphones are no longer supported, removed dead code related to the feature.

Change-Id: I3dd51b5b1d9f77fd870947608f8a14fc3f7aeed0
Signed-off-by: Akhil Karuturi <akarutur@codeaurora.org>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-10-26 03:20:26 -03:00
Shaik Jabida
70fe2b13a8 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>
(cherry picked from commit 14c551f6abb3ad841accc8af91c4a18c0a78b2fe)
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-10-26 03:20:24 -03:00
Richard Raya
c54f14f40f Merge tag 'LA.UM.9.1.r1-16400-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/audio-kernel
"LA.UM.9.1.r1-16400-SMxxx0.QSSI14.0"

* tag 'LA.UM.9.1.r1-16400-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/audio-kernel:
  dsp: q6lsm: revert Check size of payload before access

Change-Id: I13f390d1a43aca2ebf7e9f8fd9f91aaa84c5f8fa
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-10-26 03:12:20 -03:00
Richard Raya
01f8009d86 techpack/audio: Reduce wakelocks timeouts to 500ms
Change-Id: I41734cbc82bc1828f884a11a1f7047fba593d724
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-10-13 13:23:17 -03:00
Richard Raya
125b2e96f4 techpack/audio: wcd9xxx: Add timeouts to wakelocks
Change-Id: Ic4dd56c9e4eafe4c925787dce370fe4ba0d8c9e6
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-10-13 13:07:37 -03:00
Richard Raya
1af43dc9da msm-4.14: Run dos2unix treewide
find . -type f -print0 | xargs -0 -n 1 -P 12 dos2unix

Change-Id: I0a93052f5b83de7ee3d66ab372280f5401b8d00b
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:37:38 -03:00
Panchajanya1999
d321a83c5c techpack/audio: Target user build variants
Change-Id: I481c891b8e853d272cfbe2b6b912dc767f74c710
Signed-off-by: Panchajanya1999 <panchajanya@azure-dev.live>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:05 -03:00
Richard Raya
d1df81d98d Merge tag 'LA.UM.9.1.r1-16300-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/audio-kernel
"LA.UM.9.1.r1-16300-SMxxx0.QSSI14.0"

* tag 'LA.UM.9.1.r1-16300-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/audio-kernel:
  dsp: q6voice: Adds checks for an integer overflow
  dsp: q6voice: Adds checks for an integer overflow
  dsp: q6lsm: Check size of payload before access
  dsp: q6lsm: Check size of payload before access
  Fix for OOB access issue
  Fix for OOB access issue
  ASoC: msm-audio-effects-q6-v2: Add BPF order check
  audio-kernel: Add changes in multiple files to unblock CR's
  dsp: q6voice: Add buf size check for cvs cal data

Change-Id: I5a461411130da487544d758966e75808d1eb2936
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-07-23 18:00:56 -03:00
Richard Raya
2d8ca01838 msm-4.14: Remove Qualcomm RmNet extensions
Change-Id: I3b65d85babe24b4b38afb3898b1e00fd06405356
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-05-28 22:07:02 -03:00
Forenche
41ead3880c techpack/audio: Fix xiaomi bug
Basically the charger was detected as USB type-C Headphones so nuke the check as it is retarded
Also the analog USB type-C to 3.5mm Jack dongle doesn't work for us so remove the case entirely

Change-Id: I22b4a7d4280d48b8bfb820a399d5b7e1d7ea74d5
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-05-17 21:59:10 -03:00
Richard Raya
58c8cfc2a7 Merge tag 'LA.UM.9.1.r1-15900.01-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/audio-kernel into HEAD
"LA.UM.9.1.r1-15900.01-SMxxx0.QSSI14.0"

* tag 'LA.UM.9.1.r1-15900.01-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/audio-kernel:
  ASoC: msm-audio-effects-q6-v2: Add BPF order check
  dsp: q6afe: Add check for fbsp state

Change-Id: I98f9624604c595585d514bfc956fe170e3973019
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-03-25 23:06:51 -03:00
Richard Raya
c21740b406 Merge tag 'LA.UM.9.1.r1-14600-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/audio-kernel
"LA.UM.9.1.r1-14600-SMxxx0.QSSI14.0"

* tag 'LA.UM.9.1.r1-14600-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/audio-kernel:
  dsp: q6asm: Add check for ADSP payload size
  ASoC: msm-pcm-host-voice: Check validity of session idx
  ASoC: msm-pcm-host-voice: Check validity of session idx
  dsp: q6lsm: Address use after free for mmap handle
  ASoC: msm-pcm-host-voice: Check validity of session idx
  dsp: q6lsm: Address use after free for mmap handle
  ASoC: msm-pcm-host-voice: Check validity of session idx
  dsp: afe: Copyright update.
  ASoC: msm-pcm-voip: Avoid interger underflow
  ASoC: msm-pcm-voip: Avoid interger underflow
  dsp: q6voice: Add buf size check for cvs cal data
  dsp: asm: validate payload size before access
  dsp: q6core: Avoid OOB access in q6core
  ASoC: msm-pcm-host-voice: Handle OOB access in hpcm_start
  dsp: afe: Add check for sidetone iir config copy size
  ASoC: msm-pcm-voip: Avoid interger underflow
  ASoC: msm-pcm-voip: Avoid interger underflow
  ASoC: msm-pcm-host-voice: Address buffer overflow in hpcm copy
  dsp: add lock in ion free to avoid use after free
  Asoc: check for invalid voice session id

Change-Id: I288b010a1612fb33e30746d584a0460d0906d76c
2023-12-07 20:10:28 -03:00
azrim
f5d1d8f9f6
Merge commit '709af6e1a6ec3689fb14399db326eb7fb3c6e8be' into richelieu
* commit '709af6e1a6ec3689fb14399db326eb7fb3c6e8be':
  asoc: codecs: Add nullptr check
  asoc: codecs: Add nullptr check
2022-08-25 14:56:07 +00:00
Cyber Knight
16ac85a44e
{sound, techpack}: Nuke debug information with -g0
- Level 0 produces no debug information at all.  Thus, -g0 negates -g.

Co-authored-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
Signed-off-by: Cyber Knight <cyberknight755@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-06-16 14:20:43 +00:00
Sultan Alsawaf
413b1aa7e3
rmnet_shs: Fix consistent divide-by-zero when updating stats
- In rmnet_shs_wq_refresh_dl_mrkr_stats(), `tdiff` is used as a divisor and is set to `rmnet_shs_wq_tnsec - tbl_p->l_epoch`.
- However, the function called before it, rmnet_shs_wq_refresh_total_stats(), resets `tbl_p->l_epoch` to`rmnet_shs_wq_tnsec`, resulting in `tdiff` always being zero inside rmnet_shs_wq_refresh_dl_mrkr_stats().
- This results in a 100% consistent divide-by-zero exception:

[32.709616] Unexpected kernel BRK exception at EL1
[32.709626] Internal error: ptrace BRK handler: f20003e8 [#1] PREEMPT SMP
[32.709639] Process kworker/3:1 (pid: 79, stack limit = 0x0000000068506c9d)
[32.709647] CPU: 3 PID: 79 Comm: kworker/3:1 Tainted: G S      W         4.19.202-NeutrinoKernel-lothal-EXP #1
[32.709651] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 20809 (DT)
[32.709664] Workqueue: rmnet_shs_wq rmnet_shs_wq_process_wq
[32.709670] pstate: 60c00085 (nZCv daIf +PAN +UAO)
[32.709676] pc : rmnet_shs_wq_update_stats+0x3c8/0x5c0
[32.709680] lr : rmnet_shs_wq_update_stats+0x230/0x5c0
[32.709684] sp : ffffff801054bce0
[32.709687] x29: ffffff801054bce0 x28: ffffffa9fe579cdd
[32.709692] x27: ffffffa9fe57ada0 x26: ffffffa9fe57b1e0
[32.709697] x25: 0000000000000008 x24: ffffffa9fdc15920
[32.709702] x23: ffffffa9fe57e6b0 x22: 0000000000000007
[32.709706] x21: 0000000000000000 x20: 0000000000000000
[32.709711] x19: ffffffa9fddd4840 x18: 0000000000000000
[32.709716] x17: 0000000000000000 x16: 0000000000000005
[32.709720] x15: 0000000000000000 x14: 0000000000000179
[32.709725] x13: 0000000000000000 x12: 0000000000000000
[32.709730] x11: 0000000000000000 x10: 0000000000000000
[32.709734] x9 : 0000000000000000 x8 : 0000000000000000
[32.709739] x7 : 0000000000000000 x6 : 0000000000000000
[32.709743] x5 : 0000000000000000 x4 : ffffffa9fe57b218
[32.709748] x3 : fffffff2f1d31000 x2 : 0000000000000000
[32.709752] x1 : 0000000000000000 x0 : 0000000000000007
[32.709758] Call trace:
[32.709764]  rmnet_shs_wq_update_stats+0x3c8/0x5c0
[32.709768]  rmnet_shs_wq_process_wq+0x54/0xd0
[32.709775]  process_one_work+0x22c/0x3c0
[32.709779]  worker_thread+0x188/0x5e0
[32.709784]  kthread+0x130/0x160
[32.709790]  ret_from_fork+0x10/0x1c
[32.709797] Code: f9449860 f9022f60 f9449c60 f9023360 (d4207d00)
[32.709802] ---[ end trace 1ae09793f9d923fb ]---

- Reordering the function calls fixes the issue.
- It looks like this issue was hidden by Clang's dead store elimination depending on whether or not tracepoints were enabled, since the quotients in question are only ever used as arguments to trace_rmnet_shs_wq_high().

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
Signed-off-by: Carlos Ayrton Lopez Arroyo <15030201@itcelaya.edu.mx>
Signed-off-by: Samuel Pascua <sgpascua@ngcp.ph>
Signed-off-by: Cyber Knight <cyberknight755@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-06-14 17:50:44 +00:00
Sultan Alsawaf
50876ae723
ASoC: msm: Remove unused transcode_loopback_session_lock mutex
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-05-14 08:36:54 +00:00
Aditya Bavanari
7d99ca60c8
dsp: Fix improper mutex unlock in afe close
During SSR use cases, when AFE APR handle is NULL
and AFE close is invoked, mutex unlock is done without
locking. Fix it and bail out without unlocking the
mutex in this scenario.

Change-Id: Ia2988b56425d8c2d5c726d5860c13e655e7e4ed1
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-05-09 11:22:50 +07:00
azrim
015d8e6a80
treewide: fix function declaration without a prototype
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-05-04 13:16:43 +07:00
azrim
b21ab57e39
Merge commit '5c00aa86ffaaae4f97d8e9fa50a7fbd0195b9b85' into sheesh
* commit '5c00aa86ffaaae4f97d8e9fa50a7fbd0195b9b85':
  ASoC: wcd937x_slave: Add retry while getting logical addr for wcd937x slave
2022-05-03 12:50:29 +07:00
Sultan Alsawaf
1595ae38bb
ASoC: dsp: voice_mhi: Fix uninitialized variable usage
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-05-03 06:11:16 +07:00
Park Ju Hyung
de004764d9
techpack: avoid VLA
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 15:03:44 +07:00
dianlujitao
07110d9976
techpack/audio: sm6150: Report correct key code of headset buttons
Change-Id: I8ecc1609d929ac5a8d4d73711b15b4a741d910a3
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:59:37 +07:00
Yaroslav Furman
739c411a8f
teckpack: codecs: Use scnprintf() for robustness
Reasoning explained here 06236821ae

Also fixes this warning:
../techpack/audio/asoc/codecs/wcd-clsh.c:73:9: warning: ‘snprintf’ argument 4 overlaps destination object ‘buf’ [-Wrestrict]
   73 |   cnt = snprintf(buf, buflen - cnt - 1, "%s%s%s", buf,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   74 |           buf[0] == '\0' ? "[" : "|",
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~
   75 |           states[i]);
      |

Signed-off-by: Yaroslav Furman <yaro330@gmail.com>
Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
Signed-off-by: Fiqri Ardyansyah <fiqri15072019@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:59:37 +07:00
Sultan Alsawaf
fe39ec00a0
ASoC: codecs: Fix uninitialized variable usage
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Fiqri Ardyansyah <fiqri15072019@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:59:37 +07:00
Sultan Alsawaf
0992e6df01
ASoC: dsp: msm-dts-srs-tm-config: Fix trivial unguarded pr_debug()
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Fiqri Ardyansyah <fiqri15072019@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:59:36 +07:00
Albert I
8e6c67a544
techpack/audio: codecs: Fix potential buffer overflows
* detected by Clang 9+'s -Wfortify-source.

[Adapted to techpack/audio]
Signed-off-by: Albert I <kras@raphielgang.org>
Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
Signed-off-by: Nauval Rizky <enuma.alrizky@gmail.com>
Signed-off-by: Fiqri Ardyansyah <fiqri15072019@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:59:36 +07:00
Sultan Alsawaf
c547e28cf1
ASoC: dsp: q6afe: Fix uninitialized th_vi_v_vali variable usage
The on-stack th_vi_v_vali struct is not fully initialized by
afe_get_sp_th_vi_v_vali_data(), leaving members of the th_vi_v_vali
struct used despite not being initialized. Fix it by zeroing out the
memory in afe_get_sp_th_vi_v_vali_data().

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Fiqri Ardyansyah <fiqri15072019@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
Signed-off-by: azrim <mirzaspc@gmail.com>
2022-04-26 14:59:36 +07:00