Add slimbus dai-link to send data from VI feedback path
to DSP for speaker protection usecase.
Change-Id: I34785a7dd2b141c521c3f2623966459b18a80364
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Speaker protection algorithm needs V(voltage) and I(current)
readings from speaker. Enable VI path on the codec to provide
readings to the speaker protection algorithm.
Change-Id: I741e7f3076a7db595297ad7a1ee551c46d5c8213
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Add null checks to prevent hdmi ops from being called
if they have not been defined.
CRs-Fixed: 1009284
Change-Id: If772bd86cc9b754fbc900eb47338429e9b841eef
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
when event is generated during CMI SEND state, process the
event explicitly without waiting for response to complete.
This change fixes response timed out errors for start and
stop commands.
Change-Id: I2e8d877b57c4d547688fdd7a2e71d06dfec3d4ab
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Add support for AFE encoder configuration.
Add new mixer controls to support AFE input channel
and encoder configuration.
Add support in AFE to set the encoder and input
channel configuration.If encoder configuration is set
ADSP will encode the PCM steam and send over backend.
Change-Id: I56581533ffff3b61f5b5ee128841ab61b62674d7
Signed-off-by: Naresh Tanniru <ntanniru@codeaurora.org>
Add support of route control to set ADM input channel
config. This is used to help open adm with different
channel config compare to AFE output.
Add new mixer command to override adm channel count set
by hw_params. This is useful in cases where BE hw_params
is different from the ADM channel configuration for cases
such as A2DP exercising ADSP path.
Change-Id: I93ad53016a28efe0d8592ac0092d6c8896a66072
Signed-off-by: Naresh Tanniru <ntanniru@codeaurora.org>
In machine drivers, some pointers are not set as NULL
after the memory is freed, which will leave many
dangling pointers. Set them to NULL explicitly to
avoid potential risk.
CRs-Fixed: 997062
Change-Id: Ifa27a21cb76688101b758a34eddf69b160c27c79
Signed-off-by: Meng Wang <mwang@codeaurora.org>
In codec drivers, some pointers are not set as NULL
after the memory is freed, which will leave many
dangling pointers. Set them to NULL explicitly to
avoid potential risk.
CRs-Fixed: 997062
Change-Id: I1fde78158af71d57c958ac9f5668d4b65c9a7a3f
Signed-off-by: Meng Wang <mwang@codeaurora.org>
- Add support for internal codec driver.
- Add regmap support for internal codec
The code is migrated from msm-3.18 kernel at the below
commit -
commit <bbf356f8bd26039cf3e0b447c064de6e2455b101>
<Merge "thermal: qpnp-temp-alarm: add support for
GEN2 PMIC peripherals>
CRs-Fixed: 1046168
Change-Id: Ib0cd2ed579bd370cc8979cafcc14acb083a408b6
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
In machine driver probe, platform device pointer is assigned prior to
codec registration which might be invalid if wcd9335 and wcd934x sound
card registrations are going on simultaneously. Update the pointer after
sound card registration to avoid null pointer dereference.
CRs-Fixed: 1048402
Change-Id: I315e191227e14e207187673b8efb5401143dec9d
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Update codec driver register configuration for all the Lineout paths on
codec. The register configurations are updated for Lineout mono and
stereo configuration.
CRs-fixed: 997556
Change-Id: I7a09aeb2a02c30fb851ef21dcaad194413f17955
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Signed-off-by: Stephen Oglesby <soglesby@codeaurora.org>
Initialize param length with user space argument and
check the condition for maximum length in
SND_AUDIOCODEC_EAC3 format.
CRs-Fixed: 1032820
Change-Id: I710c1f743d7502e93989e8cc487078366570e723
Signed-off-by: Surendar karka <sukark@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>
Device crash is observed for consecutive SSR's triggered during WFD
playback. This is due to callback functions registered by afe client
aren't reset during the first SSR and the same callback functions are
being used for the next SSR event, resulting access in freed data.
Fix this issue by resetting the callback functions during SSR.
CRs-Fixed: 1045045
Change-Id: Ib651dd59b30e4924f4e199cfd4fae64df6030d9d
Signed-off-by: Venkata Narendra Kumar Gutta <vgutta@codeaurora.org>
FM audio playback is failing as the loopback mode
is hardcoded to EC mode which is incorrect for
FM audio playback usecase.
Change it to default loopback mode.
Change-Id: I36b60ba2283b0bbe36f492e1410603b8c2050cc4
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
During playback, enabling smart boost feature changes the threshold
of the playback signal based on the amplitude of the signal without
clipping the signal. Change enables smart boost on WCD9340 codec.
Change-Id: Ic4c5e3cc071898f376070b853112c5014d61272c
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
DMIC clock on ECPP(Echo Cancellation Ping-Pong) hardware path
can run at lower clock rate to avoid power consumption. Select
ECPP dmic clock rate when decimator is connected only to ECPP
path.
CRs-fixed: 1022917
Change-Id: I968e1fe6b099ebf5334eadb209219181293b207f
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
WCD9335 codec has single master clock supply widget for both
playback and recording paths. Adding separate clock supply
for playback and recording paths will help handle low power
audio recording usecases without affecting playback usecases.
Change is to enable separate clock supply widgets for playback
and recording paths.
CRs-fixed: 1022917
Change-Id: I3978d2c53f2b04104d9d279f8acad60326f9405c
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Codec is in digital core power collapse when there is no
audio usecase but low power audio usecases needs codec to
be out of power collapse. Changes bring codec out of
digital core power collapse for low power audio usecases
without enabling master clock.
CRs-fixed: 1022917
Change-Id: I762fc1dc6b6527608e73ac5144215ee141570aac
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Add support for CPE(Codec Processing Engine) second voice
wakeup session using ECPP(Echo cancellation Ping-Pong) hardware
path. This allows to enable two concurrent CPE sessions, one
on MAD(Mic Always-on Detection) and the other on ECPP.
CRs-fixed: 1022917
Change-Id: I7a14a2d0b5455d427f90e02506b996fc615c848a
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
WCD audio codecs contain SPI slave hardware module to provide access
to codec memory and SPI register space. Change adds driver for this
slave hardware. This driver uses regmap for SPI internal register
accesses and plugs in to standard SPI framework as child device to
master controller driver.
CRs-Fixed: 1049012
Change-Id: I0640ac1ed60a2ec3633636760593211ecd2f9c2d
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
WCD audio codecs have DSP embedded to perform signal processing on
audio data. The codec driver has control over the DSP clock, power etc,
whereas the DSP memory can be accessed through an different bus slave
interface. In such cases, it is required to make sure the hardware
expected sequences are met for the DSP to function properly. The
wcd-dsp manager driver registers as master to component framework
and provides the ability to sequence the operations between the child
drivers. Upon registration of all children, the wcd-dsp manager driver
parses the wcd dsp image, downloads the image and boots up the DSP.
It invokes the component children to perform the tasks in sequence.
CRs-Fixed: 1049012
Change-Id: I059e1b111c607e49a7cc9a7940cf458e701c73d3
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
wcd_dsp_utils adds utilities that will be used by the
wcd dsp manager driver. Add helper functions to parse
WDSP image and provide list of segments to be loaded
to memory.
CRs-Fixed: 1049012
Change-Id: I2b1464c2a035a039440e6d3e5122ad3f90da4d1e
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
The array index value when setting/getting the channels
of proxy is incorrect as the channel count begins from two.
Fix by setting the correct index offset.
Change-Id: I3ab9858daf6dcdbce762946cbdebeb96eaad764a
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
One of the CPE sessions uses EC(Echo cancellation) PP(Ping-Pong)
path on WCD9335 that is connected to CPE (Codec Processing Engine)
hardware. Configure EC PP path for CPE functionality. This
requires WCD9335 codec to be out of digital core power collapse
without turning on MCLK(Master clock).
CRs-fixed: 1022917
Change-Id: I68200b12fcb316bf36f7c3af2734a094f972da9c
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
DAPM marks back end dai as dirty during ASoC suspend
which triggers device path teardown. Add ignore suspend
to all back end dais to avoid device path teardown.
CRs-Fixed: 1031932
Change-Id: I89f83feed0702f3a3f3b6141ed73459b8878d2df
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Changes to support packed 24 bit (SNDRV_PCM_FORMAT_S24_3LE)
CRs-Fixed: 1011048
Change-Id: Id927e9b8894b1bf99e57cc0f04abf126740c6d36
Signed-off-by: Manish Dewangan <manish@codeaurora.org>