Commit Graph

647 Commits

Author SHA1 Message Date
qctecmdr
fd60ba91e4 Merge "bengal: enable compile of required modules" 2019-10-18 08:20:09 -07:00
Ajit Pandey
9d6160b373 dsp: q6voice: Reset dma_buf pointer to NULL in case of failure
In case of voice_alloc_rtac_mem_map_table() failure no memory get
allocated for rtac but dma_buf pointer might get corrupted and may
point to some unmapped memory region. Since we are only doing NULL
pointer check for dma_buf in method is_rtac_memory_allocated() we
need to reset such pointer to NULL in failure case.

Change-Id: I5e81adad4e302620757375f87fa15344e07dccf8
Signed-off-by: Ajit Pandey <ajitp@codeaurora.org>
2019-10-18 04:48:37 -07:00
qctecmdr
15e89245c3 Merge "dsp: afe: call get params with afe cmd lock held" 2019-10-16 23:46:59 -07:00
qctecmdr
e59a8a66f5 Merge "dsp: lsm: don't print physical address of invalid lsm client pointer" 2019-10-15 00:18:43 -07:00
Meng Wang
a801ad8fd7 dsp: lsm: move lsm_common deregister out of mutex_lock
When dispatch_event in apr and q6lsm_client_free in q6lsm
are running concurrently, there may be deadlock between
session_lock in lsm and svc->m_lock in apr for lsm_common.
Move lsm_common mmap apr deregister out of mutex_lock to
avoid deadlock.

Change-Id: I7c96ba12834bd4a7c8e5ca1b78d798578678b251
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-10-14 20:22:41 -07:00
Laxminath Kasam
00f60bae1e bengal: enable compile of required modules
Update compile of required modules for bengal target.

Change-Id: If4d512b7270cc811a05524caac5292234a0ac437
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-10-12 23:40:48 +05:30
Xiaoyu Ye
56c0d0927d dsp: lsm: don't print physical address of invalid lsm client pointer
Function q6lsm_get_session_id_from_lsm_client will print out the
physical address of a lsm client pointer in error message when it
fails to find the matching lsm client. This is not needed because
the address information is redundant and might cause potential
issue when a lsm client is already invalid.

Change-Id: If8c38b566c839c4b45d98e79802d0fd6efb5bdb9
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2019-10-09 21:57:42 -07:00
Karthikeyan Mani
daf7d7af99 dsp: afe: call get params with afe cmd lock held
If get params is called without afe cmd lock, it
leads to race conditions with other callers calling
afe_apr_send_pkt and the status values read back
are getting overwritten wrongly by the callers that
call without lock.

Change-Id: I5af4d7bbbe01357dd9b6ae8efbe1831401003508
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-10-06 23:06:40 -07:00
Aditya Bavanari
81a54a220e dsp: Reset core hw vote client handle in SSR
Reset core hw vote client handle in SSR use cases
and do not unvote when the client handle is 0.
This is to clean up the client ids in SSR in
order to avoid unusual client deregistrations.

Change-Id: Id0cee50f7ca27e29db6134b7a70ae75334e0d765
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-10-04 01:08:58 -07:00
qctecmdr
46c1ee44b8 Merge "dsp: adsp-loader: Support dynamic size for array priv->adsp_fw_name." 2019-10-03 20:07:55 -07:00
qctecmdr
86eff99707 Merge "dsp: Change condition for cal_data for v_vali_param" 2019-09-27 09:13:08 -07:00
Ajit Pandey
72066d3ab6 dsp: adsp-loader: Support dynamic size for array priv->adsp_fw_name.
Current implementation allocates fixed size for array priv->adsp_fw_name
but this may result in out of bound access if source adsp_fw_name_array
dts property size exceed this fixed size. This patch fixes this issue by
allocating priv->adsp_fw_name array with dynamic size of source array.
Also fixes bytes copied in strlcpy.

Change-Id: Iea031952224672c34eb7245996687985e18ef8be
Signed-off-by: Ajit Pandey <ajitp@codeaurora.org>
2019-09-27 19:56:30 +05:30
Vatsal Bucha
ff83a9e205 dsp: Change condition for cal_data for v_vali_param
V-Validation is not working due to different
size for cal_data and data_size. This is expected as
same callbacks are used for ftm and v validation.
Change condition to ensure data_size is less than
or equal to size of cal_data.

Change-Id: I78b4e6778de9cfa5f95830fc6d48b84e608ba3a5
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-09-24 12:08:31 +05:30
qctecmdr
0ed4827e2f Merge "dsp: adm: use default rate for unsupported sample rates" 2019-09-21 22:14:56 -07:00
Aditya Bavanari
156a57fbb5 dsp: avtimer: Add adsp ready check before accessing avtimer registers
Add adsp ready check before accessing avtimer registers in
order to avoid NOC errors on these registers during SSR/PDR
usecases while querying offset.

Change-Id: I9246302f01906ab35095c76f729ea082b9756cc5
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-09-18 20:46:44 +05:30
Yunfei Zhang
af3faf2ae3 dsp: adm: use default rate for unsupported sample rates
Some ECNS topologies can't support sample rate of 48KHZ,
reset it to 16KHZ for such use cases.

Change-Id: I5d0457feb2e74929546746fd4b184f2d7e065fbb
Signed-off-by: Yunfei Zhang <yunfeiz@codeaurora.org>
2019-09-15 16:07:45 +08:00
qctecmdr
d598f6e9ad Merge "dsp: lsm: add apr NULL check in apr deregister" 2019-09-14 20:55:34 -07:00
qctecmdr
6f39bea44a Merge "dsp: lsm: check for mem_map_handle" 2019-09-12 03:57:02 -07:00
qctecmdr
8b6fa0c4b7 Merge "dsp: avtimer: validate payload size before memory copy" 2019-09-11 08:45:25 -07:00
Meng Wang
c893cd2e0d dsp: lsm: add apr NULL check in apr deregister
During SSR, q6lsm_mmapcallback could happen before
q6lsm_mmap_apr_dereg. q6lsm_common.apr and
q6lsm_common.apr_users are cleared in q6lsm_mmapcallback.
Add apr NULL check in q6lsm_mmap_apr_dereg before accessing
q6lsm_common.apr_users.

