Add delay after LDO_RXTX supply is enabled as per
hardware register sequence.
Change-Id: I588d36c6c13ae8f545aba2b2cf6d1c73fde08d0a
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Use kmalloc instead of dma_alloc_coherent for slim buffers
to support dma_mapping api in interrupt context.
Change-Id: Idf06832b6a3bb30f6a16c168b4e5e5f13ad0a0ab
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
For remove module(rmmod), update drivers
to cleanup resources and allow insert module
again without any issue.
Change-Id: Iddc6e5e11d986359afd3100bf3c5eab70cb1c1eb
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Defer probe of soundcard registration until codec
driver registration is complete to fix detection of
codec version by machine driver.
Change-Id: Ia93404a85c98bd50e63015073284d5bf290a3f9f
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Observe mute issue when PDR triggered while music playback
on HPH. As per HW recommendation, ensure OCP is turned off
before PA enable/disable. During PA enablement, turn off OCP
to avoid false OCP interrupts.
CRs-Fixed: 2167007
Change-Id: I0dc2cc6ded3416b635d14dc3b7aafa7997fe9a4d
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Add a missing function pointer null check condition in
mbhc driver to avoid null access during fast
insertion-removal.
Change-Id: I6aa64325cea6f7aa551115969d1e6ba184ec8d14
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
It is possible that the spi transfer that clears the clock request
on the slave may fail. In such case, it is not safe to assume that
the clock request is still enabled as it can cause failures for
further spi transfers if the clock request is cleared. Fix such
issues by resetting the clock state in the driver even the clock
request clearing fails.
CRs-Fixed: 2169087
Change-Id: I699e72b59b4cb049dfacaa190823796a545f2dbb
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Currently IIR coefficient values are written to HW everytime when
digital core comes out of power collapse. This increases playback
cold start latency. So update IIR coefficient values before IIR
band enable.
Change-Id: I57ad54b4674ed0a49fdfc55d77c519568f5a7893
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Add size check to make sure the data sizes from WDSP
ELF metadata and the split firmware ELF are the same.
Change-Id: I913087bc352850ceac2fcc07067ea8f480563ae2
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
Add size check to make sure the data sizes from WDSP
ELF metadata and the split firmware ELF are the same.
Change-Id: I7a1404cd15601d8d503e3355e6dc70e2949df72d
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
Update routing driver with port mixer commands between
primary and secondary interfaces to enable AFE lopback
between them. Update FE DAI driver to add hostless FEs
for primary/secondary Auxpcm and secondary MI2S.
Change-Id: I792e1cf4e0600d3b4726624e29e73e67828a3935
Signed-off-by: Viraja Kommaraju <virajak@codeaurora.org>
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Change i2s max rate supported for tavil to 384000Hz.
Cleanup usage of intf_type to optimize differentiation
between slim and i2s.
Change-Id: If6451dae7c61e8f61be3d5a13549f98b382e5054
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Add support for tavil i2c access. Add audio
routings dapm widgets for data and control.
Change-Id: I96ebf7a5700b10f294f4fadfeeb21dab490a9313
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Add i2c driver node for tavil codec for
i2c communication with the codec.
Change-Id: Ie28dfeca102251265a5f50153c3ba98dae84dde2
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Change mic bias enum names to be specific to codec
to avoid conflict with mbhc mic bias enum.
Change-Id: I7bae83aafd72753eaedebd533364ec404a54977a
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Add support for quinary mi2s/auxpcm/tdm for msmnile target.
Change-Id: I0cbfa98129e6181662f7555735173eded12a0bf7
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Fix return value in aqt_codec_info_create_codec_entry function
to return proper value and add target config to include files
Change-Id: I063e199b1bf0e672b5afc20ed7de8447eed35dd4
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Add ALSA dailinks for supporting various audio/voice
use cases for msmnile target.
Change-Id: If300b2c94e72414a657f30691cdfcb0d0a3b9a13
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Add stub function for msm pinctrl get function
when msm pinctrl configuration is not defined.
Change-Id: I5229dd804025e328471f0fd35cff33a69d47b2dd
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
WCD9360 codec acts as an interface between AQT codec and
msmnile CPU DAI. Add AQT based playback and capture dais in
WCD9360 codec driver.
Change-Id: Ic780dd336a775dbb48a1d3ada90029763ac7a657
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
AQT1000 supports different headset detect pull up current source
values in MBHC. Add a callback function to handle new current
source values in MBHC driver.
Change-Id: I060af1aff3fe7c4dfd4aa4c480542efa54c2777c
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
AQT1000 codec supports multiple micbias voltage settings. Add an
API to client modules to adjust the micbias voltage based on their
desire voltage requirements.
Change-Id: If89b836ab60b66e9ec1000fe6d07f4b1a8484b01
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Disable source tracking get functionality for sdm855 till
feature is completely enabled
Change-Id: Id644fa46d95bd1091502b1c5ae4cce3bb64d633e
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Add codec entry for AQT1000 codec to support ADIE calibration.
Add new hwdep node AQT1000_CODEC_HWDEP_NODE to store ANC/MBHC
calibration data.
Change-Id: I8b5ff9a2cfe2a0a8ac593b63b20b28697dc975bf
Signed-off-by: Meng Wang <mwang@codeaurora.org>
AQT1000 codec is a hifi headset that supports audio
playback and recording on headset. It also supports
playback of fractional sampling rates. Audio playback
and recording is transferred through I2S interface.
Add driver for AQT1000 codec
Change-Id: Iba163e9203d67216cdbf87727b06801356a001e3
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Between Linux-4.9 and Linux-4.14, upstream has updated the
ION APIs significantly to make ION ready to bring out of
staging folder. This has changed the way ION and dma_buf
APIs used to work together for allocating, mapping and
deallocating ION buffers.
Update MSM Audio ION wrapper functions used by audio drivers
to reflect these ION API changes as per upstream ION.
Change-Id: I63097e147a397aa3a538f69ac88b6fb10871c3dc
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Add changes to support wcd9360 audio codec driver in
wcd9xxx common files.
Change-Id: I5b9f9d592b6843d7887eb3954d079776ddf15764
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
snd_pcm_ops copy interface used by msm platform drivers is replaced
with copy_user in msm-4.14. Unit of two input variables is changed
from frame count to byte.
Update all the related msm platform drivers to adapt to this change.
Change-Id: Icecd0454c7a80e5ee90407c64aaf1ca76d2d9815
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Re-factor audio clock driver to register one clock at a time
and remove duplicate lpass clocks.
Change-Id: I63ddf4b65ec7e9cda0dcad4e0167cd8636e89e1a
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
ADM calibration is not sent in audio recording
use case which leads to low volume issue.
Since the LSM port ID is same as audio recording
port ID in case of internal codec, driver tries to
send LSM calibration for non LSM use case in which case
no calibration will be sent.
Instead of using port ID, use the pass_thr mode to
differentiate between LSM and non LSM use cases.
CRs-Fixed: 2167317
Change-Id: I1b6ea51d83330f6439791cf1bb6170306f6895b0
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
For MI2S shutdown, if clock disable is failed,
do not bother to re-increment clock reference. Otherwise,
next time when startup is called, clock enable will not
be called again, so use case will not work.
CRs-Fixed: 2166356
Change-Id: Ic7a93a5f20eaabed93d0cd94d76d09f0f1c869fd
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
- During PCM close, the AIF power down will be delayed if
ignore_pmdown_time flag is not set. Set this flag for ultrasound RX DAI
to avoid delay in PCM close which causes slimbus overflow.
- Flag ignore_pmdown_time is only required to be set for RX DAIs.
Add this flag for RX DAIs that don't have it and remove this
flag for TX DAIs that have it in sdm670 machine driver.
CRs-Fixed: 2166356
Change-Id: I794ee96fb96fe04091ce73f0b48f84ebf119256c
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
WCD codec must be enumerated before AFE configuration for
some of the features can be sent to DSP. This is because
as part of setting up this configuration, DSP tries to
access some codec register. These register accesses will
fail if codec is not enumerated already.
Add a check for sound card online state to confirm that WCD
codec has already enumerated before sending AFE configs.
CRs-Fixed: 2166356
Change-Id: Ie5883f3543872d7a049a00a4c70445232360f2f9
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
In analog codec, EAR PA gain control get
function is updated with input value again
resulting in override. Remove the override
of control value again.
CRs-Fixed: 2161617
Change-Id: I7ddd252adf53666a6c9adc1bc92e840067fa932c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
With AANC enabled, and when the device switches
from speaker path to handset path there is a audible
pop. Add more delay to the aanc enable work function
to resolve the pop issue.
CRs-Fixed: 2137607
Change-Id: Icaf381179b0a81440b21ab4280cb6fc95e6fe6ba
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Add interface to trigger WDSP dumps for debug use.
Important register dump and WDSP ramdump are both collected when
DEBUG_DUMP string is sent from userspace via WDSP misc node or
when WDSP boot timeout happens.
CRs-Fixed: 2117755
Change-Id: I8b91a8939201a54512a5e3557ce771b4ff2ff075
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
Release the acquired mutex when there is failure
in enabling the soundwire clock.
Change-Id: I2e10ed7f0bd86524998a67d62e85754f7989eca2
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
High impedance aux cable when inserted causes jack to change to
lineout. This causes removal event to be called which results
in pause during music playback because jack value is not updated.
Do not change current plug while plug is marked as lineout.
CRs-Fixed: 2151012
Change-Id: I99797b58c48be00185a352094e32e8623faee491
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Check the ASM buffer index boundary before using it
to access the buffer to avoid out of array bounds error.
CRs-Fixed: 2145996
Change-Id: I5492941dfd9e7c3fa90af6caec14f9ff7e75d248
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
For Low-latency audio playback usecase, vote for a priority
upgrade for Glink Rx thread, to avoid any performance issue.
Change-Id: I8332c80eedd7325700e695f341fc4b92f65fd77c
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Set freed pointers to NULL to avoid double free
in msm_compr_playback_open and msm_compr_playback_free
functions of the compress driver.
CRs-Fixed: 2142216
Change-Id: Ifd011dd85dd9f610c7b69dd460f73d26e006cd66
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
Add support for new ADM LSM cal types in order
to avoid topology and cal block overriding during
concurrent use cases like SVA with speaker
protection.
CRs-Fixed: 2085865
Change-Id: I155d29ff0b77b069aa5970408332064c5c2aebd7
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
WCD codec must be enumerated before AFE configuration for
some of the features can be sent to DSP. This is because
as part of setting up this configuration, DSP tries to
access some codec register. These register accesses will
fail if codec is not enumerated already.
Add a check for Sound Card online state to confirm that WCD
codec has already enumerated before sending AFE configs.
Change-Id: I0b7e5eb49e4f6c6aee9cb142054e57eae592602b
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
To reduce time of usb-c analog headset detection, reduce
gnd mic swap threshold if usb-c is enabled. Use
existing threshold value otherwise.
CRs-Fixed: 2137077
Change-Id: Ic1d1f3a00c9034caaac45f2c80f018546a69ce59
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Add support for LDAC encoding in dsp to
enable LDAC encoder over split a2dp path.
CRs-Fixed: 2143086
Change-Id: Ia5ed981f5cd9cc61621d667362585ec7a7e64fa1
Signed-off-by: Preetam Singh Ranawat <apranawat@codeaurora.org>
Add support of 44.1Khz, 88.2Khz and 96Khz over split-a2dp path.
CRs-Fixed: 2143086
Change-Id: I05e7e947bec250c509f647718323bd208c46b2b2
Signed-off-by: Preetam Singh Ranawat <apranawat@codeaurora.org>
Add routings between LSM FEs and Audio EC Ref, or AFE port for
external Audio EC Ref will not be enabled during DSP SVA.
Change-Id: Ic70ee9479cd384d0226ac0e92a1824f92ec2d946
Signed-off-by: Yunfei Zhang <yunfeiz@codeaurora.og>