Revert "[media] v4l2-ioctl.c: handle PREPARE_BUF like QUERYBUF"

This reverts commit 304a3305c54bbf5f1ad7b91a7fe7168b9368961e.

Change-Id: I2272d5498952c8ed78be3bada1ee2db94c052ffe
ASoC: msm: Fix for wma playback after SSR

After SSR apr session doesn't get destroyed as
the callback from apr driver doesn't come.Fix
this by not doing NULL allocation in q6asm callback.

Change-Id: Idfec89dfd06075fec4199869354bdcb9e01a3dc9
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
ASoC: msm: qdsp6v2: clear old memhandle list when SSR happens

When SSR triggers, ASM gets RESET_EVENT callback.
Clear custom topology related old memhandle list here.
Otherwise for next ASM session opened after SSR,
old memhandle is sent to DSP and result in no audio.
Also, for ASM session while unmap during SSR, APR
command fail is expected, even then go ahead and
clear old mem handles relating to session.
Add changes to clear it from list.

CRs-Fixed: 592823, 589762, 592580, 590719, 589450, 593497
Change-Id: I10fc8190e929c7a4a344b1d393233e6cbcfcee97
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Revert "ASoC: msm: qdsp6v2: disable OCMEM by default"

This reverts commit c7dbbcf2a34c9ec7bf5ca2b474649908a48b2ecf.
Revert changes to disable OCMEM for Audio and Voice use-cases
by default.

Change-Id: I814efe272c8051417753bae2fc6fe805bd817921
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
ASoC: msm: qdsp6v2: Check for null data pointer

Add check for null data pointer in
aprv2_core_fn_q() and log error message if
true.

CRs-Fixed: 575228
Change-Id: I0d02913ced422ff3f396375c70ad6929908ee58d
Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
ARM: dts: msm: enable SD1 BE for AFE port

This port is added to enabled dedicated track to be played on SD1
by APPS over codec.

Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Change-Id: I8b6de1f7bf45cd23a2102d28e38fa651319ee242
ASoC: msm: qdsp6v2: Add support for VoWLAN

Add a front-end DAI for VoWLAN voice session,
update routing driver to add support for voice
over WLAN.

Change-Id: I4f56e12d619ebb40a8668da107a0d386158a060d
Signed-off-by: Vicky Sehrawat <vickys@codeaurora.org>
ASoC: msm: qdsp6v2: fix possible integer overflow

Check integer overflow before multiplying struct size. If that happens
should return immediately. In addition if param length is greater than
MAX size from spec, better return error.

Change-Id: Ib96cb419ade042d21a1213f6d8c2ff339f5d1c56
CRs-fixed: 605273
Signed-off-by: Fred Oh <fred@codeaurora.org>
ASoC: msm8974: add devices for incall music delivery

Add backend DAI link and frond end DAI link to enable
incall music delivery on the second sub.
The feature is required to play LCH tone on second sub.

CRs-Fixed: 626562
Change-Id: Ibbea1e2102ea10b2d114b8d57ff96dd09863ffa1
Signed-off-by: Avinash Vaish <avaish@codeaurora.org>
Signed-off-by: Karthik Reddy Katta <a_katta@codeaurora.org>
ARM: dts: msm8974: Add support for incall LCH tone playback

Update the device tree to add AFE port id needed to enable
incall music delivery on the second subscription.

CRs-Fixed: 626562
Change-Id: Idf6ae3cd9c916c250ea587837031c80f4522a11f
Signed-off-by: Avinash Vaish <avaish@codeaurora.org>
Signed-off-by: Karthik Reddy Katta <a_katta@codeaurora.org>
ksm: Provide support to use deferred timers for scanner thread

KSM thread to scan pages is getting schedule on definite timeout.
That wakes up CPU from idle state and hence may affect the power
consumption. Provide an optional support to use deferred timer
which suites low-power use-cases.

To enable deferred timers,
$ echo 1 > /sys/kernel/mm/ksm/deferred_timer

Change-Id: I07fe199f97fe1f72f9a9e1b0b757a3ac533719e8
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
mmc: core: Fix disabling of cache for Hynix cards