Change-Id: Ia0ff57b3fff0a0e4f26b836a8a15324406af1a14
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-09-09 09:27:45 +08:00
qctecmdr
a1cacab61b Merge "dsp: lsm: adjust mutex_lock to avoid deadlock" 2019-09-06 10:54:21 -07:00
qctecmdr
bd95d2fa1c Merge "ASoC: compr: add amrwbplus offload support" 2019-09-04 03:38:00 -07:00
qctecmdr
51603b4bf0 Merge "dsp: Add support for META MI2S ports" 2019-09-04 03:12:28 -07:00
Meng Wang
fae3404de2 dsp: lsm: check for mem_map_handle
Sometimes adsp may fail to allocate memory for SVA calibration
data and add check if mem_map_handle is assigned with valid
non-zero handle to avoid panic.

Change-Id: Icad722edc52906e63d581aafa02b42b8518ebca6
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-09-04 08:13:18 +08:00
Meng Wang
818d4e9b7f dsp: lsm: adjust mutex_lock to avoid deadlock
When dispatch_event in apr and q6lsm_client_free in q6lsm
are running concurrently, there may be deadlock between
session_lock in lsm and svc->m_lock in apr. Adjust session_lock
in q6lsm_client_free to avoid deadlock.

Change-Id: I26eb788d4c17af78272dd1f717717e865dfbd0ac
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-08-30 15:44:49 +08:00
Ajit Pandey
2e285bf25d dsp: avtimer: validate payload size before memory copy
Check payload size to avoid out-of-boundary memory
access before attemptimg memory read.

Change-Id: I94723b526449aacfe7b2fe30990fb77cdd15c5da
Signed-off-by: Ajit Pandey <ajitp@codeaurora.org>
2019-08-26 16:10:20 +05:30
qctecmdr
a8878c531d Merge "audio-kernel: Update Kbuild support for bengal" 2019-08-25 03:13:29 -07:00
Ralf Herz
43c0abd0c0 dsp: Add support for META MI2S ports
QCS405 can group data lines of several MI2S interfaces.
This feature is used with new META MI2S ports.

Change-Id: I0d8c2de742e04d7348e40e1026b1640c3f987479
Signed-off-by: Ralf Herz <rherz@codeaurora.org>
2019-08-23 20:12:48 +02: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
qctecmdr
0dc1d1134f Merge "ASoC: Preliminary Android target definition for sdmshrike" 2019-08-11 03:16:10 -07:00
qctecmdr
5467317e15 Merge "dsp: q6afe: add tws mono switch for aptx adaptive encoder" 2019-08-11 03:14:55 -07:00
Zhou Song
450ee1b712 dsp: q6afe: add tws mono switch for aptx adaptive encoder
Add support to switch tws channel mode for aptx adaptive
encoder.

Change-Id: Ife4170be56b152d34758a1cfd20fa4ec203742db
Signed-off-by: Zhou Song <zhous@codeaurora.org>
2019-08-06 10:17:23 +08: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
Vijayakumar Badiger
30a1c046b4 ASoC: Preliminary Android target definition for sdmshrike
Add target definition support for sdmshrike.

Change-Id: Ic87588d7aa9e14d2893bc1d6172cb35c34f6ede2
Signed-off-by: Derek Chen <chenche@codeaurora.org>
2019-08-02 17:02:18 -07:00
qctecmdr
5dcf7dd485 Merge "ASoC: msm: update makefiles for auto platform support" 2019-08-02 07:11:19 -07:00
qctecmdr
3f29588ad6 Merge "ASoC: msm: Add audio support for sdmshrike on auto platform" 2019-08-02 07:06:59 -07:00
Laxminath Kasam
fdda2d8146 audio-kernel: Update Kbuild support for bengal
Update config file to pick for bengal in Kbuild files.

Change-Id: Ic86e22204bbc16ca751eceb0391e38b4a60ac8b5
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-07-31 21:26:30 +05:30
qctecmdr
ab5f8de9bc Merge "dsp: adsp-loader: load adsp based on nvmem idx" 2019-07-29 03:32:57 -07:00
qctecmdr
237662b0a1 Merge "audio-driver: Update build files for sa6155" 2019-07-29 02:50:05 -07:00
qctecmdr
06dc54de05 Merge "audio-driver: update to support 32 channels" 2019-07-29 02:36:40 -07:00
qctecmdr
ce22ebd4f8 Merge "dsp: adm: Obtain path type from session type" 2019-07-29 02:22:57 -07:00
P.V. Phani Kumar
55a4312929 Initial target enablement changes for bengal.
Change-Id: I7296e39fcedd9ecec5bb788ac3706b297ac8d6d7
2019-07-24 23:19:33 -07:00
qctecmdr
e360832ef6 Merge "dsp: Revert featurization of 32 channel support in DSP" 2019-07-24 03:01:07 -07:00
qctecmdr
a7352414c3 Merge "audio-kernel: add support to query presentation position from DSP" 2019-07-24 00:47:35 -07:00
qctecmdr
8ee45b38bd Merge "dsp: Reset ec ref port id after use" 2019-07-24 00:42:29 -07:00
Aditya Bavanari
380e08eeac dsp: adsp-loader: load adsp based on nvmem idx
Load different adsp images based on nvmem property
of sku variants. Read fw image name mapped to
nvmem property's value and load it based on sku
variant.

