Commit Graph
2135 Commits
Author SHA1 Message Date
yaozm1 81c4cb937b asoc:Enable necessary log for mbhc
Propogate changes from (CR).
For headset debug purpose;
Enable necessary log.

Change-Id: Ib34f66978a7659ca396ef6db4d0a8e5f18363bd4
Signed-off-by: yaozm1 <yaozm1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1581555
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit 08300c96a3e1454a6c8e2de9df5a3df69ecc1776)
Reviewed-on: https://gerrit.mot.com/1744665
Reviewed-by: Yunfei Guo <guoyf2@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
2023-06-01 00:35:13 -03:00
guoyf2 feb238febf Audio bringup: asoc: add aw882xx support
Change-Id: Ia5781b73ecaceba7393379da5c38c63112e7f894
Signed-off-by: guoyf2 <guoyf2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1732545
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Submit-Approved: Jira Key
Tested-by: Jira Key
Reviewed-by: Yunfei Guo <guoyf2@motorola.com>
Reviewed-by: Xianhong Li <lixh8@lenovo.com>
2023-06-01 00:35:13 -03:00
qctecmdr fa03eae637 Merge "ASoC: rouleur-mbhc: Enhance impedance calculation logic" 2023-01-22 06:56:30 -08:00
qctecmdr e7371e7285 Merge "ASoC: rouleur-mbhc: Fix pop noise heard when headset insertion" 2023-01-22 06:51:23 -08:00
Soumya Managoli 28658bc2a0 ASoC: msm-pcm-q6-v2: Add dsp buf check
Current logic copies user buf size of data
from the avail dsp buf at a given offset.
If this offset returned from DSP in READ_DONE event
goes out of bounds or is corrupted, then it can lead to
out of bounds DSP buffer access, resulting in memory fault.
Fix is to add check for this buf offset, if it is within
the buf size range.

Change-Id: I7753cc6db394704dbb959477150141d42b836bef
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
2023-01-11 17:53:21 +05:30
Vijay Kumar Maddula c03164c8a2 ASoC: rouleur-mbhc: Enhance impedance calculation logic
When headset insert, calculate impedance for multiple times
and stop calculating if the result is within the threshold.
Modify register write sequence as per rouleur software sequence.

Change-Id: Id035304963d0822f758d7a527a712aca500a8a78
Signed-off-by: Vijay Kumar Maddula <quic_vmaddula@quicinc.com>
2023-01-10 02:18:24 -08:00
Vijay Kumar Maddula b99e002ebb ASoC: rouleur-mbhc: Fix pop noise heard when headset insertion
Observed pop noise during impedance discharge after
headset/headphone plugged in.
Adding 40ms delay while discharge to complete ramp down properly.

Change-Id: I7eb4ba3423660454990722579b7c7b57156c8067
Signed-off-by: Vijay Kumar Maddula <quic_vmaddula@quicinc.com>
2023-01-05 21:42:14 -08:00
Vaibhav Raut 5fd49711c9 asoc: wsa881x: Fix to set the correct volume level
Equality operator was used instead of assignment.
Updated the same.

Change-Id: I6f49dc8801669ae1734b9b3f31b57a6a8dfdfbde
Signed-off-by: Vaibhav Raut <quic_vraut@quicinc.com>
2022-12-22 11:34:42 +05:30
ronghuiz 3789f88189 asoc: Add routing control for qrb5165 BT HFP usecase
Add entry in snd_soc_dapm_route array for hfp client rx mixer
control path.
Add entry in iwsa_cdc_rx_0_port_mixer_controls for
slimbus7 interface

Change-Id: I782cfbc56344fec9454a8317fbab828cab0e6fde
2022-11-07 12:58:50 +08:00
Vaibhav Raut 54fca86eb6 Asoc: fix integer overflow for long duration offload playback
update runtime total bytes transferred and received
in compress driver.

Change-Id: I1bd129e18681fcf10a27efaa061594081114c1fb
Signed-off-by: Akhil Karuturi <akarutur@codeaurora.org>
2022-07-27 17:15:15 +05:30
qctecmdr 38e81d823d Merge "asoc: Correct the range of dev_token for usb headset." 2022-07-22 08:07:41 -07:00
Fudong Zhang 99b672de4e asoc: Correct the range of dev_token for usb headset.
The range shows 0->-1 which is not right.

