Updating MSM auido_lpa.c (two commit) from codeaurora.com
[PATCH] msm: audio: qdsp5v2: Restore popp gain when HLB is enabled

Restore the POPP gain to 0x2000 when deviece is moved from
NON HLB to HLB.

CRs-Fixed: 306560
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
(cherry picked from commit c9bcfe9cb2bb46a4ab83b96f9a4c34c7820220c1)

Change-Id: Ibbf9c1147a70b331bb6852b5911366d7af61c2de
Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>

[PATCH] msm: audio: qdsp5v2: Fix issues with LPA playback volume after call

- LPA audio plays with higher volume after voice call.
- In LPA driver POPP gain is always set to unity. This should only
reset when switching from NON-HLB to HLB device.
- Add attribute to maintain the previous state to set POPP gain only
in case of device switch from NON-HLB to HLB.

Change-Id: Id125d8f81b5b423ffbfd6dee551e9061e13a500e
CRs-Fixed: 321780
Signed-off-by: Vinay Vaka <vvaka@codeaurora.org>
[PATCH] kernel/sysctl.c: trivial: use BUG_ON

Use BUG_ON(x) rather than if(x) BUG();
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ identifier x; @@
-if (x) BUG();
+BUG_ON(x);
@@ identifier x; @@
-if (!x) BUG();
+BUG_ON(!x);
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
[PATCH v3] staging: android/lowmemorykiller: Don't grab tasklist_lock

Grabbing tasklist_lock has its disadvantages, i.e. it blocks
process creation and destruction. If there are lots of processes,
blocking doesn't sound as a great idea.

For LMK, it is sufficient to surround tasks list traverse with
rcu_read_{,un}lock().
From now on using force_sig() is not safe, as it can race with an
already exiting task, so we use send_sig() now. As a downside, it
won't kill PID namespace init processes, but that's not what we
want anyway.

Suggested-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
lib/checksum.c: optimize do_csum a bit

Reduce the number of variables modified by the loop in do_csum() by 1,
which seems like a good idea.  On Nios II (a RISC CPU with 3-operand
instruction set) it reduces the loop from 7 to 6 instructions, including
the conditional branch.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
msm: platsmp: Remove extraneous boot_secondary delay

Change msleep_interruptible to usleep. msleep_interruptible
takes around 16 ms to return while the secondary CPU can
come up in about 1.5 ms. usleep is much finer grained and
returns every .5 ms. This allows boot_secondary to complete
much more quickly.

Signed-off-by: Maya Spivak <mspivak@codeaurora.org>
(cherry picked from commit 5e17706)

Change-Id: I49b32101667b1c2bfd7ecacf6a1c96db2a696afc
Signed-off-by: Swetha Basineni <sbasin@codeaurora.org>
[PATCH][SEMANTIC] Staging: android: ram_console: Use resource_size function

The semantic patch that makes this change is available
in scripts/coccinelle/api/resource_size.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/
memcg: let css_get_next() rely upon rcu_read_lock()

Remove lock and unlock around css_get_next()'s call to idr_get_next().
memcg iterators (only users of css_get_next) already did rcu_read_lock(),
and its comment demands that; but add a WARN_ON_ONCE to make sure of it.

Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
idr: make idr_get_next() good for rcu_read_lock()

Make one small adjustment to idr_get_next(): take the height from the
top layer (stable under RCU) instead of from the root (unprotected by
RCU), as idr_find() does: so that it can be used with RCU locking.
Copied comment on RCU locking from idr_find().

Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
msm: vidc: Increase the default input buffer

Increased the default input buffer size from half-frame size
to three fourth of frame size.

CRs-Fixed: 294663

Signed-off-by: Ananda Kishore <kananda@codeaurora.org>
(cherry picked from commit 08fd174f02cc8001d1da38b5db2386cca542a2ee)

Change-Id: Ie65250e5d9af131dc0c8b2dbae85c83ddc5caec1
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
vidc: 720p: Add IDR Frame type support for H264 format

Read IDR frame type from 720p core register set and
propagate it to user space using new IDR frame type
enumeration added in api header file. The IDR frame
type info is used in SYNCFRAME logic for H264 format
in userspace.