Change-Id: I99ffe171ec8c42c0ee9e148f171c557353d72910
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-07-24 11:44:18 +05:30
Chaithanya Krishna Bacharaju
6bd4088d76 dsp: adm: Obtain path type from session type
In programable channel mixer, path type is derived based on
afe port id. Due to this, wrong path type is obtained in case
of loopback usecase where Rx port is used to capture ec ref
signals. This leads to wrong channel map being set in channel
mixer. Instead use session type to obtain path type.

Change-Id: I5292ed5eed1366ac28d72e4ca0815ab62e91fa60
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
2019-07-21 20:03:01 -07:00
Derek Chen
e780bb9ce6 ASoC: msm: update makefiles for auto platform support
Update makefiles to use TARGET_BOARD_AUTO instead
of TARGET_PRODUCT for automotive platform support.

Change-Id: Ic688e8b13ba9c4b6f100c1acec50940053895d3d
Signed-off-by: Derek Chen <chenche@codeaurora.org>
2019-07-20 19:27:19 -07:00
Derek Chen
583e3bf1c6 ASoC: msm: Add audio support for sdmshrike on auto platform
Add audio support for sdmshrike on automotive platform.

Change-Id: I39c70fd7ed66124827f55b7a6e0a834cf735d301
Signed-off-by: Derek Chen <chenche@codeaurora.org>
2019-07-20 19:27:05 -07:00
King Tam
4f4ebc9228 dsp: ion_vm: adapt to new interfaces
Add new interfaces stub functions for Dolby security change,
since ion_vm share the same header file with ion.

Change-Id: Iaac5931a9c97eafe1a8cc5980ac70b9a62288faa
Signed-off-by: King Tam <kingt@codeaurora.org>
2019-07-20 13:04:01 -07:00
qctecmdr
0965ec588f Merge "dsp: sleep before sending q6core ready query" 2019-07-20 00:27:03 -07:00
qctecmdr
f9797396bd Merge "dsp: voice: Add support for CVD version 2.4" 2019-07-20 00:19:29 -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
Rahul Sharma
f53de7f9fb audio-driver: Update build files for sa6155
Enable conditional build for audio driver modules
specific to sa6155.

Change-Id: I58701a907242afcfe230623ff42b47c001e3d5f4
Signed-off-by: Rahul Sharma <rahsha@codeaurora.org>
2019-07-19 12:31:25 -07:00
qctecmdr
fa9e9c3ac9 Merge "ASoC: enable dynamic FFECNS effect control" 2019-07-17 05:37:36 -07:00
Aditya Bavanari
dc3f7e4680 dsp: voice: Add support for CVD version 2.4
CVD version update is needed to support a new modem
feature. Add support for CVD version 2.4 in internal version
mapping table.

Change-Id: I26627e3c88b424acca8f85696dd58d7ce2e944d9
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-07-11 18:31:59 -07:00
qctecmdr
5a08ced93b Merge "dsp: Remove param_size from pkt_size of apr header" 2019-07-10 04:45:19 -07:00
Chaithanya Krishna Bacharaju
757f0d29a2 dsp: Reset ec ref port id after use
Reset ec ref port id to invalid port after use to ensure
it is not picked for other adm sessions.

Change-Id: I802326122ad6dc63c7f2df16169da3f50559202f
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
2019-07-09 21:44:29 -07:00
Laxminath Kasam
5478daae29 dsp: sleep before sending q6core ready query
After PDR, audio avs services still are initializing state.
Avoid sending q6core command after PD up event immediately,
wait for sometime before sending the q6core ready command.

Change-Id: Ibee38db9ee1a30b7852da3d08cac7b0d06371733
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-07-09 03:58:11 -07:00
Xiaojun Sang
dc9e8c2006 ASoC: enable dynamic FFECNS effect control
Add interface for userspace to control FFECNS effect.

Change-Id: I78010899e6c193726a79d74e86f13a1546106eff
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2019-07-09 15:43:04 +08:00
Dieter Luecking
9fb7c8c43e dsp: Revert featurization of 32 channel support in DSP
Remove the dependency on dedicated config flag for the
use of new API versions in ASM and ADM open commands.
Dependency is now on ADSP service version only.

Change-Id: I2e7bcec675bafb9ad9e2a10df4ccc1e52bb72c92
Signed-off-by: Dieter Luecking <dieterl@codeaurora.org>
2019-07-09 08:41:04 +02:00
qctecmdr
af5bd75cc6 Merge "dsp: Fix open params for read_compr in IEC61937 mode" 2019-07-06 08:46:51 -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
qctecmdr
1534fa3eea Merge "dsp: ion: unmap DMA buffer after kernel ion map failure" 2019-07-04 05:58:39 -07:00
qctecmdr
95514749d7 Merge "audio-driver: Update build files for auto LA-GVM" 2019-07-04 05:56:46 -07:00
qctecmdr
4de5775619 Merge "dsp: Add size check for afe set and get functions" 2019-07-04 05:49:21 -07:00
Aditya Bavanari
b778846e50 dsp: Remove param_size from pkt_size of apr header
As param_size is included in apr header pkt_size, out of
bounds access occurs in glink. Remove the param size addition
to fix this issue.

CRs-Fixed: 2472208
Change-Id: If8b34aeacd3bc9ba67ac9276eb1a8ebf0933f9f9
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-07-02 20:10:34 +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
Xiaojun Sang
ab07f12b3a dsp: ion: unmap DMA buffer after kernel ion map failure
DMA buffer does not unmap after kernel ion map failure. It leads
to unexpected vaddr and memory leak.

Change-Id: I363dd9178a0bcbca601180bfd0a7bd7ef2430d3e
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2019-07-01 14:14:37 +08:00
qctecmdr
87802a6f2d Merge "audio-driver: dsp: Adapt to non sys heap support for GVM" 2019-06-28 22:55:28 -07:00
Aditya Bavanari
3c259b5e62 dsp: Add size check for afe set and get functions
In afe_get_cal_sp_th_vi_param and afe_set_cal_sp_th_vi_cfg
functions, data size check is not present which might lead to
out of bounds access. Add size checks to fix the same.

