ASoC: msm: Add 24 bit support to Primary MI2S TX

Add 24 bit support to Primary MI2S Tx. Add
capability to specify bits per sample to DSP.

Change-Id: I928f37c7b76ffea735365b164d52ceabd88e77e6
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
Signed-off-by: houst0nn <houstonn@gmail.com>
derp
audio: remove handset pop-noise

When receiver opens immediately after it is  closed, the pop-noise occurs.

Change-Id: I8e5374edea9f8710963b7669e64b109db2354650
ASoC: wcd9320: Add support for notification of codec events

Add Support for machine driver to register for codec event. Machine
driver needs do one time ADSP AFE configuration after codec
initialization after ADSP SSR. So add support for machine driver to
register for codec initialization event.

CRs-Fixed: 487983
Change-Id: I3e4a392659ae8c88d845f5337760fda3af94a117
Signed-off-by: Kiran Kandi <kkandi@codeaurora.org>

Conflicts:

	sound/soc/codecs/wcd9320.h

Signed-off-by: Ajay Dudani <adudani@codeaurora.org>

Conflicts:
	sound/soc/codecs/wcd9320.h
ASoC: wcd9xxx: use separate mutex for bandgap and clock get/put

Current bandgap and clock get/put uses the big codec lock which is widely
used by entire resource manager.  Embrace bandgap and clock resource
manager api with big codec lock can lead deadlock on certain device
switch case.  Introduce separate mutex only for bandgap and clock resource
manager api to be able to avoid mutex deadlock.

CRs-fixed: 501236
Change-Id: Ia9ee12d767c86ed3db2223f1a4721834b7d6768d
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>

Conflicts:
	sound/soc/codecs/wcd9320.c
ASoC: wcd9xxx: don't acquire BCL from codec driver

Codec driver shouldn't acquire BCL lock especially from DAPM widget.
Otherwise mutex deadlock can happen in below scenario.
--
thread0                         | thread1
                                | *lock BCL
                                | power up DAPM widget B
                                |         snd_soc_dapm_sync()
DAPM widget A starts sync       |
*lock BCL                       |
--

Fix codec driver to hold codec->mutex instead of BCL and prevent possible
mutex deadlock.

CRs-fixed: 502427
Change-Id: Ibc4a70eba4824a384874244f36831e2d98c85d4b
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>

Conflicts:
	sound/soc/codecs/wcd9306.c
ASoC: wcd9xxx: don't change clock frequency while bandgap/clock are on

After subsystem restart, codec drivers enable bandgap and clock if those
were enabled before subsystem restart to restore previous state.
The bandgap and clock enablement is followed by codec re-initialization
which includes master clock frequency change.
When master clock frequency changes while bandgap/clock are on, there is
chance to make hardware goes into bad state which results in audio mute
issue.

Change bandgap and clock enable sequence to guarantee that those are
enabled after master clock frequency changes completed.

CRs-fixed: 513412
Change-Id: I9bcd1ed55ec0bd7fe790caf0dd01bbe8b4c4c52c
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
ASoC: wcd9xxx: Update sound card's online/offline state

Update sound card's state when it went to online/offline so application
can monitor and wait for card's online prior to issue command.

Change-Id: I7cfb120e56e97cf743782a8b4b2fcbad242b227b
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Signed-off-by: Glenn Kasten <gkasten@google.com>

Conflicts:
	drivers/mfd/wcd9xxx-core.c
	sound/soc/codecs/wcd9306.c
ASoC: wcd9xxx: reinitialize codec irq after subsystem restart

During subsystem restart, it's possible codec's upstream irq is disabled
if irq handler tried to access codec register when it's inaccessible.
Reinitialize codec irq handler after subsystem restart to be able to
bring codec interrupts back to work again.

CRs-fixed: 520754
Change-Id: Iaa6fa8da25cdf6ed6746754385ad895db8dcea9a
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Signed-off-by: Glenn Kasten <gkasten@google.com>