msm: camera: return -EIO if daemon hasn't fully launched

Media server depends on camera daemon to be fully launched
to be able to get camera info. Return -EIO if daemon hasn't
subscribed to v4l2 device node. This gives HAL opportunity
to try again.

Bug: 10577806
Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>
(cherry picked from commit d562b2f9774d9251068dbded5ad15a1c7407824f)

Change-Id: Iebc51c8e56352e02ef5f0554c9eb5ac2bf629595
Signed-off-by: Dan Trifan <jimsth@gmail.com>
tcp: add a sysctl to config the tcp_default_init_rwnd

The default initial rwnd is hardcoded to 10.

Now we allow it to be controlled via
  /proc/sys/net/ipv4/tcp_default_init_rwnd
which limits the values from 3 to 100

This is somewhat needed because ipv6 routes are
autoconfigured by the kernel.

See "An Argument for Increasing TCP's Initial Congestion Window"
in https://developers.google.com/speed/articles/tcp_initcwnd_paper.pdf

Change-Id: I386b2a9d62de0ebe05c1ebe1b4bd91b314af5c54
Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
msm: camera: Propogate return value from i2c_read/write

This makes sure ERESTARTSYS pops up to system call level
and can be triggered again.

Bug: 10577806
Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>
(cherry picked from commit 6a05ee416042bf0b3565bc767ab4462a2ae14518)

Change-Id: I66abd3600bb9aae64d9af42dcdf9768531bd6166
Signed-off-by: Dan Trifan <jimsth@gmail.com>
usb: gadget: audio: Fix problem resuming playback on alt interface change

If the alternate interface is set back to 1, we now resume playback
if still triggered.

Bug: 12549807
(cherry picked from commit 898bafb4722ac04cda46249e39b0be96ab9d2bbd)

Change-Id: I6c3eb43ebafbc8a101ae83e7864097be5b07a0f9
Signed-off-by: Dan Trifan <jimsth@gmail.com>
msm: camera: Do not ignore ERESTARTSYS return from wait function

By ignoring ERESTARTSYS return from wait function, the thread
could potentially hold up the freezing of the task for a long
time, causing battery drain.

Bug: 10577806
Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>
Change-Id: I653c06c6bf41b07c811d6bab33e3c839460f45b6
(cherry picked from commit db69933cd572bb7f6fc6ede66175dc4adfdd8217)
Signed-off-by: Dan Trifan <jimsth@gmail.com>
Revert "hammerhead_defconfig: Enable usb tablet devices and xpad"

This reverts commit 88c42aa4d05681c2742fa7dfb02df90d69e9fe0c.

Signed-off-by: Dan Trifan <jimsth@gmail.com>