Change-Id: I99eca6065e6f5a050527f1bfce2bfcba28123b53
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-06-26 11:01:38 +05:30
Timothy Sham
4a6979f60e audio-driver: Update build files for auto LA-GVM
enable conditional build for audio driver modules for
automotive LA GVM.

Change-Id: I058f3e6ca557f8ca6d02e33e80f6c190b1a2a29e
Signed-off-by: Timothy Sham <tsham@codeaurora.org>
2019-06-25 13:11:38 -07:00
Timothy Sham
5f0a52cccd audio-driver: dsp: Adapt to non sys heap support for GVM
Adapt to non sys heap support for SMMU FE driver on GVM of
automotive.

Change-Id: I67f5ca511cea1a7a5c1615868b5b2d74e6b22dac
Signed-off-by: Timothy Sham <tsham@codeaurora.org>
2019-06-20 14:24:41 -07:00
Cong Tang
1fa4e0449c audio-driver: Update build files for LA automotive
enable conditional build for audio driver modules for LA
automotive.

Change-Id: Ifb18ea6f8af531a99e29904c2245424657b42df7
Signed-off-by: Cong Tang <congt@codeaurora.org>
2019-06-20 13:50:31 -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
qctecmdr
cbadda916f Merge "dsp: add senary MI2S and TDM port IDs" 2019-05-21 20:36:44 -07:00
qctecmdr
34b7d3b2fd Merge "ASoC: hide bind/unbind in sysfs" 2019-05-21 20:33:23 -07:00
qctecmdr
a6b16919e9 Merge "dsp: add audio ion virtualization support" 2019-05-18 03:08:36 -07:00
qctecmdr
4a0cf5086c Merge "asoc: Ratelimit error logs" 2019-05-18 03:03:10 -07:00
qctecmdr
f78ad1d9ee Merge "asoc: update missed file header to SPDX" 2019-05-18 02:59:44 -07:00
qctecmdr
805c422306 Merge "asoc: msm-lsm-client: add support for shared buffer DAM module" 2019-05-18 02:57:52 -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
Ramprasad Katkam
14efed6eb7 asoc: Ratelimit error logs
Ratelimit error logs to avoid excessive logging during
ssr/pdr.

Change-Id: Icdc9823cef5b070ed70cdd002bb3cd00d482a869
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2019-05-14 17:42:22 +08:00
Meng Wang
d74f72b86d asoc: update missed file header to SPDX
update missed file header to SPDX.

Change-Id: I694c45965473d00d5a577df1cd2074becbc51372
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-05-14 01:02:43 -07:00
Timothy Sham
49cbca051c dsp: add audio ion virtualization support
Add support for virtualized ION frontend driver for audio.
Virtualized ION driver currently is designed to extract
physical memory through hypervisor abstracted ion layer,
which can be shared between APPS and ADSP directly.

Change-Id: I3c664ec3c3a99ce092da6ee103a3b2de4073664f
Signed-off-by: Timothy Sham <tsham@codeaurora.org>
2019-05-13 23:46:55 -07:00
Linux Build Service Account
586382a701 Merge "Revert "Revert "dsp: voice_mhi: use modified mhi sync/put api""" into audio-drivers.lnx.4.0 2019-05-13 14:37:12 -07:00
Xiaoyu Ye
845b66f42a asoc: msm-lsm-client: add support for shared buffer DAM module
A new module called DAM is introduced to achieve common shared
memory for SVA use cases in LPI. Add new mixer control interface
to provide support for STHAL to configure the data that LSM gets
from AFE to be either processed or unprocessed.

Change-Id: I8556413257c6a2aee4739bcd89ffd130805af0c5
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2019-05-10 09:42:27 -07:00
qctecmdr
d12578a0ab Merge "asoc: send VAD enable or disable" 2019-05-07 22:35:09 -07:00
qctecmdr
a76475b412 Merge "dsp: add incall stereo capture" 2019-05-07 22:35:09 -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
Karthikeyan Mani
3bbd2ee907 dsp: add senary MI2S and TDM port IDs
Add MI2S/TDM AFE senary port IDs for Kona target.

Change-Id: I8dafa4516c31040aad0bca30cfdc9acbdf460bf1
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-05-06 11:19:29 -07:00
Dhananjay Kumar
3d61b368d7 dsp: adm: add check for mfc channel count
Add check for mfc channel count before issuing mfc
media format command.

Change-Id: I0541d6651ecfcc90562ec0d9a632d039e34658cf
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2019-05-05 23:12:11 +05:30
Bruce Levy
cf0c734e84 Revert "Revert "dsp: voice_mhi: use modified mhi sync/put api""
This reverts commit 952f3d7864.

This revert of a revert is needed for supporting PCIE changes.

Change-Id: Ib12e4114355b15c52225ff000ed59fb1889aab4d
2019-05-02 11:58:04 -07:00
qctecmdr
06eacac35e Merge "dsp: adm: Add support for port specific channel map" 2019-05-01 04:59:33 -07:00
qctecmdr
968764e0ce Merge "makefile: kona: remove make export <all variables> instances" 2019-05-01 04:56:32 -07:00
qctecmdr
1ae80f7aa4 Merge "dsp: Fix payload mismatch issue in AFE clock setting" 2019-04-30 10:57:39 -07:00
Rohit kumar
2054b690a9 dsp: adm: Add support for port specific channel map
Add multi channel map support per afe port.

Change-Id: Ib032d1c81d918417f516131f11c500e4f6668b39
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-04-30 02:14:23 -07:00
Arun Mirpuri
eb1d6887b1 dsp: add incall stereo capture
Add support for incall stereo capture for voice uplink
and downlink capture

