Commit Graph
325 Commits
Author SHA1 Message Date
Shalini Manjunatha 09aa948bc6 soc: swr-mstr: Store and compare dev_addr along with dev_num
-> If enumeration is changed runtime, dev_num gets changed
-> so it might result in different dev_num for same device
-> between swrm_connect_port and swr_disconnect_port while powering
up and down of widget
-> This results in not emptying the port_req list, hence swrm not
going to suspend state
-> This results into adsp not going to sleep state

Change-Id: I80326a35f0cac7f7be30cbbee119a8ba247a0f76
2022-09-14 10:51:38 +05:30
Soumya Managoli 505430b7d1 ASoC: dsp: Synchronise adm commands
Race condition observed while processing the
get/set_pp_params and adm_close command.
Synchronise adm open, close and get/set_pp_params
by sending the apr cmd pkt using the same lock.

Change-Id: I9a1ebcedc91f78f3940846688f8569ec9088e1e7
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
2021-10-06 10:52:42 +05:30
qctecmdr 5bf7be9a0a Merge "asoc: qcs405: Update clk src string from dts" 2021-03-09 09:42:48 -08:00
Subhadra Jagadeesan 411c3d05fc ASoC: Audio bringup changes for msm8937_32go.
Enable compilation for msm8937_32go, 8953, sdm439, sdm429 targets.
Bring in msm8952 machine driver and SDM450 auto configs.
Update asoc, codec driver to component driver to align
with kernel-4.19 ALSA.

Change-Id: I95a6ee3dbb3b9d3b89cc6961346baf1efb3cb9c8
Signed-off-by: Subhadra Jagadeesan <subhja@codeaurora.org>
2021-01-27 11:39:25 +05:30
Sanjana B 1b2393eba3 dsp: Add support to update and store clk src values
Add support to update clk src array from machine driver.
Update clk src for different be ids based on clock
frequency at playback.

Change-Id: Ifa09d556fd50f9e2ddef39b5e3ddd25f579f8f6e
Signed-off-by: Sanjana B <sanjb@codeaurora.org>
2021-01-10 20:28:11 -08:00
Sanjana B d747558a4a dsp: afe topology deregister
To handle erroneous sequence when HLOS audio driver registers
a FFNS topology in non-island mode instead of island mode:
Call afe topology deregister to deregister any previously
created topology before registering the topology.

Change-Id: Iff871da998847ea5d3bcee417c780b8acaf70ca3
Signed-off-by: Sanjana B <sanjb@codeaurora.org>
2021-01-10 20:26:54 -08:00
Nirav Khatri 239a93e8ab ASoC: Add external mclk mixer support
Add mixer control and callback for selecting external mclk at start of
next playback for a particular BE.

Change-Id: Ifc25eda2f14da564c6b066eb8f76049697bbd44e
Signed-off-by: Nirav Khatri <khatri@codeaurora.org>
2021-01-11 09:42:15 +05:30
Soumya Managoli d881ddaff8 ASoC: Add support to send voice UI port id to afe
As per the current design in afe, if the
afe_get_cal_topology for AFE_TOPOLOGY_CAL
or send_afe_cal_type for AFE_COMMON_TX_CAL
fails, then the voice UI calblock is fetched/sent.
This is resulting in sending voice UI calblock
on a non voice UI port during concurrent usecase scenario.

Fix is to check if the calblock for get/set is for
a voice UI port or not. Added support to send this
port id info from routing driver to afe when usecase
is enabled via mixer_control.

Change-Id: I356aae61e1b9d11324e7b9f9a57953767a64b71e
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
2020-12-08 17:17:25 +05:30
qctecmdr 7961f6e686 Merge "dsp: add change to enable preemption at cal_utils_dealloc_cal" 2020-11-25 18:59:00 -08:00
qctecmdr d62420bed8 Merge "dsp: add afe function to send cps configuration" 2020-11-20 02:18:50 -08:00
Saurav Kumar d775e3b2ef dsp: add change to enable preemption at cal_utils_dealloc_cal
Add change to enable preemption at cal_utils_dealloc_cal.

