Commit Graph

70 Commits

Author SHA1 Message Date
Sanjana B
02d1c6dc11 asoc:support for DSD on MI2S interface
Add support for DSD in MI2S interface and corresponding api updates
from ADSP.

Change-Id: I494205763fa429f95e43497ed5b8f91332f5a2a3
Signed-off-by: Sanjana B <sanjb@codeaurora.org>
2020-06-09 23:41:10 -07:00
Linux Build Service Account
acc2efac70 Merge "asoc: lahaina: Fix compilation issues when DEBUG_FS is disabled" into audio-drivers.lnx.5.0 2020-04-16 02:09:59 -07:00
Prakruthi Deepak Heragu
6b2d8c3234 asoc: lahaina: Fix compilation issues when DEBUG_FS is disabled
Fix the compilation issues in audio drivers when CONFIG_DEBUG_FS
is disabled.

Change-Id: I6eeb2b36b054ba30431f7b045c182888997dc331
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
2020-04-09 00:29:51 -07:00
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
qctecmdr
3efc2c5808 Merge "dsp: Make error as debug log when CPU buffer not available" 2020-03-25 09:38:23 -07:00
Prasad Kumpatla
e1bb075244 dsp: check ac before access the service id
Check the audio client and apr before retrieving the
service_id and avoid the race condition b/w q6asm_session_free
and get_service_id calls with mutex lock.

Change-Id: I05c5fb872f866c79c909123b595df345da828967
Signed-off-by: Prasad Kumpatla <nkumpat@codeaurora.org>
2020-03-23 20:39:36 -07:00
Aditya Bavanari
3ac8fc2bff dsp: Make error as debug log when CPU buffer not available
When CPU buffer is not available, continuous error
log prints leads to excessive logging. Make the error
as debug log to avoid this.

Change-Id: Ic26006b4975fbe3d5467203d145a517c0067c296
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-03-23 19:52:59 -07:00
qctecmdr
bd95d2fa1c Merge "ASoC: compr: add amrwbplus offload support" 2019-09-04 03:38:00 -07:00
Surendar Karka
b06682d3e5 dsp: increase maximum active streams count
DSP supports maximum fifteen active streams.
Increase active stream count to fifteen.

Change-Id: I1312ece8cc8bf8040b728718edfb9b5c7ad48b33
2019-08-20 00:14:44 -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
06dc54de05 Merge "audio-driver: update to support 32 channels" 2019-07-29 02:36:40 -07:00
qctecmdr
a7352414c3 Merge "audio-kernel: add support to query presentation position from DSP" 2019-07-24 00:47:35 -07:00
Cong Tang
04a6cfa44e audio-driver: update to support 32 channels
update asm/adm/afe drivers to support 32 channels.

Change-Id: Ia231eb6a0fb545569f0f8e1f2442432d761866e9
Signed-off-by: Cong Tang <congt@codeaurora.org>
2019-07-19 14:28:47 -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
Ralf Herz
e0b9234773 dsp: Fix open params for read_compr in IEC61937 mode
The read compressed in IEC61937 mode doesn't unpack data to frames, but
data flow still requires frames_per_buf to be set to nonzero value.

Change-Id: Idb09219c57d7790cb90df62c97baf3ef0e9d8a2f
Signed-off-by: Ralf Herz <rherz@codeaurora.org>
2019-07-02 00:37:18 -07:00
qctecmdr
9ad54a5373 Merge "dsp: Define channel map for 14channels" 2019-06-17 21:01:33 -07:00
qctecmdr
bb8a875619 Merge "dsp: Add asm channel map support for 10channels" 2019-06-17 20:39:57 -07:00
Chaithanya Krishna Bacharaju
3dd8fdf8a5 dsp: Define channel map for 14channels
Define channel map for channel count 14 for adm and asm to
support capture usecases for this configuration.

