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

This reverts commit ece021021f54cfe776713d1bbaa6340a735b297f.

Change-Id: Ifd5997e125cf98d636b590dd0ea15f7f625e1695
Signed-off-by: Scott Mertz <smertz@cyngn.com>
usb: gadget: mass_storage: added sysfs entry for cdrom to LUNs

This patch adds a "cdrom" sysfs entry for each mass_storage LUN, just
like "ro" sysfs entry. This allows switching between USB and CD-ROM
emulation without reinserting the module or recompiling the kernel.

Change-Id: Idf83c74815b1ad370428ab9d3e5503d5f7bcd3b6
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.

CRs-Fixed: 575060
Change-Id: Ia4a3a63c4e5f0a3153480998effe1c323c6ed6a5
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
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.

Change-Id: Iea1ee6e91853f24e53608699c0b82fb4373bc8eb
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
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.

CRs-Fixed: 661491
Change-Id: Id0b4950ffc0eb130dbfdce36375629a683752044
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
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.

CRs-Fixed: 683288
Change-Id: I618edf0276bbe8826b47edec39df0dd4f87ffe93
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
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.

Crs-Fixed: 518008
Change-Id: I780fd42dffcd5ee4c051314aaf5f5b537815d8fe
Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
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.

Change-Id: I86558c293f0ce5d78533b79ed13a23e52e367c1d
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
asoc: msm8974: Fix compress capture device name

Change-Id: I29ab28e337af8b33fc636a4b58accd5fdff7587b
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.

CRs-Fixed: 683288
Change-Id: I68ad14d52327dd0156531fe8d17ac54ba110fdf6
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
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.

Change-Id: Id3a3cbd000ce319dcf2a01fa4eae941c042b2b37
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.

Change-Id: I3ac51187f9c53feaec4b2ea309beaefc4e9acf53
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
ngd_slim: Register with QMI service in the slave-notification thread

Slave notification thread is used to notify slaves when QMI server
(hosted by slimbus msater driver) on the remote execution environment
has come up. Use that thread's entry point to do QMI service
registration as well since doing so in probe may trigger another
probe by the QMI service leading to boot-up stalling.

Change-Id: I06b1bcfd9aa3d570554971acacd5d7b1dc20fd1c
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
asoc: msm8974: Update offload device configuration

 * Actually enable offloading on the extra devices.

Change-Id: I041ee239dc1b247367c7e2a6d23084046acaa0cf
ngd_slim: Fix return paths in transfer function

Return right away if resume fails when runtime-pm is not
enabled. Consolidate return paths if controller power-on
vote fails when runtime-pm is enabled.

CRs-Fixed: 677689
Change-Id: Ia8887dd87df6dba4f93638650794bfcdc7d1ff75
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
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.

Change-Id: I58bb4d4b6e8f1e229e635563206b49948dbe5826
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
ASoC: wcd9320: Add NULL check to avoid crash

Check for NULL pointer before passing the parameter for string
manipulation to avoid pointer dereference.

CRs-Fixed: 682551
Change-Id: I74610e4679e4808c633c0ea80d3b3e389faf46d0
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
ASoC: msm: Check the pointers before memcpy

Check the pointers before memcpy when the application queries
the adsp capability for compressed audio. Invalid pointer
can cause kernel panic when doing memcpy.

CRs-fixed: 665297
Change-Id: I522deffc42f792b8dfdcf50272a80cd0d1e5a9ee
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
ASoC: wcd9320: Add HD2 tuning coefficients for HPH path

Add 2nd Harmonic Distortion (HD2) tuning coefficients
for HPH path. HD2 coefficients get turned ON during HPH
enable and turned OFF during path tear down. Enabling HD2
coefficients would increase the Headphone PA efficiency during
audio playback.

Change-Id: I24bc053e6401d5b8f45dc62d88c7fe6a5ba01447
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>