Add support to control external audio switch thru
machine driver. This is to support msm8952 Polaris
devices.
Change-Id: I42e0779b1f18e4883006fdfa71d99da0d2519784
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
Mark few registers non-cache as they are supposed to be
volatile. This will avoid audio mute after SSR.
Change-Id: I44a99c2b609fbfbd6c9ce7fd2e4b1354ed03bc20
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Update RX shutdown sequence so that port underflow/
overflows can be avoided when slim data protocol
is changed.
Change-Id: I3428623658633ca88e279bcb5c23025214586985
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
WCD9335 codec version 2.0 supports multiple headphone
modes namely LOHIFI, LOWPWR for audio playback. Add
support to configure codec registers for these modes
in version 2.0.
Change-Id: I62eb409868795ea3913f6e967429b76f45cde2f9
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Update RX shutdown sequence so that codec
path gets tear down first followed by cpu dai.
This will avoid slim port underflow/overflows
when slim data protocol is changed.
Change-Id: I6e3582fa010d18d4e0ccfde319dfc4d81af1351f
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
To make power savings during sleep in tasha 2.0, add
required changes for setting codec registers for
rock bottom current. Apply RBSC(rock bottom sleep current)
settings only when no audio and no SVA usecase running.
Apply default value back when any of audio or SVA usecase
starts.
Change-Id: If8516b15cf38575ed2e1a1f6ebfdf49566bc8237
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
SIDO buck voltage can be dropped down to low voltage
when no audio usecase running. Update the sido buck
voltage to nominal or low voltage(svs) based on CPE
and audio usecases running.
Change-Id: Ie6caff7c264fa7f169098acf4e8fe1cc60c97d22
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
WSA881x version based register default values are
updated using regmap_register_patch() API, which
will bypass the cache. Fix this by enabling cache_only
flag before updating the register reset values.
Change-Id: I5c6838d9c84f9e0233c22f638238afc5d4a8980d
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
During playback, read wsa881x temperature and update
ocp register based on certain temperature conditions
to avoid speaker damage.
Change-Id: I3c8dd9fdc8ef480f8997338b349f31b72c7cfa48
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
When FB spkr. prot. calibration is set check
the mode flag received from userspace instead
of the stale mode in the local structure.
Change-Id: I4fa2074d19a1c8eb1341eaca5405d4183ea9f848
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
During bootup, probe function will get called multiple times until
sound card is registered. And it calls msm8952_init_wsa_switch_supply
for each probe. If registeration fails, it'll not call
regulator_put to decrease regulator ref. In regulator consumers,
there are multiple sound-msm-vdd-wsa-switch.
Use devm_regulator_get instead of regulator_get to correct regulator
ref.
Change-Id: Ie270d235102f784241e3bf9566b811bbda22e419
Signed-off-by: Meng Wang <mwang@codeaurora.org>
The e-fuse sensing for WCD9335 codec should be done
before reg_cache_sync in ADSP SSR post reset callback.
This is to make sure that the SIDO BUCK settings are
done before the codec is completely brought out of
reset.
Change-Id: Ic391307ca26b2d9203f0a8646e17fa650540c9e5
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Before enabling the power amplifier during start of the playback,
read wsa temperature and update ocp register based on temperature.
Change-Id: I3fa58d73e324bab8286d558dc4634eb1e08df325
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Add ignore suspend for input and output widgets so that dapm will
not power down these widgets while they are in use and the system
is going to suspend.
Change-Id: Iec9972c9ff2c9e7d3d653e5f809d9aeaf085155b
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
Add support in machine driver to be able to parse device
tree for all possible wsa881x that are supported in the
target, find out from ALSA core about how many wsa881x out
of the list of devices passed from device tree are present
in the target and already registered with ALSA as codec,
and eventually register those wsa881x devices (which are
present) as AUX codec to be used with the sound card.
Change-Id: I69a5cf7d542178aca97eb0dd91e5b35e23467c93
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
Drivers might need to use the ASoC core function to
find out whether a particular codec is already
registered with ALSA core or not. Export the function
so that drivers can use it outside of the file.
Change-Id: I2e4fb191afab9dccf1be3d380f54a81797b2d6e5
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
For wsa881x dynamic detection, create a new function to
handle the enumeration of a wsa881x device. Once a device
is enumerated successfully, this new function will perform
below 2 tasks on the device-
- register device with regmap
- register device as a codec with ALSA core.
Change-Id: I087b6869361e880814a8f11d5912bc6530b56758
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Interrupt any wait events during free of the compress driver
and move spinlock unlock to after the ASM client is freed.
Change-Id: Idb865ebbb47b86ac32043ba4562053d3f9795b4d
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
openCPE framework allows third party vendors to integrate audio/voice
processing algorithms into CPE. Add support for openCPE.
Change-Id: I8a0e00fa3dd74753834ba653b7ee3c84e72fd39e
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Add LSM topology calibration blocks. Topology is sent to identify the
modules that will be invoked in CPE.
Change-Id: I62c84ca211398d8d0bde1b826286512cd2d38688
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
For supporting multiple algorithms on CPE, the cpe image needs to be
re-downloaded based on the algorithm. Add changes to expose sysfs
interface to accept cpe firmware image name and download the image with
the name provided at run time.
Change-Id: I0dfd71c45f87b75b694e5a82d66601db11544ee4
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Speaker configuration varies based on the type of aux codec(wsa)
variant. Send speaker configuration from machine driver to wcd9335
based on aux codec variant.
Change-Id: Ib7bfee3a1692e0d33a31f3ec3a756213ac03409e
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
pdata->codec is null when referenced from tx hw params
fixup. Use the correct pointer to avoid crash issue.
Change-Id: I4e34dcf569643f72b6b1d337cd6be095228731e2
CRs-fixed: 916976
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
Increase slimbus clock gear during device path bringup to
reduce the latency of codec register writes. Change increases
slimbus clock gear before device path bringup and restore
back to default after device path bringup.
Change-Id: I6aae7fffb001c4b0dbf6947bb41200682965a38f
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
As soundwire is in wcd9335 codec, all soundwire register writes
should go through codec. To reduce the latency of register
writes during device path bringup, add bulk register write
function to write multiple soundwire registers in one
transaction.
Change-Id: I97055d20ef1e7cfb15b41e00183291a10af35b1f
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Codec digital registers need to be synched once codec is
out of digital power collapse. regcache_sync_region will
sync only part of the hardware registers. Change uses
regcache_sync_region to sync codec digital registers
after codec is out of digital power collapse. This will
avoid synching of all the codec registers.
Change-Id: Ib86ff31cfab115e760cf38a2093159cd47e6a8e7
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Currently slimbus_0_rx backend connecting to aif_mix_rx1 codec
DAI does not support 44.1KHz sample rates. Enhance this backend
and aif_mix_rx1 codec dai to support 44.1KHz sample rate playback.
Change-Id: I387f726eb6db11d685eb1fc4969a29dcd14bfd04
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>