For some of the clips improper channel map is applied when not
set from userspace.
Reset channel map flag to apply default channel map.
Change-Id: Ic128b835ecea632c99fba5b14471fc76e767b80e
Signed-off-by: Preetam Singh Ranawat <apranawat@codeaurora.org>
Use EOS V2 to avoid time out for EOS when afe port
is closed before EOS
Change-Id: I3be0aa33384d2015354b8f9a307f3e0cb200c040
Signed-off-by: Satish Babu Patakokila <sbpata@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 drivers to use upstream definition of snd_codec
as compr_passthr and flags variables are no longer supported
on kernel 5.4.
Change-Id: I5b0fc43af9cdae0a40e9e4f086fcecdb4be85f76
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
From 5.4 kernel, cpu_dai_name is replaced by a
pointer to snd_soc_dai_link_component which holds the
dai name, update such references.
Change-Id: I5ddda0232b75cee7c0f2dc937102e1342a50276a
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
There's a corner case where there're pause and resume operations in the
middle of last full buffer drain. Waking up drain without checking
against the real byte available violates the assumption only one
partial buffer in the last write.
The solution is to just resume the write pipe if there's more than one
fragment pending.
CRs-Fixed: 2536883
Change-Id: Id24c63bad774ec916942b8f94ddaa396d2560517
Signed-off-by: Weiyin Jiang <wjiang@codeaurora.org>
compress read is failing as the encoder config
format support is to v5. Update the open read call
to V5 based on ASM version.
Change-Id: I5b74da5719172d31fb488bcd8081c6d0495d3905
Volume setting on the custom channel map is failed as
use default channel map is always set to true.
Use default channel map from runtime data and update
number of channels only if custom channel map is not set.
Change-Id: I2326b52687144a584f85ab3db8a2930f8fa5c3ea
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
In case of invalid values in _put() callback return directly to avoid
deadlock issue with mutex unlocking in goto label.
Change-Id: Ib0623e26dd83b96cd6ec315f515098b8ea0b2dd2
Signed-off-by: Ajit Pandey <ajitp@codeaurora.org>
Few mixer controls _put and _get methods uses runtime private data
that can be freed by close() callback in parallel threads leading
to issue. Added global mutex lock in such methods to avoid runtime
concurrency around such data.
Change-Id: Ie542c64a4f1e50fd9547ebb9f65df2b7b0c21a0e
Signed-off-by: Ajit Pandey <ajitp@codeaurora.org>
audio can use adsp or modem. Hence check
apr subsys state commonly instead of adsp or modem.
Change-Id: Ice70ab23797ec5f940e1bda3fa1b2d84c196fc56
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
In a stream we need to add support for downmixed stereo channel
along with the left and right channels. Add custom channel map
to support downmixed stereo channels.
Change-Id: Icb7fa226a6f07ee4f7d00b8f55fe578c27719c86
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
support for AMR codec in compress driver path.
Change-Id: Ife1d82caddf87a904f8c8b0402fc79f05a8289d1
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Add support to use compress path for mic and ec reference data
capture in single stream. Extend PSPD controls for compress
frontend ids. Update compress driver to use latest ADSP APIs
if available.
Change-Id: Icbf9def07cb0a01542fb3b5cd77e74ab53aec683
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
Add support to query presentation position from DSP
in system time domain.
Change-Id: I42b4d234ddc256f93c01defbe2c74872a2a2cf3e
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
Tinymix set the array value of the mixer control one by one. The
channel number validation check here will cause failure in tinymix.
Allow 0 value here is fine because the parameters will be checked
before they are set at runtime.
Change-Id: I49c23f84aa081550434696dde96d2800e90390fb
Signed-off-by: Erin Yan <xinyey@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>
Update channel mixer controls to use active channel maps.
Update channel maps and channel mixer control to validate
channels and frontend ids being used.
Change-Id: Id5a8d9d0f262fbf64dcfeb67a8b2195fb0d126fa
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
Waitqueue head is not initialized at open stage. Future
action may wake up uninitialized wait. Initialize them
for compress capture.
Change-Id: I142202783aa9b7b9334c1a9632a89cd1ba7f5005
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
Add support for compress perf mode so that clients
can set the COMPRESSED_PERF_MODE_FLAG to invoke
the perf mode in compress driver.
Change-Id: Ia84b95e8566aeeaf654ed90c2ab19de46e708d4d
Signed-off-by: Deeraj Soman <sdeeraj@codeaurora.org>
Add NULL check before access pointer to avoid dereference.
Change-Id: I2c7408348a0acf1a3801a5869f62bae328858beb
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Excessive logging by pr_err() could cause audio thread to stuck
in the printing session which results PD down notification timeout.
This eventually can cause ADSP PDR failure. Fix this issue by using
pr_err_ratelimited and dev_err_ratelimited to limit the number of
error messages during the ADSP PDR.
Change-Id: I68b617fef53ebd03ba79fd919bffd8c35e6eb048
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
msm_compr_trigger for next track is updated with
q6asm_stream_open_write_v5 depending on the
avcs_api_version.
Change-Id: I6b3862a7b8e0480fffdcddc2ff0949cf5399d7a6
Signed-off-by: Nidhisha Dhananjayan <nidhis@codeaurora.org>
Channel_mapping array size varies for different commands.
Add check for num_channels before calling q6asm_map_channels.
Change-Id: Iccbcfe82f716fc0ffe0a26b1779dcaa1c3cb805b
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Allow to mark entries in a channel map as unused to prevent mixing other
channels in that slot.
Change-Id: Iefbfb861b796129211e929cb0ddb84041b9f57b0
Signed-off-by: Ralf Herz <rherz@codeaurora.org>
Enhance Channel Mixer control for MultiMedia Frontends to
get custom channel mixer coefficients from userspace and
use it during device routings to control stream to device
channel mappings.
Change-Id: Icf950377dede46b097c8656174af5eb311bf719a
Signed-off-by: Cong Tang <congt@codeaurora.org>
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
Reduce the amount of time driver waits to get a response from ADSP.
Current wait time in some cases is 5 secconds, which might cause
user space crashes in Android P. So reducing the timeout to
1 second.
CRs-Fixed: 2318751
Change-Id: I6b6789aa5b408659dd57f8f6b017df52d14b28aa
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
snd_soc_platform_driver is removed in kernel-4.19.
Update snd_soc_platform_driver to snd_soc_component_driver.
Change-Id: I434b6fd173d1f4365a610d9164342d5d04d6c5bc
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>
Move struct snd_dec_ddp from uapi folder to msm-compress-q6-v2.c to
avoid code check warning.
Change-Id: Id33eee6da8f42841c80e7e5795bb19e71ab6e784
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Compressed streams now do support up to 32 channels.
Use new ADSP API for 32 channels if ADSP supports this.
If not fall back to 8 channel API.
Change-Id: Ief6fe189a6a34f15cfb96bfb9cb7d97b03633b95
Signed-off-by: Dieter Luecking <dieterl@codeaurora.org>
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
Excessive logging causes throttling during bootup.
Update log level from error to debug in get functions to
avoid excessive logging.
CRs-Fixed: 2321589
Change-Id: If2a23144adf76cdd9bb2d9048a967b63186d7f6e
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>