Change-Id: Icb319271795826aa49b80f354ee8d3507febc8ae
Signed-off-by: Fudong Zhang <quic_fudozhan@quicinc.com>
2022-07-14 20:34:35 +08:00
Meng Wang d212c829f3 asoc: pcm-noirq: set substream state to disconnect when ssr happens
When SSR happens, set substream state to SNDRV_PCM_STATE_DISCONNECTED
to avoid userspace keeping waiting for substream state and causing
deadlock.

Change-Id: Iaa4d76101204652742c55d13da5c770c418a16bc
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2022-07-11 22:32:10 -07:00
Arungopal Kondaveeti 93ff782147 asoc: msm-pcm-routing: Assign default topology when app_type is zero
In normal cases audio hal will sent  proper ACDB and APP type values
but in some cases if app type becomes zero.Assign default topology
when app_type is zero.

Change-Id: Id588308650f823f7d94ffb1fd2d7656d4bcf9cb2
Signed-off-by: Arungopal Kondaveeti <quic_kondavee@quicinc.com>
2022-04-27 00:26:33 -07:00
qctecmdr b03e6b4f97 Merge "asoc: codecs: fix race condition of core vote and reg access" 2022-04-26 02:26:15 -07:00
qctecmdr 580a6ea284 Merge "asoc: notify dp driver after disp codec probe" 2022-04-26 02:26:14 -07:00
ronghuiz 358438b502 asoc: notify dp driver after disp codec probe
Since dp driver load faster than audio driver,
Dp driver can't get ext codec ops, we need to notify
Dp driver after audio disp codec driver probe.

Change-Id: I159faefad06e04a1727c71240c7cf90d48522504
2022-04-20 00:10:14 -07:00
Vangala, Amarnath affa5ed6fb asoc: codecs: fix race condition of core vote and reg access
Auto suspend timer for core vote is triggering before read write complete.
Move the auto suspend of core vote to post read write operation.

Change-Id: Ib0f6b026fe0e7fd3fbe052691db492915e436a78
Signed-off-by: Vangala, Amarnath <avangala@codeaurora.org>
2022-04-12 20:20:38 -07:00
Faiz Nabi Kuchay df752383fc ASoC: wcd937x: Add check for ULP irrespective of the Class
Add check for ULP mode irrespective of the Class to update
QCRG sequence.

Change-Id: Ie314aec147083df2b7db3e2769e3ff652d13c7de
2022-04-05 23:08:59 -07:00
Faiz Nabi Kuchay deab6661d2 ASoC: wcd937x: Update QCRG sequence for wcd937x
Update QCRG sequence for wcd937x.

Change-Id: I039a8b2dc74c34722b6c81bab429dee6326ec362
2022-03-21 23:48:38 -07:00
Lakshman Chaluvaraju 695fc8b6d6 asoc: changes to fix KW errors.
Add changes to fix KW errors.

Change-Id: I87fc8bf5b2753cef6af881713637e9521389708d
Signed-off-by: Lakshman Chaluvaraju <quic_lchalu@quicinc.com>
2022-01-27 11:31:16 +05:30
Sudheer Papothi 691eeafacf ASoC: pcm-routing: Add WSA VI sense macro to support capture
Add WSA VI sense macro to support VI sense capture.

Change-Id: I704aa6fbcb3908c0b76c82c941818b64e1d4598b
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2021-12-09 14:48:10 +05:30
qctecmdr 3d5792b70b Merge "ASoC: wcd937x: Update EAR PA CnP FSM sequence" 2021-11-05 05:28:11 -07:00
Soumya Managoli 4b95879003 ASoC: wcd937x: Update EAR PA CnP FSM sequence
EAR PA short switch is not released after
PA is turned on and off.
Address this hardware issue by updating the
EAR PA CnP FSM while EAR power down sequence.

