Revert "ASoC: compr: Disable soft-pause for compress playback"

This reverts commit cec1d5a5b5b66b366eb976cfafc6c2418794dfc8.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: msm: Complete the wait_event request when SSR is triggered

LPA platform driver should complete the wait_event request when it
knows that SSR(sub system restart) has happened. There is no point
waiting and bailing out after timeout.

Signed-off-by: Anish Kumar <kanish@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: msm: qdsp6v2: Add support to improve debug logging

Improve debug logs by adding function names. This
change is required to fix rarely reproducible
customer issues.

Signed-off-by: Anish Kumar <kanish@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: msm: qdsp6v2: update platform driver for new SSR design.

Update PCM platform driver to handle the reset events during
SSR and also unblock the write wait according to
the new SSR design.

Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: msm: unblock the calls sent to the driver during SSR

Return error code ENETRESET from the platform driver
during the SSR recovery.
This facilitates the client to handle the error code
and take corrective measures rather than being blocked
on the call.

Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: msm: qdsp6v2: Fix read error using mmap

When capture session is started in mmap mode then
read commands are issued to ADSP after close command
is issued. This causes read failure as ADSP will not
process the successive read commands after issuing
close command. This change prevents issuing read
command to ADSP when capture session is not in running
state.

Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: msm: qdsp6v2: Add mutex to ensure atomicity

Make sure that afe command sent to DSP is atomic in nature
and doesn't get overwritten in concurrent scenarios.

Signed-off-by: Anish Kumar <kanish@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: msm8974: Update device configuration

* Rectify capture device name.
* Enable offloading on the extra devices.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: compress: propagate the error code from the compress framework

Propagate the error code from the compress framework for the timestamp
query. This error code will be used by the client to handle the
error case scenarios gracefully.

Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: msm: qdsp6v2: Userspace interaction cleanup

Compress ioctl function transfers data to/from userspace
and additionally implements logic to process ioctl command.
Ioctl function should delegate the processing to internal
functions for support compat mode.
This change moves the processing into internal function.

Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>

ASoC: core: Add compat support for compress driver

Change adds compat ioctl for supporting 32 bit userspace
client when kernel is compiled for 64 bit.

Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: msm: fix the audio mute issue post SSR

On receiving the RESET_EVENTS the in_count is not incremented
leading to the wait timeout in the capture_copy.
This causes the capture session not to be closed from the client post SSR.
Post SSR, read error causes the state mismatch for the clients
leading to no audio issue.

Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
cgroup: Take css_set_lock from cgroup_css_sets_empty()

As indicated in the comment above cgroup_css_sets_empty it needs the
css_set_lock. But neither of the 2 call points have it, so rather then fixing
the callers just take the lock inside cgroup_css_sets_empty().

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Change-Id: If7aea71824f6d0e3f2cc6c1ce236c3ae6be2037b
cgroup: Fix use after free of cgrp (cgrp->css_sets)

Running a 3.4 kernel + Fedora-18 (systemd) userland on my Allwinner A10
(arm cortex a8), I'm seeing repeated, reproducable list_del list corruption
errors when build with CONFIG_DEBUG_LIST, and the backtrace always shows
free_css_set_work as the function making the problematic list_del call.

I've tracked this doen to a use after free of the cgrp struct, specifically
of the cgrp->css_sets list_head, which gets cleared by free_css_set_work.

Since free_css_set_work runs form a workqueue, it is possible for it to not be
done with clearing the list when the cgrp gets free-ed. To avoid this the code
adding the links increases cgrp->count, and the freeing code running from the
workqueue decreases cgrp->count *after* doing list_del, and then if the count
goes to 0 calls cgroup_wakeup_rmdir_waiter().

However cgroup_rmdir() is missing a check for cgrp->count != 0, causing it
to still continue with the rmdir (which leads to the free-ing of the cgrp),
before free_css_set_work is done. Sometimes the free-ed memory is re-used
before free_css_set_work gets around to unlinking link->cgrp_link_list,
triggering the list_del list corruption messages.

This patch fixes this by properly checking for cgrp->count != 0 and waiting
for the cgroup_rmdir_waitq in that case.

Change-Id: I9dbc02a0a75d5dffa1b65d67456e00139dea57c3
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Merged LS980 Knock Code Update + MDSS LCD code update.
PM / QoS: Use NULL pointer instead of plain integer in qos.c

Fix the following sparse warning:
drivers/base/power/qos.c:465:29: warning: Using plain integer as NULL pointer

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
arch/arm/mm/proc-v7.S: fix wrong location for DSB after patch 3.4.83
mm, oom: change type of oom_score_adj to short

The maximum oom_score_adj is 1000 and the minimum oom_score_adj is -1000,
so this range can be represented by the signed short type with no
functional change.  The extra space this frees up in struct signal_struct
will be used for per-thread oom kill flags in the next patch.

** Modified to merge with Chaos Kernel

Signed-off-by: David Rientjes <rientjes@google.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Cc: Anton Vorontsov <anton.vorontsov@linaro.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Thanks to NEO and Me :) fixed NET GCC warnings
trace: memkill: per-zone page state for LMK

LMK considers memory status per zone. This change appends
gfp mask and per-zone free/file page state to LMK kill tracing.
A field <Node_id>:<Zone_id>:<Nr_free>:<Nr_page> is printed for
each zone.

Signed-off-by: Yuanyuan Zhong <a6510c@motorola.com>
Signed-off-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Dorimanx:
fix lost short defines.
trace: memkill: provide fixed zone info columns.

Maintain kernel trace log to always have fixed number of columns.

propagated_from: (CR)

Signed-off-by: Yi-wei Zhao <gbjc64@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/537078
SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: David Ding <dding@motorola.com>
Reviewed-by: Dong-Dong Yang <gdb746@motorola.com>
Reviewed-by: Jeff Thompson <jthomps1@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>

SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Jason Hrycay <jason.hrycay@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>