Revert a bunch of sound commits causing audio issues

This reverts commit 841ff1361f277e887fb46b164076df21d2ad4fbc.

Revert "ASoC: msm: Add 24 bit support to Primary MI2S TX"

This reverts commit fc817e67d35067303f9785f1a6a0ebcce98aa13a.

Revert "ALSA: core: Expose sound card online/offline state"

This reverts commit c530ec81947b9da7c77064aae35bcbe1fa0be63b.

Revert "ALSA: core: free card runtime memory"

This reverts commit 4d14402dca30893f78c36cf62b4f5ece02dfc0e2.

Revert "ASoC: core: Use driver core probe deferral"

This reverts commit f669baf8c6f02c0e2c7963ec436345a0e9e2f594.

Revert "ASoC: pcm: Protect FE dai list during dai open/close"

This reverts commit 3dc886b569535aba9bb75aaa7d28194109711189.

Revert "ASoC: wcd9xxx: reinitialize codec irq after subsystem restart"

This reverts commit 883ba8ca055c30bb0b64c40eae27a5d581613307.

Revert "ASoC: wcd9xxx: Update sound card's online/offline state"

This reverts commit a090bd773aa437e1c5a42147caaf61a346ee3520.

Revert "ASoC: wcd9xxx: don't change clock frequency while bandgap/clock are on"

This reverts commit 191382a51cc5ffa2d76913796845f197f44c3c14.

Revert "ASoC: wcd9xxx: don't acquire BCL from codec driver"

This reverts commit 6a6be79074fa494d0b53f7e65be5587564d8552f.

Revert "ASoC: wcd9xxx: don't clear pending mbhc interrupt"

This reverts commit 7b37bab8cffc9540d2e44e14dc7ff897c57cb406.

Revert "ASoC: wcd9xxx: Reset Tapan codec post adsp subsystem restart"

This reverts commit 5d83d83aa03fccb20fa84ea1b87dafcef81e9cbc.

Revert "ASoC: wcd9xxx: use separate mutex for bandgap and clock get/put"

This reverts commit 58504973a54b0d217dc6321384ab7df088008fb3.

Revert "ASoC: wcd9320: Update headphone static gain in companding mode"

This reverts commit 6282d8e40572ac0d3cd15728c67a101bb9807058.

Revert "ASoC: wcd9xxx: don't wait for mic volage to settle"

This reverts commit 7f426aed8d772055473ff9c005201dfa917ad11b.

Revert "ASoC: msm8x10-wcd: Add the internal bias for mic1"

This reverts commit 3e5c7fdbe36ea5d8d4b4645835c630162707f566.

Revert "gcc 4.7 cleanups"

This reverts commit cecf57151c2d99581feab4be7942e318c028cfe2.

Revert "ASoC: wcd9320: Add support for notification of codec events"

This reverts commit cd0bfae320842598b2791549f918b043e84ae237.

Revert "ASoC: usb: change uevent value to digital USB HEADSET"

This reverts commit 713f7ff9b84a4aaf2c0b2bc0d3cad5bb49dd1bd0.

Revert "mdss: hdmi: Dynamic Audio re-configuration"

This reverts commit 94489edae9b9e696d63ca9f8d989cd0302a49904.

Revert "ASoC: msm: Route low latency frontend to in-call music backend"

This reverts commit 7bde214931e2490353f049908e9f867cbe128c99.

Revert "ASoC: msm: change to enable audio"

This reverts commit ef79d9e7d4f5b61adccce089b2f5f014a881dc55.

Revert "ASoC: msm: flush if prior and current backends rate not matching"

This reverts commit ba4f87b3e77d5dae0e65614a09c025736cd0775c.

Revert "ASoC: msm: Add support for ASM loopback"

This reverts commit 7346f08577be678315377da8db1de526fe925994.

Revert "ASoC: msm: Add support for RTAC version 1.1"

This reverts commit 57f3efe6b539f2dcf4ffd076a71255b56f7881bb.

Revert "ASoC: msm: qdsp6v2: Fix APR de-register issues during session close"

This reverts commit 2a8300a992b54bfbcc2ed80be264b3aa510244d4.

Revert "ASoC: msm: qdsp6v2: Handle SSR for audio playback over BT usecase"

This reverts commit 2d7f3afbad042a5e6ff877d8341533fee97eb7b9.

