Commit Graph

43 Commits

Author SHA1 Message Date
qctecmdr
bd95d2fa1c Merge "ASoC: compr: add amrwbplus offload support" 2019-09-04 03:38:00 -07: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
Ralf Herz
2257355fe4 asoc: Support compressed capture from AFE interfaces
Support compressed IEC61937 audio capture from AFE interfaces
with variable data packet lengths.

Change-Id: Iffd5a06ed5fe1a96f34e225d54fab660b21d2a48
Signed-off-by: Ralf Herz <rherz@codeaurora.org>
2018-07-25 21:35:45 +05:30
Vikram Panduranga
c712c17ab0 dsp: Add support for custom encoder
Add support to set custom encoder in ASM which
can be enabled through compress capture path.

Change-Id: I563c59eb3a0213c26ce69d3c2f8d650cf3c7d32d
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
2018-06-05 12:57:23 -07:00
Vikram Panduranga
82c2c2ca00 asoc: Fix read offset for compress capture with timestamp
In a compress capture usecase, read offset guides to
move buffer pointer based on buffer length. When timestamp is
enabled read offset also needs to include timestamp header
offset along with buffer length. This fix addresses the issue
of null memory map handle due to incorrect read offset.

Change-Id: I93c3ec588e77d535b6c7a4a0d832c1e7ea5f62a7
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
2018-04-24 09:48:45 -07:00
Xiaojun Sang
75642c362c ASoC: msm: check payload size before memory allocation
Buffer from mixer ctl or ADSP is composed of payload size and
actual payload. On a 32 bit platform, we could have an overflow
if payload size is below UINT_MAX while payload size + sizeof(struct)
is over UINT_MAX. Allocated memory size would be less than expected.
Check payload size against limit before memory allocation.

Change-Id: I0bf19ca7b8c93083177a21ad726122dc20f45551
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2018-04-02 22:00:23 +08:00
Sachin Mohan Gadag
7c944235ae asoc: Add new dais to support compress record
Add new dais to support compress record usecase.
Update media_encoder_format api to v4 version in
compress driver.

CRs-Fixed: 2167556
Change-Id: I8a2f8a4cdcec4bb31ad94730eb4f1259e800c70c
Signed-off-by: Sachin Mohan Gadag <sgadag@codeaurora.org>
2018-03-04 18:54:41 -08:00
Aditya Bavanari
9deef91554 asoc: set freed pointers to NULL
Set freed pointers to NULL to avoid double free
in msm_compr_playback_open and msm_compr_playback_free
functions of the compress driver.

CRs-Fixed: 2142216
Change-Id: Ifd011dd85dd9f610c7b69dd460f73d26e006cd66
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2017-12-13 04:59:45 -08:00
Asish Bhattacharya
5faacb3a7e ASoC: allow drivers to compile both static and dynamic
Based on where the code is synced the driver should allow
both static and dynamic linked compilation.
Also remove __exit for modules loaded from another common
init/exit functions.

Change-Id: Ib58f152002aba3af4446f9bbd9b82c279212bd0a
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2017-12-07 19:57:27 +05:30
Vatsal Bucha
0527c56a87 ASoC: Remove excess logs in compress driver
Excess logs are printed in msm_compr_pointer during ADSP SSR.
This causes failure of some interrupts to occur which
results in SSR failure. Logs can be reduced by applying ratelimit.

CRs-Fixed: 2128011
Change-Id: I0d3d82bf52ea307cdf719f97c4907a2d376580c1
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2017-11-16 02:51:31 -08:00
Laxminath Kasam
8b1366a648 Audio: DLKM support for all audio modules
Switch to DLKM for all audio kernel modules.

Change-Id: I6a96023a21f655f873531af9ace81f2b01eb0f58
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-11-02 13:42:09 +05:30
yidongh
98526effb3 asoc: initialize L/R/C gain for both mono/stereo playback
When there's a dynamic channel change from mono to stereo,
volume burst is observed because center channel gain for
stereo is not initialized. Initialize center channel gain
for both mono and stereo playback.

CRs-Fixed: 2095081
Change-Id: I02254b5696a17e2792ea26a2265ab01326f5cf9e
Signed-off-by: Yidong Huang <yidongh@codeaurora.org>
2017-09-10 19:47:23 -07:00
Laxminath Kasam
8f7ccc2e6f audio-lnx: Add latest snapshot for audio drivers.
Propagate the changes based on latest snapshot
for audio kernel source tree at below cutoff of
kernel msm-4.9 -
(040750bfa78 -
 "Revert "ARM: dts: msm: Add DT node for aop-qmp
  clock controller on SDM845 v2"")

CRs-Fixed: 2104096
Change-Id: I0927c40b3a188dbf892e7ec4c1c7810953724929
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-09-04 20:12:56 +05:30
Laxminath Kasam
605b42f92c audio-lnx: Rename folders to new flat structure.
Kernel audio drivers can be categorised into below folders.
asoc - ALSA based drivers,
asoc/codecs - codec drivers,
ipc - APR IPC communication drivers,
dsp - DSP low level drivers/Audio ION/ADSP Loader,
dsp/codecs - Native encoders and decoders,
soc - SoC based drivers(pinctrl/regmap/soundwire)

Restructure drivers to above folder format.
Include directories also follow above format.

Change-Id: I8fa0857baaacd47db126fb5c1f1f5ed7e886dbc0
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-08-18 16:56:12 -06:00