Change-Id: Id23448990170b8215f547073608cd6a998d479ae
Signed-off-by: Arun Mirpuri <amirpuri@codeaurora.org>
2019-04-29 10:38:53 -07:00
David Ng
4025a25a24 makefile: kona: remove make export <all variables> instances
Replace all kernel make export <all variables> instances with
export of specific variables.  Depending on existing build
environment, exporting all as environment variables and
interaction with existing environment variable expansions
can lead to undefined behavior.

TODO:  This change is restricted to kona flow to narrow impact.
All remaining export <all variables> need to be evaluated and
fixed similarly via subsequent changes.

Change-Id: I9114b88f7511d1b3f9b496b76fb6da9db97772b8
Signed-off-by: David Ng <dave@codeaurora.org>
2019-04-26 23:44:02 -07:00
qctecmdr
c38cf58d38 Merge "asoc: dsp: add support for aptx adaptive speech" 2019-04-25 06:48:14 -07:00
qctecmdr
66ae68b936 Merge "Audio: Add lito target for audio-kernel" 2019-04-25 06:46:40 -07:00
Aditya Bavanari
23513e0973 dsp: Fix payload mismatch issue in AFE clock setting
IID support is set from user space during boot up
which can come in parallel with AFE set clock requests
due to which param payload is set in difference with
the actual set param command as per instance id support.

Change-Id: I07e45fda0943cac814f25c16da930dfae5d209a6
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-04-25 09:36:36 +08:00
Banajit Goswami
952f3d7864 Revert "dsp: voice_mhi: use modified mhi sync/put api"
This reverts commit 40c749da4c.
This change needs a corresponding change in msm-4.19 which is
not yet ready. Revert this change for now, until the dependency
change is ready to be merged.

Change-Id: I7ac030b03c01500e6061dbc6e5b4ad13385a0109
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2019-04-23 23:57:39 -07:00
qctecmdr
a29c486ff9 Merge "dsp: remove float operations in excursion calculation" 2019-04-23 20:44:59 -07:00
qctecmdr
792edd228f Merge "dsp: codecs: Remove error logging during ssr" 2019-04-23 20:42:20 -07:00
qctecmdr
7bf19b93d3 Merge "dsp: update error handling for Doa Tracking Monitor" 2019-04-23 20:41:27 -07:00
qctecmdr
b107524390 Merge "dsp: Replace wall clock for KPI calculations" 2019-04-23 20:39:30 -07:00
qctecmdr
a93b03aa39 Merge "audio-driver: support tdm multi lane for sa8155" 2019-04-23 20:38:29 -07:00
Zhou Song
caa541d688 asoc: dsp: add support for aptx adaptive speech
Add support for speech codec which is similar to a2dp aptx adaptive.

Change-Id: Ibfbcf086f009fdb561e26aaf92cefc92f1bd16ca
Signed-off-by: Zhou Song <zhous@codeaurora.org>
2019-04-22 14:43:00 +08:00
Vatsal Bucha
d284ff1e0c Audio: Add lito target for audio-kernel
Add lito target for audio-kernel modules.

Change-Id: Ic8b43df74504950e4baad9701abeddcf8f30b420
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-04-19 11:14:56 -07:00
Vikram Panduranga
40c749da4c dsp: voice_mhi: use modified mhi sync/put api
MHI APIs have been updated to support LPM. Move to
newer API to make use of device LPM.

Change-Id: I53bd3dff1b66d064091f21eb5f2a36ee77f965ed
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
2019-04-19 08:05:49 -07:00
qctecmdr
1476aaa163 Merge "dsp: q6usm: Release spinlock before return if invalid payload size" 2019-04-16 08:00:22 -07:00
qctecmdr
a077609404 Merge "lsm: check payload size validity before using it as array index" 2019-04-16 07:59:20 -07:00
pavanc
8a81c4a868 dsp: lsm: Initialize lock and condition before apr_register
While allocating lsm client, lock and conditions are initialized
after registering session with APR. There is a possibility of
accessing uninitialized condition from q6lsm_callback when SSR
is triggerred after the port specific apr is registered.

Initialized lock, condition and state before registering session
with APR to avoid invalid access.

CRs-Fixed: 2230065
Change-Id: I48b6eb7670863c45b0539155592ea0b0a3c1bffc
Signed-off-by: pavanc <pavanc@codeaurora.org>
2019-04-15 02:53:09 -07:00
Mangesh Kunchamwar
27baab0fb9 asoc: send VAD enable or disable
Updates to send VAD enable or disable to AFE port.
Send VAD and island configuration based on the ports
on which these features are supported in Vipertooth
machine.

Change-Id: Ib3e6d46fed3bf9e822f350c9ec0dc629cd82547e
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2019-04-15 02:51:36 -07:00
Cong Tang
b84eea3768 audio-driver: support tdm multi lane for sa8155
Support group tdm multi lane configuration for TDM interface.
With valid lane mask tdm interface support delivery audio channels
through different data lines.

Change-Id: I63e8ba1106b89c6bcaca0a8359a1def696c334ad
Signed-off-by: Cong Tang <congt@codeaurora.org>
2019-04-15 02:42:21 -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
Surendar Karka
7bc942b640 dsp: update error handling for Doa Tracking Monitor
AFE callback payload response for param id FFV_DOA_TRACKING_MONITOR
is not handled properly. This is resulting in 2sec
of wait event timeout delay. Updating the state event and
status event based on the payload response. This decreases
hal load time by 2sec.

Change-Id: If960ee14e264b3fe444463b47878d29aaee5e63f
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
2019-04-15 02:30:15 -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
Laxminath Kasam
366670efa7 dsp: remove float operations in excursion calculation
Avoid float operation during excursion calculation
since that impacts CPU performance. Maintain the
same precision for 2 digit as per requirement
for final value to print in sys/class node.

