Commit Graph

69 Commits

Author SHA1 Message Date
Florian Pfister
f4fd5f33d1 dsp: add SBC support for BT sink mode
Update SBC sample frequency and number of channels
from IPC library to set AFE port accordingly.

Change-Id: Ibca385b0fc0ba4c3122053559b1116bd4c31336d
Signed-off-by: Florian Pfister <fpfister@codeaurora.org>
2018-11-15 01:32:22 -08:00
Linux Build Service Account
ab1a6c2a63 Merge "dsp: afe: change lock sequence to avoid deadlock" 2018-11-05 21:39:03 -08:00
Linux Build Service Account
563b443fcd Merge "dsp: increase afe apr_send_pkt timeout to 2 seconds" 2018-11-04 19:08:04 -08:00
Vidyakumar Athota
aade87e1f2 dsp: increase afe apr_send_pkt timeout to 2 seconds
Some USB headsets take more than 1 second to respond
for afe port start command so increase the timeout value
to support playback on slow responsive USB headsets.

Change-Id: I76c43bafe3c9e1e2d8a4a23059053db6bfc0188b
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2018-11-01 11:09:57 -07:00
Florian Pfister
f1b8d5bdea dsp: add BT sink support in AFE driver
Add different media format support in AFE decoder.

Change-Id: Icdc3884882c34236f5ab02355dfbabdd2a1becd2
Signed-off-by: Florian Pfister <fpfister@codeaurora.org>
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
2018-10-31 23:14:03 -07:00
Xiaojun Sang
41de9e1640 dsp: afe: change lock sequence to avoid deadlock
Lock sequence for afe_alloc_cal does not comply with others. To
avoid deadlock, move afe_cmd_lock to the top caller in AFE.

Change-Id: I4ce03034c642c8b5e7e9e5e2ff4c73644980484b
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2018-10-31 03:08:26 -07:00
Linux Build Service Account
53b13dd5a6 Merge "dsp: Fix port media type sample rate for APTX AD" 2018-10-23 01:32:47 -07:00
Linux Build Service Account
fee3694cd7 Merge "dsp: enable VAD support on TDM interface" 2018-10-16 20:46:43 -07:00
Aniket Kumar Lata
1c9ae8ff76 dsp: Fix port media type sample rate for APTX AD
Send sample rate for port media type from APTX AD
config before AFE port start.

Change-Id: I3410428661ad4162539f437bb391c33a60ea1852
Signed-off-by: Aniket Kumar Lata <alata@codeaurora.org>
2018-10-15 10:56:21 -07:00
Mangesh Kunchamwar
bc81e3af17 dsp: enable VAD support on TDM interface
Send VAD configuration during TDM port start.

Change-Id: I30b45b066b2ca5fdf49cd74d87d95f75566661c9
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2018-10-12 09:33:03 +05:30
Ralf Herz
044e476310 dsp: Remove SPDIF format change detail info
Remove the detailed format information from each format change event as
sysfs interface is used now.

Change-Id: I6abd221e87b18c1f0e84e62db8076b8198e8ad24
Signed-off-by: Ralf Herz <rherz@codeaurora.org>
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2018-10-04 07:37:26 -07:00
Dieter Luecking
fa7687b233 dsp: Update AFE driver to support 16 ch
AFE supports now MI2S interfaces with up to 16 channels.
Add new APR API functions to support this.
Add support for senary PCM/MI2S ports.

Change-Id: I18d48eed4e9a0476363220e959a0f254aa292056
Signed-off-by: Dieter Luecking <dieterl@codeaurora.org>
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2018-10-04 15:42:53 +02:00
Surendar Karka
b0dd21f1a3 dsp: add support for Slimbus 9 port in AFE
Add support for SLIMBUS_9 Rx and Tx ports in AFE
driver.

