msm: vidc: Reduce priority of unwanted logs

Change reduces the priority of unwanted logs
which are coming in kernel logs by default
in video driver. Now these logs will come
only when enabled.

Change-Id: I18a534c7aaf8a2819be1b8812fad9e0710c49bd3
CRs-fixed: 454273
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
ASoC: msm: Fix mute issue in LPA

In event of an under-run, driver is not able to start again.
Memset the buffer to play silence while userspace recieves the
next set of data and copies it into the mmap buffer.

Change-Id: I0ccbe674defbdad638ce5d4378e18d0428003bb0
CRs-Fixed: 356297
CRs-Fixed: 359764
Signed-off-by: Tejas Shikhare <tshikhar@codeaurora.org>
ASoC: qdsp6: Fix device crash issue in LPA seek.

Accessing buffer pointer before initialization results in device crash.
To memset the buffer using physical address also results in a device crash.
Fixed this by initializing the buffer pointer before it is accessed and
memset the buffer using the virtual address.

Change-Id: I3b03f56cf988c9471c7988665bcec3c467e60bfc
Signed-off-by: Amal Paul <amal@codeaurora.org>
ASoC: msm: Fixes for underrun issue in LPA Playback

Update LPA platform driver to register restart callback.
The implementation of the callback is to issue a pending buffer
written by the application to restart the session when the dequeue
process is stopped due to underrun issue.
The callback is triggered from ALSA core when the framework
detects that the renderer stopped pulling data but the application
is still writing data. It runs in atomic context.

Fixes:
-A disturbance was heard when switching from one song
to the other, or when the song is paused for greater
than 3 seconds and then resumed
-This was due to the previous value of the track
volume being used in the lpa driver
-This was fixed by setting 0 as the initial volume

Change-Id: I035760937d032038fb3f3383dc87ecbdc5f4700d
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
ASoC: msm: Resume writes only for start command

For compressed and LPA drivers, set pending_buffers flag to 1 only if the client
issues a trigger_start command, not a pause_release command. This flag
is used to initiate writes to the dsp.

Change-Id: I503156863646210b460613a0b9a26a6bfb8854ed
CRs-Fixed: 442269, 449126
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>

Conflicts:

	sound/soc/msm/msm-compr-q6.c
ASoC: msm: Reduce the minimum period size for compress audio

-Reduce the minimum period size for compress audio.
-This allows smooth audio video playback.

Change-Id: I2ba56021fb3f0df5fb3e53cf91baf4b1a5c5690a
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
ASoC: msm: Add AAC support for compressed audio

Add support for playback of aac clips through
compressed audio driver.

Change-Id: I234a94d291de200eefafea383be5d845c0eaa4b7
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
ASoC: msm: Add volume support for compressed and pcm driver

Add support for controlling pcm and compressed audio
volume from DSP. Add TLV mixer control to set the pcm
and compressed audio stream volume. Enable soft volume
and soft pause features in pcm and compressed driver.

Change-Id: Ifea8faca39a92127fa91e880b904c0e60c92f9d0
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>

Conflicts:

	sound/soc/msm/msm-pcm-routing.c
ASoC: msm: Add support for AC3 pass through playback

Add support for AC3 tunnel mode playback where dsp acting
As pass through.

Change-Id: Ibc6536a439f7cae8cbbadcaddd4ad27e4ee84543
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>

Conflicts:

	include/sound/snd_compress_params.h

Conflicts:

	sound/soc/msm/msm-compr-q6.c
ASoC: msm: Send a write done for the last buffer

The write done event corresponding to the last compressed buffer
is not notified to the userspace. This event is required to handle
EOS for compressed audio playback. Send a write done for the last
buffer.

Change-Id: I337024cf97537fff5997f89e222a6d19a1e58e55
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
ASoC: msm: Support WMA playback

Add support for WMA codec in tunnel mode playback.

Change-Id: I1084418a1ccbe63ada78a34b6f8cf532904b919c
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
ASoC: msm: Support WMA Pro playback

Add support for WMA Pro codec in tunnel mode playback.

Change-Id: Iad8d67c77fcd8b6af7db9102f2faf4dde7423f24
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>

Conflicts:

	include/sound/snd_compress_params.h
ASoC: msm: qdsp6: Add APIs for compressed audio playback/capture

Add APIs for compressed audio playback/capture in pass through mode

Change-Id: Ic9b4c71b518e653dae4726112edb75025ccc2bc2
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>