Change-Id: I34d0f2e7b9eca499206ee9d30acf0d9121b0442e
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-04-15 02:06:18 -07:00
qctecmdr
f082bd8110 Merge "dsp: afe: check for payload size before payload access" 2019-04-14 23:13:54 -07:00
Kunlei Zhang
16e535969b lsm: check payload size validity before using it as array index
Payload size validity is not checked before using it in array index.
Check payload size to avoid out-of-boundary memory.

Change-Id: Ic0b06bb331fc1753ff7543bb218ab12d6a4a3ca8
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
2019-04-14 20:21:24 -07:00
qctecmdr
d14c2dc368 Merge "dsp: q6core: validate payload size before memory copy" 2019-04-10 22:29:30 -07:00
Karthikeyan Mani
3325ee5475 dsp: afe: check for payload size before payload access
Check if payload data is big enough before accessing
the data in it.

Change-Id: I939f205a8cebf6ef4859f81fae5429bca013d540
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-04-10 16:52:45 -07:00
qctecmdr
af254eca64 Merge "dsp: adm: modify adm callback payload size checks" 2019-04-10 14:06:10 -07:00
qctecmdr
54d99a5cee Merge "dsp: Remove redundant payload size check" 2019-04-05 09:39:55 -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
Vikram Panduranga
7e2eb2118a dsp: voice_mhi: initialize pointer to NULL
Initialize pointer to NULL to avoid any access
to uninitialized value in case of a failure.

Change-Id: I81ecb76a30b481f57fd62448e954c227ffbc421f
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
2019-04-05 08:09:18 -07:00
Vignesh Kulothungan
4965b8d670 dsp: adm: modify adm callback payload size checks
Validate payload size before accessing data from ADSP.
Modify payload size checks to accommodate for variable
payloads, payload size vary from size of one integer to
many based on opcode and other variables.

CRs-Fixed: 2380694
Change-Id: Ic5e0eb72441da8f29cf645968c9df09e7803701a
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2019-04-04 11:35:25 -07:00
kunleiz
d77def6c1f dsp: q6core: validate payload size before memory copy
Payload size is not checked before memory copy.
Check payload size to avoid out-of-boundary memory
access.

Change-Id: I07857564d4e8ce415df3810b25f0e9e17a60993d
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
2019-04-03 19:52:15 -07:00
Vatsal Bucha
038cb2d3d8 dsp: q6usm: Release spinlock before return if invalid payload size
Release spinlock in EVENT_READ_DONE before return
if payload size is invalid.

Change-Id: I0fe4f841ce73ecfc30fe70334e203443e5e2cb28
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-04-02 15:29:54 +05:30
Karthikeyan Mani
5670cbd6e3 dsp: afe: get apr handle before sending apr pkt
Make sure to get apr handle before sending a packet
so that it does not end up with no handle to send
the apr packet.

Change-Id: Iaaebee3ddc6c83896e4cb9dc8149d310fc7d67f1
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-03-25 17:45:17 -07:00
Laxminath Kasam
36384ecca2 dsp: get excursion logging at afe close for wsa and log data
Trigger xt logging getparam at every playback close
and store data. When app queries sys/class node, return
stored values and reset to 0 for some params as per
app requirement.

Change-Id: Ice1a3e9a7e03062390f1c36184a971635e55d450
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-03-20 00:07:28 -07:00
Linux Build Service Account
256a85678f Merge "dsp: afe: Implement get param for excursion logging parameters" 2019-03-18 20:29:30 -07:00
Aditya Bavanari
740b4839cb dsp: afe: Implement get param for excursion logging parameters
Implement get param for AFE_PARAM_ID_SP_RX_TMAX_XMAX_LOGGING
in order to get excursion params from DSP.

Change-Id: I5129938c51c6f6ede9d4703d13be60d04d26f5e3
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-03-15 15:56:01 +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
e848e37cb2 Merge "dsp: asm: validate ADSP data size before access" 2019-03-14 06:55:35 -07:00
Linux Build Service Account
fb966ab3ae Merge "dsp: q6voice: Check size of payload before access" 2019-03-14 06:55:27 -07:00
Linux Build Service Account
ba543e1f8f Merge "dsp: q6voice: Check size of payload before access" 2019-03-14 06:55:22 -07:00
Linux Build Service Account
ae8bc1e1f2 Merge "dsp: q6voice: Check size of shared memory buffer before access" 2019-03-14 06:55:16 -07:00
Linux Build Service Account
59342f5264 Merge "asoc: avoid excessive logging" 2019-03-14 06:55:13 -07:00
Laxminath Kasam
2e13d95506 dsp: q6afe: Add v-validation support for speaker
With speaker protection in v-validation mode, speaker
samples can be tested in early factory mode. Add
support for v-validation feature from driver.

Change-Id: I92493d6d2784cf4dd58021746bffe01180f89d23
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-03-13 19:53:30 -07:00
Linux Build Service Account
7994527b64 Merge "dsp: add support to configure MFC in ec ref path" 2019-03-13 13:13:45 -07:00
Linux Build Service Account
8fd4a210ab Merge "msm: vote for LPASS core while access LPASS registers" 2019-03-13 03:33:04 -07:00
Vatsal Bucha
0714ffdfcb dsp: q6voice: Check size of shared memory buffer before access
Check buffer size in qdsp_cvs_callback before access in
ul_pkt.

Change-Id: Ic19994b46086709231656ec747d2df988b7a512f
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-03-12 22:42:21 -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
Tanya Dixit
be0391da6c dsp: q6voice: Check size of payload before access
Check size of payload array before access in qdsp_cvp_callback.

Change-Id: Ic5ea6686a1a09df75ddd5e6fdcdfbd74efff83d8
Signed-off-by: Tanya Dixit <tdixit@codeaurora.org>
2019-03-12 22:22:02 -07:00
Tanya Dixit
d591f497ce dsp: q6voice: Check size of payload before access
Check size of payload array before access in qdsp_mvm_callback.

