After ssr mbhc interrupts need to be enabled for mbhc
to work. If mbhc_init is not called, there are no
interrupts enabled. Call the api so that mbhc is
initialized properly.
Change-Id: I64ba4b8de50da2b527e20c90f99c79c49fabfed3
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
When audio stream manager returns READ_DONE event, the payload
which comes with the event contains size of captured audio data
and offset indicating where the data starts in the buffer.
Before this change, size and offset information is stored in
global variable which can be shared by all capture sessions.
If the offset is overwritten by another session with larger value,
buffer can be indexed beyond actual size of buffer when copying
captured data into user-space buffer. Move the structure as part
of per session private data to prevent overwriting.
Change-Id: Iaee12b0153b945a315e95c862fa2522cbd69c6f8
Signed-off-by: Patrick Lai <plai@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
CPE (Codec Processing Engine) block in the hardware has multiple
exception interrupts. When CPE crashes, it is possible it will generate
multiple and spurious exception interrupts. This is causing some
interrupts to be missed. Fix this by making sure interrupts that are
serviced are masked to avoid spurious interrupts and pending interrupts
are serviced to avoid missing interrupts.
CRs-fixed: 874196
Change-Id: I63f3ef2eac3f194d5e535c607893236d3ae6a4ab
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Pull down switches on headphone outputs need to be
enabled after accessory detection is completed to
eliminate noise on headphone when no audio gets
played and if device is getting charged through
usb cable. Add support to enable headphone auto
pull down.
Change-Id: Ife83a5843782e8b0e8238be6eaebbeccec4e929d
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
snd_soc_dapm_force_enable_pin takes the dapm mutex
internally and then calls into the function
snd_soc_dapm_force_enable_pin_unlocked, where the mutex
is again acquired resulting into a deadlock. Fix
the double lock by not acquiring the mutex within
the unlocked version of the function.
Change-Id: I6c68f1ef1645997bbcb1e5b197652c41baa609d3
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
When online status is updated as soon as codec is reset after ssr,
afe port start for sva case may fail. Update the sequence to handle
this scenario.
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
Change-Id: Ifd71df1ca2e5ac88ae952dd191374c6dbecac848
In external codec, the callback to initialize mbhc is not
registered, which causes no headset detection issue.
CRs-fixed: 895387
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
Change-Id: Ic72c82e45f296a4dcaa7b9dc7f8a91ba654b83f4
Temperature reading sequence is updated in wsa881x version 2.0.
This change is to add new sequence for temperature reading.
Change-Id: Ide1dbc5ef450c5e67f10ee038a5763b9d45008f6
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
In external codec, the callback to initialize mbhc is not
registered, which causes no headset detection issue.
CRs-fixed: 895387
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
Change-Id: Ic72c82e45f296a4dcaa7b9dc7f8a91ba654b83f4
If pulldown is enabled when headset is inserted, issues
such as no button press or fake interrupts during extension
cable usecase are seen. Do not enable pulldown when headset
is kept inserted.
Change-Id: I586376a806e8f3495fc94b7a8f4af62a59f17bbe
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
If pulldown is enabled when headset is inserted, issues
such as no button press or fake interrupts during extension
cable usecase are seen. Do not enable pulldown when headset
is kept inserted.
Change-Id: I586376a806e8f3495fc94b7a8f4af62a59f17bbe
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
If there is no boot up sound, the register to bring codec
out of reset is not updated which in turn impact mbhc
functionality, so no detection happens unless any audio
is played.
CRs-fixed: 885738
Change-Id: I36862f9aa6cfa90801e739586e3b371f219f3473
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
Multichannel playback over Wifi fails due to use of invalid
afe calibration at the time of opening proxy port. Since
there is no afe calibration content for proxy devices, afe
driver erringly sends afe cal tables of the previous device.
This happens because afe tables aren't updated from acdb
loader as proxy port opening is directly carried out from
WFD module.
Currently there is no mechanism to ensure compatibility
between afe ports and afe cal tables cached in the memory.
Therefore, disallow sending of afe cal table, topology and
hardware delay calibration for proxy ports to fix the above
issue through mixer controls.
CRs-Fixed: 880657
Change-Id: I4914bb1b2fca91d71c2c34904a0ca632468efd5a
Signed-off-by: Avinash Vaish <avaish@codeaurora.org>
For some use cases like Ultrasound, AFE calibration is not needed
to be sent to DSP. Add a mixer control to set a flag in AFE native
driver for that particular Slimbus port to help avoid sending AFE
calibration data to DSP for those specific use cases. AFE driver
would check for the flag before sending calibration data to DSP.
Change-Id: Idc254224a9b73995f363668e644b2c08f86817e9
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Add kcontrol to allow configuration of the proxy port up to eight
channels. This is to support multichannel playback over proxy
port in 8976.
Change-Id: I5646bcbb7a594d8d42c8ef32c3309c40eddfadd4
Signed-off-by: Satya Krishna Pindiproli <satyak@codeaurora.org>
Multichannel playback over Wifi fails due to use of invalid
afe calibration at the time of opening proxy port. Since
there is no afe calibration content for proxy devices, afe
driver erringly sends afe cal tables of the previous device.
This happens because afe tables aren't updated from acdb
loader as proxy port opening is directly carried out from
WFD module.
Currently there is no mechanism to ensure compatibility
between afe ports and afe cal tables cached in the memory.
Therefore, disallow sending of afe cal table, topology and
hardware delay calibration for proxy ports to fix the above
issue through mixer controls.
CRs-Fixed: 880657
Change-Id: I4914bb1b2fca91d71c2c34904a0ca632468efd5a
Signed-off-by: Avinash Vaish <avaish@codeaurora.org>
Temperature reading sequence is updated in wsa881x version 2.0.
This change is to add new sequence for temperature reading.
Change-Id: Ide1dbc5ef450c5e67f10ee038a5763b9d45008f6
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
For louder clips with max volume, observe audio drops.
This is seen due to COMP1_B4_CTL setting is not updated
correctly. As per 8952 power grid, buck voltage is 1.8v
and compander register setting is varied based on this.
Update the setting to 1.8v and also ensure the compander
register bit is reset in power down sequence so that
non-compander usecases like ANC are not affected due
to this setting.
CRs-Fixed: 890042
Change-Id: Ib2bd74877d559c7f473b1c7a8a64054fb1f476bc
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
For louder clips with max volume, observe audio drops.
This is seen due to COMP1_B4_CTL setting is not updated
correctly. As per 8952 power grid, buck voltage is 1.8v
and compander register setting is varied based on this.
Update the setting to 1.8v and also ensure the compander
register bit is reset in power down sequence so that
non-compander usecases like ANC are not affected due
to this setting.
CRs-Fixed: 890042
Change-Id: Ib2bd74877d559c7f473b1c7a8a64054fb1f476bc
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Add kcontrol to allow configuration of the proxy port up to eight
channels. This is to support multichannel playback over proxy
port in 8976.
Change-Id: I5646bcbb7a594d8d42c8ef32c3309c40eddfadd4
Signed-off-by: Satya Krishna Pindiproli <satyak@codeaurora.org>
During soft reboot, some times codec is going to bad state as
all the codec supplies are not going down. Due to which codec is not
responding to slimbus which is effecting soundcard registration.
After disabling the regulator wait for 500msec, to ensure regulators
ramp's down completely.
Change-Id: I21de85f9e7170906a877f9328f088a91d0f69ee8
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
Update register sequence for impedance detection to
work on cajon and for backward compatibility with
previous targets.
Change-Id: I86831be2c36532ce4ac8f8344587309d7ebfb1ac
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
There are few use cases where apps goes down to suspend
but codec should be in active state. Core driver will not
have knowledge of these usescases and hence move suspend and
resume hooks to codec driver.
Change-Id: If5614dd13f24a80d18f53f194c7be1c5b967a003
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
check for temperature register values and log the values if
they are out of range.
Change-Id: I58dd4e9b3348215510f61e790ed81bc9d4972768
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Temperature from wsa881x thermal zone sensor is not correct
when wsa881x codec is in suspend state. Bring codec out of
reset and update register cache to read proper temperature
value from thermal zone sensor.
Change-Id: I428ba35cbc10fd6c8ac80f6eb26f218466f44ebc
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>