Change-Id: I3d9304851f4d61d7afb82c0512421159ec788db1
Signed-off-by: Saurav Kumar <sauravk@codeaurora.org>
2020-11-17 17:02:35 +05:30
Saurav Kumar 10825a5129 dsp: add change to handle use-after-free in cal_utils_is_cal_stale
Add change to address the race condition between
pointer dereference and memory deallocation.

Change-Id: Ia1ed47986ec81d3dc2feb3bc874847fadddac292
Signed-off-by: Saurav Kumar <sauravk@codeaurora.org>
2020-11-04 12:45:59 +05:30
Faiz Nabi Kuchay b721459e0c dsp: add afe function to send cps configuration
Define cps hw interface configuration structures.
Add AFE_PARAM_ID_CPS_LPASS_HW_INTF_CFG parameter id.
Add a function to send afe cps speaker protection
configuration.

Change-Id: I865e9981b6dd1da4b9ef1a3e18be82cea2996309
Signed-off-by: Faiz Nabi Kuchay <fkuchay@codeaurora.org>
2020-10-08 18:25:49 +05:30
Soumya Managoli 0c317f309c ASoC: dsp: Synchronise adm and rtac commands
Race condition observed while processing the
set_pp_params command responses sent back to back
by adsp for commands sent from adm and rtac.
Handle this by synchronising the get/set pp_params
command in both the drivers.

Change-Id: Id89d98217dc5cad3703e5d545ddee21cb145c874
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
2020-09-22 09:49:10 +05:30
Vatsal Bucha f6d24cccc4 Revert "ASoC: codecs: handle device disconnect during SSR/PDR"
This reverts commit 9fe5cc6bf101f9613bebb9ae1f4969ae8cc03b2c.

Change-Id: Ica9e39ee24562ad02c590cfd6388c5fe113d0d1f
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-09-09 21:31:31 -07:00
Vignesh Kulothungan a79a540687 ASoC: codecs: handle device disconnect during SSR
During SSR, when usbc analog device is disconnected, the
respective disconnect interrupt is not handled and hence userspace
is not notified. When ADSP recovers, fsa driver sends a disconnect
notification. So handle device disconnect and notify jack/userspace
through this notification.

Change-Id: Ic695c2267c9289f9528d50202938ec09f634de8a
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-08-11 20:06:06 -07:00
qctecmdr 715239272c Merge "dsp: Add support for GET_PARAMS" 2020-08-11 05:58:21 -07:00
qctecmdr 73d67e6681 Merge "ASoC: sdm660 audio changes" 2020-08-04 23:06:56 -07:00
Harshal Ahire 33bc91026b dsp: Add support for GET_PARAMS
Add support to query module parameters from ADSP.

Change-Id: Ie63dd95cf27277f9c836becc98952d48971a3ec3
Signed-off-by: Harshal Ahire <hahire@codeaurora.org>
2020-08-04 21:36:54 +05:30
Soumya Managoli d11d6f06c9 ASoC: sdm660 audio changes
Enable compilation for sdm660 target.
Bring in sdm660_cdc codec driver.
Bring in sdm660 machine driver.
Update codec driver to component driver to align
with kernel-4.19 ALSA.

Change-Id: I927a032d077bcce6b3dcc4a95445e8b1e86d461a
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
2020-07-28 00:39:26 -07:00
Vatsal Bucha 8203a06e61 ASoC: rouleur: Change hph and ear gain according to soc capacity
Register to power supply framework to get soc capacity.
Reduce ear and hph gain for reduced voltage to optimize
power consumption. Also set LD22 voltage to lower value
for low SoC.

Change-Id: I94de9341b8c7307128d3cd41c7398c31d57fa685
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-07-27 05:23:25 -07:00
Vangala, Amarnath ca3b79b972 ASOC: macro name correction.
Correction to macro name.

Change-Id: I609df6b1a18231c285a5290872fa7b62ab9bffea
Signed-off-by: Vangala, Amarnath <avangala@codeaurora.org>
2020-06-30 03:10:42 -07:00
qctecmdr 7b9845981c Merge "dsp: Add support to dynamically load and unload BT modules" 2020-06-30 02:05:59 -07:00
qctecmdr 7e76c13bc7 Merge "ASOC: Speaker Protection V4" 2020-06-30 02:05:59 -07:00
Harshal Ahire 10e8384973 dsp: Add support to dynamically load and unload BT modules
Add new APIs to enable dynamic load and unload of BT
modules before afe_port_start and afe_close.