Change-Id: Ieb43dafd05f88bf34fa512fd7268258163e9ac92
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
2019-06-16 17:30:32 -07:00
Weiyin Jiang
fcf3cc05fb dsp: rtac: use accurate stream id during rtac asm apr call
Hard coded stream id fails rtac call for subsequential gapless stream
which uses stream id other than default value. To get/set rtac for
gapless session successfully, we need to update the stream_id as a part
of asm apr header with correct value populated from asm session table.

Change-Id: If4afd73b4cf11bf91730a58ae6dff03efb04519d
Signed-off-by: Weiyin Jiang <wjiang@codeaurora.org>
2019-06-03 16:11:54 -07:00
Chaithanya Krishna Bacharaju
e2c1904988 dsp: Add asm channel map support for 10channels
Add asm channel map support for 10channels to support
10channel recording usecase.

Change-Id: Ic939eabed893e9e56b17e62bc5100f2d6d51732f
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
2019-05-06 23:09:51 -07:00
qctecmdr
792edd228f Merge "dsp: codecs: Remove error logging during ssr" 2019-04-23 20:42:20 -07:00
Md Mansoor Ahmed
be50237438 dsp: Replace wall clock for KPI calculations
Replace clock reference from wall clock to MONOTONIC.
This is to avoid getting impacted when system time is
set backwards or forwards (either through network or manually).

Change-Id: I98625b033f689002c9334633cf3944608d5a77d3
Signed-off-by: Md Mansoor Ahmed <mansoor@codeaurora.org>
2019-04-15 02:32:04 -07:00
Ramprasad Katkam
7311253f6f dsp: codecs: Remove error logging during ssr
During SSR avoid printing some errors which could lead
to excessive logging.

Change-Id: I5f9e7e5f32bc3de87996838048514e16d59c97a6
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2019-04-15 02:21:15 -07:00
Vignesh Kulothungan
d5f41ba7f4 dsp: Remove redundant payload size check
Due to redundant payload checks, ASM
get param requests in RTAC mode fail with timeout
errors. Fix this by removing the redundant
payload checks.

CRs-Fixed: 2372302
Change-Id: If08ec942f3530e132b5980da579ea1766d21c52b
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2019-04-05 08:09:25 -07: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
e848e37cb2 Merge "dsp: asm: validate ADSP data size before access" 2019-03-14 06:55:35 -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
Vignesh Kulothungan
52b8722a94 dsp: asm: validate ADSP data size before access
Check the size of ADSP payload before accessing it.
Validate buffer index obtained from ADSP token before using it.

CRs-Fixed: 2372302
Change-Id: I3f5e1b6f515935a10a8c59c324452be0a71f9473
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2019-03-12 11:42:59 -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
fba2a8270a dsp: Handle media fmt update events
Handle media format update events from ADSP in case of DSP loopback.

Change-Id: I4004759cc77a05f46106d359417f97f0326af19d
Signed-off-by: Ralf Herz <rherz@codeaurora.org>
2019-03-04 21:22:03 -08:00
Xiaojun Sang
a34ba3f372 dsp: asm: validate payload size before access
Payload size is not checked before payload access. Check size
to avoid out-of-boundary memory access.

Change-Id: Iaa39ee4ea5489bb5579e7b7d5dfada12d88c5809
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2019-02-26 19:12:56 -08:00
Meng Wang
c2acbee602 dsp: update copyright marking for q6afecal-hwdep and q6asm
Copyright year 2018 for q6afecal-hwdep and third party copyright
marking for q6asm are removed during updating file headers.
Add them back.

Change-Id: I0341116ca0cf82be8c3876534b98ad2c376b3531
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-02-12 08:32:44 +08:00
Meng Wang
688a867091 asoc: Update file header to GPL-2.0-only
Update file header to GPL-2.0-only.

Change-Id: If16bf92f951c6d7521f56a3e9b91da2ca2ccf6f8
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-01-29 13:43:33 +08:00
Dhananjay Kumar
defd81b1a5 dsp: 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: Ifedac25de5ae6bad1092b66ec405bba66a80f608
Signed-off-by: Cong Tang <congt@codeaurora.org>
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2019-01-21 20:58:22 -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
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
Dieter Luecking
39b3e3cc9e dsp: Update ASM driver to support 32 ch
ASM supports now up to 32 channels. Extend
the ASM Channel map structures from 8 to 32
channels.

