Commit Graph

3671 Commits

Author SHA1 Message Date
Meng Wang
748165aae9 asoc: codec: add range check to avoid overflow
Add range check for ucontrol value to avoid array
overflow.

Change-Id: I7b699519bec6f605e5ca5ece8f67badbefc7a094
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-11-13 09:16:35 +08:00
Tahir Dawson
4dad2aea99 ASoC: msm: add proxy port and pcm backend in machine driver
* Add additional proxy port frontend and pcm backend to support dual proxy port
* Add channel configuration mixer control for second proxy port

Change-Id: Iba7e21f17122926d27acc58be653351b4d0ea37a
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
Signed-off-by: Tahir Dawson <dawson@codeaurora.org>
2020-11-12 11:39:51 -08:00
Kunlei Zhang
f3e67f4b51 dsp: use default bit-width when start VoLTE call in power mode
VoLTE in power mode doesn't support to configure bit-width of
AFE port with 24bit.

Fix it by use default bit-width when start VoLTE in power mode.

Change-Id: Ic429ea317c71c9a4436705663185fc69cb885166
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
2020-11-12 16:35:35 +08:00
Akhil Karuturi
a6d9099cf5 dsp: q6core: retry till adsp is up to send custom topologies
add retry logic to ensure adsp is up before registering custom
topologies

Change-Id: Ib88c06ae8c64cd0784319f40e3746ccbbce0cdf7
Signed-off-by: Akhil Karuturi <akarutur@codeaurora.org>
2020-11-11 21:25:47 -08:00
Nirav Khatri
123a24f2c0 ASoC: Fix typo in SENARY_MI2S_RX clk info
Update the typo to fix failure in afe_get_port_idx during RX usecase.

Change-Id: I2026cbce0165e6f5e4059945183a09feaee89b45
Signed-off-by: Nirav Khatri <khatri@codeaurora.org>
2020-11-12 07:32:28 +05:30
Saurav Kumar
1546c9a1b2 dsp: add change to fix use-after-free issue
Add change to properly handle the pointers by setting them to
NULL after free and adding some null checks before dereferencing.

Change-Id: Ic2f3ef5631d0f4e4191bf772eb0b3f0b825044a6
2020-11-11 02:54:36 -08:00
qctecmdr
dec796e30a Merge "dsp: add change to enable preemption at cal_utils_dealloc_cal." 2020-11-10 23:20:57 -08:00
qctecmdr
e9b221b2ee Merge "asoc: pcm-noirq: set substream state to disconnect when ssr happens" 2020-11-10 23:20:57 -08:00
qctecmdr
4aa9a95519 Merge "soc: add support to read swr physical addr from dt" 2020-11-10 23:20:57 -08:00
qctecmdr
911e4533ee Merge "asoc: codec: Fix compilation for wcd934x codec driver" 2020-11-10 23:20:57 -08:00
Vatsal Bucha
70dbfce31b asoc: bolero: Add core_vote before gfmux access
GFMUX access happen during WSA macro usecase.
Update wsa macro to do core_vote before clock
request.

Change-Id: I0b96e725e5150fff4d8bef0d6a50837fc9a3f873
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-11-10 20:34:56 +05:30
Soumya Managoli
c98cda65d3 dsp: afe: Add new token to handle nowait cmds
Race condition is observed when sending afe cmd
and afe nowait cmd one after other resulting
in incorrect interpretation of the adsp responses
received back to back.
Handle this by adding a new data token for nowait
commands to indentify the response recevied is for
the same.

Change-Id: I76bf810c23d1fd572cb496c62cbfaac1a5c349b5
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
2020-11-09 16:08:57 +05:30
Vatsal Bucha
7a33dc6cc1 ASoC: codecs: Add count check for swr haptics device up/down
Add count check before enabling/disabling regulator for swr
haptics. This is to ensure that count dosent get mismatched.

Change-Id: I73bb9f8ef459eea4327b9db09c430e8c2ec87adb
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-11-09 10:42:20 +05:30
Kunlei Zhang
288c9e6f71 ASoC: bolero: remove LPI status check during device switch
Remove LPI status check during device switch to avoid missing
deregister irq.

