74 Commits

Author SHA1 Message Date
Michael Bestas
91470f1764 techpack: audio: Add missing FM recording mixer setup
Change-Id: Ic4bd02ab12afe2b4a8c5fc58c99541fa879b50b4
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2026-01-04 11:55:50 +05:30
celtare21
88537b06d8 techpack: audio: Remove pm_qos usage
Signed-off-by: celtare21 <celtare21@gmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2026-01-04 11:55:50 +05:30
freak07
bf69a988bf techpack/audio: Use power efficient workingqueues
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Signed-off-by: Abhishek001konni <abhishek001konni@gmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2026-01-04 11:55:50 +05:30
Sultan Alsawaf
cd343931e7 ASoC: msm: Remove unused transcode_loopback_session_lock mutex
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2026-01-04 11:55:49 +05:30
pwnrazr
699ab82dae techpack: audio: wcd: disable debugfs failed errors
referenced: d21ef71b0d7e142795adf2a8d48c65c7e98f16b9
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2026-01-04 11:55:49 +05:30
vantoman
46ddd20b38 dsp: mius: Protect afe_set_parameter critical section
* Code from branch: odin-r-oss

Change-Id: I1fbd53d5ec0b346bfeb1ffb27ded8f5a45224874
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2026-01-04 11:55:49 +05:30
Jebaitedneko
d3a9816c63 techpack: dsp: q6afe: silence TI-SmartPA logspam
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2026-01-04 11:55:46 +05:30
Panchajanya1999
f38ba49646 techpack/codecs: AAC: Hardcode max_bitrate to 384k
Our DSP is supposed to support this.

Change-Id: Ib93ee2ec1b0c1a2fd1269f64d5f133db65d1b4a0
Suggested-by: Steve Kondik <shade@chemlab.org>
Signed-off-by: Panchajanya1999 <panchajanya@azure-dev.live>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2026-01-04 11:55:46 +05:30
Panchajanya1999
8aea9a1d5c techpack/audio: tas256x: Provide correct samplerates to switch cases
Seems like Texas guys made a mistake which went un-noticed.

