Check size of payload before access in q6usm_mmapcallback.
Change-Id: Iff0672532c2ea40e7129237a92d8365d6b554cf2
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Check size of payload array before access in q6usm_callback.
Change-Id: Id0c85209a053f9dfdb53133aeb6b2510ecf18eb8
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
The range checking for audio buffer copying in function
"audio_in_write" is using the incorrect buffer size.
Change it to the actual allocated audio buffer size.
Change-Id: Ib7aaa2163c0d99161369eb85d09dc2d23d8c787b
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
Usage of q6asm_enc_cfg_blk_pcm() does not trigger
PortSettingsChanged event which is required for multi aac component.
Configure the PCM output block using q6asm_enc_cfg_blk_pcm_native()
which ensures that the event gets triggered.
Change-Id: Ieefeead45435840c2ecc1c072e8095785fd4b583
Signed-off-by: Satya Krishna Pindiproli <satyak@codeaurora.org>
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
Add mutex unlock in function audio_effects_shared_ioctl
at appropriate place to prevent use after free.
CRs-Fixed: 2123291
Change-Id: Ie0d321dc8cc20a295d102a44faea7e5710834932
Signed-off-by: Tanya Dixit <tdixit@codeaurora.org>
Pass valid channel count and sample rate information to
configure AAC decoder component and modify the API used
to configure the output PCM block when multi AAC decoder
component is used in non-tunnelled mode.
Change-Id: I5938f316a39b722924416b6910e6c8b835e7855e
Signed-off-by: Satya Krishna Pindiproli <satyak@codeaurora.org>
Initialize member value of struct audio_aio_write_param after declaration.
CRs-Fixed: 2091953
Change-Id: Iaf3ff1232e85ae8d26e9d97ce4c2aa3408da7a80
Signed-off-by: Yidong Huang <yidongh@codeaurora.org>
A thread can read audio debugfs entry while another closes the
device. Protect these operations with a mutex and before read
check audio data to be a valid pointer.
Change-Id: If29a308c1a8329d7befd047d41abe5f6ab626199
Signed-off-by: Divya Ojha <dojha@codeaurora.org>
Validate a buffer virtual address is fully within the region for an
extended edge case.
CRs-Fixed: 2049911
Signed-off-by: Siena Richard <sienar@codeaurora.org>
Change-Id: I4c56fdd42336d00a2294a8b7cc17c74606e56be2
A audio_process_event_req is not always to success. Therefore,
check the return value for audio_process_event_req, and
initializ usr_evt before using it.
CRs-Fixed: 2029798
Change-Id: I4adf682575f5f9233a1a1a533f9c6361af8a5bcf
Signed-off-by: kunleiz <kunleiz@codeaurora.org>
Eagle driver is not in use any more.
Remove the code and associated calls
to it.
CRs-Fixed: 1103106
Change-Id: Ice5333861beda9538f0783b70b3267523d16fd2b
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
Make opened device count atomic variable to avoid probable race
condition. Race condition leads to memory leak and list corruption.
Change-Id: I4da98f27d36f616bc8fa7b1a848c20cc7eea04e5
Signed-off-by: Divya Ojha <dojha@codeaurora.org>
Add mutex protection to avoid simultaneous access the
same memory by multiple threads.
CRs-Fixed: 2013494
Change-Id: I440ea633ceb7312637c9a3b29d22236166d21a39
Signed-off-by: kunleiz <kunleiz@codeaurora.org>
Validate a buffer virtual address is fully within the region before
returning the region to ensure functionality for an extended edge
case.
Change-Id: Iba3e080889980f393d6a9f0afe0231408b92d654
Signed-off-by: Siena Richard <sienar@codeaurora.org>
CRs-fixed: 1108461
Add range check for cfg->sample_rate to prevent the user space from
providing an invalid sample rate.
CRs-Fixed: 1108109
Change-Id: I17ccda0901aa4ad84d6e2f78679d71aa327f42eb
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
add decoder driver for G711 and define a structure in a
new header which contains G711 specific configuration.
Pass this configuration parameters to the aDSP for
successful decode of G711 content.
CRs-Fixed: 1094107
Change-Id: I5296de4f525adec549c8d51fbf7fc76120b3b4f5
Signed-off-by: Yamit Mehta <ymehta@codeaurora.org>
Signed-off-by: Surendar karka <sukark@codeaurora.org>
Adds lock to ioctl and other external calls to driver.
Adds missing null check in __usf_set_stream_param.
Change-Id: I142f31c6bb46d6a394ad012077e1703875a120ad
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Change all qdsp6v2 audio driver to use %pK instead
of %p. %pK hides addresses when the users doesn't
have kernel permissions. If address information
is needed echo 0 > /proc/sys/kernel/kptr_restrict.
CRs-Fixed: 1052832
Change-Id: Id6d45982cbe42a113e58c9b6509eb6ef8064aeef
Signed-off-by: Surendar karka <sukark@codeaurora.org>
Use vars in driver context after proper initialization
Change-Id: I3e59e27534b8e1088d74b42c72e0075d2fe910e6
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
CRs-Fixed: 1049521, 1049615
As read/write get access to ion memory region as well, it's
necessary to lock them when ion memory is about to be added/freed
to avoid racing cases.
CRs-Fixed: 1071809
Change-Id: I436ead23c93384961b38ca99b9312a40c50ad03a
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
The overflow check is required to ensure that user space data
in kernel may not go beyond buffer boundary.
CRs-Fixed: 1064411
Change-Id: I54c28a8942cf1a6a47a4e8272f3159b35d753ead
Signed-off-by: Karthik Reddy Katta <a_katta@codeaurora.org>
Not all memebers of config_32 are set before they are used which
might lead to invalid values being passed and used. To fix this issue
initialize all member variables of struct config_32 to 0 before
assigning specific values individually.
CRs-Fixed: 1058826
Change-Id: Ifea3a6e8bf45481c65a4455ee64318304798fee2
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Not all memebers of wma_config_32 are set before they are used which
might lead to invalid values being passed and used. To fix this issue
initialize all member variables of struct wma_config_32 to 0 before
assigning specific values individually.
Change-Id: Ibb082ce691625527e9a9ffd4978dea7ba4df9e84
CRs-Fixed: 1054352
Signed-off-by: Siena Richard <sienar@codeaurora.org>
Check that the array index value is less than the max array size
to avoid an out of bounds array access.
CRs-Fixed: 1037903
Change-Id: I2e357fd60c03833aed48a815794729fabfcfcf93
Signed-off-by: Siena Richard <sienar@codeaurora.org>
Return errors from the flush function including
the caller of the flush ioctl.
CRs-fixed: 1027784
Change-Id: I7ec578b42f50b6ce2f2738193c622c8a2f01ecd8
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
Fix overwrite of updt_params allocated in heap, and stack overread
where param pointer is passed from user space.
CRs-Fixed: 989628
Change-Id: Ida8bdb7da2fcb97023dce3b6eafe4b899a51cb66
Signed-off-by: Weiyin Jiang <wjiang@codeaurora.org>
Read commands are currently assigning 64bit physical address
to 32bit token. There is a possibility that this physical address
may have same lower 32bit values which could cause errors. Fix
by assigning session id as the token value.
Change-Id: Ie704e34338201ecec191b2031d20552691aed3ea
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
Use tokens to track all active no wait commands.
In ASM driver, certain commands are waited on to get response
from ADSP. There is a possibility that certain no-wait
commands can be improperly recognized and woken up leading
to time outs.
Change-Id: I2030a354493845b63cf92d35ca4eaadef38cfb79
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
Give upper layers enough time to turn on screen before
falling back into SUSPEND.
Change-Id: I162f25dffdbbeb783d0bca673d6e6db8de412aac
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
In audio ion driver, append msm_audio_ to API
populate_upper_32bits to maintain consistency
across other API names in this driver.
Change-Id: I72aace56bf8e80c6dd83f768876253d2c7f334bb
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Add snapshot for audio drivers for MSM targets. The code is
migrated from msm-3.18 kernel at the below commit/AU level -
AU_LINUX_ANDROID_LA.HB.1.3.1.06.00.00.187.056
(e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1)
(Promotion of kernel.lnx.3.18-151201.)
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>