Change-Id: I06860cc0b6f16a2150f9475c7d021fe97daf6b97
Signed-off-by: Kunlei Zhang <kunleiz@codeaurora.org>
2020-11-06 15:06:14 +08:00
Meng Wang
e0705ab0d4 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>
2020-11-06 09:14:44 +08:00
Vignesh Kulothungan
41db7ae304 soc: add support to read swr physical addr from dt
Remove static definitions of rx swr slave physical addresses.
Add support to read swr slave physical addresses from device
tree and store it within respective master data structure.
Revert addition of slave device address for wcd937x in soundwire
master.

Change-Id: I0eb2597b8e40a54d476cd2662bbe4f2008af899a
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-11-05 16:10:45 +08:00
qctecmdr
78fff06931 Merge "asoc: codecs: fix race condition of core vote and reg access" 2020-11-04 19:57:25 -08:00
Saurav Kumar
e4463e36c8 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-03 12:30:01 +05:30
Amitkumar H(Temp)
5d7c21de7f asoc: codec: Fix compilation for wcd934x codec driver
Fixed compilation issues.

Change-Id: Ia8ba3840f7630361c430ccbaab6cde5a24f8c367
Signed-off-by: Amit Kumar Hayyal <amih@codeaurora.org>
Signed-off-by: Vivek Malapaka <malapaka@codeaurora.org>
2020-11-01 20:44:17 -08:00
qctecmdr
59298aad12 Merge " ASoC: bolero: Update clock sequence to clear Fs counter" 2020-11-01 20:23:50 -08:00
qctecmdr
8ae1b12168 Merge "soc: add check condition before enabling irq" 2020-11-01 20:23:50 -08:00
Vangala, Amarnath
f2e5dd213c 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>
2020-10-30 14:58:15 +05:30
qctecmdr
f03233c4f7 Merge "soc: swr-mstr: Enable device wakeup only for tx macro" 2020-10-28 11:22:16 -07:00
Vignesh Kulothungan
01906e6049 soc: add check condition before enabling irq
Enable interrupt request only when the interrupt is
in disabled state.

Change-Id: I67795bf0ee344661e02b0fec3181cd7980d56652
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-10-28 10:15:12 -07:00
Vatsal Bucha
ff2053b1fe soc: swr-mstr: Avoid underflow due to CPS spkr prot enabled
Underflow is observed sometimes with CPS spkr prot enabled.
Reduce no of retry count for wsa to 1 so as to optimize delay
between reads on wsa and prevent underflow.

Change-Id: I505fcf349b45bd6f2374e5cfee83473f032e4ad7
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-10-28 14:58:33 +05:30
Meng Wang
795c484ea3 soc: swr-mstr: update logic to dump soundwire register
Some soundwire register dump is skipped with current logic.
Update ppos logic to dump all soundwire registers correctly.

Change-Id: Id053e2b71705ca17caf2de2bb85f8c987790099a
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-10-27 11:21:34 +08:00
qctecmdr
7c1dc5a70e Merge "asoc: msm-pcm-q6-v2: Update memset for period size" 2020-10-25 07:34:22 -07:00
qctecmdr
d757a256e4 Merge "asoc: avoid adding global control in loopback probing twice" 2020-10-25 07:34:22 -07:00
qctecmdr
6b3783e3b8 Merge "ASoC: error check for backend index and MCLK src" 2020-10-25 07:34:22 -07:00
qctecmdr
c5337ea009 Merge "asoc: va-macro: Update clk_div switch based on decimation rate" 2020-10-25 07:34:22 -07:00
qctecmdr
3fc43769b0 Merge "asoc: routing: add PRI_TDM path as echo reference data" 2020-10-25 07:34:22 -07:00
qctecmdr
5872bd0838 Merge "asoc: wcd937x: Update slave port config table for BCS" 2020-10-25 07:34:22 -07:00
qctecmdr
93e8156fb8 Merge "asoc: bolero: Add core_vote before gfmux access" 2020-10-25 07:34:22 -07:00
qctecmdr
88318ed5e8 Merge "soc: swr-mstr: Resolve swr overflow, underflow errors for wsa" 2020-10-25 07:34:21 -07:00
qctecmdr
6de6dc28a5 Merge "soc: update port config table to handle sva/voip" 2020-10-25 07:34:21 -07:00
qctecmdr
170e5c6038 Merge "soc: update mechanism to set master port offset1" 2020-10-25 07:34:21 -07:00
qctecmdr
883a10354b Merge "soc: swr-mstr: Check for fifo avail before bulk write" 2020-10-25 07:34:21 -07:00
Amit Kumar H
bc905e33d5 asoc: codec: Fix compilation for wcd9335 driver
Change macros for 5.4 kernel compatible.

