Commit Graph

62 Commits

Author SHA1 Message Date
qctecmdr
c3c4fd765e Merge "ASoC: update headers for upstream compliance" 2020-05-14 22:04:36 -07:00
Preetam Singh Ranawat
319590242d asoc: msm-compress: Reset channel map flag during close.
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>
2020-05-09 17:12:37 -07:00
Vignesh Kulothungan
e0bdd11269 ASoC: update headers for upstream compliance
Update uapi header reference path to include
path prefix "audio/"

Change-Id: Ic7b1d22910b07be3ffe8d9f02514ed89facea974
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-05-06 11:26:15 -07:00
Sudheer Papothi
424a92ebb9 ASoC: msm-compress: Add NULL check in msm_compr_set_volume
Add NULL check for pdata structure in msm_compr_set_volume to
avoid dereference.

Change-Id: I364bf95ce7df0f5b4cea0e7bd4c5926c1966aac1
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-04-23 11:17:27 +05:30
Satish Babu Patakokila
54d42ba9df dsp: Add support for EOS V2
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>
2020-03-31 21:25:09 +05:30
Vignesh Kulothungan
823f0f01fe ASoC: add config check for QGKI
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>
2020-01-26 03:51:32 +05:30
Vignesh Kulothungan
bde9a11153 ASoC: compress: update codec option wma to wma_dec
Update codec option wma to wma_dec.

Change-Id: I6462c6a5a9a5b2f1e6f74df951a101331ce75872
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-01-22 15:34:30 -08:00
Meng Wang
7ecd3d4fed asoc: use upstream definition of snd_codec
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>
2020-01-17 17:09:09 -08:00
Meng Wang
d6bde74f93 asoc: compress: update codec option wma to wma_dec
Update codec option wma to wma_dec.

Change-Id: I1e22c7d2793b2e58a4507e562b4a57ac0a29f418
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-01-16 17:53:22 +08:00
Vignesh Kulothungan
0db3d6b206 ASoC: update cpu_dai_name references
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>
2019-12-25 15:17:46 +08:00
qctecmdr
e3003bb845 Merge "asoc: update open read call based on ASM version" 2019-12-13 04:42:43 -08:00
Weiyin Jiang
7b51a258a1 ASoC: compr: wake up drain only if it's the last buffer
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>
2019-11-28 23:01:36 -08:00
qctecmdr
947edcaa30 Merge "asoc: msm-compress: Replace goto with return in case of invalid value" 2019-11-26 07:03:04 -08:00
Surendar Karka
afd3e12fbe asoc: update open read call based on ASM version
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
2019-11-11 19:02:14 +05:30
Surendar Karka
4bb8998788 asoc: update number of channel only for default channel map
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>
2019-10-31 03:34:32 -07:00
Ajit Pandey
9adf04cadb asoc: msm-compress: Replace goto with return in case of invalid value
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>
2019-10-24 13:50:00 +05:30
Ajit Pandey
fa018867ef asoc: msm-compress: Add lock in controls _put() and _get() callback
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>
2019-09-16 12:39:14 +05:30
qctecmdr
48d815e732 Merge "asoc: check subsys state in FE instead of q6 state" 2019-09-12 04:02:35 -07:00
qctecmdr
bd95d2fa1c Merge "ASoC: compr: add amrwbplus offload support" 2019-09-04 03:38:00 -07:00
Ramprasad Katkam
17f0516574 asoc: check subsys state in FE instead of q6 state
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>
2019-09-03 14:43:05 +08:00
Surendar Karka
597695312d asoc: add support for custom channel map
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>
2019-08-06 04:21:08 -07:00
Asish Bhattacharya
7e3391bd8e ASoC: compr: add amrwbplus offload support
support for AMR codec in compress driver path.

Change-Id: Ife1d82caddf87a904f8c8b0402fc79f05a8289d1
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2019-08-05 14:04:39 +05:30
qctecmdr
a7352414c3 Merge "audio-kernel: add support to query presentation position from DSP" 2019-07-24 00:47:35 -07:00
Chaithanya Krishna Bacharaju
61b2de686e asoc: routing: Add support to use compress path for ec ref loopback
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>
2019-07-15 00:35:57 -07:00
Surendar Karka
38d66474e1 audio-kernel: add support to query presentation position from DSP
Add support to query presentation position from DSP
in system time domain.