Conflicts:

	include/sound/snd_compress_params.h
	sound/soc/msm/qdsp6/q6asm.c
ALSA: usb-audio: work around Android accessory firmware bug

commit 342cda29343a6272c630f94ed56810a76740251b upstream.

When the Android firmware enables the audio interfaces in accessory
mode, it always declares in the control interface's baInterfaceNr array
that interfaces 0 and 1 belong to the audio function.  However, the
accessory interface itself, if also enabled, already is at index 0 and
shifts the actual audio interface numbers to 1 and 2, which prevents the
PCM streaming interface from being seen by the host driver.

To get the PCM interface interface to work, detect when the descriptors
point to the (for this driver useless) accessory interface, and redirect
to the correct one.

Reported-by: Jeremy Rosen <jeremy.rosen@openwide.fr>
Tested-by: Jeremy Rosen <jeremy.rosen@openwide.fr>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tilepro: work around module link error with gcc 4.7

commit 3cb3f839d306443f3d1e79b0bde1a2ad2c12b555 upstream.

gcc 4.7.x is emitting calls to __ffsdi2 where previously
it used to inline the appropriate ctz instructions.
While this needs to be fixed in gcc, it's also easy to avoid
having it cause build failures when building with those
compilers by exporting __ffsdi2 to modules.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
KVM: x86: remove vcpu's CPL check in host-invoked XCR set

commit 764bcbc5a6d7a2f3e75c9f0e4caa984e2926e346 upstream.

__kvm_set_xcr function does the CPL check when set xcr. __kvm_set_xcr is
called in two flows, one is invoked by guest, call stack shown as below,

  handle_xsetbv(or xsetbv_interception)
    kvm_set_xcr
      __kvm_set_xcr

the other one is invoked by host, for example during system reset:

  kvm_arch_vcpu_ioctl
    kvm_vcpu_ioctl_x86_set_xcrs
      __kvm_set_xcr

The former does need the CPL check, but the latter does not.

Signed-off-by: Zhang Haoyu <haoyu.zhang@huawei.com>
[Tweaks to commit message. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tcp: fix tcp_md5_hash_skb_data()

[ Upstream commit 54d27fcb338bd9c42d1dfc5a39e18f6f9d373c2e ]

TCP md5 communications fail [1] for some devices, because sg/crypto code
assume page offsets are below PAGE_SIZE.

This was discovered using mlx4 driver [2], but I suspect loopback
might trigger the same bug now we use order-3 pages in tcp_sendmsg()

[1] Failure is giving following messages.

huh, entered softirq 3 NET_RX ffffffff806ad230 preempt_count 00000100,
exited with 00000101?

[2] mlx4 driver uses order-2 pages to allocate RX frags

Reported-by: Matt Schnall <mischnal@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Bernhard Beck <bbeck@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
gianfar: add missing iounmap() on error in gianfar_ptp_probe()

[ Upstream commit e5f5e380e0f3bb11f04ca5bc66a551e58e0ad26e ]

Add the missing iounmap() before return from gianfar_ptp_probe()
in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ipv6: fix possible crashes in ip6_cork_release()

[ Upstream commit 284041ef21fdf2e0d216ab6b787bc9072b4eb58a ]

commit 0178b695fd6b4 ("ipv6: Copy cork options in ip6_append_data")
added some code duplication and bad error recovery, leading to potential
crash in ip6_cork_release() as kfree() could be called with garbage.

use kzalloc() to make sure this wont happen.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Cc: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
netlabel: improve domain mapping validation

[ Upstream commit 6b21e1b77d1a3d58ebfd513264c885695e8a0ba5 ]

The net/netlabel/netlabel_domainhash.c:netlbl_domhsh_add() function
does not properly validate new domain hash entries resulting in
potential problems when an administrator attempts to add an invalid
entry.  One such problem, as reported by Vlad Halilov, is a kernel
BUG (found in netlabel_domainhash.c:netlbl_domhsh_audit_add()) when
adding an IPv6 outbound mapping with a CIPSO configuration.

This patch corrects this problem by adding the necessary validation
code to netlbl_domhsh_add() via the newly created
netlbl_domhsh_validate() function.

Ideally this patch should also be pushed to the currently active
-stable trees.

Reported-by: Vlad Halilov <vlad.halilov@gmail.com>
Signed-off-by: Paul Moore <pmoore@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>