Merge remote-tracking branch 'caf/kk_2.7-stable' into cm-11.0

Conflicts:
	kernel/events/core.c

Change-Id: I0acbaf4b232fc32905b85f90853d6877198bc513

Conflicts:
	drivers/gpu/msm/kgsl_debugfs.c
bcmdhd: update to 1.141.44 from sprint ND8 source

Change-Id: Ie87df94d96f99d696ceb80328a993e9aac04ade8
sensors: update from latest source drop

Change-Id: Ibcab74240782f82dfa2b6976c7ccaa34f68f1590

Conflicts:
	arch/arm/configs/cyanogen_apexq_defconfig
	arch/arm/configs/cyanogen_d2_defconfig
	arch/arm/configs/cyanogen_d2dcm_defconfig
	arch/arm/configs/cyanogen_expressatt_defconfig
secjack: update driver

Change-Id: I30a2e5f0b5c416f600879a589362ddeca24038d4
msm: board-m2: Update sec battery configuration

Use commonized variables based on KK source drop.
A lot of this was done in previous kernel releases, though the
sec_bat values were only commonized (based on att, it seems) in
the latest release.

Change-Id: Icadb65af12cd86d9351c9b4e71a98d7097d0cd03
Signed-off-by: Luis Cruz <ljc2491@gmail.com>
net: ipv6: Amend ipv6_recv_error usage

Usage of ipv6_recv_error, included in commit f704820, needs to be
updated to account for the changes in ad25b5d.

Fixes:
  net/ipv6/ping.c: In function 'pingv6_init':
  net/ipv6/ping.c:84:29: warning: assignment from incompatible pointer type [enabled by default]

Change-Id: Ia77db6e465072fb794999a20f75f59e848a88b79
Signed-off-by: Luis Cruz <ljc2491@gmail.com>
Update defconfigs
update defconfigs

CONFIG_INPUT_GPIO is required for the new Samsung sec_jack driver
Google recommends 32768 for CONFIG_LSM_MMAP_MIN_ADDR

Change-Id: I1f321b317bbf114c86b4ee267ae564c01700dfc1
d2: enable usb host notify

Change-Id: I90cb14bfa100ede1bcac0f82922bceda6c7a8656
msm: fix in-tree compilation for perf_trace_counters

In-tree compilation for arch/arm/mach-msm/perf_trace_counters.c was
hitting this error:

    In file included from arch/arm/mach-msm/perf_trace_counters.h:127:0,
                     from arch/arm/mach-msm/perf_trace_counters.c:14:
    include/trace/define_trace.h:79:43: fatal error: ./perf_trace_counters.h: No such file or directory

Instructions for TRACE_INCLUDE_FILE in include/trace/define_trace.h say
"the path is relative to define_trace.h, not the file including it".
Fix in-tree compilation by making the path relative to define_trace.h.

Change-Id: I566b83faf2714ce5f68ac11e5d63ab7cd0de23ed
Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
ALSA: compress_core: cleanup pointers on stop

as the start can be called after stop again, we need to reset state

Signed-off-by: Namarta Kohli <namartax.kohli@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: compress_core: don't wake up on pause

during pause the core should maintain the status-quo on the device and pointers
and not wake up. If app needs it should call DROP explcitly.

Signed-off-by: Namarta Kohli <namartax.kohli@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: compress_core: fix open flags test in snd_compr_open()

O_RDONLY is zero so the original test (f->f_flags & O_RDONLY) is always
false and it will never do compress capture.  The test for O_WRONLY is
also slightly off.  The original test would consider "->flags =
(O_WRONLY | O_RDWR)" as write only instead of rejecting it as invalid.

I've also removed the pr_err() because that could flood dmesg.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: compress_core: integer overflow in snd_compr_allocate_buffer()

These are 32 bit values that come from the user, we need to check for
integer overflows or we could end up allocating a smaller buffer than
expected.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: compress - move the buffer check

Commit ALSA: compress_core: integer overflow in snd_compr_allocate_buffer()
added a new error check for input params.
this add new routine for input checks and moves buffer overflow check to this
new routine. This allows the error value to be propogated to user space

Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: Compress - add codec parameter checks

Conflicts:
	include/sound/compress_params.h

Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: core: don't return uninitialized snd_compr_tstamp

The snd_compr_update_tstamp() can only fill in the snd_compr_tstamp
if the codec implements the pointer() function. If that happened
the code was previously returning uninitialized garbage in the
tstamp because it wasn't initialized anywhere.

This change zero-fills the tstamp in the two places it is used
before calling snd_compr_update_tstamp(), and also has
snd_compr_update_tstamp() return an error indication if it
can't provide a tstamp. For the case of snd_compr_calc_avail()
it ignores this error because we still need to return info on
the available buffer space even if we can't provide tstamp
info - when the tstamp is not valid all fields are now
guaranteed to be zero.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: compress: add support for gapless playback

this add new API for sound compress to support gapless playback.
As noted in Documentation change, we add API to send metadata of encoder
and
padding delay to DSP. Also add API for indicating EOF and switching to
subsequent track

Also bump the compress API version

Conflicts:
	include/uapi/sound/compress_offload.h

Change-Id: I298fb3613d00d21b96f39510ed0c2c9c5f656043
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ASoC: add definations for compressed operations

Here we update the asoc structures to add compress stream definations
First the struct snd_soc_dai_driver adds a new member to indicate if the dai is
compressed or pcm. Next we add a new structre the struct snd_soc_compr_ops in
the struct snd_soc_dai_link. This is to be used for machine driver to perform
any opertaions required for setting up compressed audio streams

next is the compressed data operations, they are added using struct
snd_compr_ops in the struct snd_soc_platform_driver.

Signed-off-by: Namarta Kohli <namartax.kohli@intel.com>
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: add compress stream support

This patch adds the support to parse the compress dai's and then also adds the
soc-compress.c file while handles the compress stream operations, mostly analogus
to what is done in the soc-pcm.c and aditional handling of the compress
opertaions

Conflicts:
	sound/soc/soc-core.c

Signed-off-by: Namarta Kohli <namartax.kohli@intel.com>
Signed-off-by: Ramesh Babu K V <ramesh.babu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>