Native audio playback is muted after adsp subsystem restart,
because codec device_reset() API is called even before device_down()
API finishes execution. This causes audio to mute, as codec is not
in proper reset state. Add new lock to synchronize codec subsystem
restart APIs.
Change-Id: I2366f8b04fc6cb7d874661b948c3e9af10470107
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
TASHA_IS_1_1 macro checks only for version number.
This macro returns true for tavil codec. So modify
tasha macros to check for codec and version.
CRs-Fixed: 1066331
Change-Id: I5240e0ee888187a8185974ea288ce2cad62bd776
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
As there are many hardware version of wcd934x codec. Add version
check in the code so that userspace can get the version info.
CRs-Fixed: 1063367
Change-Id: Ia320380d568426c2d7a414a832980a556ff27f0f
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
WCD9XXX irq driver uses device tree APIs in the
IRQ handler. Device tree APIs disable interrupts
for the duration of their execution. Do not use
these APIs in the wcd9xxx irq handler to reduce
the interrupt off (irqsoff) latency.
CRs-fixed: 1055867
Change-Id: I3ec0b8dce2b2bb1ccbcb5bdd7cd6621a5f9513f8
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Depending on the impedance across HPHL and HPHR, set classh
configurations so as to avoid false OCP events.
Move wcd9xxx_registers.h to uapi folder, as this header
file is used by userspace for wdc9330 codec.
CRs-Fixed: 963843
Change-Id: Ie2fb4b75b7f74013580bd3912372c64ddefc734e
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
Signed-off-by: Neema Shetty <nshetty@codeaurora.org>
DMIC clock on ECPP(Echo Cancellation Ping-Pong) path can be set to
lower clock rate to avoid power consumption. Change configures the
DMIC clock rate on ECPP path based on device tree settings.
CRs-fixed: 1022917
Change-Id: I03e1a7f5ef3cf1b1907c03a3d38965ce3a611bc4
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Add wcd934x as a mfd child and configure regmap.
Configure MCLK as per the HW sequence.
CRs-Fixed: 1041199
Change-Id: I9e2dbb0f0acaa1442c1624556bc52abf98158c92
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
If target can support multiple codecs, only one of the
codecs will be enumerated. Do not clean up common resources
when other codec fails to enumerate.
CRs-Fixed: 1041199
Change-Id: I74a298739925b5763458c2e637372aa8f2c2aa55
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
During codec interrupt controller probe, allocate and register
irq domain for codec interrupts for mapping between hwirq and
irq numbers.
Change-Id: I3e32043499f2b1e2616cf74864969815e626a23b
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Codec reset gpio configuration needs to be updated
before slimbus master component is initialized otherwise
codec cannot be enumerated on the bus. Add a new platform
device driver to update the codec reset gpio configuration
to valid state (output, drive-strength) before slimbus
is initialized.
CRs-Fixed: 968161
Change-Id: I7227212e6b846d58196718255aa4b0923352d120
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
During ADSP subsystem restart, all slimbus read/write would fail
as the bus is not available. Avoid codec read/write, until the
slimbus master in ADSP is up.
Change-Id: Iec1933d2625c1cd3dd700b2b3e2ffc7eae64880b
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Digital microphone clock drive strength setting in the codec could
be platform dependent based on the type of microphone, etc. Add support
to make the DMIC clock drive strength configurable through device tree.
CRs-fixed: 938006
Change-Id: I8b17d985052098b56d012081a77b6dfc94553eca
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Update register sequence for low hifi and low power modes
for headphones on wcd9335 codec to achieve better performance.
Change-Id: Icf543df7c4e8ab4cc9222a39bf1df4e6af4ab8ec
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Add snapshot of audio codec drivers for MSM targets. The
code is migrated from msm-3.18 kernel at the below commit/AU level-
AU_LINUX_ANDROID_LA.HB.1.3.1.06.00.00.187.056
(e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1)
(Promotion of kernel.lnx.3.18-151201.)
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>