When slimbus state changes this needs to be updated
to CPE core. CPE core will load the images when codec
get slimbus online notification.
Change-Id: Ib58c7eaa3f6e9abb8aee7c1c5fe4ea7200460111
Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
The CPE hardware block on the codec may become unresponsive due to
unknown reasons. In such situation, the codec hardware has functionality
to interrupt the driver so that driver can take necessary steps to
reinitialize the CPE hardware block. Add support for detecting CPE
hardware state and reinitialize the CPE block so that further use
cases are not affected.
Change-Id: I8a3447925216f0d6c3bd177162800e3e3c8df879
Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
During fast switching of audio playback, we need to wait
for 5ms for the LINE PAs to get settled down before enabling
them again for playback. Same delay is also required after PA
is enabled. Add the required delays after LINE PAs are enabled
or disabled.
CRs-Fixed: 668339
Change-Id: Ic867ca555bb0cf211cd6afa0e78d63e04e525076
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Add docking station jack interrupt support to msm8994
audio machine driver.
Change-Id: I0af9a78cee92554fe75d2fd3c33fe0be98fc2576
Signed-off-by: Tanya Finkel <tfinkel@codeaurora.org>
Multiple instances of VoIP driver are not supported and when opened
multiple instances causing corruption in the VoIP data structure.
Add condition checks to handle invalid requests from userspace.
CRs-Fixed: 669865
Change-Id: I3f1b5cc0fb31ba76fbeb3d3e186bfcce49c3505a
Signed-off-by: Venkata Narendra Kumar Gutta <vgutta@codeaurora.org>
The current code cannot support ear boost in bypass
mode and speaker boost enabled by default.
The change ensures that the register writes for
ear boost in bypass mode and speaker boost are present
only in the ear path and speaker path respectively
Change-Id: Icf5a78ffb7ecd2354aba3904faf2180647780048
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
The SCLK is getting enabled twice for each playback,
the sclk is never turned off by the Q6.
Due to this Q6 keeps voting against TCXO resulting
in the failure for the system to go in the TCXO shutdown.
CRs-Fixed: 684388
Change-Id: Iedaca288d997cbc41015c8de7081858ac32b0316
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
Under normal operation, the cpe services state never goes to OFFLINE,
but during SSR handling, the state transitions to OFFLINE. Fix the
propogation of OFFLINE state transition to avoid erroneous CPE state
which can lead to unexpected issues.
Change-Id: I54b9e68e98615a186cfa1b59de0759838e9ba95d
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
During VoIP call if SSR happens there is no audio from the next call
onwards. Incorrect typecasting of void pointer causing memory corruption
in ASM driver resulting in aforementioned issue.
CRs-Fixed: 687854
Change-Id: Ib04b40b978c82e00fe78cc7b12122f2052fb14c1
Signed-off-by: Venkata Narendra Kumar Gutta <vgutta@codeaurora.org>
Currently, OCP hold is set to zero by default which is
preventing the PA from holding the shutdown state.
Set this bit to enable OCP hold by default. Once hold is set
PA would shut down immediately during overcurrent and hold
that state unless SPKR_PA_EN bit is toggled.
Change-Id: Ib37edddea5a4a34f5f6d046d3bf3baa835598d89
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Make sure that afe command sent to DSP is atomic in nature
and doesn't get overwritten in concurrent scenarios.
Change-Id: I86558c293f0ce5d78533b79ed13a23e52e367c1d
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
If a session is released during the SSR, then the memory unmap
command to DSP fails. This results in not releasing up the memory
block shared among apps and the DSP.
Fix by checking if the session has been invalidated during the SSR
and free up the memory during the close command.
CRs-Fixed: 687190
Change-Id: I66251e624e5cc1abd816c2e4647997482b96c771
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
Return error code ENETRESET from the platform driver
during the SSR recovery.
This facilitates the client to handle the error code
and take corrective measures rather than being blocked
on the call.
CRs-Fixed: 683288
Change-Id: I618edf0276bbe8826b47edec39df0dd4f87ffe93
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
Compat ioctl pointer is assigned to ioctl field instead of compat_ioctl
member variable. Change updates the assignment.
CRs-fixed: 688027
Change-Id: I248e3225493f0ceafcb5e70ce0ff827ab77c7a74
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Check for NULL pointer before passing the parameter for string
manipulation to avoid pointer dereference.
CRs-Fixed: 682554
Change-Id: Ic0c17f7019124f482767a3fcb54c0562ffed0ce8
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Check for NULL pointer before passing the parameter for string
manipulation to avoid pointer dereference.
CRs-Fixed: 682551
Change-Id: I74610e4679e4808c633c0ea80d3b3e389faf46d0
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
The error code propagated from the flush cmd in the trigger stop
is causing the error in the state of the soc compress framework.
This hinders in closing the BE connected to the FE.
If the AFE is not closed it prevents the target to go into TCXO
shutdown.
Fixed by removing the error handling of the flush command in the
trigger stop, since failure in flush doesn't signify the
failure in the stop command.
CRs-Fixed: 687111
Change-Id: I8f6e2bfbd0e59516ede2359dda4cedf027948a72
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
The LiQUID dock support driver is not specific to the
APQ8084 SoC. Rename it to reflect its generality since
it can be used for other MSM/APQ LiQUID platforms.
Change-Id: I4a969077c543cd84e98dd198d3d7670b6071605a
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Ensure required regulators are enabled during plug type determation
otherwise it will effect Plug determination.
call enable_irq_wake properly for all the interrutps otherwise headset
won't get detected when device is in sleep mode.
CRs-Fixed: 685319 685322
Change-Id: I3f10bb4f21bdc47c3f9882ae5fc668a942390a76
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
Voice call over BTSCO wideband does not work because of
the mismatch in the string values used in user space and
kernel for the aux pcm sample rates. Change the values in
kernel to be consistent with other targets.
Change-Id: Ifd45484705fc0e4b98b2978cf03cbfcc908a8693
Signed-off-by: Narsinga Rao Chella <nrchella@codeaurora.org>
CRs-fixed: 686078
- Mute media volume and play any music clip then reboot
the phone. Play music again noise comes. This noise
is introduced in DSP/LPASS.
- DSP suggestion is to mute master volume gain while
configuring ASM session to avoid such noise at
begining of asm playback.
Change-Id: I2aa2846d6e3e9a85c459534e9108e6fe7aebb962
Signed-off-by: Ramjee Singh <ramjee@codeaurora.org>
AFE_PORT_ID for tertiary_mi2s_tx is missing in afe driver
this is resulting failure while pushing adm cal data associated
to this port. This change add this port in valid port list.
Change-Id: Icefc778be7f89b7925e0951ce76bf74fb0c52e9d
Signed-off-by: Srikanth Uyyala <suyyala@codeaurora.org>
If memory allocation fails or allocation of extremely
large buffer is attempted causing kmalloc to return a
NULL, the present code goes ahead and dereferences the
NULL pointer.
The change returns from the function immediately if
kmalloc returns a NULL.
CRs-Fixed: 683684
Change-Id: Iffd532b9eacebfc3c365ced6856a117164111988
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
Add check for NULL pointer as return value from function before
dereferencing the pointer.
CRs-Fixed: 682545
Change-Id: I856f29e1f4a608e4de765a6b43214a55c896ef2f
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
The present code enables over current protection for
headphones during boot up. This causes leakage current
on the cdc boost rail when the device is in idle state.
The change enables the ocp before hph pa is enabled
and disables them after hph pa is disabled.
CRs-Fixed: 684587
Change-Id: I549dce1b76221f2cf822dac0c819a0a673a3a960
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
With new sound cards possible to connect over SLIMBUS,
add SLIMBUS as primary BE dai.
Change-Id: I6ebb3744a539f3409caad0565f7a80e6f531cc07
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Add multimedia9 frond end DAI in 8084 machine driver
to support in-call music feature on second subscription.
Change-Id: Id79d32b78465799ec9bcfc2567e1b0cd716fec73
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Propagate the error code from the compress framework for the timestamp
query. This error code will be used by the client to handle the
error case scenarios gracefully.
CRs-Fixed: 683288
Change-Id: I68ad14d52327dd0156531fe8d17ac54ba110fdf6
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
The headset removal during the voice call causes the master bias to be
turned down impairing the speaker functionality.
Fix by removing the disable sequence of the MASTER_BIAS
during the headset plugout.
CRs-Fixed: 684711
Change-Id: I8ba382549f7efb08bda9412d0c401a9e7d78915d
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
All the codec reads/writes go through slimbus satellite driver on APPS.
Slimbus satellite driver is already voting for slimbus clock before any
codec read or write so remove the vote from codec driver
Change-Id: I61f5b22d14f87668766d8d2f948a087066a73b11
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
If the calibration data is not present the open of the audio
client was failing.
Even if the calibration data is not present then also the playback
should continue.
Fix by returning success even if the calibration data is not
present.
Change-Id: I768b6541686c71b03d5aa140cc62a59dce291f89
CRs-Fixed: 683320
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
VI(voltage/current) feedback capture widget is part of speaker RX path.
When speaker is enabled, the VI feedback capture widget would be turned on.
During the shutdown of speaker RX path VI feedback codec path is
shutdown first and then the AFE port is closed. This will cause the
underflow errors during the shutdown seqeunce.
Change removes the vifeedback capture widget from playback path and
creates a new capture path. Userspace module will enable/disable the
VI feedback path via mixer control.
CRs-fixed: 591723
Change-Id: Ibceb5ff404e7cd7b73c490877e6b6e07faa06ab7
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Add Multimedia9 mixer controls to support in-call music
delivery on second subscription.
Change-Id: I8f7a43dc5e1cefcaf834c9c62ef56de5486dce88
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Ioremap for LPASS_CSR_GP_IO_MUX_MIC_CTL is called twice
without iounmap(). It causes memory leakage.
CRs-Fixed: 683280
Change-Id: I77b25c4d148c69e9387f8d813a43f86f452a07c8
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
MBHC driver moves pm wake lock state to awake before
scheduling work which detects the headset type.
But the work scheduled does not move the pm wake lock
state back to sleepable. This is causing the target
not to enter into tcxo.
CRs-Fixed: 681157
Change-Id: Ib8d94d5d50a8180365ba4fdaee7c4c587769cbe4
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
DPM timeout was happening due to the suspend call to the
codec driver being blocked.
This was due to a deadlock by acquiring the same mutex by the
suspend call and the work queue.
Fix by modifying the codeflow so that the deadlock is avoided.
CRs-Fixed: 681986
Change-Id: I96f11ee968a0e9bd267a80d2d11f1fa49985f5a9
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
Improve debug logs by adding function names. This
change is required to fix rarely reproducible
customer issues.
Change-Id: Ic8b7f5b06bac1695904cecdc071cc13dc4b034ec
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
Improve debug logs by adding function names. This
change is required to fix rarely reproducible
customer issues.
Change-Id: I8f1e4f7c7b65bfdbbb7cf55595710985a7d3a5f7
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
When we insert headphone slowly, it may be detected as HEADSET
incorrectly.
So when we detect the HEADSET type, report it first and then schedule
the polling for it. If then button press interrupt is triggered
without corresponding button release paired, correct it to headphone.
CRs-Fixed: 678536
Change-Id: I82a043bf3ccccd956a79b9a96d393a9c0f46e8da
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
Add Slimbus 3 TX port to the list of valid ports.
Otherwise opening of this port will fail.
CRs-fixed: 682168
Change-Id: I53bdde37afb4c5b0773eff86bfcc45541532e4e7
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
* commit 'v3.10.40': (203 commits)
Linux 3.10.40
ARC: !PREEMPT: Ensure Return to kernel mode is IRQ safe
drm: cirrus: add power management support
Input: synaptics - add min/max quirk for ThinkPad Edge E431
Input: synaptics - add min/max quirk for ThinkPad T431s, L440, L540, S1 Yoga and X1
lockd: ensure we tear down any live sockets when socket creation fails during lockd_up
dm thin: fix dangling bio in process_deferred_bios error path
dm transaction manager: fix corruption due to non-atomic transaction commit
Skip intel_crt_init for Dell XPS 8700
mtd: sm_ftl: heap corruption in sm_create_sysfs_attributes()
mtd: nuc900_nand: NULL dereference in nuc900_nand_enable()
mtd: atmel_nand: Disable subpage NAND write when using Atmel PMECC
tgafb: fix data copying
gpio: mxs: Allow for recursive enable_irq_wake() call
rtlwifi: rtl8188ee: initialize packet_beacon
rtlwifi: rtl8192se: Fix regression due to commit 1bf4bbb
rtlwifi: rtl8192se: Fix too long disable of IRQs
rtlwifi: rtl8192cu: Fix too long disable of IRQs
rtlwifi: rtl8188ee: Fix too long disable of IRQs
rtlwifi: rtl8723ae: Fix too long disable of IRQs
...
Change-Id: If5388cf980cb123e35e1b29275ba288c89c5aa18
Signed-off-by: Ian Maund <imaund@codeaurora.org>
Update register write sequence for speaker and headset devices
during device tear down.
For PMIC 2.0 and QCRG 2_0_7 version has changes in the QCRG sequence
update the code to match the QCRG.
CRs-Fixed: 680225, 680246
Change-Id: I9ddfc478665d936080fca40b004cdd32bd8579b1
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
Initialization values for over current protection
registers are not proper. Enable IRQ/Disable IRQ calls
should be equal which has been ensured.
CRs-Fixed: 672584
Change-Id: I93528d3e59cf1238b6ccaeebf9116e6641027009
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
The interface to set sample rate for BT is not available. Its
set at 8KHz hardcoded and hence need mixer control to allow
set from user space based on need.
Change-Id: I8a522c9d96cff5a0433fce0a5b549b5b7f90a5fe
CRs-Fixed: 681676
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Cache last known playback timestamp before resetting the
in use session in preparation for possible re-use of the
same session.
Change-Id: Id422f5654960818c159f9f07d5af3c497192bae2
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
When kernel is compiled for 64 bit and user space client is in
32 bit mode, then compat IOCTL path is taken instead of normal
IOCTL path. Add compat IOCTL support in voice platform driver.
This is needed to enable local call hold in DSDA use case.
Change-Id: I74e49f4986a4754a25189613828cf11283fe16e3
Signed-off-by: Narsinga Rao Chella <nrchella@codeaurora.org>
CRs-fixed: 673882
On triggering the SSR the audio was not heard on the speaker for the
pmic 2.0 hardware.
For the pmic 2.0 hardware the register set which gets initialized post SSR
didn't have the speaker DAC ctl register hence the whole chain in the DAPM
was not established leading to no audio.
Fix by updating the array of the default registers for the 2.0 hardware.
CRs-Fixed: 679797
Change-Id: If11c7e9e573d878710d59f2f2294a0a039eb8dcc
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
AUXPCM and MI2S gpios are used for Bluetooth and FM. Configure
AUXPCM and MI2S gpios using pin control method. Change enables
Bluetooth and FM usecases.
Change-Id: Iea24c060e01036f694ec60f16f12024e917131ea
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>