Previously the WFD driver was reponsible for signalling the
online/offline events to userspace listeners. This led to redundant
notifications due to the manner in which the WFD driver is used. The
signalling is better purposed when done from MDP driver.
Change-Id: Ifffbacb565f8758b65139f7b0e32df0773247e2d
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
update_stats() in wfd-utils gets called from various thread contexts.
Make this thread-safe to avoid list corruptions.
CRs-Fixed: 441415
Change-Id: I71c1da78b1f4e11b4f25852063a578e43ff18fb6
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
Limit number of TS packets available to secure demux for processing
in any single processing session. This is done in order to prevent
large input buffer that require a long processing time and may cause
latency and overflow situations.
The limit can be fine-tuned as it is a module parameter.
Change-Id: I36f007da1b8152be27885ba4674bf42e6eb86ffa
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Add support for the following features in the secure demux API:
* Setting TS output format for recording filters.
* PES counters reported by the secure demux.
* Filter flags support - CRC checking for section can be disabled.
Change-Id: I621f395154137c6470c278907961792c85c6c09c
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
The entry for unsubsribe_event function is missing from the server ops
table. Add this entry and point to the correct implementation of the
function.
Change-Id: I083213f546556723167a088e0c64c5a20f3295c0
CRs-Fixed: 399710
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
This reverts commit b7d35468be026b0266bcb5217b72c6fbbf8b1bc0.
Change-Id: Iba80431f304dff64ba0427870dd857fc8729be28
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
Buffer overflow is handled by flushing the output buffer and
reporting the overflow event to the user, and all subsequent data
callbacks are discarded until user is notified on the overflow.
When buffer overflow is reported by the secure demux and output buffer
is flushed, next calls to secure demux processing report the buffer
as free for new data, but data callbacks are discarded due to being
in overflow state. This causes write pointers of secure demux to get
out of sync.
This patch separates the flushing of the buffer, and now this occurs
when user is notified on the overflow, so secure demux now discards
data during the overflow state.
Change-Id: I20a0bc33b3261fdd4fa6e1f9a543187c1612cebf
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
The demux driver identifies video frames by searchning for patterns in
the video payload. A pattern can be spread over two separate TS packets,
so the pattern lookup mechanism must take into consideration the possible
prefix sizes. Also, when reporting the written data length, the prefix
size (if used) should be added.
This patch fixes issues with not taking all possible prefix sizes into
consideration, and with not reporting the data length properly when a
prefix is used.
Change-Id: I6f4829e860c2d7518964a456a36418be26a06080
Signed-off-by: Liron Kuch <lkuch@codeaurora.org>
kernel-thread can be stopped either externally using
kthread_stop or the thread function exits by itself, only
one of the approaches should be used.
When kernel thread-function exits the task is cleaned up,
calling kthread_stop afterwords causes failure.
Change-Id: I3eb36e85fa6a650ebdbf2b34dd2ca434f34f28e6
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Previously the WFD driver was reponsible for signalling the
online/offline events to userspace listeners. This led to redundant
notifications due to the manner in which the WFD driver is used. The
signalling is better purposed when done from MDP driver.
Change-Id: I2248de84d57504c2fa9f26e1bfdf0e0d4a02257a
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
When removing a PID from a filter, the dmxdev_feed representing this PID
should be removed from the list of the filter's feeds, and its memory
should be freed.
Change-Id: I8e9f2d69e9c6a907eb6be2d07429e3448ad4e547
Signed-off-by: Liron Kuch <lkuch@codeaurora.org>
mpq_dmx_decoder_fullness_wait was called either from
dvb-demux or internally by the plug-in. In the first case
mutex should be locked before checking the video buffer while
in the second case it was called while the mutex was already
locked. Due to this the function checked whether the mutex is
already locked or not.
This check it not atomic, if the function is called by dvb-demux
while the mutex is un-locked, after this check it is possible
to have a context-switch and the mutex gets locked by other API
functions of the plug-in, which could lead to dead-lock or
invalid states.
Change-Id: I32ce4aa3ee7a93c1a8a4fda1d0f916e65eab11ce
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Extend the capabilities of the demux driver's TSPPv1 plugin to support
more than 16 PID filters using SW filtering.
Change-Id: Ic0eff5e94fa4cd6ec852a38f785cc5129726bffe
Signed-off-by: Liron Kuch <lkuch@codeaurora.org>
Add checks for validity of the mem objects for the buffer
planes before using them, to prevent any potential crashes.
Change-Id: I1221092f8c13912479c72c2bd8385b93fd7226b0
Signed-off-by: Azam Sadiq Pasha Kapatrala Syed <akapatra@codeaurora.org>
When starting feed fails while the feed is part of a filter that
holds multiple PIDs for recording, the filter's state does not
change and therefore the feeds which were started were not stopped
and de-allocated properly. In addition the dvr-feed count
is per feed basis and should be decremented for each feed that
is stopped part of the recording filter.
Change-Id: I739e6d40596df3c80cd0843f89eb4a8d3d51ddf4
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
When filter is started secure-demux buffers handles
should be initialized with invalid values so that they
are not released if they were not set.
Change-Id: I79c3896130059a5118f4966cc59c80d2f3f83814
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Reading the STC value from TSIF interface
is required by some application.
Change-Id: I180c54f1c74b3f82741c085880b6887bb7182d53
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
A new compiler generated a warning about a variable that may
be used uninitialized. To avoid this warning, initialize variable
to zero.
Change-Id: I119ca4952e8185140b02fda2c65651989892d5db
Signed-off-by: Liron Kuch <lkuch@codeaurora.org>
This change disables the excess kernel logs in wfd.
Change-Id: I66eb92f8997523d71557e3e22cc330bc7ad0b1df
Signed-off-by: Shobhit Pandey <cshopan@codeaurora.org>
Mutex should be released only if the function locked it
at the beginning.
Change-Id: If83d615a1777a1ccb2a13d070e1b67d002662cb8
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
sdmx process should be invoked with the requested
number of bytes rather than with the number of bytes
available in the buffer.
Change-Id: I4541cc4ff15d5c23ca9aad6a85a4d815ece7b21c
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
secure-demux processing function expects to receive a fixed
start address aligned to 4KB along with a read pointer, the
code provided the current address along with a read pointer
set to 0 as fixed value. This may cause the start address not
to be aligned to 4KB.
Change-Id: Ibd4a4c70c3b874df328de9d3fea0437cbdf53028
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Secure mode should be set on feed basis therefore TS and section
feeds should expose API to to set their secure mode. The secure-mode
is saved as part of the feed structure which already exists
instead of allocating special memory to save this info.
Change-Id: Ib081ac893a1f0aa3ee4ac4f333459010b095d7fe
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
This change adds support for demuxing of encrypted streams which current
software demux implementation does not support.
User-space API is extended to allow setting of key ladder information
needed in order to perform decryption.
If secure demux application is available, demuxing does not take place in
the dvb demux sw filter anymore but instead is performed in the new secure
demux, regardless of whether the stream is encrypted or not.
Otherwise, the dvb demux sw filter will be used as before and demuxing of
encrypted streams will not be available.
Change-Id: If75a7b03d1f13d3b012250b87c25eaf6d6cbc399
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Report counters for transport error indicator, continuity-counter
errors and total number of TS packet constructing a PES in the
PES events so that applications can decide whether to decode
or drop the packet based on the errors information.
Change-Id: I8680163783a12c4f2518cd83fa0b3c7dfa882c34
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
The code accesses the PES filter parameters even though the
filter could be a section filter rather than PES. Add check
of the filter type before checking the PES parameters.
Change-Id: Id74c70f518edb149d2d7a7e2b0bbb9bf1e3ac860
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Read/write pointers of filter's output buffer should be reset
to start of the buffer when filter is stopped and buffer is flushed.
Change-Id: I5e8dd61f4fc88be966b14152e7a6ba524969ffbb
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
-Move to stock camera driver without dual camera, PIP
changes.
-Changes to make this older stock camera driver compatible
with newer ION interface & IOMMU.
This partial revert brings us back to the following commit:
commit 954b92b26c
Author: insup.choi <insup.choi@lge.com>
Date: Mon Jul 2 15:24:23 2012 -0700
camera: add mako camera driver imx111, imx119
Change-Id: I5451ba05023fe7cbe3442512924062e7dc63f3f4
Signed-off-by: Iliyan Malchev <malchev@google.com>
Signed-off-by: Mansoor Aftab <maftab@codeaurora.org>
Change-Id: Ic8aac872572989c7747b4a2b36190ac2da6617ee
Required to activate the vision mode in s5k6b2yx sensor.
Change-Id: I56e7c56fed414d030e6e57ff7e15c20a071c5dc6
Signed-off-by: Punit Soni <punits@codeaurora.org>
Signed-off-by: Ninad Patgaonkar <ninadp@codeaurora.org>
Use the fps divider in calculation of sensor frame length
lines, so that the current fps requested is into effect.
Change-Id: I38ea5775e98e030b8be2e6895ac1a709a81cec92
CRs-fixed: 434293
Signed-off-by: Kalyani Oruganti <kalyanio@codeaurora.org>
When the cmd sent by HAL is notified to the daemon, copy the
result of the processing of that ctrl command like status, back
to the userspace.
Change-Id: I6209981fb18abd7d4bd55e1f6525998f7fa14ddf
CRs-Fixed: 411688
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
If init call for LED flash is missed / failed, gpio_request() may not
be performed for gpio pins for LED flash. This causes stability issues
where gpio calls are performed without gpio_request. Check for valid
client before performing gpio configuration.
Change-Id: Ib232dd53b52af06981d53c799b000ac7f4917c9d
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
(cherry picked from commit 952001729813a0184d95e20f30bee89d6a4cd9bc)
When video data is tunneled internally between demux and dvb-video,
the ION buffer holding the video data needs to be shared with
dvb-video driver.
Change-Id: Ia6517bd9cbf284e1314d5275eccc6813dc8d3096
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
- Allow Soc to interrupt host for RT Plus, eRT data
- Parse the RDS group for RT Plus, eRT
- Queue the parsed data and event for RT Plus, eRT
to upper layer
CRs-fixed: 419248
Signed-off-by: Ayaz Ahmad <aahmad@codeaurora.org>
(cherry picked from commit 89265111440674132f59c3aa2938a0aefbfc84fb)
Change-Id: I44010cebd5d7de7ae3a4b076971d24d65aa4fb91
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
Add counter for number of decoder packets with transport error
indication. Reset all decoder counters exposed in debugfs when
video is started.
Change-Id: I9434b2da3c24e19bb57acf562dcdb7df49a10dad
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
PCR packets with error indication is dropped to filter-out
invalid PCR values and flags that might cause errors
in clock recovery mechanism. In addition PCR is reported
also when playing from memory with 0 STC if the packet is
not in 192-tail format.
Change-Id: I3118877e0847f1df9aeb0d1891184c59b0d658c8
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Video buffer is allocated from CP-MM heap for both secure and non-secure
buffers. Some targets may restrict not to allocate non-secure buffer from
CP-MM heap, in such case need to make the allocation from IOMMU heap.
Change-Id: If0f56cab5fc6e3da1d4b7f1ec568184c9d16fed4
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Video stream buffer should be first initialized and then
registered to the adapter, otherwise, if registered
before initialization the video consumer may get uninitialized
stream-buffer.
Change-Id: I9f3e02ee360140b5132cd49df406cf2fa2ac6579
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Added the following files to existing demux directory in debug-fs:
1. decoder_out_count: Counts number of frames output to decoder.
2. decoder_out_interval_sum: Sum of time intervals between
frames outputs.
3. decoder_out_interval_average: Average of time intervals between
frames outputs.
4. decoder_out_interval_max: Maximum time interval between
frames outputs.
All counters can read and reset by writing to the respective file.
demux device output in debug-fs was adjusted for better visibility.
Change-Id: I2c9835364c534cc4b9c1cbc74afee71c40f61d98
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
TSPP output buffer when allocated as physically contiguous to serve
as input to TrustZone should be allocated from QSEECOM heap and not
CP_MM heap since the latter may be locked in secure playback.
Added a module parameter for the heap to allocate the buffer from,
default is QSEECOM. In addition, the existing implementation allocated
TSPP output buffer once for each demux device though is it not one per
demux device but rather one per TSIF, the allocation was moved to be
done once an output channel from specific TSIF is opened.
Change-Id: Ie606c6074a4f78d9f51f0d47697539567a1643cd
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
For each TSIF two pipes were allocated, one for section output
and one for PES output. The two pipes were unified into a single
pipe as the pipes were configured with the same parameters and there's
no real need for separating them. A unified pipe allows recording of
section packets along with non-section packets while maintaining the
order of the packets in the output to be the same as they
appear in the input.
Change-Id: Ifb9c8d9a3e83b3c4b144ea26d2d7f144ec605b8c
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
demux reported the first video PTS using the PTS value within the
first video PES after playback starts. When playbak starts demux
drops all PES data until reaching sequence-header, the PTS of the
first PES holding a video frame after reaching the sequence header
should be used and not the one in the first PES before data is dropped.
Change-Id: I4c2b3f79e8320239d7c8e165093d4c6111dc8a27
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
The output buffers of demux filters can be set in decoder
and in non-PES filters, it is separate from the video output
buffers. When filter is stopped the buffer should be un-mapped
always if it was mapped previously regardless of the filter's type.
Change-Id: I5e0562b23e983a9c624be2dd71612ef23f3b50d0
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Video elemenatry stream data is usually passed from demux to a video
consumer (e.g. video decoder) in kernel-space via tunneling. However
there are cases when the video consumer is a user-space application
controlled by the middleware. This change adds support for notifying
user-space about newly available elementary stream data and
associated meta-data, using the existing events queue mechanism.
Change-Id: I1994879f9056abea389602224fa970bd029b1e56
Signed-off-by: Liron Kuch <lkuch@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>