Change-Id: I7a21c06fd67984ef60e7d40b61a100ddc48371fc
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2018-10-03 03:47:47 -07:00
Xiaojun Sang
f27e351051 ASoC: msm: remove unnecessary error log in audio kernel
PP event queue is not used by capture path. Initialize PP
event queue for playback path only to remove unnecessary log.
Change log level from error to debug when no matching afe
cal block is found.

Change-Id: Ibc323449f2fdc74cccd350ae30ac76d937898ffa
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2018-09-11 18:03:19 -07:00
Aniket Kumar Lata
9dce504834 dsp: Do not send ABR parameters if bitrate is fixed
ABR encoder config parameters should be sent to DSP
only when ABR is enabled. Do not send these parameters
for fixed bitrate.

Change-Id: Icf7e4feef65d01c8ae3f6c6123d490cadef46c97
Signed-off-by: Aniket Kumar Lata <alata@codeaurora.org>
2018-09-06 15:16:43 -07:00
Ramprasad Katkam
250075f808 dsp: afe: add support for swr wakeup irq events
Add support for soundwire wakeup irq registration and event
notification from afe.

Change-Id: I97abe0a8bb571b997a52f90e0a0f57a26c714251
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-09-03 10:18:26 -07:00
Aditya Bavanari
e9454c6269 asoc: Add LSM routing changes for TX_CDC_DMA_TX_3
Add LSM mixer and function related routing changes
for TX_CDC_DMA_TX_3 interface to support SVA.

CRs-Fixed: 2281591
Change-Id: I9ff7e9d51069ec0467c464ddb5c640e533e81d90
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2018-08-27 18:28:49 +05:30
Aditya Bavanari
54ca7d1b91 asoc: Add hostless entries in routing driver
Add hostless nodes for RX_CDC_DMA_RX_0 and TX_CDC_DMA_TX_3
interfaces to support HFP/FM use cases.
Add missing port-ids in afe driver.

CRs-Fixed: 2281591
Change-Id: I634a6970b7c47320120cb850ad94bd69376ac181
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2018-08-23 16:13:13 +05:30
Vignesh Kulothungan
0ffc608139 dsp: q6afe: Add check for DC detection registration
Check if speaker protection is enabled before registering for
DC detection events.

CRs-Fixed: 2244131
Change-Id: If2f9f777534ee5fe9024ba1080d0b73d3f750159
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2018-08-07 10:56:42 -07:00
Linux Build Service Account
6baee220f0 Merge "asoc: Update mixer control for island mode setting" 2018-08-02 08:23:15 -07:00
Linux Build Service Account
9264698ee1 Merge "asoc: audio-ext-clk: Add support for multiple lpass clock sources" 2018-08-01 04:54:13 -07:00
Linux Build Service Account
2cb347bab2 Merge "asoc: qcs405: Add support for AFE SPDIF interfaces" 2018-07-31 09:34:20 -07:00
Aditya Bavanari
348a4a6d2a dsp: afe: Add support for Rx and TX codec dma interface
New codec dma interfaces have been introduced to connect
LPASS and Codec macros. This change is to add Rx and Tx
codec dma interface related updates to Q6 AFE native driver.

CRs-Fixed: 2281591
Change-Id: I2edbe904cd4c13801f06cdd7bd226a82db5d6d51
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2018-07-31 11:22:48 +05:30
Mangesh Kunchamwar
07b8dc90a9 asoc: Update mixer control for island mode setting
Fix overwriting of port ID in island mode mixer control.

Change-Id: Ibf650e94519ffde7655e14a88ccc9042b3a3544b
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2018-07-30 23:17:12 +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
Vidyakumar Athota
968be0ae5b dsp: q6afe: fix payload copy issue in module event
Payload is copied incorrectly in AFE module event callback.
Fix this issue with proper typecast of payload pointer.

