ASoC: wcd9320: release codec mutex before calling dapm function

DAPM calls will internally acquire soc_card class locks for its
operations. Therefore, release codec->mutex before calling into
snd_soc_dapm_mux_update_power and snd_soc_dapm_mixer_update_power.
This will help avoid deadlock inside those functions.

CRs-fixed: 612080
Change-Id: I6bb943389240b67e1847bc533ac56fdd20799bce
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
ASoC: msm: qdsp6v2: Low latency mode for audio capture

For low latency audio capture sessions adm should be
opened in low latency mode.This change checks for low latency
mode and passes the info to adm.

CRs-fixed: 622080
Change-Id: I1fb6f82570f48b392ada631278ed097214d9cb5b
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
ASoC: msm: qdsp6v2: extra low latency mode change for audio capture

For low latency audio capture sessions adm should be
opened in low latency mode.This change checks for low latency
mode and passes the info to adm.

Change-Id: I8cc5efc44f7500d7abf6db54f8ab74d60f1bbf97
CRs-fixed: 622080
Signed-off-by: Mingming Yin <mingming@codeaurora.org>
ASoC: wcd93xx: Remove deadlock for ANC use-cases

When calling snd_soc_dapm_sync(), it eventually tries to
lock the same mutex already locked for ANC widgets and a
deadlock occurs. By moving the mutex unlock to just before
snd_soc_dapm_sync(), this deadlock is prevented.
This problem was introduced in Linux 3.5.

Reference commit: 2894770ec17ff732f911c8495ae0504f06a5dad5
for sound/soc/codecs/tlv320aic3x.c

Change-Id: Ic52d94d0097e79c085fcca2770274d48042b53b6
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
ASoC: msm: EOS timeout now based on audio data

The timeout value, in relation to waiting for the
EOS command completion message from ADSP, is now
based on the time it will take the ADSP to stream
the remaining audio buffers.

Change-Id: I76fa7d97b91052afd8884aab40bc5df040951be5
Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
ARM: dts: msm: Update device tree node for audio

Rename properties and compatible strings to return to the old
naming convention.

Change-Id: Ia58df9c4084e4d570d487aff1138522d3b862a58
Signed-off-by: Kumar Gala <galak@codeaurora.org>
ASoC: wcd9xxx: Set HPH PA register to volatile

Set HPH PA register to volatile to make sure the register will be
updated with proper bits during bringup.

CRs-Fixed: 625324
Change-Id: I8334a66644dca536f0bcfef562b7f64372a47d32
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
ASoC: msm: qdsp6v2: update rtac driver with asm handle

rtac driver uses the asm session handle to communicate with DSP
this handle is supplied to rtac driver in q6asm_audio_client_alloc
function. But the rtac driver is not updated when the asm session
is de-allocated. This change is about updating rtac driver with
asm session handle during q6asm_audio_client_free.

Change-Id: I10bab5830d8e29d17907511c757c4d2bcf09c0cc
Signed-off-by: Srikanth Uyyala <suyyala@codeaurora.org>
ASoC: msm: fix RX3 MIX1 INP3 path setting

The path RX3 MIX1 INP3 is not functional as its setting a wrong
regiser.

CRs-Fixed: 631013
Change-Id: I1916a4c6e1b2399c146471ca7a20791c36e14962
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
ALSA: Add SNDRV_PCM_STATE_PAUSED case in wait_for_avail function

commit ed697e1aaf7237b1a62af39f64463b05c262808d upstream.

When the process is sleeping at the SNDRV_PCM_STATE_PAUSED
state from the wait_for_avail function, the sleep process will be woken by
timeout(10 seconds). Even if the sleep process wake up by timeout, by this
patch, the process will continue with sleep and wait for the other state.

Signed-off-by: JongHo Kim <furmuwon@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound: usb: Use digital audio type for userspace notification

 * Devices connected via USB should appear as "digital" devices
   which do not use Android's volume controls.

Change-Id: Idce0333f31648563c8b779687487037ff2d01e6c
ASoC: msm: Update the correct channel count for dolby configuration

Wfd supports both 5.1 and stereo pcm playback. Add the dolby
configuration for 5.1 playback on wfd.

Conflicts:

	sound/soc/msm/qdsp6v2/msm-dolby-dap-config.c

CRs-Fixed: 609429
Change-Id: I6727ca1a4825bf64e48f211ca9d270f661ceedf0
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
ASoC: dapm: fix race condition in dapm

Dirty widget list can be accessed by multiple paths
in dapm framework. Dirty list is protected by dapm mutex.
Since dapm_set_pin and dapm_force_enable_pin function
accesses the dirty list, protect it using the dapm mutex.

CRs-Fixed: 637323
Change-Id: I8c265072083e142c0858b6cc7a983d07e7d75af0
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
ASoC: dapm: Change mutex lock subclass in dapm

Address the compilation issue by changing the subclass
enum in dapm functions.

Change-Id: Icd31748b1beb7328819de7f8e4a32c128f60c43f
CRs-fixed: 656634
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
ASOC: msm: Enable volume mixer for hfp

Enable volume mixer for HFP in afe loopback

CRs-Fixed: 596437
Change-Id: I6ba180b4c700f24e610fbac4abcbbb0d1d57ccda
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
ASoC: wcd9xxx: [HACK] Prevent headphone&speaker from clipping

* Buck mode is set to 2V when HPH+Spk combo device has been selected.

Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>

Change-Id: Id9c60be9298cc3eae2fb178900fc95582b00f716
ASoC: msm: qdsp6v2: adding volume per dev-id

Add volume mixer control per device id for pcm use case.

Change-Id: Ieab721541a5cdf494b7fad78abc06d4f667b4baf
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
asoc: msm: Update compress device name

Change-Id: Ie85c4d8ace20691c81393c553448b1403cecb674
misc: Kill logspam

Change-Id: Ida0b1eaeda4c678f0103675b44a8cc845f3dacbf

Conflicts:
	drivers/misc/shineled/shineled_driver_find7.c
	drivers/misc/shineled/shineled_driver_find7op.c
asoc: wcd9320: Use class AB headphone path for high-res formats

 * The class AB path is less efficient, but has a lower noise floor.
 * Enable this path for 24-bit or high (>96KHz) sample rate, as this
   tradeoff is worth it with lossless, high resolution music.