Change-Id: I74da9a49aac754d4557c7206155de65cf9b6bdaf
Signed-off-by: Harshal Ahire <hahire@codeaurora.org>
2020-06-25 22:44:00 +05:30
Vangala, Amarnath 7873230284 ASOC: Speaker Protection V4
Support for Speaker Protection V4.

Change-Id: I2237836243a716d4ed3288c9c613bc8d4ec5a282
Signed-off-by: Vangala, Amarnath <avangala@codeaurora.org>
2020-06-25 01:25:20 -07:00
Vangala, Amarnath 4f9cd65b9b ASOC: Speaker Protection V4 API
API changes for Speaker Protection V4.

Change-Id: I3f00831d90ba0fd11db915cc0af96cf429fc98c9
Signed-off-by: Vangala, Amarnath <avangala@codeaurora.org>
2020-06-25 00:00:28 -07:00
qctecmdr ab1f47387e Merge "dsp: adm: change channel number for FLUENCE_SM module" 2020-06-05 03:44:49 -07:00
Kunlei Zhang d34438955c dsp: adm: change channel number for FLUENCE_SM module
FLUENCE_SM module in COPreP topology doesn't support
stereo input. Update channel number to mono for
VPM_TX_VOICE_FLUENCE_SM_COPP_TOPOLOGY.

Change-Id: I7de7b49706387b09031f67e1a0271db1825cb81d
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
2020-05-29 16:35:01 -07:00
Laxminath Kasam 29bb821fb5 asoc: codecs: Update LPM voting support in codec supplies
For power saving during RBSC, need to vote for minimum
or zero current on load for respective regulator to
enter LPM mode. Add required support from audio WCD/WSA
to vote accordingly during suspend/resume.

Change-Id: I578195b84ba18a0b69dde3b93a3f6461efa85f7f
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-05-22 02:16:03 -07:00
Surendar Karka b50f4233ef asoc: enable TTP generator
Add support to enable TTP generator in AFE.

Change-Id: I0186dc18809b87a912a1c3ec9dd7fcd26aa726f5
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
2020-05-10 23:29:38 -07:00
Surendar Karka fc93c48633 asoc: add support to set TTP offset
- Add support to set TTP offset.
- Add direction support for render mode

Change-Id: Ia869767c58192f3e07cddc7bf230992076f7a02e
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
2020-05-10 23:28:43 -07:00
Aditya Bavanari a2675b6406 asoc: codecs: Add comparator autozeroing support for rouleur
When current source mode is enabled, comparator auto
zeroing should be turned ON by HW. As rouleur codec HW
doesn't do this automatically, add this support
in SW to set the auto zero enable before FSM enable
and reset to auto once FSM is enabled.
Disable surge protection before ADC measurements
and change HPHL and HPHR thresholds while
identifying cross connection for proper
accessory identification.

Change-Id: Ib775de0f0bdb6c655a3c0eb4775276acfbca1e84
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-05-04 08:38:21 -07:00
qctecmdr 0e7b0f8ae7 Merge "asoc: codecs: Fix button interrupts issue in rouleur" 2020-05-04 06:25:44 -07:00
Aditya Bavanari 55f4acd888 asoc: codecs: Fix button interrupts issue in rouleur
Current source mode in rouleur does not work
properly leading to issues in button interrupts
and fake electrical removal interrupts.
Enable pull up mode instead of current source
mode to fix these issues. Modify the headset
max vref voltage to 1.7 volts and micbias
calculation logic.

Change-Id: If3e4a2fdcf080b07fe3c363b6eb6115f101b91f4
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-05-01 07:39:07 -07:00
Surendar Karka 681a9ea695 asoc: add render mode support in transcode loopback
Add new TTP render mode in compress driver and
render mode support in transcode loopback driver.