Change-Id: Iaf15183653d8c2f2072437cfb92d048a954e96f9
Signed-off-by: Vivek Malapaka <malapaka@codeaurora.org>
Signed-off-by: Amit Kumar H <amih@codeaurora.org>
2020-10-23 10:31:53 +05:30
Mangesh Kunchamwar
b45e776c9c ASoC: error check for backend index and MCLK src
Update proper error checks for backend index and MCLK src
ID.

Change-Id: I36680f7bae66f95f099d59740c68861c5ee28d86
Signed-off-by: Nirav Khatri <khatri@codeaurora.org>
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2020-10-22 14:08:51 +05:30
Vatsal Bucha
5fe4a509cc soc: swr-mstr: Enable device wakeup only for tx macro
At bootup device wakeup enable is called for all masters
causing issue for wsa on lahaina. This is because wsa
supports interrupts on lahaina. Thus enable device wakeup
only for tx master.

Change-Id: Ia53df31427e54d5fd981cd650e1b0f06cb2d47b5
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-10-22 13:32:08 +05:30
Vignesh Kulothungan
9d8d55d947 soc: update mechanism to set master port offset1
When multiple slave ports are configured to a single master port,
the offset1 of master is the minimum of all slave port's offset1.

Change-Id: I102269806048ecf9982489164a7651a2cdd0661c
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-10-20 11:32:42 -07:00
Laxminath Kasam
b522d6a8f2 asoc: msm-pcm-q6-v2: Update memset for period size
tinycap test can attempt with different size to
read from driver and need to avoid access more
than period size.

Change-Id: Ifa4ddfb086bd83aa981da62e88da3a9395f5aabc
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-10-20 13:18:55 +05:30
Vignesh Kulothungan
d7c3e4fbe1 ASoC: codecs: add null check before use
Add null check for swr dmic component and swr_dmic_priv
before use.
Add array bounds check for slave port index before
accessing the array.

Change-Id: I57cc860e69d75385434822b1975d869d12717de4
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-10-19 23:22:43 -07:00
qctecmdr
19df8856be Merge "asoc: Fix LSM2 mixer control array" 2020-10-19 21:44:04 -07:00
qctecmdr
6e98db9bf4 Merge "asoc: routing: remove unnecessary routing for TDM_TX" 2020-10-19 21:44:04 -07:00
qctecmdr
09d2850b3a Merge "asoc: holi: use new pm_qos API" 2020-10-19 21:44:04 -07:00
qctecmdr
e2c4330a48 Merge "q6afe: add support for lc3 codec playback" 2020-10-19 21:44:03 -07:00
Laxminath Kasam
212d01f856 asoc: wcd937x: Update slave port config table for BCS
Update slave port config table to avoid overlap
of BCS channel with headset ADC2 channel.

Change-Id: Ib414ac1bcbdf66fd4addc6ca22edb78a61ea7a90
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-10-19 13:40:31 +05:30
Guodong Hu
88dba174c9 asoc: avoid adding global control in loopback probing twice
Add condition control to avoid mixer being added twice,
to avoid kernel error printing.

Change-Id: I832e4c08ac06fe885c1497bce4bd4ada96ef83fb
Signed-off-by: Guodong Hu <guodhu@codeaurora.org>
2020-10-19 15:12:21 +08:00
Vatsal Bucha
5936ba71aa soc: swr-mstr: Resolve swr overflow, underflow errors for wsa
SWR overflow, underflow interrupts are seen sometimes on bootup.
Check whether devnum is 0 during fifo read and write. Also assign
read and write fifo depth before master init to resolve errors.

Change-Id: Id7b687985e320396d2f9dab69db56cc7f5426b04
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-10-19 12:04:28 +05:30