Before calling audio ANC ioctl functions, compare the
allocated buffer size to the size of the header and ANC cmd header
to ensure the buffer is big enough.
Change-Id: I8fcd0a830853d802bbb11fc243a4d392fbe384f3
Signed-off-by: Timothy Sham <tsham@codeaurora.org>
Provide a debugfs interface to get count of mpm timer.
Change-Id: I24e927b6219b8bd4c2f4ddecb8f51518f0db663a
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
Close the open hab socket after receiving an error status from
the hab.
Change-Id: Ia56c7ce49d0e61661c9f133d35540e48f3707e01
Signed-off-by: Amit Blay <ablay@codeaurora.org>
Develop a mechanism to faciliate the performance test for hab
and share memory.
Use "echo 0 > /sys/module/msm_hab/parameters/perf_test" to
start share memory throughput test, and use
"cat /sys/module/msm_hab/parameters/perf_test" to get the
result.
Change-Id: Ic9e27ace5332bd022e444747ab58152bb3dfd584
Signed-off-by: Chao Bi <chaobi@codeaurora.org>
Partial Array Self-Refresh driver is used to interface
with rpm to vote/unvote on memory self-refresh from HLOS.
Driver listens to memory hotplug notifications and decides
to vote or unvote depending on memory online and offline.
This vote is considered by RPM to avoid self-refresh on
offlined DDR segments. And hence a reduce in power consumption.
Change-Id: Ida2b36d671c6379dc3c07258a95cf15ae07a4bc0
Signed-off-by: Arun KS <arunks@codeaurora.org>
Fix an unused variable warning when GHS flag is not defined.
Change-Id: Icd5b8bbb0e1bd7bedbaa6c806889d21213cb23f2
Signed-off-by: Amit Blay <ablay@codeaurora.org>
Add early audio interface support to allow
synchronization between ADSP loading and early
audio playback.
Execute the command
'echo 0 > /sys/kernel/lpass_resource_mgr/check_early_audio'
to check if early audio playback is ongoing.
Output will be "Online" if early audio playback is ongoing.
CRs-fixed: 2126727
Change-Id: I95d07c8f3cd93ded112b551238a973a76fb6b7ed
Signed-off-by: Derek Chen <chenche@codeaurora.org>
If the receive buffer in habmm_socket_recv() is smaller
than the message, it should be kept in the queue rather
than dropped.
Change-Id: Iabc1f73e5b443cc7ebdefc3961d5bec9049a265f
Signed-off-by: Yong Ding <yongding@codeaurora.org>
waitqueue is initialized on every call to notify_for_subsystem.
This leads to stability issue if one thread is waiting for completion
and another thread re-initializes it.
Waitqueue is initialized only in probe function.
CRs-Fixed: 2197181
Change-Id: I3509a7c4a197c727b2025c1aeb6a35690c3c8501
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
Tx_data cmd is processed in tasklet which is not guranteed to be
scheduled immidiatley. This decreases performance of glink.
Process tx_data command in irq handler.
CRs-Fixed: 2225619
Change-Id: Ida5e51b83fa46c76f72ae886260752baa8b942b9
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
currently hab only supports importing remote buffer
to cpu address, which can't be shared to other process.
Therefore we add dma_buf import/export function in hab
Change-Id: I156c925d7c0cefef5bf146ad8cff38de9c4b3bee
Signed-off-by: Yajun Li <yajunl@codeaurora.org>
HAB in the kernel can return -EAGAIN from the habmm_socket_recv() call.
This can happen particularly from a signal handler context.
Change-Id: Ib2885dc49193efb925ed03dc507a2fd2c97ec8c5
Signed-off-by: King Tam <kingt@codeaurora.org>
Undefined string lengths could lead to buffer overflows. Format the
string correctly to ensure proper usage of snprintf.
Change-Id: Ia85754327d342aefce2a67eb7f5aeca857d8fbcf
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
All guest VMs use the same HAB id for communication
with QCPE.
Change-Id: I01ed16376730276f13a734b82d387b1d30d14434
Signed-off-by: Amit Blay <ablay@codeaurora.org>
voice_svc_dev is allocated as a device managed resource
and need not be freed since it is freed automatically.
Remove the logic to free voice_svc_dev in probe failure
and remove functions to avoid double free.
CRs-Fixed: 2204285
Change-Id: If4f9ca840b00448b987f5ce443f66b0923b01969
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
In the blocking mode of habmm_socket_recv(), it is an
interruptible wait by default. Here, the uninterruptible
version is added.
Change-Id: Iba9ee10afb3f2529a99a9c90f6fc0cb56fb9cb08
Signed-off-by: Yong Ding <yongding@codeaurora.org>
When WLAN driver encounters FW timeout scenarios, it may check if the
FW is down by calling icnss_is_fw_down() API. Recovery should also be
considered as FW down, as FW has not completely recovered and ready
for WLAN communication.
Change-Id: I4c9e15aacc5605dca823e2cfcbf6f87152aaa78e
CRs-Fixed: 2218795
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
Stuffs relevant with ioctl are only for hab driver
itself and hab clients in user space. Those hab clients
in kernel dose not need them. So here uapi/linux/habmm.h
is refined into two files as habmmid.h and hab_ioctl.h.
Change-Id: I9344e3e3fec88a042ec1915a9c0d51a28cea6e9a
Signed-off-by: Yong Ding <yongding@codeaurora.org>
in_pkt pointer is holding dangling pointer address even after calling
release_pkt() which causing use-after-free.
Set the in_pkt pointer to NULL after free.
CRs-Fixed: 2210859
Change-Id: If5e01c0109c947e52f3ff269c9b2b50ac0dc2bdf
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Make sure data is flushed before updating write index by adding a wmb.
Change-Id: I3d17ed56b64ac9ca399a0ef11a638027c1ba36ae
Signed-off-by: Chris Lew <clew@codeaurora.org>
This query API can be used by hab clients to get
their virtual channels' info if necessary, eg, the
local and remote vmids.
Change-Id: I1293b51a1127997f493f07c0c2181423bf45d79e
Signed-off-by: Yong Ding <yongding@codeaurora.org>
variable rc is not initialized in the beginning of function
ipc_router_mhi_write and ipc_router_mhi_xprt_probe. This leads
possible use without initialization issue.
Initialize variable in the beginning of both functions.
CRs-Fixed: 2209246
Change-Id: Ida0bdad2336be928d6e440d4143350bbf9f253d5
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
The logic to truncate packets if the size is too long was off by one.
Fix the conditional logic for checking lengths.
CRs-Fixed: 2121368
Change-Id: I908bd0a1ab78dea439056dbcd12eb158b2789e4a
Signed-off-by: Chris Lew <clew@codeaurora.org>
The owner for the driver is not a string. Fix the owner
accordingly.
Change-Id: I5f29cc0ae65714756868a0076f8a8adc6c3d45c2
Signed-off-by: Anant Goel <anantg@codeaurora.org>
This is adding pchans based on the legacy header files.
Change-Id: I0abf6b7617f4e1e057891c1312a20538bc65d2ea
Signed-off-by: Yong Ding <yongding@codeaurora.org>
The fixed issues include variable initialization missing and improper NULL
pointer checking.
Change-Id: I5302cf84f7f0414fe0cf69ccc0cafc8225142c5f
Signed-off-by: Tony Han <xiahan@codeaurora.org>
The guest VM uses this driver to communicate subsystem state related
notifications to a backend driver via the virtual device's registers.
Change-Id: I612fcb641c4d531c1d2c0fd18f44f7ebff040f2c
Signed-off-by: Anant Goel <anantg@codeaurora.org>