Change-Id: I81d945f963cfb4a3cb26155700b82880d891ec5e
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-03-12 22:15:55 -07:00
Dhananjay Kumar
4303439281 dsp: add support to configure MFC in ec ref path
Add support to process ec at channel count other than the
playback channel count by providing ability to set downmixed
channel count and downmixing weights to be used to downmix
ec ref data obtained from playback path.
These configs would be used to explicitly configure MFC module
present in ec ref path, for usecases where ec processing cannot
be done at playback channel count due to algorithmic or resource
limitations.

Change-Id: Iaa80a0f0da3697c55751b2201578252d6466d3b5
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2019-03-12 22:04:58 -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
Linux Build Service Account
c38af66a58 Merge "dsp: codecs: fix range check for audio buffer copying" 2019-03-06 02:55:37 -08:00
Mangesh Kunchamwar
cdd68dbe72 msm: vote for LPASS core while access LPASS registers
When ADSP is in power collapse or island state, it would fail
to access LPASS codec register.Vote for LPASS core to avoid
LPASS power collapse with pmruntime approach while accessing
LPASS registers & TLMM.

Change-Id: I74d037e499fb6f1245b9a1bd1b0a77200608c27b
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2019-03-06 08:50:31 +08: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
Ralf Herz
fb81b6e796 dsp: 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: I06f7de932dec4d30b2d6cfe04460d07ddad89049
Signed-off-by: Ralf Herz <rherz@codeaurora.org>
2019-03-04 21:21:01 -08:00
Linux Build Service Account
34b11a32b1 Merge "adm: undo echo reference rx value reset after open" 2019-03-04 11:44:13 -08:00
Linux Build Service Account
c76093dd87 Merge "dsp: q6usm: Check size of payload before access" 2019-03-04 11:44:10 -08:00
Linux Build Service Account
b227c31c2b Merge "dsp: asm: validate payload size before access" 2019-03-04 11:44:09 -08:00
Linux Build Service Account
ddb358dfd7 Merge "dsp: adm: validate ADSP payload size before access" 2019-03-04 11:44:06 -08:00
Xiaojun Sang
f2f68463a7 adm: undo echo reference rx value reset after open
echo reference value reset after open leads to second SVA session
without echo. Undo the value reset.

Change-Id: Ie6ae357108beed0c8f034a3408c494475376e486
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2019-02-28 17:11:20 +08:00
Linux Build Service Account
16470427d0 Merge "asoc: Add support for Aptx Adaptive decoder" 2019-02-27 01:15:33 -08:00
Linux Build Service Account
b24eed47e3 Merge "audio-kernel: dsp: Add needed exports" 2019-02-27 01:15:32 -08:00
Linux Build Service Account
8c40496013 Merge "dsp: adm: change sample rate for FLUENCE_EF module" 2019-02-26 19:38:40 -08:00
Linux Build Service Account
d7b38e7a01 Merge "codecs: reduce error log rate" 2019-02-26 19:38:37 -08:00
Linux Build Service Account
c496cb0f6d Merge "dsp: validate token before usage as array index" 2019-02-26 19:38:36 -08:00
Vatsal Bucha
def212b841 dsp: q6usm: Check size of payload before access
Check size of payload array before access in q6usm_callback.

Change-Id: Id0c85209a053f9dfdb53133aeb6b2510ecf18eb8
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-02-27 11:22:02 +08:00
Vatsal Bucha
1c8aec0cfd dsp: q6usm: Check size of payload before access
Check size of payload before access in q6usm_mmapcallback.

Change-Id: Iff0672532c2ea40e7129237a92d8365d6b554cf2
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-02-27 11:19:38 +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
Vignesh Kulothungan
3552462ec5 dsp: adm: validate ADSP payload size before access
Check the size of ADSP payload before accessing it.

CRs-Fixed: 2380694
Change-Id: Ib0c0f0bf6c7f7cf659df0eb70a3f66cee580cb66
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2019-02-26 19:05:27 -08:00
Xiaoyu Ye
6c0100f281 dsp: codecs: fix range check for audio buffer copying
The range checking for audio buffer copying in function
"audio_in_write" is using the incorrect buffer size.
Change it to the actual allocated audio buffer size.

Change-Id: Icb9a9e9c3b3d3c6e55e7bad20b34f94784b82674
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2019-02-26 10:26:04 -08:00
Xiaojun Sang
cf353edbf2 dsp: validate token before usage as array index
Token from DSP  might be invalid for array index. Validate the token
before being used as array index.

Change-Id: I9f47e1328d75d9f9acf7e85ddb452019b6eced0a
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2019-02-21 16:44:51 +08:00
Chaithanya Krishna Bacharaju
4a466532e4 dsp: Add support for Aptx Adaptive decoder
Add support for Aptx Adaptive decoder. Introduce flag
to indicate ABR feedback decoder configuration to
differentiate from regular decoder configuration.

Change-Id: I272e0a9572a56e878f7ad1385514b3be7010145a
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
2019-02-20 19:05:55 +08:00
Josh Kirsch
2253309313 audio-kernel: dsp: Add needed exports
Add needed exports in q6afe. These are
needed for sdxprairie drivers where LPASS
provides the clock.

Change-Id: Icd8256153523c8827ffd65eda1152ef9ad355119
Signed-off-by: Josh Kirsch <jkirsch@codeaurora.org>
2019-02-20 19:02:33 +08:00
kunleiz
1529b55bb8 dsp: adm: change sample rate for FLUENCE_EF module
FLUENCE_EF module in COPreP topology doesn't support
44.1Khz sample rate. Set sample rate to 16Khz for
VPM_TX_DM_FLUENCE_EF_COPP_TOPOLOGY, which contains
FLUENCE_EF module.

