Commit Graph

2853 Commits

Author SHA1 Message Date
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
qctecmdr
fad96773ea Merge "asoc: compress: Modify incorrect partial buffer size check" 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
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
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
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
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
qctecmdr
5fb54fcd05 Merge "asoc : modify spf_machine_dlkm module name for GVM" 2022-11-24 20:26:46 -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
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
Vijay Kumar Maddula
c0b9e1dcd8 asoc: tavil: modify TX routes and dapm widgets
Observed audio capture has no data after upgrade to 5.4 kernel
due to change in dapm power up sequence in 5.4 kernel.
Modified tavil TX routes and  dapm widgets to
meet the recent kenrel dapm power up sequence.

Change-Id: I15965a4f221b396e670a5b2888a60557c302db51
Signed-off-by: Vijay Kumar Maddula <quic_vmaddula@quicinc.com>
2022-10-13 23:50:18 -07:00
qctecmdr
fed8cf2681 Merge "asoc: destroy mutex during module_exit" 2022-10-13 00:37:54 -07:00
qctecmdr
6f35442a48 Merge "asoc: tavil: modify RX routes and dapm widgets" 2022-10-11 23:29:07 -07:00
qctecmdr
cc4939f5a6 Merge "Asoc: 24bit support for output devices" 2022-10-11 23:29:07 -07:00
qctecmdr
c37ebe7169 Merge "asoc: add return value check for channel mapping function" 2022-10-11 23:29:07 -07:00
Vijay Kumar Maddula
66448f4e5e asoc: tavil: modify RX routes and dapm widgets
Observed audio playback mute after upgrade to 5.4 kernel
due to change in dapm power up sequence in 5.4 kernel.
Modified tavil RX routes and  dapm widgets to
meet the recent kenrel dapm power up sequence.