Revert "msm: qdsp6v2: Buffer address for Record and playback is 32-byte aligned."

This reverts commit 5ab0fb9c59227fffcf6c3b0c7d892a1c7c667b4e.

Revert "ASoC: msm: qdsp6v2: Set ADM channel to max supported for ULL"

This reverts commit 9ed77b1ea4ec29580b0a0a345ebf1608ba569eab.

Revert "ASoC: msm: qdsp6v2: Don't update state variables for no-wait commands"

This reverts commit b45aa557c8fe5fbd95f925e1aaf4a4015a604339.

Revert "ASoC: msm: qdsp6v2: Set ADM sample rate to 48Khz for ULL"

This reverts commit 9fd10f615637a96f625337109d82fedcab548fc8.

Revert "ASoC: msm: Fix playback failure on device switch during ULL playback"

This reverts commit 4f689e8249bb33f0520ffcd31b650cbc78677cee.

Revert "ASoC :msm: Increase Proxy buffering"

This reverts commit 635e0978af4ca0b76286bfe99c44a32ff3719416.

Revert "ASoC: Compress: Check and set pcm_new driver op"

This reverts commit 96140beb6ab697a48bd9b66baa3103c9df000c5c.

Revert "msm: usbaudio: Add check for NULL before dereferencing"

This reverts commit e1ecd03281446c72f4bbb51a0a1a700934a01a85.

Revert "ALSA: core: Fix crash by avoiding appl_ptr crossing 32-bit boundary"

This reverts commit 8705c7ce5bf7a5f7e634f65cdda967cd64f2f98c.

Revert "ALSA: pcm: check for integer overflow during multiplication"

This reverts commit 17e3d611b2878637f6e6bc8e969712bb1955c7cf.

Revert "ALSA: compress: Memset timestamp structure to zero."

This reverts commit 38b643a639666279192cf50fb0b37d3f7ed384c3.

Revert "ASoC: msm: Do not allow commands during gapless transition."

This reverts commit cc653438662a01b3778a29d003732d763c911ccd.

Revert "ASoC: msm: Disable gapless offload playback by default"

This reverts commit 3e090061506268bb221afb0edbf947c2737abe97.

Revert "ASoC: msm: Handle RESET_EVENTS in compress driver"

This reverts commit bf5a831722aad767eb1f4fdd1f02b7700c6b9136.

Revert "ASoC: msm: Enable initial/trailing silence removal"

This reverts commit cb9277527405b88329225b928f7287dc3fdc8fd0.

Revert "ASoC: msm: Add playback support for AC3/EC3 in compress driver"

This reverts commit 0e9f942f9b7d6e87f2f6af130207240eadd28cb4.

Revert "ASoC: msm: Add support to enable audio post processing in DSP"

This reverts commit d3f921035fee5de8b59771bc23b54e65c8e9a581.

Revert "ASoC: qdsp6: Add support for audio post processing effects"

This reverts commit e240da274e4118611cde97e2cba7cc2323f8f05a.

Revert "ASoC: qdsp6: Add support for custom topology"

This reverts commit 3b15103c4e9fd7a0b19f34a87cce593a2d785505.

Revert "ASoC: msm: Add support for gapless audio playback"

This reverts commit e1a4aed5148f625e2a0861a40541b43ae9889ab9.

Revert "ASoc: msm: qdsp6: Add ultra low latency playback support"

This reverts commit 6a1e16ea828516b686a5a0c27bb8aa5de1c94119.

ASoC: msm: qdsp6v2: fix the crash issues due to NULL pointer

If adsp subsystem restart happens, ac and apr handles are not valid
any more. While recovering subsystem restart and reassign proper
handles protection from accessing NULL pointer is required.

CRs-fixed: 513414
Change-Id: Idb60d3504a37c0de708846a4f8517f9d75eb9078
Signed-off-by: Fred Oh <fred@codeaurora.org>

audio: Remove sound upstream, fix build, clean some leftovers

Change-Id: I38a199600604bf5bf394555a76b551d82cc6674a
msm: kgsl: show current power level for 8974 SOCs.

since 8974 uses duplicate frequencies in its table, it's not possible to tell
which of the duplicates is actually in use

Signed-off-by: Paul Reioux <reioux@gmail.com>
GPU: overclock to 533 mHz
GPU: step-pwrlevel to 6
Tune deadline, ondemand, interactive.