Change-Id: I527da1a70cacba1014b2a706216172d12066b909
Signed-off-by: kunleiz <kunleiz@codeaurora.org>
2019-02-20 02:59:09 -08:00
Chaithanya Krishna Bacharaju
8b0abba9d7 dsp: Check ec ref rx port against AFE_PORT_INVALID
ec ref rx port is defined as integer and it is
set to 0xFFFF (AFE_PORT_INVALID) when ec controls are reset.
Due to this the current check against -1 (0xFFFFFFFF) in
adm open will always return true even after controls are reset.
This leads to adm open failures in case no ec ref channels are
set as part of record usecase. Avoid this by checking ec ref rx
port against AFE_PORT_INVALID.

Change-Id: I0d52bbe2a980d495933239315e6bba193a18567e
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
2019-02-20 16:51:01 +08:00
Xiaojun Sang
72cea1a23c codecs: reduce error log rate
Huge volume of log prints out at error. Reduce the redundant log.

Change-Id: I761d5953614d039b7a725926c38adee1beeeec41
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2019-02-18 17:37:38 +08:00
Vikram Panduranga
0a7307c180 dsp: voice_mhi: reset vote count at modem restart
MHI devote is not required when modem restarts during
a voice call, which results in PCIe down notification.
Hence, vote count is reset to zero when modem restart
is received.

Change-Id: Ia2a7bb98f21d5130520489c8f2d20a04d41f03b4
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
2019-02-13 18:01:42 -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
Vikram Panduranga
51f7fa7f56 dsp: voice_mhi: fix memory size before mapping
Mailbox memory was mapped with incorrect memory size.
Adding a fix to use the actual size while mapping.

Change-Id: If9a478ca044f68bed8e0899dfb023545585272f2
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
2019-01-30 23:45:47 -08:00
Vikram Panduranga
7dbdc9aa69 dsp: q6voice: call voice MHI start/end APIs
Whenever a voice call starts or ends q6voice shall call
voice_MHI API to enable or disable MHI voting respectively.

Change-Id: Ia1125fb96c67ff6fec2242bc2b482ef7017dfb7d
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
2019-01-30 23:43:02 -08:00
Vikram Panduranga
e2db205a11 dsp: add voice MHI driver
Add voice MHI driver to support the following features -
1. Allocate and map mailbox memory needed for voice call
packet exchange.
2. Send memory mapped addresses to ADSP.
3. Vote MHI host driver at start and stop of a voice call.

Change-Id: I8ef8bc270acacab9b80bca7addccdf73bd572adf
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
2019-01-30 23:39:34 -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
Linux Build Service Account
c695edde0f Merge "dsp: add support to set custom channel mixer coefficients" 2019-01-28 11:11:21 -08:00
Vikram Panduranga
24efd2a62e dsp: add dma map resource cmd
Add a new API for mapping DMA resources
that needs to be attached to existing
SMMU SID.

Change-Id: I7a513d24ea30a5ead318e856e4c5317743fd0021
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
2019-01-24 17:44:04 -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
Linux Build Service Account
1ec5816c0b Merge "dsp: Add frame size control parameter for AAC encoder" 2019-01-08 05:32:06 -08:00
Linux Build Service Account
f6416bbf7a Merge "dsp: afe: add support for VA macro codec DMA interface" 2019-01-08 05:32:05 -08:00
Linux Build Service Account
9cdd3ad6f9 Merge "asoc: dsp: ipc: Reduce wait timeout to 1 second" 2019-01-06 06:32:24 -08:00
Linux Build Service Account
624abc38c9 Merge "dsp: update EC reference port only if channels are configured" 2019-01-06 06:32:04 -08:00
Xiaoyu Ye
8341eefc48 dsp: afe: add support for VA macro codec DMA interface
VA macro on Kona has three TX codec DMA interface. The
current AFE driver only supports two codec DMA interface.
Add support to enable the third one in AFE driver.

Change-Id: Ie0f6241ef37bc03ad9adb1c4fe82f82468caec25
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2019-01-03 14:57:47 -08:00
Aniket Kumar Lata
be83735305 dsp: Add frame size control parameter for AAC encoder
BT sink devices have a limitation on the packet sizes
they can receive and handle from BT sources. AAC encoder
can produce output frames which can vary in size based on
content being encoded. If frame size exceeds MTU size of
BT sink device, it will lead to incorrect decoding of
frames in BT sink.
Add a frame configuration parameter (MTU/Peak bitrate)
for AAC encoder to solve this problem.

Change-Id: Ia7795049e982400b0b3657b0b3a8990fc6920e38
Signed-off-by: Aniket Kumar Lata <alata@codeaurora.org>
2019-01-02 17:28:08 +08:00
Surendar Karka
de79a06acf dsp: update EC reference port only if channels are configured
ADM open is failed due to payload size not getting updated
with ec reference size. Update EC reference port only if
EC reference channels are configured.

Change-Id: Ic2dd6a3cf805c1ea40d71d0b62b6e867167d169e
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
2019-01-02 17:23:23 +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
Laxminath Kasam
c910c02395 dsp: return ENETRESET error if apr is down
In SSR/PDR, return ENETRESET errno to
propagate this failure to userspace. After
audio HAL receives ENETRESET, it stops retry
for pcm_open continuously. Rate limit the logs
when apr send packet fails during PDR/SSR
usecases to avoid watchdog timeouts.

Change-Id: I03a80aef6ffedb4f15f953fff5213d6a3c9efc4b
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-01-02 15:44:42 +08:00
Meng Wang
b0e04799e4 ASoC: config: add config to compile audio drivers for kona
Add config to compile audio drivers for kona.

Change-Id: I3367a68d0109c80de8525fd74ebaef2959684865
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-21 12:19:44 +08:00
Meng Wang
19fa6defdc asoc: update kernel version for kona
Update kernel version for kona.

Change-Id: I490832f0a62f8f1b5cfe6fc6134e22cc5d8ae583
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-20 12:36:53 +08:00
Linux Build Service Account
ed9a9cce4a Merge "dsp: afe: Cleanup task_struct related implementation" 2018-12-12 08:52:06 -08:00