Commit 6932a01cd (mmc: card: quirk: disable cache for Hynix card)
claims to disable cache because of data corruption issues when cache
it is enabled. In reality, the patch allows enabling of cache during
card initialization but disallow flushing of cache during suspend or
file system sync operations. This is more dangerous than without
the commit. Move the fixups for disabling cache to mmc_fixups so as
to enable the quirk during initialization itself. Also, remove obvious
warnings everytime card is initialized during runtime resume.

CRs-Fixed: 593932
Change-Id: I3f71eaccf90ffdea83f418b7c05be68f5d89d227
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
ASoC: dapm: Unlock mutex in error cases

Dapm functions are not unlocking the mutex when an error
is encountered.This change fixes the mutex unlock issue.

Change-Id: Ia7ffaea9a30ae09a501f8f861c62c64d6c110d44
CRs-fixed: 613644
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
(cherry picked from commit e5d642a37a643bf9ee4606e0a43b6714019fbc4a)
ARM: Don't dump vmalloc addresses with show_data()

Memory-mapped IO address spaces cannot be safely dumped at will.
Some addresses may not be available (clocked, powered) at all times,
and may result in hangs or bus decode errors if accessed. Other
registers that are accessible may have read side-effects, and dumping
them may have adverse affects on stability or the functionality of
the affected peripheral.

Be safe, and skip dumping such addresses altogether.

CRs-Fixed: 625442
Change-Id: I4cfa75f027ededf841a0240715af0db385857cbe
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Signed-off-by: Vignesh Radhakrishnan <vigneshr@codeaurora.org>
ARM: Improve vmalloc address checking in show_data()

There is an unhandled corner case with the current check
which has recently been hit. The nbytes argument may be
large enough for the range being dumped to cross a
boundary between page-table mappings, and dump addresses
which are vmalloc'd in the neighboring mapping.

Check every address being dumped to see if its vmalloc'd,
not just the address passed to show_data().

CRs-Fixed: 625442
Change-Id: I255b093808177321f5202dcacea337ee333bfc63
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
binder: NULL pointer reference

This fix handles a possible NULL pointer reference in
debug message.

CRs-fixed: 642883
Change-Id: Ide78f281ec0cff5cbd8231b85c305d13a892854e
Signed-off-by: Paresh Nakhe <pnakhe@codeaurora.org>
sdhci: sdhci-msm: update dll configuration

The newer msm sdhci's cores use a different DLL hardware for HS400.
Update the configuration and calibration of the newer DLL block.

The HS400 DLL block used previously is CDC LP 533 and requires
programming multiple registers and waiting for configuration to
complete and then enable it. It has about 18 register writes and
two register reads.

The newer HS400 DLL block is SDC4 DLL and requires two register
writes for configuration and one register read to confirm that it
is initialized. There is an additional register write to enable
the power save mode for SDC4 DLL block.

Change-Id: I20ddeaee9309c43cd51bebdfc02d70553c9d2a87
Signed-off-by: Krishna Konda <kkonda@codeaurora.org>
sdhci: sdhci-msm: fix issue with hs400 mode

In HS400 mode, command line is still operated in SDR mode and not
DDR mode like data lines. So in order to correctly process command
responses, the hardware needs to be set appropriately or else there
will command crc or similar errors due to incorrect sampling of the
response.

Change-Id: I426ff4fc4798afae254d11a608c800dc0b7bf765
Signed-off-by: Krishna Konda <kkonda@codeaurora.org>
mmc: sdhci-msm: configure CORE_CSR_CDC_DELAY_CFG to recommended value

Program CORE_CSR_CDC_DELAY_CFG for hardware recommended 1.25ns delay.
We may see data CRC errors if it's programmed for any other delay
value.

CRs-Fixed: 683894
Change-Id: Id7de28b7b9222c35e6b419e416f72bd8f98cbaf8
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
mmc: sd: fix the maximum au_size for SD3.0

Since SD Physical Layer specification V3.0, AU_SIZE is supported up
to 0xf.  So If SD-card is supported v3.0, then max_au should be 0xf.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Git-commit: 77776fd0a4cc541b9a528eacc1d31ca47eb1ae7a
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Change-Id: I140ad257098ab88ae8fab0a9cdb28130c3d4327b
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>