Change-Id: If4269c30c13572db1b252f223368d444b9250901
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
2021-10-26 12:31:23 +05:30
Vatsal Bucha a1d9ad0e09 ASoC: wcd937x: Add change for LDOL VOUT accuracy calibration
ATE stores the calibration result in EFUSE register. This has to
be copied to sleep bandgap voltage for accurate calibration.

Change-Id: I118c5c3b42ba4cfd42185d8da6d468f44e31b88f
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2021-10-13 12:46:19 +05:30
Vatsal Bucha 41c63392cb ASoC: wcd937x: Add change to micbias reg for new tanggu fab id
Add change to micbias reg for new tanggu fab id.

Change-Id: I9bfa54c6ee3b87db56e72c1fefb4d4f0db461f14
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2021-09-28 12:31:22 +05:30
Vatsal Bucha edbd2b5086 ASoC: wcd937x: Update register value for new fab id for tanggu
Update register value for new fab id for tanggu.

Change-Id: I13594dbd311bbeab115753e0bec1a748158f8100
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2021-09-23 19:17:58 +05:30
Vatsal Bucha cf02882f86 ASoC: wcd937x: Change resistor divider output for hph if fab id is enabled
Depending on efuse reg value, if fab id is enabled,
change resistor divider output to P12 for both hphl and hphr.

Change-Id: If5e0caac2648f6e0b8c089bb56883a442b5a8ecd
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2021-09-01 20:19:58 -07:00
Ramu Gottipati f91caf5f58 dsp: adm: add to check output/input channel value
To avoid out of bound value of output/input
channel add the check.

Change-Id: I25b7616d6fc08c2d0bb530dfb1457471dc25861c
Signed-off-by: Shashi Kant Maurya <smaury@codeaurora.org>
Signed-off-by: Ramu Gottipati <ramug@codeaurora.org>
2021-08-12 04:15:43 -07:00
qctecmdr ba00f99c41 Merge "asoc: wcd-cpe: Set the dma_mask for cpe_device" 2021-08-08 23:12:19 -07:00
qctecmdr e76714cb32 Merge "ASoC: msm8952: Defer until pcm voice probe done" 2021-08-02 23:23:49 -07:00
Shashi Kant Maurya 4314a0f156 asoc: wcd-cpe: Set the dma_mask for cpe_device
Memory allocation for wcd-cpe ramdump fails as memory is
not allocated from CMA reserve leading to CPE configuration
failure.
So force driver to allocate memory from CMA by
initializing the device’s coherent_dma_mask and dma_mask.

Fixes the SVA CPE sound model loading issue on tashalite variants.

Change-Id: Ic47017009aee666e364c7ec3ac62725c77a36b3c
Signed-off-by: Shashi Kant Maurya <smaury@codeaurora.org>
2021-08-02 14:13:15 +05:30
Kunlei Zhang f22c602a31 asoc: Parse wcd-datalane-mismatch property to update rx frame config for khaje
Due to datalane mismatch, update rx frame config to use DATA_LANE0 for
khaje qrd.

Change-Id: I0f5720ab1d7b7c585f7df986481c28568385f09d
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
2021-07-30 19:10:53 +08:00
Subhadra Jagadeesan 17074ec9bc ASoC: msm8952: Defer until pcm voice probe done
Random issue of delayed voice component probe is observed
sometimes happening after sound card registration. This causes
voice component driver probe not getting called during card registration and
results in voice mixer controls like CVD_Version missed out from sound mixer controls.
This results in crash in audio HAL acdb initialization flow.

Fix is to check for voice pcm probe status in machine driver and
defer until done.

Change-Id: Ib4e380da90d3dd66f054b46227e9fb79648b7524
Signed-off-by: Subhadra Jagadeesan <subhja@codeaurora.org>
2021-07-28 16:50:40 +05:30
qctecmdr ffe853a885 Merge "asoc: Register CDC_DMA interface only if enabled" 2021-07-24 11:15:18 -07:00
qctecmdr 20e0f5bb61 Merge "asoc: codecs: add null check before access" 2021-07-24 11:15:18 -07:00
Subhadra Jagadeesan 95f1bad1d3 asoc: Register CDC_DMA interface only if enabled
Register for the widgets and interconnections in routing
driver only when the respective interfaces are supported.
Add config based approach for CDC_DMA interface.

