Commit Graph

85 Commits

Author SHA1 Message Date
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
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
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
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
Linux Build Service Account
ed9a9cce4a Merge "dsp: afe: Cleanup task_struct related implementation" 2018-12-12 08:52:06 -08:00
Linux Build Service Account
d3a0e9fcca Merge "dsp: q6afe: return error on no configuration data" 2018-12-12 08:52:02 -08:00
Linux Build Service Account
af3c54713f Merge "ASoC: Add TWS+ mono mode support" 2018-12-12 08:52:01 -08:00
Linux Build Service Account
bed688a58c Merge "asoc: add support to get Direction of Arrival target scores" 2018-12-12 08:51:56 -08:00
Karthikeyan Mani
0253cb9698 dsp: q6afe: return error on no configuration data
Move the return value to within the error check
condition to avoid returning error for valid
scenarios too.

Change-Id: I718786d9eb3c779a85da3a4cb3929806692f5424
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2018-12-11 00:09:46 -08:00
Chaithanya Krishna Bacharaju
8c6a184189 dsp: add support to get Direction of Arrival target scores
Add support to get DOA tracking monitor data.
This is required to support SVA LED display feature with
FFECNS/FFNS enabled.

Change-Id: I7e39c2f3998fcc3f9ed0767c0090f862e1ba7539
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
2018-12-11 00:02:27 -08:00
Surendar Karka
d47fda4407 asoc: add support for afe_loopback_tx BE dai
Add dai driver and routing driver changes for
afe loopback BE. This BE is used to capture
EC reference data.

Change-Id: Ia57f335bde5f8a47de0030fbf1cdb784c8821e17
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
2018-12-10 23:58:04 -08:00
Aditya Bavanari
91674b50e6 dsp: afe: Cleanup task_struct related implementation
Cleanup task_struct related implementation in
AFE driver as it is not used anymore and
causes invalid pointer access in stability tests.

Change-Id: I97ad810f9389338af85c7cea3213432917a21106
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2018-12-10 23:45:11 -08:00
Manisha Agarwal
d99fac0210 ASoC: Add TWS+ mono mode support
Add support to enable mono mode when one TWS+ earbud is
connected. Change the encoder config when device switches from two
earbuds to single earbud.

CRs-Fixed: 2341876
Change-Id: I880aa6a2767d88e99be2d80afff0e5fbec94b8a4
Signed-off-by: Manisha Agarwal <maniagar@codeaurora.org>
2018-12-10 23:36:26 -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
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