Change-Id: Ibff21be4040a769ab3b6466a4619fa7f4daa0d71
Signed-off-by: Panchajanya1999 <panchajanya@azure-dev.live>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2026-01-04 11:55:46 +05:30
Ivan Vecera
f5764288e9 techpack: audio: 4.0: tas2562: Fix Amp output level control
TAS2562 datasheet specifies that amp_level value is represented
by bits[5:1] with maximal value 0x1c (values 0x1d-0x1f are
marked as reserved. Fix maximum and shift value of associated sound
control accordingly (max value 0x1c and shift 1).

Signed-off-by: Ivan Vecera <ivan@cera.cz>
Change-Id: I77be6a744ba4de8a51c91eba5602e4fdfb88b3ac
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2026-01-04 11:55:46 +05:30
Danny Lin
cd5ae9245d techpack: ASoC: sm8150: Split sa8155 driver into separate config option
There's no need to compile the sa8155 driver when targeting sm8150
mobile devices.

Signed-off-by: Danny Lin <danny@kdrag0n.dev>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2026-01-04 11:55:46 +05:30
Jebaitedneko
1e0f81accb techpack: audio: remove qos requests for sm8150 2026-01-04 11:55:46 +05:30
Miguel de Dios
bc7e997328 asoc: msm-dai-q6-v2: Mark msm-dai-q6 drivers as sync probe.
Bug: 115776306
Bug: 77146523
Change-Id: I31d533a62e2dbfbc27aea8bf8794cf4c5d201c9a
Signed-off-by: Miguel de Dios <migueldedios@google.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2026-01-04 11:55:39 +05:30
Sultan Alsawaf
ba1a605fb5 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: Pranav Vashi <neobuddy89@gmail.com>
2026-01-04 11:55:34 +05:30
Sultan Alsawaf
f5c9cfa9d9 ASoC: dsp: voice_mhi: Fix uninitialized variable usage
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2026-01-04 11:55:34 +05:30
Sultan Alsawaf
fe638dbfd1 ASoC: codecs: Fix uninitialized variable usage
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2026-01-04 11:55:34 +05:30
Aditya Bavanari
9176df89d4 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: Pranav Vashi <neobuddy89@gmail.com>
2026-01-04 11:55:33 +05:30
Yaroslav Furman
02990d676f drivers: remove a few loggers
Signed-off-by: Yaroslav Furman <yaro330@gmail.com>
Signed-off-by: neobuddy89 <neobuddy89@gmail.com>
2026-01-04 11:55:31 +05:30
Adam W. Willis
fa0dad600f treewide: Don't warn about IPC logging failures
Seeing as we shut this down intentionally, I don't see why we need
to be alerted it's failure, repeatedly, and from multiple drivers.

Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2026-01-04 11:55:25 +05:30
Adam W. Willis
4dce5d2473 treewide: Don't warn about debugfs init failure if disabled
Silence loggers directly where possible in order to avoid
extraneous guarding. Additionally, clean up npu_debugfs.

Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2026-01-04 11:55:25 +05:30
Sebastiano Barezzi
cc9bccd9ef techpack: audio: Import Xiaomi changes
Change-Id: I52e78d6fe17834ffecf5cd269b07b1bd53d9790d
2026-01-04 11:55:23 +05:30
Sebastiano Barezzi
e5802413fb techpack: audio: asoc: codecs: Use spk-id standard driver
Change-Id: I4093c026405398b752b183bc4a8639e3eccf49fc
2026-01-04 11:55:23 +05:30
Sebastiano Barezzi
ef37b66360 techpack: audio: asoc: codecs: tfa98xx: Make it compile without debugfs
Change-Id: Ia04686616f8f2b0b5fa5eb810025811970d624d5
2026-01-04 11:55:23 +05:30
Sebastiano Barezzi
70f2ee5211 techpack: audio: asoc: codecs: tfa98xx: Fix includes
Change-Id: If34b42dc06c36b9663b8422ee6d2746d4f54b285
2026-01-04 11:55:23 +05:30
Sebastiano Barezzi
ee1c2e5558 techpack: audio: asoc: codecs: tas256x: Shut up
Change-Id: I4beed107b75999e6f909467062bccb0a0e3229eb
2026-01-04 11:55:23 +05:30
Sebastiano Barezzi
e269042190 techpack: audio: Import Xiaomi drivers
* cs35l41: From cepheus-q-oss
* tas2557: From cepheus-q-oss
* tfa98xx: From cepheus-q-oss
* cirrus: From cepheus-q-oss
* elliptic: From cepheus-q-oss
* mius: From cepheus-q-oss
* tas256x: From vayu-r-oss
* cs35l41_v2: From nabu-r-oss

* Run clang-format on source files

Change-Id: If9f9dd884f924ef31d01623f11144134b2c8c206
2026-01-04 11:55:23 +05:30
Sebastiano Barezzi
28ea507bcb techpack: audio: Allow ASoC codecs selection through Kconfig
* Not every device may want all the additional codecs from OEM,
  especially on common kernel sources with a lot of codecs

Change-Id: I1521f714c90e74f1f674495bee312e28e55cf87a
2026-01-04 11:55:23 +05:30
LuK1337
5a81c622ce techpack: audio: Make all drivers built in
Change-Id: I6e63a2de8caae25f298aa868d2b8b4367603bb23
2025-05-31 19:17:18 +03:00
Rama Bondan Prakoso
4f6177b19d techpack: audio: Include trinket platform config directly
Change-Id: If0868d612f9e2a80956473cc416f229ed3211c37
Signed-off-by: Rama Bondan Prakoso <ramanarubp@gmail.com>
Signed-off-by: Fiqri Ardyansyah <fiqri15072019@gmail.com>
2025-05-31 19:17:18 +03:00
Abinath S
b296e6c11c 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-03-05 02:55:18 +02:00
danielml
6170e74c14 techpack: audio: 4.0: wcd-mbhc-v2: Add missing bracket
Change-Id: I8d5063dd69cc14a413733c6c197c38b371e358b3
Signed-off-by: danielml <daniel@danielml.dev>
2024-12-29 14:47:51 +01:00
Akhil Karuturi
09000ad3d7 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>
2024-10-14 21:22:37 -04:00
Shaik Jabida
e59c199d27 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)
2024-10-10 15:30:30 +03:00
Michael Bestas
b904af7a05 Merge tag 'LA.UM.9.1.r1-16300-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/audio-kernel into android13-4.14-msmnile
"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

 Conflicts:
	techpack/audio/4.0/dsp/q6afe.c

