sched: Fix select_idle_sibling() bouncing cow syndrome If the previous CPU is cache affine and idle, select it. The current implementation simply traverses the sd_llc domain, taking the first idle CPU encountered, which walks buddy pairs hand in hand over the package, inflicting excruciating pain.

1 tbench pair (worst case) in a 10 core + SMT package:

  pre   15.22 MB/sec 1 procs
  post 252.01 MB/sec 1 procs

Signed-off-by: Mike Galbraith <bitbucket@online.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1359371965.5783.127.camel@marge.simpson.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>

Conflicts:
	kernel/sched/fair.c

Change-Id: I4ca60be0d759d4881fad55be78d9f075aea50121

Conflicts:
	kernel/sched/fair.c
USB: gadget: f_audio_source: Switch to DMA memory to support MMAP

- Music takes more time to resume on speaker after USB unplug.
- USB driver does not support the Non-blocking mode i.e.
  MMAP mode. When the USB is unplugged, write is blocked for
  10 sec, and after a 10 sec timeout, the USB accessory device
  is closed and the device switch to speaker occurs.
- Changes were made to implement the MMAP interface in the
  driver that is Non-blocking. Hence, the write thread gets
  unblocked immediately and the switch to speaker is
  instantaneous.

CRs-Fixed: 453134
Change-Id: I3020f56db31e78aed114e6a4021f519b1ed234c3
Signed-off-by: Deepa Madiregama <dmadireg@codeaurora.org>
ASoC: apq8064 : Fix for voice over USB in Fusion target

- currently APQ assumes 8k and mono as USB parameters for
  voice over USB but MDM configures with 48k and stereo
  as USB parameters which results a mismatch between APQ
  and MDM configurations
- Set the APQ parameters in sync with MDM

Change-Id: Ibbdf6bb620b4fd2c25ba6879477488c85c5defc9
Signed-off-by: VidyaKumar Athota <vathota@codeaurora.org>
CRs-Fixed: 415079
sound: Enable the switch device for USB digital audio

 * Samsung has this commented out in favor of their proprietary dock
   solution, but we can support both.
 * Enables full support for USB DACs on Android :)

Change-Id: Id6d576886924e6c57d6e3fe920eee3ee1833ad98
ASoC: audio: fix unlock Null pointer issue

-In afe_open, trying to unlock mutex on variable
that is already freed.
-correct the sequence by unlock mutex first then
free the variable.

CRs-Fixed: 423196
Change-Id: If7df0e0f46c7d16843c6d52ae821974cc74539ff
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
(cherry picked from commit 4c120ae85c6c5ac2adfdf61956b45d02461a93e3)
ASoC: msm: qdsp6: Add error check for memory commands

- Write failures observed during audio playback.
- Error checks are missing for memory map and memory unmap cmds,
  we are proceeding to write data even if memory map is failed. Due
  to this pcm_out_write failures are observed.
- Add proper error handling for memory map and unmap cmds.

CRs-Fixed: 485051
Change-Id: Iedd369fcd655b02a213277e973059612c040fe34
Signed-off-by: Deepa Madiregama <dmadireg@codeaurora.org>
msm: usbaudio: Fix memory allocation for USB audio module init

Fix memory allocation issue in snd_usb_audio_init()
use sizeof(struct) insead of sizeof(pointer)

Change-Id: I270bbd7111e97dd4e0e92378f61d5025e16f5fca
Signed-off-by: Alex Fradkin <afradkin@codeaurora.org>
ASoC: usb: move the switch setting to more appropriate location

There is a delay between creation of sound card and creating of
corresponding steam. Currently we set the switch at the time of
creation of card. And later streams get created, so its more
optimal if we set the switch only after creating the stream.

Change-Id: Ic9f29d7a8dbcd32cde0097289ce6e1404a837372
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Linux 3.4.57
Revert "Async I/O latency to a ssd greatly increased, 34% gain (Creds: kleikamp)"

This reverts commit 524a804ff95a28aeb5ac5f4ef6f37971bd60913a.
Revert "Revert "Async I/O latency to a ssd greatly increased, 34% gain (Creds: kleikamp)""

This reverts commit 2eb62916675e6cc11294db850cfc9a2adb021ef2.
Revert "sched: Fix select_idle_sibling() bouncing cow syndrome If the previous CPU is cache affine and idle, select it. The current implementation simply traverses the sd_llc domain, taking the first idle CPU encountered, which walks buddy pairs hand in hand over the package, inflicting excruciating pain."

This reverts commit 88859a89f7dde1ec87458ec6a046162448cef5de.
sched: Fix select_idle_sibling() bouncing cow syndrome If the previous CPU is cache affine and idle, select it. The current implementation simply traverses the sd_llc domain, taking the first idle CPU encountered, which walks buddy pairs hand in hand over the package, inflicting excruciating pain.

1 tbench pair (worst case) in a 10 core + SMT package:

  pre   15.22 MB/sec 1 procs
  post 252.01 MB/sec 1 procs

Signed-off-by: Mike Galbraith <bitbucket@online.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1359371965.5783.127.camel@marge.simpson.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>

Conflicts:
	kernel/sched/fair.c

Change-Id: I4ca60be0d759d4881fad55be78d9f075aea50121

Conflicts:
	kernel/sched/fair.c