This patch reverts commit c9c67fe553.
hwparams compat ioctl path was failing since platform driver was
returning an error. Platform driver should call pcm_lib layer of alsa
framework instead of returning invalid ioctl error.
This change fixes AMRNB recording usecase which was failing when hw
params ioctl was issued by userspace client.
CRs-fixed: 683867
Change-Id: Id17939d9803a4184649fde0afaef3fdce1ec1955
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Program different button thresholds for current source
and MICBIAS for proper button detection.Also enable PULL_UP
for MICBIAS2 during playback for proper button detection.
CRs-Fixed: 691749
Change-Id: I6720e33d7c2882648bd2f465dc3abb9f68c24e05
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
Add support to detect extension cable feature using
electrical insertion and FSM removal interrupts.
Add option to configure driver for either special
headset detection or extn cable feature.
CRs-Fixed: 662020
Change-Id: I6c42edbf4052d4e08473c34bad9e7122792792b4
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
Fix the boundary check for the array that holds the COPP
information.
Change-Id: Ie0bbaf25aae25e722ebefac434b00c05b8a0a2c6
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
Update the EAR path device with proper gain settings when
proper configuration is set from the userspace.
CRs-Fixed: 689069
Change-Id: I644903f23906467e63a2711d3319a8408351f973
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
This is needed to allow include from
non soc folder.
CRs-Fixed: 689849
Change-Id: I753012d5ce9c5a788e75b4edf9b0099b58b30ec0
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Add support for loopback volume control for primary MI2S.
Change-Id: Ic08537426301d59402b2ce4b240be476dff8eb73
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
If micbias is disabled during headset detection
while recording is happening through handset, it results
in noise in recorded data.So make sure micbias is
not disabled during recording.
CRs-Fixed: 689844
Change-Id: I6fa56770e365553603021f9e3ac713ccfc67d38b
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
Avoid logical conflicts seen while error handling.
Change-Id: I4c6b58bfcbd87f4d764fc6b923bf718e5f642ae5
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
mbhc initial calibration needs mclk to be enabled, so schedule
headset detection for 4sec so that modem gets loaded and will be ready
to accept mclk enable request command.
Change-Id: I19d07f5c4d9b35cbff3df72ebf7cdff99419d38e
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
Correct disabling of analog and digital interrupts
and correct headphone detection.
Currently cross_conn_det function is disabling MICBIAS,
due to this recording/button detection is not working
if cable is inserted in recording mode.
CRs-Fixed: 689558
Change-Id: I454e7e0a3cf180d0df9afdd672f1241ecfdfcdc9
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
If headset is inserted slowly and FSM is enabled,
it is possible that cross connection is wrongly
detected. Add polling to recheck the type of headset.
CRs-Fixed: 671195
Change-Id: I0f759b77395403c0f30aa531790ead09217a8d3d
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
Digital mute is enabled as part of the DAPM sequence but unmute
is done through digital mute interface on TX path added in the
codec driver which facilitate soc framework to ensure the
decimator path is unmuted when the stream is started. but this
will not holds good for the ADIE loopback usecases.
Add mixer control to update the loopback status and during
the DAPM sequence based on this status unmute the DEC path as part
of DAPM sequence.
CRs-Fixed: 690350
Change-Id: Id3ba9d52e5615e4adb370ce3cf98ed9a64d9b5bb
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
Add support for VoIP call auto recovery during Sub System Restart(SSR).
Change-Id: Ie8dce8f575ba3af5560c523a00e8520aef1c68c3
Signed-off-by: Venkata Narendra Kumar Gutta <vgutta@codeaurora.org>
Enable OCP interrupts when HPHL/HPHR PA gets disabled
by sending notification to the mbhc.
CRs-Fixed: 689558
Change-Id: Ie05d8baf082953dfa1ec0cdaee45900fc43cad9f
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
Refractor special headset detection logic.
For button's to work on special headset in MICBIAS mode,
we need to enable AutoZeroing. Add notification between
codec and mbhc to enable AutoZeroing when MICBIAS is enabled.
CRs-Fixed: 676586
Change-Id: I3430c029b22b2b5f80a8b267ea2e334b4ccae0a8
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
MBHC cal dce, sta is read as zero incase mclk is not
configured. Add changes to provide MCLK before MBHC
cal is read.
Change-Id: Id99b123f561573c436df5b1e2760716428a50d64
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
If special headset is removed, the callback to
disable micbias will be called, as micbias is
always on with special headset. Mbhc driver
checks a flag, used to disable/enable micbias
for special headset, to make sure micbias is
not disabled by recording. If this flag is not
updated properly before the callback is called
while the headset is removed, it can cause that
micbias is left enabled.
CRs-Fixed: 687630
Change-Id: Id49a2a0ba43821deef8fc5b6fb904239b2273f69
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
All of the commands being sent to the DSP are using cmd_state flag
which can be overwritten when several commands are sent at the same
time. This results in Memory map/unmap command timing out. The change
will separate the memory flag from flags for other commands so that
they do not overwrite each other.
CRs-fixed: 673781
Change-Id: I61e059f402feb2c4e1e3dbed1825990456e78471
Signed-off-by: Damir Didjusto <damird@codeaurora.org>