Change-Id: I958d15910785cf0c5707dec432b4dd3e272c3dc1
Signed-off-by: Dieter Luecking <dieterl@codeaurora.org>
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2018-10-04 07:13:39 -07:00
Linux Build Service Account
8903e56097 Merge "ASoC: rate limit for error log" 2018-09-20 11:43:44 -07:00
Xiaojun Sang
c226e86c15 ASoC: rate limit for error log
Use rate limit to reduce redundant log.

Change-Id: I7cd7403c42ddce7915c5ecb82504e6c38bcf0572
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2018-09-19 08:53:45 +08:00
Vignesh Kulothungan
e5159cdc90 dsp: asm: split check condition for NULL and stale
Split the muli-check condition into two separate check conditions.
Suppress the logs for stale condition to debug.

CRs-Fixed: 2307741
Change-Id: I984a2ea7928de052e993e77db807df83109ab423
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2018-09-12 11:23:34 -07:00
Karthikeyan Mani
0c1f938992 dsp: rate limit read/write error logs
Rate limit dsp read/write error logs to reduce log
prints during SSR scenario for read/write failures.

Change-Id: I031be5ebd39bdd11dc8e1eb92c77ed782f1dc149
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2018-08-28 14:32:37 -07:00
Vignesh Kulothungan
61e56a95a3 dsp: asm: initialize variables before use
Initialize flag variables before use in spinlocks.

CRs-Fixed: 2257317
Change-Id: I8b5973c1dfe3c7266a71d4e8ef4d5884b685ae5d
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2018-08-23 09:52:35 -07:00
Linux Build Service Account
6f046cdf21 Merge "ASoC: q6asm: use session lock to avoid use-after-free" 2018-08-08 23:32:14 -07:00
Linux Build Service Account
ed06521452 Merge "asoc: msm: update asm channel map for push pull mode" 2018-08-07 06:18:42 -07:00
Xiaojun Sang
fe99d5b2d1 ASoC: q6asm: use session lock to avoid use-after-free
It is possible that audio session free and param set happens
simultaneously. Audio client might be freed while param set
is doing wait_event_timeout.
Use session lock to make sure client_free happens after param set.

Change-Id: I0947c309c8e445fa2e220680e329d88bd5fe2418
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2018-08-02 17:38:17 +08:00
Surendar Karka
5628e8bc98 asoc: msm: update asm channel map for push pull mode
In noirq push pull mode channel map needs to be set during
ASM open shared io stream. Add support for no irq driver to
set channel map during ASM shared io stream open.

CRs-Fixed: 2267809
Change-Id: Ic1abfe60bb54b6529fbb4cf999e50196befaba46
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
2018-08-02 13:05:05 +05:30
Linux Build Service Account
2cb347bab2 Merge "asoc: qcs405: Add support for AFE SPDIF interfaces" 2018-07-31 09:34:20 -07:00
Mangesh Kunchamwar
2eabdc7309 asoc: dsp: add check for integer overflow
Add check for integer overflow of user
supplied data for ADSP stream command.

CRs-Fixed: 2173850
Change-Id: Idde5665c770398629b1b0cfa2c18d3c023b0f9a2
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2018-07-27 21:32:46 +05:30
Ralf Herz
cc29b9e839 dsp: support for AFE SPDIF input interface
Support two SPDIF input and two SPDIF output interfaces in AFE.
Support 61937 compressed capture.

Change-Id: Ie71434eb53be798567a6240e0f4bf171aee305b8
Signed-off-by: Ralf Herz <rherz@codeaurora.org>
2018-07-25 21:35:33 +05:30
Linux Build Service Account
d36e5ef530 Merge "dsp: Avoid excessive list iterations" 2018-07-09 11:56:34 -07:00