Change-Id: I42b4d234ddc256f93c01defbe2c74872a2a2cf3e
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
2019-07-05 16:03:04 +05:30
Erin Yan
2f81be27d8 asoc: adapt channel mixer usage to tinymix
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>
2019-06-16 17:47:03 -07:00
Xiaojun Sang
53cd13a1ab ASoC: hide bind/unbind in sysfs
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>
2019-05-17 15:00:33 +08:00
qctecmdr
9ef70dacaa Merge "asoc: update channels and channel maps usage in channel mixer" 2019-05-01 05:00:30 -07:00
qctecmdr
bdc4b5f403 Merge "asoc: Add support for compress perf mode" 2019-04-30 11:03:11 -07:00
Dhananjay Kumar
f682acd01d asoc: update channels and channel maps usage in channel mixer
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>
2019-04-30 08:52:56 -07:00
Xiaojun Sang
d57aca0812 ASoC: initialize queue head for compress capture
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>
2019-04-15 02:31:24 -07:00
Deeraj Soman
9d125879de asoc: Add support for compress perf mode
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>
2019-04-15 02:05:24 -07:00
Meng Wang
8a2a104156 asoc: add NULL check before access pointer
Add NULL check before access pointer to avoid dereference.

Change-Id: I2c7408348a0acf1a3801a5869f62bae328858beb
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-03-21 10:46:02 +08:00
Linux Build Service Account
66547d7c3f Merge "dsp: asm: Add check for num_channels before calling q6asm_map_channels" 2019-03-14 15:24:19 -07:00
Linux Build Service Account
8d44b4ee14 Merge "asoc: Stream_open issue fix for gapless playback" 2019-03-14 06:55:29 -07:00
Xiaoyu Ye
f74e89bd89 asoc: avoid excessive logging
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>
2019-03-12 22:28:30 -07:00
Nidhisha Dhananjayan
d84669e428 asoc: Stream_open issue fix for gapless playback
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>
2019-03-12 22:11:07 -07:00
Rohit kumar
2a64e52662 dsp: asm: Add check for num_channels before calling q6asm_map_channels
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>
2019-03-11 05:39:41 -07:00
Ralf Herz
49c325c69f asoc: Add new channel ID to mark unused channel map slots
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>
2019-03-04 21:21:31 -08:00
Dhananjay Kumar
807f7e9521 asoc: add support to set custom channel mixer coefficients
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>
2019-02-28 08:57:51 +08:00
Vignesh Kulothungan
0fcf2af3df asoc: dsp: ipc: Reduce wait timeout to 1 second
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>
2019-01-02 16:04:27 +08:00
Meng Wang
18065271af asoc: remove find tag to fix compile error
Remove unused find tag to fix compile error.

Change-Id: Id4b6d210ef51f3ad419968a9413a691d7f7a779e
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-11 14:33:40 +08:00
Meng Wang
43bbb87652 asoc: Update file header to GPL-2.0-only
Update file header to GPL-2.0-only.

Change-Id: Ic1542a3209a5fe73c937a5b36491ede4a451936d
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-10 14:49:34 +08:00
Meng Wang
ee084a068e ASoC: Change platform driver to component driver
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>
2018-12-08 03:15:41 -08:00
Linux Build Service Account
355332ce80 Merge "ASoC: switch audio drivers to SPDX identifier" 2018-12-07 13:20:51 -08:00
Meng Wang
61af6849e9 ASoC: switch audio drivers to SPDX identifier
Switch audio drivers to SPDX identifier on msm-4.19.

Change-Id: Ic3f0230a516db251b8d81e8a7e73dbc04d66fe1b
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-07 15:47:32 +08:00
Meng Wang
1b52b57ad2 asoc: add snd_dec_ddp struct for AC3 and EC3 playback
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>
2018-11-28 02:55:16 -08:00
Linux Build Service Account
1929529772 Merge "asoc: qcs405: Use changed clock for SPDIF interfaces" 2018-10-15 21:21:25 -07:00
Dieter Luecking
ceef9afb23 asoc: msm-compress: Add support for up to 32 channels
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>
2018-10-04 16:34:57 +02:00
Vignesh Kulothungan
2ce6784865 asoc: update log level to avoid execessive logging
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>
2018-09-27 09:56:25 -07:00