check for the proper param size before copying,
to avoid buffer overflow.
Change-Id: I3e41439fb747aeebe7677b32c768aea19fcea37c
Signed-off-by: Shimana P <quic_shimp@quicinc.com>
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>
there is no check for cvs_voc_pkt[2],when recieves
0xffffffff from ADSP which results in an integer overflow
Fix is to address this.
Change-Id: Ie935dd8823981ec260d77f5117f4ef0b0fc08f60
Signed-off-by: Ramireddy KrishnaKanth Reddy <quic_ramikris@quicinc.com>
Added change to check the list before access it.
Change-Id: Ibbf80f157caf06453daefd3a38607b0460157123
Signed-off-by: Sandhya Mutha Naga Venkata <quic_smuthana@quicinc.com>
check size of payload before access in q6lsm_mmapcallback.
Change-Id: I6a755ca4cf54078f0d00f38e303f1b1da29b244c
Signed-off-by: Kumar Anurag Singh <quic_kumaranu@quicinc.com>
Increase the locking range to prevent shared resources from
being abnormal modified.
Change-Id: Icb7ecfd6110874e6ecfa5bea5c1bd2625127e08d
Signed-off-by: Jing Wang <quic_jingwa@quicinc.com>
(cherry picked from commit ebd90817721f88c9215b6e0511fcaff3125f8138)
Check if buf size is valid before comparing
with buf offset.
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
Change-Id: I8336be046c4922ce2f8bb333b58ca867059e9528
pm runtime resume and suspend operation uses
linux clock API to vote/unvote lpass hw resources.
When autosuspend funtionality is used, suspend op
is triggered from a worker thread upon timer expiration,
can block if there is an ongoing clock
operation holding global prepare/unprepare mutex
lock in common clock framwork. If the ongoing
clock operation calls get_sync on pinctrl-lpi,
the get_sync gets scheduled out due to ongoing suspend
by worker thread. This leads to dead lock between
get_sync and suspend, waiting for each other to
complete. Avoid using autosuspend functionality in
pinctrl-lpi to avoid race conditions in clock APIs.
As auto suspend functionality is not required, lpass
hw voting/devoting happens in synchronous manner, can
be done directly by calling DSP voting APIs. Hence remove
runtime pm ops in lpi pinctrl driver.
Change-Id: I86df5e8e502c6466feea196fe8649c34e046aa26
Signed-off-by: Abhilash Sathyanarayana <quic_abhisath@quicinc.com>
compress_pause was failing on gki mode due to change in
stream state. The change is done to enable pausing even
when the stream state is in the draining state.
Change-Id: I3285b84a1e17dc483bf35a45c8cee693f18671c5
Signed-off-by: Vaibhav Raut <quic_vraut@quicinc.com>
size = sizeof(p_info_32) + p_info_32.param_size;
This overflow issue may result heap overflow during copying the data:
memcpy(param_info_rsp, &p_info_32, sizeof(p_info_32));
The validation check is added so that heap overflow can be avoided.
Change-Id: I11dcbe7ebb33e349dfd9f347f3ef25bc781075fc
Signed-off-by: Raza Kamal <quic_razkam@quicinc.com>
Macro needed for differentiation of auto code as the
file is shared for non auto code as well.
Signed-off-by: Manoj Kumar N D <quic_mnd@quicinc.com>
Change-Id: I8b464d5cacd2b5bcf51c54a3e50c930d9cb54e41
Get the CoPP idx based on FE id before sending the channel
mixer settings during runtime.
Signed-off-by: Manoj Kumar N D <quic_mnd@quicinc.com>
Change-Id: I2a0fc517bf3e53523679e3108ca6849d2f96e79d
(cherry picked from commit e9c96f97eda6069576731984a146343ccb32d900)
(cherry picked from commit d6d824a975955075d02e2ed3b51f8ef4d6f202b7)
Add bound check to avoid out of bound access for array.
Change-Id: Ia43a50dc0c4e956be00fba92ba6819dbcc9b0ee3
Signed-off-by: Kumar Anurag Singh <quic_kumaranu@quicinc.com>
External mclk to audiocc can be routed via
ext_mclk1_a or ext_mclk1_b gpio on lahaina by configuring
aud_ref_clk_sel mux. Add changes to configure aud_ref_clk_sel
mux in machine driver based on DT property.
Change-Id: I606cb148113263a53d6ad02011db0c5c8d042126
External mclk to audio interfaces can be routed via
different gpios as per platform by configuring
aud_ref_clk_sel mux. Add support in q6afe to expose
new set_param from DSP.
Change-Id: I0677877d2ad0cabdf00a7b213652db4b62f0d8b5
Signed-off-by: Abhilash Sathyanarayana <quic_abhisath@quicinc.com>
Before return with error, release the mutex.
Change-Id: I034a90f9c4f52df8bc8e30312f5241ac4ba7bba0
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
Check if HPHL or EAR is enabled before sending RX_MUTE event.
Change-Id: I4ffc42a0d79c8edea77745a2f52361a4cf3dddaa
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
Do not disable CMPDR for EAR if ear mode is on
as it can lead to mute issues on ear.
Change-Id: Ibf54fe6f14c5f08c2004fae36204398109ad53c1
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
- add support for HDMI controller and
HDMI external display detection mechanism
- add controls for HDMI
Change-Id: I5da8a12d337d649e49aa2e56c90566a530706287
Fractional sample rate doesn't work due to GSDC is
not enabled.
Add vote for audio hw clk for fractional sample rate.
Change-Id: I12d5315b0f346d54e7f384b2e38bbfd0f35199ff
Add support to make mclk freq configurable in Bolero
Macros - VA, TX and RX. Fallback to 9.6MHz if mclk
frequency is not defined in DTSI.
Change-Id: I27034d6bd31e1ed225adfc8de1b43cd68da84db3
Signed-off-by: Abhilash Sathyanarayana <quic_abhisath@quicinc.com>
For audio interfaces to be sourced from an external clock, one needs to
configure clock attributes such as the clock root and RCG registers for
operation at an appropriate clock frequency. Add support for this by
registering for a callback with Q6AFE driver which during clock enable,
provides clock attribute values and toggles the GPIO pin sourcing the
external clock.
Change-Id: I64a849e045a13dedd876b6a82c727a0e0610cbb7
Signed-off-by: Abhilash Sathyanarayana <quic_abhisath@quicinc.com>
In the case an external clock is used to source the MCLK, configure
additional clock attributes to be sent to the DSP. Introduce parsing of
new DT properties about the external clock frequency which is required
to find the appropriate clock attributes whilst providing backward
compatibility to not send any additional clock attributes to the DSP.
Change-Id: I029080fe509f9545fb9785bf4a9225e9bb7dff46
Signed-off-by: Abhilash Sathyanarayana <quic_abhisath@quicinc.com>
To configure the external clock, the client (machine driver) is expected
to configure the clock attributes (M, N, D, div2x, clk root, etc.) and if
required, to toggle the external clock source in the registered callback
function, before sending the param to the DSP. Expose the API to the
clock driver for the same. During clock disable, the sequence of
operations is reversed.
Change-Id: I289625e40c3a9c102270eae3c10ad7bf1a112f4f
Signed-off-by: Abhilash Sathyanarayana <quic_abhisath@quicinc.com>