Change-Id: I636ecd5fd3fa5ccafb6086b4fca41c240b758391
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
2020-04-30 23:29:29 -07:00
Linux Build Service Account 61159274e5 Merge "dsp: q6adm: add ADM_AUDPROC_PERSISTENT cal type" 2020-04-27 23:11:51 -07:00
Surendar Karka cf3f8e684f dsp: Add support to set clock drift
- Add support to adjust drift in audio interface
  clock source PLL.
- ADSP adjusts the source clock based on clk id. Add support
  in AFE driver to get clk id based on the AFE port.

Change-Id: I45ceb6579bb15e32541051e0ba936a2d903e4923
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
2020-04-20 21:16:34 -07:00
Ramlal Karra 471fe91296 dsp: q6adm: add ADM_AUDPROC_PERSISTENT cal type
ADM supports certain modules that can have very large calibration sizes,
in such cases the calibration is expected to be persistent in memory.
Add new calibration type for this purpose.

Change-Id: I2d1fb219a3748d0ead5ca2199da2b55669f2550e
Signed-off-by: Ramlal Karra <rkarra@codeaurora.org>
2020-04-16 07:25:05 -07:00
Ramlal Karra 2854a2ed7c uapi: add ADM_AUDPROC_PERSISTENT cal type
ADM supports certain modules that can have very large calibration sizes,
in such cases the calibration is expected to be persistent in memory.
Add new cal type ADM_AUDPROC_PERSISTENT for this purpose.

Change-Id: If85c0b6675ea7481c7d71d5c0d770bc129332026
2020-04-14 05:59:16 -07:00
qctecmdr c5d71261ea Merge "asoc: wcd938x: Add vdd-buck as on demand supply" 2020-04-08 20:39:18 -07:00
Aditya Bavanari bb981b707e audio-kernel: Synchronize hw vote and unvote requests
HW vote and unvote is currently called from multiple
clients leading to synchronization issues
during SSR/PDR scenarios. Synchronize all the vote requests
by using digital codec resource manager.

Change-Id: I7e63f69ab5d761a3bb4c7ce70bbef2e8bfd76cfb
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-04-02 18:20:15 +05:30
Laxminath Kasam 700983517f asoc: wcd938x: Add vdd-buck as on demand supply
On lagoon, vdd-buck need to be dynamic supply.
Add required support to handle buck as dynamic supply.

Change-Id: If6c27fffe0d0c44f178e61a6eae6ef63775c8988
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-04-01 03:02:48 -07:00
Derek Chen debd51e9d6 ASoC: Add mixer control for DTMF module enabling
Mixer controls are added to enable and disable
DTMF ADSP modules.

Change-Id: Ic04c4696b31f77488cb2047829b823255872f7ac
Signed-off-by: Derek Chen <chenche@codeaurora.org>
2020-03-24 11:40:37 -04:00
qctecmdr b2758386b1 Merge "asoc: qcs405: Add dai links for hdmi tx" 2020-03-24 03:24:01 -07:00
qctecmdr dfb7689c3b Merge "asoc: qcs405: add support for dsd input" 2020-03-19 08:04:02 -07:00
Sanjana B 63bdc7bdab asoc: support for audio over hdmi tx
Add support for audio over hdmi tx.

Change-Id: I4f2108fd14eb22ec4e226220787e0defe512bb5f
Signed-off-by: Sanjana B <sanjb@codeaurora.org>
2020-03-19 08:32:18 +05:30
qctecmdr e25bc7eda4 Merge "asoc:kona: add proxy ports for call screening in machine driver" 2020-03-18 07:56:54 -07:00
Jaideep Sharma 39932230f0 asoc: add code change for proxy playback and capture BE DAIs.
proxy AFE port based BE DAIs can be used for various use cases, including
but not limited to voice call. Add support for BE DAI link based on pseudo
ports.

Change-Id: I00384de1104399853743e709f53f969842ef69a1
Signed-off-by: Jaideep Sharma <jaidshar@codeaurora.org>
2020-03-12 11:02:51 +05:30
Manisha Agarwal e87c0b1cfb dsp: Bit rate mode support for aac codec
Add variable bit rate mode support for aac codec.

Change-Id: Iedd9fe0df2d3a12e3d4e6c2916305399da10873f
Signed-off-by: Manisha Agarwal <maniagar@codeaurora.org>
2020-03-06 12:16:22 +05:30