Change-Id: I56a8a3c14896cd1e267a4099e90ca480d13e2d6f
Signed-off-by: Subhadra Jagadeesan <subhja@codeaurora.org>
2021-07-15 11:45:03 +05:30
qctecmdr 5fd51489bb Merge "ASoC: wcd: Add check to stop invalid memory access" 2021-07-14 02:16:54 -07:00
Lakshman Chaluvaraju e7a2c47f01 asoc: codecs: add null check before access
Add null check before accessing cable status.

Change-Id: I77d19f543cf56ffaa159c490ea4df1f8c5a0f272
Signed-off-by: Lakshman Chaluvaraju <lchalu@codeaurora.org>
2021-07-13 16:39:59 +05:30
qctecmdr de549a6f75 Merge "asoc: codecs: Fix LPASS register access during bootup" 2021-07-08 20:30:27 -07:00
qctecmdr 9b69c23403 Merge "ASoC: msm8952: avoid static route between cpu and codec dai" 2021-07-08 20:30:27 -07:00
Sujin Panicker db70954c3b ASoC: Enable wsa881x-temp-sensor for bengal
Enable wsa881x-temp-sensor only for bengal, since
sdm450 uses both analog and digital wsa and would
cause symbolic error as wsa881x-temp-sensor would
be enabled twice.

Change-Id: Ibe78bee9a4400f5c4a355056b53d0bf726546f55
Signed-off-by: Sujin Panicker <c_spanic@qti.qualcomm.com>
2021-07-06 18:48:43 +05:30
Subhadra Jagadeesan 9babf6fd80 ASoC: msm8952: avoid static route between cpu and codec dai
Static route created between playback/capture widgets of
cpu and codec dai of same dai link cause codec path to get powered up first
followed by BE DAI start during device switch use-case like
audio playback on wsa-speaker and switch occurs to headphones upon insertion,
leading to audio playback failure.
Set the dynamic bit of BE DAI links of slimbus to update the backend parameters
before codec path setup.

Change-Id: I876efc10dace85069f980da864f017feee1b40ba
Signed-off-by: Subhadra Jagadeesan <subhja@codeaurora.org>
2021-07-06 15:59:19 +05:30
qctecmdr 12f3c1c51d Merge "asoc: msm_sdw: Revert adsp ready check for read/write" 2021-07-05 02:01:28 -07:00
Aditya Bavanari 656566e82e asoc: codecs: Fix LPASS register access during bootup
In analog codec and soundwire codec probe functions,
ADSP Audio PD up status is not checked which leads
to LPASS registers access during bootup
even before ADSP is ready.
Check for ADSP ready state in the respective
probe functions to fix this.

CRs-Fixed: 2202958
Change-Id: I8e05d30ef55cde58e8002d1040b3701280b91861
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2021-07-04 22:39:48 -07:00
Sanjana B e49de9f35d ASoC: wcd: Add check to stop invalid memory access
Catch any unexpected behavior with else case to
prevent invalid memory access.

Change-Id: I0edad1c645031286ba0528a52fd11655f445df35
Signed-off-by: Sanjana B <sanjb@codeaurora.org>
2021-06-29 12:40:04 +05:30
Soumya Managoli ef51f93795 ASoC: Changes to enable codec clk for wcd9335
wcd9335 codec on 8953/8937 uses div clk2.
Add support for the same in audio clock driver.

Change-Id: Ia4e40b6f7c993fc3ff9e66eebd9e08c7a9a46f23
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
2021-06-23 16:08:04 +05:30
qctecmdr 036d22eddd Merge "ASoC: Get the component handle for cpe and tasha" 2021-06-19 10:29:48 -07:00
qctecmdr 0879ae52eb Merge "SoC: codecs: Fix slim_tx port configuration for wcd9335" 2021-06-19 10:29:48 -07:00
qctecmdr 770c810a62 Merge "Asoc: check for invalid voice session id" 2021-06-19 10:29:48 -07:00