Change-Id: I24576f342c43e586ed9b55eeab2510c59c70e33d
Signed-off-by: Vijay Kumar Maddula <quic_vmaddula@quicinc.com>
2022-10-11 02:46:18 -07:00
fei tong
2068734c27 asoc: Fix App Type Gain can`t work proper
App Type Gain command does not work due to max value

Change-Id: I27a7e4cf22e6b53650e1b51af65c7aadafa064dc
Signed-off-by: ftong <quic_ftong@quicinc.com>
2022-10-11 14:22:50 +08:00
ftong
1a2ec5b372 asoc: destroy mutex during module_exit
Mutexes are initialized, but not destroyed, add destruction
in exit routines.

Change-Id: Ia45c604141f4f03403a765e0d10ff0b86b25885e
Signed-off-by: ftong <quic_ftong@quicinc.com>
2022-10-10 17:43:47 +08:00
ftong
37bcf911fa asoc: add return value check for channel mapping function
Add return value check for channel mapping function, and reject invalid input

Change-Id: If8ddc16b33bf2b6af10f9d6055d6de27d86ad240
Signed-off-by: ftong <quic_ftong@quicinc.com>
2022-10-10 17:41:26 +08:00
Kogara Naveen Kumar
05c9918e58 Asoc: 24bit support for output devices
Enabled 24bit support for output devices

Change-Id: If48ebbd849d619019cc5ecff972ca638ecb771d4
2022-10-06 11:05:47 +05:30
qctecmdr
472af0e526 Merge "asoc: use virt_sndcard_ctl node for sndcard status update" 2022-09-27 04:06:41 -07:00
Sitong
dee7082307 asoc: use virt_sndcard_ctl node for sndcard status update
In automotive hypervisor SSR case, csd2 need a while to handle resource,
hence receiving virtual SSR event doesn't mean PVM is ready for audio usecase.
AudioReach should wait for more precise events from PVM csd2.
Expose an ioctl node for updating sndcard status via gsl virtualization.

Change-Id: Ia5d1110dea970070706937c3bf5e42e1ccb1942f
2022-09-21 19:20:38 +08:00
qctecmdr
14d435e07f Merge "ASoC: codecs: Deinitialize mbhc on codec remove" 2022-09-15 08:43:47 -07:00
qctecmdr
36711408f2 Merge "asoc: audio reach kernel bringup on 8255 GVM" 2022-09-14 23:58:21 -07:00
Huicheng Liu
b490a90b34 asoc: audio reach kernel bringup on 8255 GVM
* Refine populate_snd_card_dailinks function.
* Add oct_tdm, hs_if3_tdm and hs_if4_tdm.

Change-Id: Iaca5b1d4f107ede773530a60b457a510244f784a
Signed-off-by: Huicheng Liu <quic_huicliu@quicinc.com>
2022-09-13 01:22:23 -04:00
qctecmdr
479105b370 Merge "asoc: remove error from function msm_pinctrl_mclk_enable" 2022-09-08 22:59:08 -07:00
Soumya Managoli
a596b7cd0a ASoC: codecs: Deinitialize mbhc on codec remove
Invoke mbhc de-init on codec remove to free
the requested mbhc irqs.

Change-Id: Id87bb38a9cde6223224d76cbda325e3334037e52
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2022-09-01 16:23:55 +05:30
Jing Wang
d207393128 asoc: Add kcontrol "QUAT_TDM_RX_7 Port Mixer TERT_TDM_TX_7"
Since quin & tert tdm fsync has harware conflict at talos,
add kcontrol for audiod use.

Change-Id: Ic42dec3144a9b3a8def14b14081cb9562291ae09
Signed-off-by: Jing Wang <quic_jingwa@quicinc.com>
2022-09-01 15:16:44 +05:30
Xuewen Liu
2e13245b99 asoc: remove error from function msm_pinctrl_mclk_enable
change pr_err to pr_debug. Can't find device node
mclk_gpio_phandle[i](it equals "qcom,internal-mclk1-gpios")
in gpio device_tree dts file, so it needs to change this log
to pr_debug, it's not an error.

Change-Id: I82e58222e27b3a97209c52e8e569a0257744cf22
Signed-off-by: Xuewen Liu <quic_xuewliu@quicinc.com>
2022-08-30 08:28:20 +00:00
Krishna Kishor Jha
09f30ee1a0 audio-kernel: Do SRC with MFC
1) Doing SRC with MFC when FE and BE SampleRates are different.
   MFC module is expected to add as fist module in COPP and output
   SR of MFC is configured same as app_type SR.
2) Adding MFC module V2 version details to system.

Change-Id: I7c03fa28ec32892645ead9baf59eb927ca3e4891
2022-08-11 22:48:18 +05:30
Jing Wang
50e0fe7b19 dsp: dyn mclk support enable/disable in afe_set_lpass_clock_v2
dyn mclk support enable/disable in afe_set_lpass_clock_v2

Change-Id: Idb793961135ddc2bcdefe2c8367abce93a4ce164
Signed-off-by: Jing Wang <quic_jingwa@quicinc.com>
2022-08-01 19:30:48 -07:00
qctecmdr
dd2d4b6317 Merge "asoc: enables paired rx port to address tdm slot shift issue" 2022-07-22 01:29:02 -07:00
Kogara Naveen Kumar
fab1b421ae asoc: enables paired rx port to address tdm slot shift issue
Defines mixer control for the paired rx and how the dai driver is starting/stopping the paired rx port.

Change-Id: Ie17f7de9d7a482ad30b219a9ba68066ee8d467df
2022-07-20 02:41:56 -07:00
Hugh Guan
b1d01899fa asoc: change HS_IF dummy to playback
HS_IF0_TDM_RX_0_DUMMY, HS_IF1_TDM_RX_0_DUMMY and HS_IF2_TDM_RX_0_DUMMY
are for playback instead of capture.

Change-Id: Icb4ccaacb3c6904b9591cada0905250a2b67cbef
Signed-off-by: Hugh Guan <quic_hhguan@quicinc.com>
2022-07-15 11:34:45 -07:00
Krishna Kishor Jha
282aeeb375 audio-routing: Support Rx to Tx loopback
Static loopback is created between QUIN_TDM_RX_0 to Tx session.
Tx session is created with quin_tdm_tx_7 dummy port.

Change-Id: Ic634b47d1d7f80a10c6d2bc341a6d3ca8eae34c1
2022-07-10 22:43:21 -07:00
Krishna Kishor Jha
9d3e690bfb asoc: fixing incorrect log messages
Updating log messages with present input vlaues.

Change-Id: Iaeb4d9ddea6032e97eab59e54f4cef2d0c72d59e
2022-07-05 18:01:27 +05:30