16 Commits

Author SHA1 Message Date
Abinath S
4fa5939ec9 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>
2025-12-26 17:07:54 +08:00
Shalini Manjunatha
a037977eb0 BACKPORT: dsp: afe: check for param size before copying
Check for the proper param size before copying,
to avoid buffer overflow.

Original-Change-Id: I70c52e6ab76f528ea3714784ab9013b070839c40
Signed-off-by: Shalini Manjunatha <quic_c_shalma@quicinc.com>
Change-Id: Ic7fa9b3dd047d8eeba3cea02b99d6bc5b9df8daf
2025-12-26 17:07:33 +08:00
Samuel Pascua
3389a4a5d0 Revert "techpack: Import M515FXXU1ATH4 for sm7150 devices"
Now that possible races are solved, it is safe to use A71 drivers.
M51 drivers is still susceptible to audio breakage.

Fixes out-of-tree build as well.

This reverts commit 904a06434c.

Change-Id: Ia3cc443408d874a97d62fa703a7c5c7ff10da247
2025-09-27 22:42:40 +08:00
Samuel Pascua
8574f2dc5e techpack: audio: fix usage of uninitialized srcu notifier chain
`audio_notifier_init()` calls `audio_pdr_register()`
which registers an SRCU notifier. `audio_pdr_register()`
is called before the SRCU notifier chain is initialized.

Initialize the SRCU notifier chain earlier to avoid
this issue.

Change-Id: Ib605b95782eb9a23afd8d4b8f09ff63f3b65692b
Signed-off-by: Samuel Pascua <pascua.samuel.14@gmail.com>
2025-09-27 22:42:40 +08:00
Meng Wang
80d0f60662 asoc: codec: 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>
[dereference23: Backport to msm-4.14]
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
2025-09-17 16:58:11 +08:00
Haky86
904a06434c techpack: Import M515FXXU1ATH4 for sm7150 devices
* The recent kernel sources have broken audio on sm7150 devices, use proper one to fix audio.

Change-Id: I57a0e5e4153e36d24d2fca28151c587c5f307685
2024-05-13 18:34:00 +02:00
Panchajanya1999
7e7d4c5138 techpack/audio: tas256x: Provide correct samplerates to switch cases
Seems like Texas guys made a mistake which went un-noticed.

Change-Id: I551c6dfaf1ca5e279f05e74991fc113e96c22627
2024-05-13 18:33:59 +02:00
Soumya Managoli
e820bbb12d ASoC: 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: I94a371bd95997e7cc09702c86bbb3e4b33bac516
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
[dereference23: Forward port to 4.14]
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
2024-05-13 18:33:59 +02:00
Sultan Alsawaf
bf8a2ffc95 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().

Change-Id: I14e50ea3393c2c898d77bdf3e04933e905520126
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: atndko <z1281552865@gmail.com>
2024-05-13 18:33:58 +02:00
Sultan Alsawaf
1675ac77d1 ASoC: dsp: voice_mhi: Fix uninitialized variable usage
Change-Id: I1f36bc6c96e85b28890922862a070ea990cd3c06
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: atndko <z1281552865@gmail.com>
2024-05-13 18:33:58 +02:00
Sultan Alsawaf
89f152aaa8 ASoC: codecs: Fix uninitialized variable usage
Change-Id: Ib314e5ff7a7fbb013549d796064289bc24057d4f
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: atndko <z1281552865@gmail.com>
2024-05-13 18:33:58 +02:00
Sultan Alsawaf
a48a9c756d ASoC: msm-pcm-routing-v2: Fix non-blocking if-statement warning
Change-Id: I5ed5be34a7c4d6135b735965e1fb8070f0296242
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
[dereference23: Extend to audio-kernel 4.0]
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
2024-05-13 18:33:57 +02:00
Sultan Alsawaf
79fa486b09 ASoC: dsp: msm-dts-srs-tm-config: Fix trivial unguarded pr_debug()
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
[dereference23: Extend to audio-kernel 4.0]
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>

Change-Id: I6eda8759d8d8eb5441ff85d8e102d1bde111f8c4
2024-05-13 18:33:57 +02:00
Sultan Alsawaf
28da804b7b ASoC: dsp: amrwb_in: Fix AUDIO_GET_AMRWB_ENC_CONFIG ioctl
The non-blocking if-statement here causes the AUDIO_GET_AMRWB_ENC_CONFIG
ioctl to always return -EFAULT, even upon success. Fix it by correctly
guarding the -EFAULT return value.
Change-Id: I23f732a79487abec63d47894ecdf87686d7a75be
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
[dereference23: Extend to audio-kernel 4.0]
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
2024-05-13 18:33:57 +02:00
Danny Lin
5df67f3c14 techpack: audio: Remove build timestamp injection
This causes parts of the audio module to be rebuilt during every
incremental build, even if there are no changes:

  CC      techpack/audio/ipc/apr.o - due to command line change
  CC      techpack/audio/ipc/apr_v2.o - due to command line change
  CC      techpack/audio/ipc/apr_tal_rpmsg.o - due to command line change
  CC      techpack/audio/ipc/wcd-dsp-glink.o - due to command line change

We're only experiencing this issue in techpack/audio/ipc at the moment,
but kill the timestamp injection in all the audio components to
eliminate the possibility of encountering this issue again in the
future. This is harmless since the injected BUILD_TIMESTAMP macro is
never used.

Change-Id: Ie964cc70b0575166804bf595c629a34ed68894c3
2024-05-13 18:32:02 +02:00
Haky86
023939f454 techpack: Import from A715FXXUADWE1
Change-Id: I358a6562180b33f9bb934071ddbf806cd4ca55c1
2024-05-13 18:32:01 +02:00