Change-Id: I58642a054667912bcc01ae19c8c73d28c28b5589
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2018-07-23 18:20:29 -07:00
Linux Build Service Account
f205f9ccd7 Merge "asoc: dsp: add support for aptX adaptive" 2018-07-18 10:16:11 -07:00
Sharad Sangle
82777e54d5 asoc: dsp: add support for aptX adaptive
Add support for new A2DP profile aptX adaptive.
This is just like any other A2DP profiles.

CRs-fixed: 2272343
Change-Id: I219dec038e84b7b98ebb2d5233ddf576c8bbe70a
Signed-off-by: Sharad Sangle <assangle@codeaurora.org>
2018-07-12 22:26:40 -07:00
Mangesh Kunchamwar
2d84e4aedc asoc: Enable VAD in QCS405
Add AFE HW CAL dep node in config and fix the set sampling rate
for codec dma interface

Change-Id: I9165a80da00bfb5b61bbf4f0391ff794d8fba352
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2018-07-11 21:27:07 +05:30
Linux Build Service Account
548608e403 Merge "dsp: afe: add missing codec dma port indices" 2018-06-29 03:52:09 -07:00
Linux Build Service Account
ceb09056d7 Merge "dsp: add an exception in determining port type" 2018-06-28 14:10:08 -07:00
Mangesh Kunchamwar
1274b76c1d dsp: afe: add missing codec dma port indices
Add codec dma port indices in get port index function.

CRs-Fixed: 2248380
Change-Id: I62fcf502ce997e1537c0ea47dd0292612cb297ad
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2018-06-28 16:15:39 +05:30
Vikram Panduranga
dfae8ef1bb dsp: add an exception in determining port type
AFE ports have been identified as RX or TX based
on a certain rule. Add an exception for VOICE_RECORD_TX
port from this rule.

Change-Id: I8a2fa4b6053baaf7747493aa385da887e6dd170c
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
2018-06-27 15:58:19 -07:00
Linux Build Service Account
a6a600898a Merge "dsp: q6afe: fix sleeping function called from invalid context" 2018-06-26 23:29:56 -07:00
Xiaoyu Ye
baf2839922 dsp: q6afe: fix sleeping function called from invalid context
afe_callback indirectly calls q6core_send_uevent which might
sleep due to use of mutex. Move this send uevent function call
to work queue to prevent the issue.

Change-Id: I74ad151a9bae84860059d0a11042cda6475394c2
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2018-06-25 18:28:18 -07:00
Sudheer Papothi
af431ad7c9 dsp: q6afe: Add support to control AANC noise level
Existing software supports only high AANC level with minimum noise.
Requirement is to support different noise levels when AANC is
enabled for better AANC effect.

Change-Id: I343d00473937f68eb86533e88b25083d554b79b1
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2018-06-23 01:53:02 +05:30
Mangesh Kunchamwar
4e1e71885e dsp: afe: Add support for VAD in AFE native driver
Update to AFE native driver to send VAD calibration
to DSP. Add support for per service API version query
in q6core driver.

Change-Id: I6234879054e7b5622a40912da16072fd8dbd83fe
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2018-06-12 19:18:35 +05:30
Mangesh Kunchamwar
8c706aba34 dsp: afe: Add support for codec dma interface
New codec dma interfaces have been introduced to connect LPASS and
Codec macros. This change is to add codec dma interface related
updates to Q6 AFE native driver.

Change-Id: Ia3d1e5e80c694c8c4a7f904151adfcb504964b08
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2018-06-10 22:46:57 -07:00
Vignesh Kulothungan
c3f3898770 dsp: add support to send uevent on dc detection
On receiving DC detection notification, send an uevent to notify
the userspace.

CRs-Fixed: 2244131
Change-Id: I42b0bb2287d7f1edf5e7c344302a7ea97408ab13
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2018-06-07 09:01:29 -07:00
Vidyakumar Athota
94bd8731ae dsp: add support for DC detection event in afe
Add support to register with ADSP for DC detection event
in speaker protection module.
Add support to notify audio driver clients when DC detection occurs.