Change-Id: I1c9e8eab1ba8cec1811983cc9d628d410b397ff7
2024-10-10 15:21:16 +03:00
danielml
342f1ec586 techpack: audio: Fix stub functions declarations
Change-Id: Ia725b0079107af67b3e114a419e346c3d9b26865
Signed-off-by: danielml <daniel@danielml.dev>
2024-08-23 05:06:11 +00:00
Thierry Strudel
1f29b6fcb7 techpack: 4.0: makefile: do not export all the variables
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
Original-Change-Id: I4929e64d53a0bc865b12a27cce37520be52c9744
Change-Id: Ia511b44ae6a6057e90e876024008ce5d450338e9
Signed-off-by: Thierry Strudel <tstrudel@google.com>
2024-08-23 05:06:06 +00:00
danielml
1ba41954ed techpack: audio: 4.0: Fix usage of empty prototypes
Change-Id: Id94da1efa956a9cb892dd75164f5f72d26af807c
Signed-off-by: danielml <daniel@danielml.dev>
2024-08-21 14:57:59 +02:00
danielml
dfe010c067 techpack: audio: 4.0: Do not attempt to build wcd934x
This codec is not present in the 4.0 techpack

Change-Id: Ibad636d60419f64ac03ba9846eaf900452ac0d98
Signed-off-by: danielml <daniel@danielml.dev>
2024-08-21 14:57:54 +02:00
Alexander Winkowski
600ae2cbaa ASoC: Add support for atoll platform
Change-Id: Ie00e2131eed67240ae4f94e6a40b28dda9f67640
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
2024-06-24 18:25:40 +00:00
Alexander Winkowski
dff0a40486 Revert "soc: pinctrl-lpi: Initialise at late_initcall"
This reverts commit ea5aa7a3fe.

The issue has been fixed properly in Idafc26a739df1831d04ea2fde4625e8f9ca1a0ae

Change-Id: I8275c11660af6cd03907970dea020897b66ceaa3
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
2024-06-24 18:25:31 +00:00
Angelo G. Del Regno
8b0f472b45 dsp: 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
2024-06-24 18:25:13 +00:00
Vignesh Kulothungan
b1204dc2ef soc: 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>
2024-06-24 18:25:12 +00:00
Andrzej Perczak
53092de2cf 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>
2024-06-24 18:25:11 +00:00
Meng Wang
6270dc3254 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>
2024-02-13 13:17:44 +00:00
Michael Bestas
b62da8c0cb Merge tag 'LA.UM.9.1.r1-15500-SMxxx0.QSSI14.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/audio-kernel into android13-4.14-msmnile
"LA.UM.9.1.r1-15500-SMxxx0.QSSI14.0"

* tag 'LA.UM.9.1.r1-15500-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: Iae6fd8e9d7d203befdaa084202dc118e627dc76e
2024-01-04 13:08:01 +02:00
Shalini Manjunatha
3af01a2be3 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>
2023-12-11 22:20:05 +02:00
Laxminath Kasam
494202969b asoc: 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>
2023-12-11 22:20:05 +02:00
Laxminath Kasam
5a3a17402e 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>
2023-12-11 22:20:05 +02:00
Laxminath Kasam
16d1791c03 asoc: 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>
2023-12-11 22:20:04 +02:00
Soumya Managoli
0b7a6434c7 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.

Original-Change-Id: I7753cc6db394704dbb959477150141d42b836bef
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
Change-Id: I5c945b6570ccd348659b2e8ee889368e7f4f6f80
2023-12-11 22:20:00 +02:00