ARM: dts: hammerhead: Change i2c clock rate to 19.2 MHz

For standard  requirement, I2C source
speed of 50MHz causes high power usage, hence
this patch change the clock rate to 19.2 MHz
to save power.

Signed-off-by: Sana Venkat Raju <c_vsana@codeaurora.org>
[neo: Thanks sultanxda]
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ALSA: control: Fix missing VOLATILE flag at creating controls

The SNDRV_CTL_ELEM_ACCESS_VOLATILE bit flag wasn't properly inherited
at creating control elements via snd_ctl_new1().

Signed-off-by: Takashi Iwai <tiwai@suse.de>

ALSA: PCM: Fix some races at disconnection

Fix races at PCM disconnection:
- while a PCM device is being opened or closed
- while the PCM state is being changed without lock in prepare,
  hw_params, hw_free ops

Reported-by: Matthieu CASTET <matthieu.castet@parrot.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: wcd9320: Set Audio MAD IIR coefficients from ACDB

WCD9320 codec has HW MAD which requires the Audio IIR
filter coefficients to be configured. ACDB data contains
IIR filter coefficients, these values are written to
codec registers when MAD session is initiated. This
change reads ACDB data for Audio MAD and sets the audio
IIR registers for MAD.

Signed-off-by: Satya Krishna Pindiproli <satyak@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: msm: metaInfo support in acdb kernel driver

implements store_meta_info and get_meta_info API
metainfo is supplied by userspace to kernel driver via
store_meta_info, later this info is sent to ADSP by querying
using get_meta_info

Signed-off-by: Srikanth Uyyala <suyyala@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: msm: Add MultiKeyword support for Listen

Listen is a Voice activation and recognition feature.
Currently Listen feature supports recognition of single
keyword for a given session. This change adds support
for MultiKeyword detection for each Listen session.

Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>

ASoC: msm: Add MultiKeyword support for Listen

Listen is a Voice activation and recognition feature.
Currently Listen feature supports recognition of single
keyword for a given session. This change adds support
for MultiKeyword in Listen interface header. Userspace
hal will use this interface header to determine Sound
Model version based on App ID.

Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC : msm: Add IOCTL for Listen LookAhead Buffering

LookAhead buffering is a feature used for buffering PCM
data from codec once the successfull keyword detection is
done for a given sound model. This change defines the IOCTL
interface for LAB feature to user space. User space
can use these IOCTL to control and stop LAB.

Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: msm: qdsp6v2: Fix event status issue for Sound Model V1

Multikeyword supports different sound models. Keyword detection
status for sound model V1 and V2 are different. This caused the
event status for sound model V1 to fail even though the events
were from ADSP were correct. This change fixes the issue of
detecting the status correctly for Sound model V1 and V2 types.

Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: core: Add compat ioctl support for listen driver

Change adds compat ioctl to listen driver for supporting 32 bit userspace
client when kernel is compiled for 64 bit.

Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: msm: qdsp6v2: avoid null pointer dereference

If memory allocation fails or allocation of extremely
large buffer is attempted causing kmalloc to return a
NULL, the present code goes ahead and dereferences the
NULL pointer.
The change returns from the function immediately if
kmalloc returns a NULL.

Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: msm-lsm-client: Handle close gracefully

The listen pcm device could get closed abruptly due to userspace
application crash. In such cases, the device close will be invoked
abruptly. Handle this scenario gracefully by properly cleaning up the
driver before close.

Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: wcd9320: Fix SVA runtime PM

* Use a wakeup source here as our DAPM is old.
* Ported from Bacon device.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>