CRs-Fixed: 296738
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
(cherry picked from commit f6af73ecdbab8b493acc5a3815f474a2f9cca865)

Change-Id: Idd861573b26cad84bfd9142b38730f3e971bc1cc
Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>
vidc: 720p: Handle profile unknown as bitstream error.

For corrupted VOL header in the middle of playback
core is returning UNKNOWN PROFILE error and is being
treated as Fatal error and playback is getting aborted.
Now handling it as sequence header fail/recoverable
error.

Change-Id: I28f79cec1946d3430f90087920f93ef74cf4c101
CRs-Fixed: 302549
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>
[PATCH] vidc: 720p: Memset MPEG-4 recon buffers to black

In the case of MPEG-4 decoding with clips which have
initial frames starting with P-VOPs, green macroblocks
are seen. This is because of recon buffers used for
MPEG-4 have 0 preset values. The default values are
changed to 0x10 & 0x80 for luma and chroma to get
default color as black.

CRs-Fixed: 303298
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
(cherry picked from commit 207df7f89bf731c456bf6d5c905bde1aa014a8af)

Change-Id: I11224f50be0d73170204c1e3e68eb64b6c657f22
Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>
[PATCH] msm: rmnet: reschedule read tasklet in low memory conditions + Accept packets larger than MTU

[PATCH] msm: rmnet: reschedule read tasklet in low memory conditions

If the read tasklet is unable to allocate a skb due to low memory
conditions, reschedule the tasklet to retry at some point in the future.

Change-Id: I481c309c3e64052d0ee1fa24b8e2428d92518a5a
CRs-Fixed: 295596
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>

[PATCH] rmnet : Accept packets larger than MTU

The initial Android RmNET device driver had a validation filter on
receive packets to ensure size did not exceed link MTU (1514
originally). This assumed the link was symmetrical, such that
maximum transmit and receive transmission unit (MTU/MRU) were the
same. Over time, the symmetrical link assumption has been proven
incorrect, leading to cases where valid packets are dropped.

Remove the RX packet size validation filter such that packets
larger then configured MTU will be passed up the data stack. This
strategy change is permitted under the kernel documentation.
Reference: kernel/Documentation/networking/netdevices.txt

Change-Id: Iae9737cc6e7a37872cf00d03f9ac98bd4907b4f7
Signed-off-by: Kalyani polepeddy <kpolep@codeaurora.org>
[PATCH] msm: audio: qdsp5v2: Check for AFE module before acquiring AFE task

Need to check the afe module status if it is enabled earlier.
Before acquiring the AFE task

CRs-Fixed: 287936
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
(cherry picked from commit 0b0e3911779cf2429621e07e9f3e1a9152003b4f)

Change-Id: Ic2f758a8060df193982a94308aefd98188ea8482
Signed-off-by: Sunil Joseph <sunilj@codeaurora.org>
forgot commiting this header
bootmem: Add alloc_bootmem_align() [LeeDroid-]
Add an alloc_bootmem_align() interface to allocate bootmem with
specified alignment.  This is necessary to be able to allocate the
xsave area in a subsequent patch.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
LKML-Reference: <20101116212441.977574826@sbsiddha-MOBL3.sc.intel.com>
Acked-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
[PATCH] i2c: Fix section mismatch

The function i2c_ssbi_probe is referenced outside of the __init section.
This is fixed by calling platform_driver_probe instead of
platform_driver_register since this device is not hotplugable.

Change-Id: I9f217ce230b52d2037a49ba49bc7342ceb076be5
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
fix few typos
netfilter: add more values to enum ip_conntrack_info

Following error is raised (and other similar ones) :

net/ipv4/netfilter/nf_nat_standalone.c: In function "nf_nat_fn":
net/ipv4/netfilter/nf_nat_standalone.c:119:2: warning: case value "4"
not in enumerated type "enum ip_conntrack_info"

gcc barfs on adding two enum values and getting a not enumerated
result :

case IP_CT_RELATED+IP_CT_IS_REPLY:

Add missing enum values

Signed-off-by: Eric Dumazet <eric.dumazet@xxxxxxxxx>
CC: David Miller <davem@xxxxxxxxxxxxx>