Conflicts:
	drivers/cpufreq/cpufreq_ondemand.c
	include/linux/mm.h
	kernel/sched/Makefile
sched: Add sysinterface for GENTLE_FAIR_SLEEPERS

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
kernel/ksysfs.c: unused variable 'cpu' [-Wunused-variable]

Signed-off-by: Andre Saddler <dresadd09691@gmail.com>
net/ipv4/tcp_output.c: conflicting types for 'tcp_write_xmit'

uses:
     static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,
instead of
     static int tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,

refers to: https://bitbucket.org/AOSPA-hybrid/kernel_lge_msm8974/commits/3ead69fd1889fb7a214eb8685ecf89e9d71ff2a6

Signed-off-by: Andre Saddler <dresadd09691@gmail.com>
arm/dt: msm8974-gpu: Enable qcom bus-control

Conflicts:
	arch/arm/boot/dts/msm8974-gpu.dtsi
Enable arch_power
 Update ARM topology and add cpu_power driver
block: Add VR, ZEN, SIO, FIOPS I/O schedulers

block: fiops add some trace information

Add some trace information, which is helpful when I do debugging.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
block: fiops bias sync workload

If there are async requests running, delay async workload. Otherwise
async workload (usually very deep iodepth) will use all queue iodepth
and later sync requests will get long delayed. The idea is from CFQ.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
block: fiops preserve vios key for deep queue depth workload

If the task has running request, even it's added into service tree newly,
we preserve its vios key, so it will not lost its share. This should work
for task driving big queue depth. For single depth task, there is no approach
to preserve its vios key.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
block: fiops add ioprio support

Add CFQ-like ioprio support. Priority A will get 20% more share than priority
A+1, which matches CFQ.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
block: fiops sync/async scale

CFQ gives 2.5 times more share to sync workload. This matches CFQ.

Note this is different with the read/write scale. We have 3 types of
requests:
1. read
2. sync write
3. write
CFQ doesn't differentitate type 1 and 2, but request cost of 1 and 2
are usually different for flash based storage. So we have both sync/async
and read/write scale here.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
block: fiops read/write request scale

read/write speed of Flash based storage usually is different. For example,
in my SSD maxium thoughput of read is about 3 times faster than that of
write. Add a scale to differenate read and write. Also add a tunable, so
user can assign different scale for read and write.

By default, the scale is 1:1, which means the scale is a noop.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
block: fiops ioscheduler core

FIOPS (Fair IOPS) ioscheduler is IOPS based ioscheduler, so only targets
for drive without I/O seek. It's quite similar like CFQ, but the dispatch
decision is made according to IOPS instead of slice.

The algorithm is simple. Drive has a service tree, and each task lives in
the tree. The key into the tree is called vios (virtual I/O). Every request
has vios, which is calculated according to its ioprio, request size and so
on. Task's vios is the sum of vios of all requests it dispatches. FIOPS
always selects task with minimum vios in the service tree and let the task
dispatch request. The dispatched request's vios is then added to the task's
vios and the task is repositioned in the sevice tree.

Unlike CFQ, FIOPS doesn't have separate sync/async queues, because with I/O
less writeback, usually a task can only dispatch either sync or async requests.
Bias read or write request can still be done with read/write scale.

One issue is if workload iodepth is lower than drive queue_depth, IOPS
share of a task might not be strictly according to its priority, request
Bias read or write request can still be done with read/write scale.

One issue is if workload iodepth is lower than drive queue_depth, IOPS
share of a task might not be strictly according to its priority, request
size and so on. In this case, the drive is in idle actually. Solving the
problem need make drive idle, so impact performance. I believe CFQ isn't
completely fair between tasks in such case too.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>

Signed-off-by: Paul Reioux <reioux@gmail.com>

Conflicts:
	block/Kconfig.iosched
	block/Makefile
defconfig
don't build test-io
Dynamic read-ahead support

Conflicts:

	block/blk-core.c

Conflicts:
	include/linux/mm.h
	mm/readahead.c
Revert "Dynamic read-ahead support"

This reverts commit e0c3e27009d470b05b43627a511d93001e8df106.
Disable Gentle Fair Sleepers

Better UI response
Async I/O latency to a ssd greatly increased, 34% gain (Creds: kleikamp)
GTFO
Merge pull request #1 from bart452/kk3

merge changes from last night