CRs-Fixed: 2244131
Change-Id: Ieb467f62207546a785eac2e9b96ca677e0b10565
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2018-06-07 08:53:00 -07:00
Garmond Leung
6b3f418d7e dsp: Add support for setting USB packet service interval
Add support for setting packet service interval for usb
AFE Port.

Change-Id: I2221c659f967deaccb9031a9a61b51fd475a0e22
2018-05-31 17:56:21 -07:00
Karthikeyan Mani
16b697200c dsp: afe: add interface to update dp audio stream index
For DP audio Multi Stream Transport, add an interface
to set DP controller and DP stream index for display
port audio AFE port.

Change-Id: I6efbb6937a7849e5840a93541961414eb9049863
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2018-05-10 13:43:23 -07:00
Aniket Kumar Lata
c0c314765f asoc: dsp: Add support for adaptive bitrate
Add support for adaptive bitrate with A2DP offload.
Set up Tx feedback path on SLIMBUS_7_TX from BT SoC
to LPASS. Configure AFE encoder and decoder for ABR.
Add bit width support to configure AFE port with
32bit for BT A2DP.

Change-Id: I8e0afaf52561e5dc70318240ba238fc42844501f
Signed-off-by: Aniket Kumar Lata <alata@codeaurora.org>
2018-04-29 15:59:32 -07:00
Vikram Panduranga
770b8383d2 dsp: Mark cal block after use
After applying calibration on DSP, cal block
is marked stale to ensure same calibration is not
reused for future usecase.

Change-Id: I9f446c0602f4ab34ca71b9d2611319624fb19cd2
Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
2018-03-16 17:54:53 -07:00
Vignesh Kulothungan
87f926a612 ASoC: dsp: Fix LPASS clock timeout issue
LPASS set clock time command times out because afe callback
was waking up the incorrect wait queue. Use the appropriate
index instead of the global index for wake up.

CRs-Fixed: 2151551
Change-Id: I2d4f4c477913a9513ffae2992ecf777f7a3ed60d
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2018-03-06 10:40:03 -08:00
Vignesh Kulothungan
85073c0432 ASoC: dsp: Update AFE driver to support Instance ID
Add support to set and get AFE module params with
Instance ID support. Maintain support for non
Instance ID set and get param structures as well.
Use common pack and set param functions to set and
get parameters to DSP instead of handling them at an
individual module level.

CRs-Fixed: 2151551
Change-Id: I15dac800bdf7f860d0fbeeff86f986c42a9eae34
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2018-03-04 23:06:32 -08:00
Linux Build Service Account
9ebd03032c Merge "ASoC: rmmod fixes for audio drivers" 2018-03-02 23:16:37 -08:00
Laxminath Kasam
30ad751aac ASoC: rmmod fixes for audio drivers
For remove module(rmmod), update drivers
to cleanup resources and allow insert module
again without any issue.

Change-Id: Iddc6e5e11d986359afd3100bf3c5eab70cb1c1eb
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2018-03-01 16:02:06 +08:00
Karthikeyan Mani
0575b6733a dsp: afe: Add 9.6MHz clock in osr clk list
Add 9.6MHz osr clk frequency to support tavil
mclk request.

Change-Id: I79da9cf9ddb8588ca550956d9c07f751618741ac
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2018-02-28 18:50:46 -08:00
Banajit Goswami
08bb73698a dsp: update MSM Audio ION wrappers to align with upstream
Between Linux-4.9 and Linux-4.14, upstream has updated the
ION APIs significantly to make ION ready to bring out of
staging folder. This has changed the way ION and dma_buf
APIs used to work together for allocating, mapping and
deallocating ION buffers.
Update MSM Audio ION wrapper functions used by audio drivers
to reflect these ION API changes as per upstream ION.

Change-Id: I63097e147a397aa3a538f69ac88b6fb10871c3dc
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2018-02-04 03:41:06 -08:00