Move unnecessary UAPI header files to normal header folder.
Change-Id: I0ba6da8fdc4e21a3493fcc284fa2e08a06dc3013
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Update SOC_SINGLE_SX_TLV to SOC_SINGLE_S8_TLV to make codec
driver compatiable with upstream driver.
Change-Id: I4061b015d715978f3b294ad630f53b64bf66c2b7
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Add CONFIG_AUDIO_QGKI check for variables and functions
in audio drivers, so they are used only during a QGKI build.
Change-Id: Ia04232566367f196f298a49cf3962bb7927bec6a
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
Update kernel version references from 4.19 to 5.4.
Update symbolic links to new kernel version files.
Change-Id: I38baa52218b16e0b0c86ad898912d29ec4d3d516
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
Add NULL checks for mbhc in tavil driver to avoid
NULL pointer dereferences when MBHC is not supported.
Change-Id: I43bfd062af6048486256f744bd028b27fedc7f53
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
Exposure of driver bind/unbind to userspace via sysfs may
lead to unexpected behavior.
Hide bind and unbind by driver attribute.
Change-Id: I20d6ee653bcc16af15d6368664aaf240c6645cd0
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
When detecting special headset, vref for special headset is
set based on headset threshold reference 1800mv or based on
regular micbias settings from device tree. Scale threshold
reference as per the special headset micbias voltage.
Change-Id: Ic4cc24e18efeb420b53a2154707c9399eb886181
Signed-off-by: Meng Wang <mwang@codeaurora.org>
In case TX HPF mixer ctl set to 150Hz, go bit register
is not updated. Always update go bit along with
setting 150Hz at TX enable sequence.
CRs-Fixed: 2407902
Change-Id: I05b8a471cb2505d1ca5b290ea7ba35da5a534170
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
On tavil, the range for HPHL/HPHR volume is 0 to 24.
Update max value for HPHL/HPHR Volume.
Change-Id: I03f2eb3f833e5dc93a7cddaba09e765aa6077616
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Some alsa API are removed in kernel-4.19 which would cause
codec driver compile failure. Update codec driver to fix it.
Change-Id: Ie358ec1863082166958059c179300b453d2a03ad
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Switch audio drivers to SPDX identifier on msm-4.19.
Change-Id: Ic3f0230a516db251b8d81e8a7e73dbc04d66fe1b
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Paths using WDMA3_OUT widget are currently not marked to be ignored
during suspend, which results in the path teardown during suspend.
Due to this the audio use-case is broken. Fix this by marking
WDMA3_OUT widget as ignore_suspend.
CRs-fixed: 2176596
Change-Id: I72a2dda21aabfe9b13ea8660d4e3a51b3185d9ea
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
During bind/unbind of ngd_msm_ctrl power_gate_digital_core
is called. Simultaneously tavil_remove is also called
making tavil pointer as NULL. Check for tavil as not NULL
at the start of function to avoid NULL pointer dereference.
CRs-Fixed: 2267796
Change-Id: I6fc476cc8b706b556836f30838983de0f34d4fc1
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
Currently, the fs_cntr for MAD is enabled whenever the MAD
audio path is enabled. But, a new issue is reported where
MAD fs_cntr is required even for some of the non-MAD paths.
As per hardware requirements, enable the MAD fs_cntr always
from the codec default registers.
Change-Id: I6fe8f663b82e711b4194aa51a3e21150aa98cf02
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
When micbias is enabled set curr to higher value for
vreg bob bypass and when it is disabled set it
to default value for sm6150.
CRs-Fixed: 2315478
Change-Id: I451506002f382e666d47bc83944bdc8dbbedcad8
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
During SSR, when the playback on speaker gets started before codec
is out of digital core power collapse, results in soundwire
register read/write failures. Check for codec power state before
enabling the soundwire during speaker device path enablement for
playback usecase to avoid soundwire register read/write failures.
Change-Id: I3b45ef0c34ad4f97aad89afaf719989ffbda7485
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
ANDROID_BUILD_TOP variable is deprecated and thus all paths are
assumed to be relative to the top directory.
Change-Id: Ifc1bba67bf47092a37336581990d4bcce82a72f5
For new swr master controller to recover WSA on wcd934x variant,
trigger events from wcd934x driver for ssr down and up.
Change-Id: I8f0163178708760ef3ad2a765a80682611693e9b
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
When codec probe is not correctly completed and ADSP SSR happens
before sound card is registered, calling SSR callback may result
into NULL pointer dereference and kernel panic happens.
Check sound card state when calling device_down and post_reset to
avoid NULL pointer dereference.
Change-Id: I35fd84af51edf45db6fd451dc68dbcaaed11fee7
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Check for in2p clamp state in insertion irq
and ignore the interrupt if the clamp is already
set, which means the mechanical removal is about
to happen next.
Change-Id: I55691d427cf07d5b61862b6dbd39f3ec34d873e5
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Add support for SSR/PDR handling using SND event framework.
Change-Id: Ia96858ed6dc43cbb80d01a7797abb57442813d3b
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Currently, for any WDSP errors, the driver collects the debug
dumps/information based on trigger from userspace. This is protected
under CONFIG_DEBUG_FS and should not be run unless stress tests are
executed and this functionality is explicitly enabled since
performing debug dumps could possible leave the WDSP in bad state.
Add debug node to control dumping debug information and not rely
only on CONFIG_DEBUG_FS
To enable debug dumps:
echo 1 > /sys/kernel/debug/wdsp0/debug_dump_enable
To disable debug dumps:
echo 0 > /sys/kernel/debug/wdsp0/debug_dump_enable
Change-Id: I67d8781839d9caee16e6bf6a5befd9010ccaafc0
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
Due to the local char array that stores the codec dsp control command
is not initialized, an invalid command could cause the stack content
to be printed out in kernel dmesg. Initialize the array with memset.
Change-Id: I739eacb5058275c91bef67505531097cb364b93e
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
Update config file and make rules for msmsteppe
compilation.
Change-Id: I374a0725a7dd36edc9e04652fb07dc719310565c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
When ssr is in progress, during some race conditions
mbhc events are getting reported when codec is still
coming up. Ignore such events without reporting.
Change-Id: I3d3f78f97c2b855fc36a480f38c166bda2d979f0
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
In the case of WDSP boot timeout, api_mutex and ssr_mutex have already
been acquired. There is no need to do mutex lock again during debug dump.
Check the signal enum to see if it's the internal WDSP boot timeout case.
Change-Id: I6fe5e77b1bff72ed5ad463bb1df76c6b02c84c92
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
Cancel any pending delayed work in device down call
to ensure no work is scheduled during or after a
SSR/PDR sequence.
Change-Id: I4cc89cb1a9d8be732c978044d4eea3cf6644ec30
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Use hardware default value for boost state in regmap.
Use correct mask for initial value of boost state.
Change-Id: Ia8b707ba0128662d47059d25325693bc8eaff723
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
Reset power_active_ref counter to 0 when it is negative to
take digital core out of reset during next session.
Change-Id: I724ffe6e3547655424238ca02a9bf8ac24b101fe
Signed-off-by: Meng Wang <mengw@codeaurora.org>
If wcd934x config is removed, need to stub out the
APIs to load any dependent audio modules and enumerate
sound card.
Change-Id: If885d4d1f0ee83448ac41ed66b51f078978cb7d1
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Use CONFIG_ARCH_SM6150 for Talos to enable
proper compilation.
Change-Id: I14e06122116c431bf4b99da3a061d165f68e0d4f
Signed-off-by: Tanya Dixit <tdixit@codeaurora.org>
Add MSMSTEPPE in the makefile rules to enable
compilation for SDM640.
Change-Id: I36437404d98229c8b292fd63304498122d8c8687
Signed-off-by: Tanya Dixit <tdixit@codeaurora.org>
Update all audio drivers to use updated chipset name in
files, functions, architecture specific configurations
and the device tree compatible strings.
Change-Id: I507948866213ddb8806edea71a57c1f29ce7e71b
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
Update all audio drivers to use updated chipset name
in architecture specific configurations and the device
tree compatible strings.
Change-Id: Ib1abe643c6914c1b0b57ef110c7b60e23e356d97
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>