msm: vidc: Add LTR feature for H264 encoder

This change adds Long Term Reference picture
selection feature for H264 video encoder.

Change-Id: Ida957df244d8715c955afe8d809708123a94e999
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
ASoC: wcd9304: Fix incorrect detection of headphone

On slow insertion of headphone, if the v_hs_max value
is too high, it can be detected as headset instead of
lineout when the mic is floating. Adjust the value of
v_hs_max to correct plug type detection.

CRs-Fixed: 507511
Change-Id: Ieeef329d93fc2d3ca6ca9c0171f00ceb756ea747
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
msm: camera: Guard the release of resources using mutex

The critical section of the code related to release needs to be
protected against race conditions.

Change-Id: I2165d37168882c345e2f845df08b74eb49b3cb23
CRs-fixed: 518302
Signed-off-by: Alok Kediya <kediya@codeaurora.org>
usb: u_bam: Fix spinlock leak followed by lockup from workqueue

Driver has missing code to release spinlock while returning from
workqueue in case of memory allocation failures.
Returning from workqueue without releasing spinlock messes up
with worker thread and kernel keeps throwing up warnings like:
"BUG: workqueue leaked lock or atomic: kworker/u" for any
sleeping function called from worker thread afterwards. Later
when driver again tries to acquire same (unreleased) spinlock
it results in spinlock lockup.

CRs-Fixed: 497158
Change-Id: I4eaa7aaa42ed95a9b78a8939e80f4c0694e574b2
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
msm: kgsl: Do not try to resume the device from INIT state

If the device is still in INIT state there are no open instances
of it running.  Resume calls should be no-ops.  Do not attempt
to start the device at this point.

Change-Id: I1cb6d60581b0b5b0a2ab1b13418adc4ae3983c5e
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
Merge "msm: kgsl: Do not try to resume the device from INIT state"
Merge "msm: camera: Guard the release of resources using mutex"
Merge "msm: vidc: Add LTR feature for H264 encoder"
ASoC: msm: Support to configure the code for media button

There is mismatch in button 0 code value that is used
in kernel and userspace. Configure the code for button 0
to match with that of userspace.

Change-Id: Ie0518b69e50d50d81b44bea6ce48ce1db2bbae03
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
radio: iris: Handle force close gracefully

Do not queue the FM disabled event while in OFF state.

Change-Id: I8f8cd31198f8bb1a7521920844e0f0c5c3190b08
CRs-Fixed: 492216
Signed-off-by: Venkateshwarlu Domakonda <Venkateshwarlu@codeaurora.org>
u_hsuart: Fix a bug in opening the SMUX port

commit 9fdf017a (tty: n_smux: add separate close notifications)
implemented SMUX_LOCAL_CLOSED notification for clients to know
when the port is ready for opening again.  Use this notification
and defer opening until the port is ready.  If the port is opened
before this notification is arrived, the open will fail and
rmnet/dun does not work.

CRs-Fixed: 509013
Change-Id: I18bf9f08029fb98d611679d3aa65d13b088da8bc
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
diag: Command registration not happening properly

Some CM command registrations are not happening properly
on apps side. This could be because some smd events
for control type were getting missed. Make changes
in order to read pending SMD packets for control
type.

Change-Id: I0fe25455275f6169bee91d151d8657330081c104
CRs-Fixed: 516718
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
power: pm8921-charger: vote D0 when running kickstart

There is a small window when the PMIC could lock up while
running the kickstart routine. If PMIC sleeps right while
kickstart is run, it causes a short sleep which is known
to cause PMIC locksup.

To prevent these, specifically vote for D0 clock while
running kickstart which guarantees that the PMIC will not
sleep.

Change-Id: I9ea27ef73098d0ec5e8391352ee005d8a78daa9a
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
power: pm8921-bms: fix calibration and UVLO issues

The bms is not running a hkadc calibration before calculating the
first SOC. This causes accuracy issues with the power on SOC.

Also when the battery gets in the low voltage range, don't limit
the corrections. We have seen UVLO where even though the BMS was
calculating SOC quickly it was not lowering the SOC fast enough.
Skip limiting ocv change when battery is near cutoff voltage.

Change-Id: I07747546867dcc90ccf7cb353c4e7a2c2c42520d
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
msm: board-8960: Modify SMPS7 min, max voltage limits for 8960ab

PM8921 SMPS7 is the parent regulator for the LDOs which supply
to the Q6 processors. The worst case voltage for Q6 processor
on 8960ab is 1.075V (compared to 1.05V on 8960). Raise the S7
voltage constraints from 1.15V to 1.275V in order to accommodate
the increase in Q6 supply voltage.

CRs-Fixed: 507062
Change-Id: If3e249b6412d141d7108332b43481e127c350bb2
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Merge "usb: u_bam: Fix spinlock leak followed by lockup from workqueue"
Merge "radio: iris: Handle force close gracefully"
Merge "u_hsuart: Fix a bug in opening the SMUX port"
Merge "ASoC: wcd9304: Fix incorrect detection of headphone"
Merge "ASoC: msm: Support to configure the code for media button"