* changes:
regulator: map consumer regulator based on device tree
regulator: pass additional of_node to regulator_register()
regulator: adapt fixed regulator driver to dt
regulator: helper routine to extract regulator_init_data
regulator: Constify constraints name
regulator: Properly register dummy regulator driver
dt: add empty dt helpers for non-dt build
copper: regulator-stub: Add devices for Krait Power Control
Merge Upstream's stable 3.0.21 branch into msm-3.0
This consists 814 commits and some merge conflicts.
The merge conflicts are because of some local changes to
msm-3.0 as well as some conflicts between google's tree and
the upstream tree.
Conflicts:
arch/arm/kernel/head.S
drivers/bluetooth/ath3k.c
drivers/bluetooth/btusb.c
drivers/mmc/core/core.c
drivers/tty/serial/serial_core.c
drivers/usb/host/ehci-hub.c
drivers/usb/serial/qcserial.c
fs/namespace.c
fs/proc/base.c
Change-Id: I62e2edbe213f84915e27f8cd6e4f6ce23db22a21
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
With device tree support for regulators, its needed that the
regulator_dev->dev device has the right of_node attached.
To be able to do this add an additional parameter to the
regulator_register() api, wherein the dt-adapted driver can
then pass this additional info onto the regulator core.
Change-Id: Idf7c4e532cc06fd00b8182b635d15dcfafb2cef9
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
[mbohan: Update regulator_register for msm regulator drivers]
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
Both audio path and MBHC accessory detection logic need master clock
enabled along with bandgap and clock block of CODEC. Clock control
is managed by the machine driver. Calls to clock control function from
audio and MBHC detection paths can be nested. As a result, reference
counter of master clock is incremen/decrement out of order and cause
master clock not enabled when audio path is enabled. Without master clock
CODEC will not consume data and this leads to SLIMBUS overflow error.
Change-Id: I2cabb2d6db4c0129716489672e34a49cc21cea08
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Use mechanical switch on the phone jack to detect headset/headphone
insertion and removal. Mechanical switch is beneficial to avoid fake
button press and high impedance microphone headset detection.
CRs-fixed: 341402
Change-Id: Idffba14316ab25e07736d1b7385f0edb16216089
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
In current design, voice and voip calls share the same
memory for calibration data. But DSP doesn't support to map
the same memory twice. This will cause crash in DSP when trying
to make voice call and voip call concurrently.
In voice driver, allocate the separate memory to store voip
calibration data.
Change-Id: I52bf0554f88610ab8088571739aa0a72cff69f39
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
AUX PCM RX and TX interfaces have to opened together and closed
together for AUX PCM HW interface to work correctly. Currently
as soon AUX PCM RX interface is closed AUX PCM TX is also closed.
Correct this by opening AUX PCM HW interface as soon one of
AUX PCM RX and TX is opened and close the AUX PCM HW interface
when both AUX PCM RX and AUX PCM TX interfaces are closed.
Change-Id: I3790ce2fd4d7957ea0278955e791aca28d5c3db7
CRs-Fixed: 337425
Signed-off-by: Kiran Kandi <kkandi@codeaurora.org>
Pcm irq position is incremented by one extra period size if
WRITE_DONE event is received during paused state as elapsed
is not called and as a result playback gets muted sometimes
Fix this mute issue by resetting the pcm irq position in
WRITE_DONE event instead of pointer operation
Change-Id: Ia33e5188674b1f6a54619169b84bdd5be22ad73a
CRs-Fixed: 344436
Signed-off-by: Sriranjan Srikantam <cssrika@codeaurora.org>
If HPHL and HPHR have relatively high impedance, internal MBHC HPHL
trigger cannot trigger so results in headphone/headset detection
failure.
Utilize MIC trigger as well as HPHL trigger in order to detect headphone
and headset which have high impedance on headphone line.
CRs-fixed: 339390, 337590, 336847, 334339
Change-Id: Ibfd4ba254197233f2b5e253f5d1fa2a98c848c97
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
MDM9615 machine driver is added to support MDM9615 with ALSA FE/BE
architecture. It provides a glue between MDM9615 platform driver
and WCD9310(TABLA) codec driver.
Change-Id: Ie5e8d7257d10b1061ff09ce6ed7494092b2d31b9
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
Currently snd_soc_jack_report() always acquires codec->mutex and
synchronize DAPM widgets. This automation is helpful if jack has defined
widget. However if codec driver doesn't have defined jack widget and
non-jack widget wants to synchronize with report_sock_jack's thread which
is usually irq handler, it can make dead-lock as all DAPM widget
call-backs are called after codec->mutex acquisition.
Add new API snd_soc_jack_report_no_dapm() so codec driver can have ability
of control DAPM synchronization part of snd_soc_jack_report()
Change-Id: Ifc6054cd8b6d8a6b52517cf84baca1e3949e09fe
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Add support for Slimbus channels between external modem and APQ.
These channels transfer voice packets to/from the modem to the
BT stack on APQ.
Change-Id: I48bd5248104719574fbc6cf52edfb92cff79bff9
Signed-off-by: Neema Shetty <nshetty@codeaurora.org>
Aux PGA (Auxiliary Programmable Gain Amplifier) interface on the
audio codec is used to loopback the analog audio signal from
input (line-in) to output (line-out/HPH/EAR) only through the
analog domain of the codec. AUX PGA also supports analog gain,
which is used to control the gain of the input signal
For WCD9310, line-in5 is used as AUX PGA Left and line-in6 is
used as AUX PGA Right. Add mixer controls to enable routing
AUX PGA inputs to all possible outputs
Change-Id: I85a7865528aa3b2455c190b2617754fe22f3d24a
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
It is found that recording from MI2S audio HW path
is broken. The reason is that the check to validate
the front-end ID is compared to wrong ID.
Update the comparson so that the correct front-end
ID is used.
Change-Id: Ie7ede2cac755a6ec85b2e6f2143d5b2252a721b4
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
There are codec registers which have different addresses depending on
hardware version. Update registers' address correctly.
CRs-fixed: 340283
Change-Id: If848f71a40d244ee900dc86608058749c334ff4b
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
The suspend currently goes on a blocking state due to the locks.
These locks have been moved to parent device in mfd core driver
for safe codec read write and hence no need for duplicate locking.
Add the run-time PM call to wcd9304 codec so Slimbus driver
keeps Slimbus clock on when the codec driver knows there is going
to be audio streams running on the codec.
Change-Id: Id3bf6ce9da5f7bd882c8c2bf927527d16f197bc0
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Send a write done event as timer interrupt in paused state to
resolve the concurrency between between pausing and completion of
buffer
Change-Id: I83cd6a4db03479d0d63608dc47f8ba862fbb3341
CRs-Fixed: 340469
Signed-off-by: Tejas Shikhare <tshikhar@codeaurora.org>
Each target can support different codec and new sound
card has to be registered based on the codec and the
target type.
Change-Id: I414745462686077f2bc7469b2b7728d354aca43c
Signed-off-by: Swaminathan Sathappan <Swami@codeaurora.org>
The suspend/resume schedule work fails because of the
uninsantiated sound card. The fix is to skip the
schedule work for the uninsantiated sound card.
CRs-fixed: 339411
Change-Id: I224fc94578b4834c5bc187151e84e6ed83d737bd
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
The compander system is intended to increase the dynamic
range of an input signal. But for the wcd9310 codec,
this feature is to use companding in a novel way in the DAC
converter path to increase the signal noise ratio.
The change is to add the compander support to wcd9310
codec. The dynamic compander enable/disable during stream
playback is not supported.
Change-Id: I916a5e4cc0a06516a691bbdcdf0103dcb7b0398c
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
- When SSR is done, we hear an extra noise sound.
- During SSR, Q6 is stopped and AUDIOIF will send the
left over samples in DMA buffers continuously to codec
resulting in noise.
- Disable the active SND devices when SSR is initiated.
This will avoid any noise happening while SSR in progress.
Change-Id: I1a14494a52607a8245231395bab6b14ad4a02d53
CRs-Fixed: 333915
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
In answer machine use case, voice rx is muted and
the voice is recorded into file.
The mixer control command is added to mute the rx device.
CRs-Fixed: 338015
Change-Id: I1c71ed4129e8aa2fb7241e2f1fdb77db472235a8
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
Create ION client and allocate buffers based on
the client handle and free the buffers when no
more needed
Change-Id: I00be9dbd3e8f5eff286d8f1bc0d61656866bf360
Signed-off-by: Swaminathan Sathappan <Swami@codeaurora.org>
Add the run-time PM call to wcd9310 codec so Slimbus driver keeps Slimbus
clock on when the codec driver knows there is going to be audio streams
running on the codec.
Change-Id: I1dceb27e200a87d2b5e7a60d6361b6399c1a1381
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
The default timeout of DAPM power down for RX path is 5000, which
is used to prevent click and pop for playback. But it's too long
for voice call and causes the back to back call and device switch
to not work.
Change this value to 0 to reduce the shutdown delay for voice call.
Change-Id: I705a2cb1efa4432b32d1f3e9d98f47ae124966cc
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
Add support for 5 RX and 4 TX Slimbus channel support.
Headphone/Earphone/4 DMIX/2 AMIC and IIR1 support
Change-Id: I1b7ad5e5fd9d87aab80d6533503371e63df8cc0a
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
The current core assumes TABLA as the only codec driver registering.
To support single binary for multiple targets its essential that
we remove this restriction and move to a generic framework
to support multiple codec. This can be done by moving all codec
specific code to dedicated codec driver and use core driver to probe
the codec based on slimbus device id and do generic setup for the
codec. This also helps to have same boards with different flavours
of codec variants.
The WCD9XXX family of codecs share the initial codec register
mapping which holds the Slimbus device id to identify the
codec existing on the target.Core driver now registers the
codec device based on this check.
Change-Id: I4c43d5f04c20696f4f5138411460681ec7879d34
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>