Commit Graph

153 Commits

Author SHA1 Message Date
yuayang
568d8d0822 asoc: audio-kernel: Remove trace_printk
Remove trace_printk point.

Change-Id: I76b53eda77bc41c75e06a885084022d74c248188
Signed-off-by: yuayang <quic_yuayang@quicinc.com>
2023-12-21 16:26:31 +08:00
Sairam Peri
6e38fad118 asoc: codecs: update max sampling rate of wsa881x analog driver
Updated the wsa dailink to support 384Khz HS playback.

Picked latest codec fixes to kernel6.0.

Change-Id: Ia570dc3f3ed55415ac374e1ba3bb6f2277dade96
Signed-off-by: Sairam Peri<quic_peri@quicinc.com>
2023-08-31 23:33:37 +05:30
Vatsal Bucha
c5698c8a0b bolero: tx-macro: Fix link status not connected issue due to clk not enabled
Sometimes link status is not connected due to tx_mclk_users
not being properly updated. This is due to tx_mclk_users
enable and disable not being protected by common mutex lock.
Add mutex lock whereever it is accessed to resolve issue.

Change-Id: Ibba208be1f2d3eaf63c49e434c2ae48bc3b5b2d8
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2021-05-24 01:44:55 -07:00
Soumya Managoli
afde3b3eb2 asoc: bolero: Update PCM_RATE based delay for amic
The PCM_RATE bit field in LPASS_TX_CDC_TXn_TX_PATH_CTL
ranges from 0 to 6.
In the current implementation of tx-macro, the value
read is mapped directly to the sample rate instead of
the indices. Change is to correct this.
Add the delay based on pcm_rate in va-macro as well.

Change-Id: I6cb7e58e71f2a25356608611f1dfed83171706f6
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
2021-05-17 06:03:13 -07:00
Laxminath Kasam
01756036b5 asoc: lpass-cdc: Update swr pdev initialize order
During sound card register init call, if swr pdev
is not initialized yet respective soundwire port
config is not updated to soundwire controller device.
In macro drivers, update swr pdev into macro private
data prior to platform device add.

Change-Id: Ifa67471cfc7a10b102b573df6285e598bb0b5e5e
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2021-04-26 07:50:25 -07:00
Vatsal Bucha
b6430e162b asoc: codecs: add child devices after completing initialization
In bolero-cdc and tx, va, wsa and rx macros, move schedule_work call to
add the child devices to the point later to where the parent
initialization gets completed.

Change-Id: Iaa07329a25020dde21d9249c3848bb7fcf7d816a
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2021-03-15 21:53:10 -07:00
Vatsal Bucha
79d3ed87ca 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: I758cf57bde4e0b56320ef18f6f17adc655fc8fcb
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2021-03-08 06:24:35 -08:00
Jyotirmoi Sarma
a3d8911945 audio-kernel: asoc : Upgrade asoc to support 5.10 kernel
Change-Id: Ia54112cfbde418d66b9314d4ba731928aa057558
Signed-off-by: Jyotirmoi Sarma <jyosarma@codeaurora.org>
2020-12-08 08:49:44 -08:00
Phani Kumar Uppalapati
b15db3b6c8 Merge commit 'd9fa9d435ba1b92cf0f0361a0749107b7abc45a5' into audio-kernel-5-4.lnx.1.0
Change-Id: Iaf98532030ee4ef5fe6a70df083a685733dd5670
2020-11-05 19:15:07 -08:00
Laxminath Kasam
e0ea9653c3 asoc: bolero: control wakeup of swr_tx during clock setup
Move the enable and disable of wakeup capability of
swr_tx gpios to clock setup to disable or enable it
in all required usecases.

Change-Id: I9fb76926d8520c382e7f19777190357c50f98994
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-10-14 12:55:12 +05:30
Vidyakumar Athota
88c1c0288c Merge commit '1a7cee75ba63d6cce68924591b125d604bef39f5' into audio-kernel-5-4.lnx.1.0
Change-Id: Ie4363b4d1be12c7fd85e261bf728462009d8a2cf
2020-09-30 10:01:03 -07:00
Vatsal Bucha
ffd65896dd ASoC: bolero: Make tx swr gpio as wakeup capable
Do not register afe event listener for shima and make
tx swr gpio as wakeup capable.

Change-Id: I4d805c2b65e6c424c1c215431caa75f6181a16e8
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-09-29 14:29:49 +05:30
Meng Wang
1a7cee75ba asoc: bolero: switch clk to VA_CLK for LPI SVA
When switching TX_CLK to VA_CLK, there could be some
IRQ missing with current design. Switch the clk in bolero
to avoid the corner case.

Change-Id: I9a8b15ade3358c7276356a0f6555b541651d85a5
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-09-21 11:45:19 +05:30
Meng Wang
0dbd04d871 Revert "Revert "ASoC: bolero: check clock source before clock switch""
This reverts commit 68cbba47d0 as this
causes AMIC SVA issue.

Change-Id: Icb08cec87b108243fc9660a519c332c1f3ffb48d
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-09-21 11:44:00 +05:30
Salendarsingh Gaud
5d69def3cf Revert "Revert "Revert "ASoC: bolero: check clock source before clock switch"""
This reverts commit bdb29e89ea.

Change-Id: Ie82e94c86cb063ec9cc45695f4df9b0e5f842217
2020-09-13 13:01:06 +05:30
Salendarsingh Gaud
48dd09c650 Revert "asoc: bolero: switch clk to VA_CLK for LPI SVA"
This reverts commit 87d4e3c1b9.

Change-Id: Ie2e5d7a9ce900d3f390481d3fc7ac207260ab315
2020-09-13 13:01:06 +05:30
Meng Wang
87d4e3c1b9 asoc: bolero: switch clk to VA_CLK for LPI SVA
When switching TX_CLK to VA_CLK, there could be some
IRQ missing with current design. Switch the clk in bolero
to avoid the corner case

Change-Id: Iec5cac16e026e4e46646894c546f1acb3fce4fa8
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-09-09 16:56:04 +05:30
Meng Wang
bdb29e89ea Revert "Revert "ASoC: bolero: check clock source before clock switch""
This reverts commit 68cbba47d0 as this
causes AMIC SVA issue

Change-Id: I0e66c97dfc9499c30942ce2e3a123be58833eac8
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-09-09 16:55:44 +05:30
Meng Wang
5de0472da9 asoc: bolero: switch clk to VA_CLK for LPI SVA
When switching TX_CLK to VA_CLK, there could be some
IRQ missing with current design. Switch the clk in bolero
to avoid the corner case.

Change-Id: Iec5cac16e026e4e46646894c546f1acb3fce4fa8
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-09-09 16:34:16 +08:00
Vidyakumar Athota
584244b6ac Merge commit '5efb3a4ee3959f20ed2b697663205ec9a6bd1e5c' into audio-kernel-5-4.lnx.1.0
Change-Id: I58fbdf6b91c33ab5d147efbe5f5706616052c7fe
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2020-09-06 18:25:28 -07:00
Linux Build Service Account
b9c15b6953 Merge "Merge commit '33ea77356f47c6c596c8505ca90307fc1245ef3f' into audio-kernel-5-4.lnx.1.0" into audio-kernel-5-4.lnx.1.0 2020-09-06 06:58:55 -07:00
Rohit kumar
e25a1fdc64 asoc: codecs: Update logic for active ch cnt calculation
Use number of bits set in active_ch_mask to calculate
active channel count. This fixes improper update of
channel count if same kcontrol is issued more than
once.

Change-Id: I84dc33ad5b6dbfc3babf5bbfeab1e2e71af5983b
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
2020-08-31 22:42:09 -07:00
Meng Wang
ea56a753a8 Revert "Revert "ASoC: bolero: check clock source before clock switch""
This reverts commit 68cbba47d0 as this
causes AMIC SVA issue.

Change-Id: I0e66c97dfc9499c30942ce2e3a123be58833eac8
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-09-01 10:24:46 +08:00
Sudheer Papothi
65b24ebabc ASoC: tx-macro: Allow regcache sync during clock enablement
Allow regcache sync during clock enable to make sure the registers
are in proper state before the usecase.

Change-Id: I8a9214e460c7f77759d1956e0e7e2d6b2f5b3d3a
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-08-04 17:02:00 -07:00
Sudheer Papothi
ab0d3bfa37 ASoC: bolero: Add LPI mode for VoLTE usecase
Add LPI mode support for VoLTE usecase to register
soundwire inband interrupts during LPI mode.

Change-Id: Id955f211587fac1c2608dcb753f62b0b1f9b60cc
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-07-20 14:23:15 -07:00
qctecmdr
d36eef9148 Merge "asoc: bolero: Ensure va-macro is registered before other macros" 2020-07-14 06:11:20 -07:00
qctecmdr
ab4679a93f Merge "soc: soundwire: Enable audio core voting" 2020-07-14 06:11:20 -07:00
Laxminath Kasam
b9ff5ac5b0 asoc: bolero: Ensure va-macro is registered before other macros
As va-macro has fs_clk gen, ensure va-macro
is registered before other macros.

Change-Id: I8283dc11817caf0c208fe231132951a7a79b7d51
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-07-08 19:51:47 +05:30
Sudheer Papothi
68cbba47d0 Revert "ASoC: bolero: check clock source before clock switch"
This reverts commit 93bc6299f3 and
6cc7f52a6d.

Change-Id: I614b650d6e071b9d1867988ebc88246b9fdc8f91
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-07-08 03:39:55 +05:30
Vatsal Bucha
39b18cbd38 ASoC: bolero: Resolve glitch during amic record
Glitch is observed during amic record due to improper
sequence being followed. Reduce delay between toggle
of hpf gate to depending on sample rate to resolve glitch.

Change-Id: I8d9810dbc00264662f24532be9338198e6d7316d
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-07-02 20:09:54 -07:00
Laxminath Kasam
034cd15ba8 Revert "soc: mstr-ctrl: Retain Audio_HM voting until suspend"
This reverts commit d02c7efb35.
and commit 61f235e5bd to avoid AOP
related issues.

Change-Id: I0b8b44bc5cca6bef6bc18c228f08a9c585c79c1c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-06-22 09:40:14 +05:30
Laxminath Kasam
d02c7efb35 soc: mstr-ctrl: Retain Audio_HM voting until suspend
Restore change to retain audio_hm voting and
ensure AOP hang issue not seen by masking interrupt
wakeup of swr pinctrl pins.

Change-Id: I51bf36d6d6b0999abf10a4bc94cce900d1adf1d5
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-06-08 16:24:54 +05:30
Laxminath Kasam
61f235e5bd asoc: bolero: Register for AFE event for all SVA usecases
For island SVA usecase, ensure register for
AFE in-band interrupt.

Change-Id: I24e6dfadfaa38919114000fb09a7906264020cd9
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-06-08 16:23:50 +05:30
qctecmdr
3938234bc8 Merge "asoc: codec: Add pre ssr up event for all macros" 2020-06-01 10:27:01 -07:00
Prasad Kumpatla
515fc228ee asoc: codec: Add pre ssr up event for all macros
Add a pre ssr up event in all macros ,where GFMUX reset
to done before set the dev_up flag to true.

Change-Id: I77229ccd0ed68aac841146a89fe7f76961260aea
Signed-off-by: Prasad Kumpatla <nkumpat@codeaurora.org>
2020-05-26 15:15:51 +05:30
Meng Wang
30fad2dc20 asoc: codec: update SOC_SINGLE_SX_TLV to SOC_SINGLE_S8_TLV
Update SOC_SINGLE_SX_TLV to SOC_SINGLE_S8_TLV to make codec
driver compatiable with upstream driver.

Change-Id: I4061b015d715978f3b294ad630f53b64bf66c2b7
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-05-19 08:34:39 +08:00
qctecmdr
a7e2d0d2b4 Merge "asoc: bolero: Fix AMIC TX pop on bolero 2.1" 2020-05-10 05:35:13 -07:00
qctecmdr
3dc027a3da Merge "asoc: Fix port collision interrupt in WSA" 2020-05-10 05:35:13 -07:00
qctecmdr
b0afb2d28b Merge "bolero: tx-macro: Fix audio distortion during amic record" 2020-05-05 23:55:58 -07:00
Laxminath Kasam
942fe13e42 asoc: bolero: Fix AMIC TX pop on bolero 2.1
For bolero 2.1, amic connect on any SWR input.
Update API to check amic usecase.

Change-Id: Iced7df39b0dbaf83e77a72536e55223d3bda2289
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-04-29 23:26:34 -07:00
Prasad Kumpatla
a804ab121b asoc: Fix port collision interrupt in WSA
During multiple PDR usecases, due to sync issues
port collision interrupt is observed.
set wsa state to device down  before cancelling the ocp
workqueue and bail out from the workqueue when wsa state
is set to device down.

Change-Id: Ibefb338c1d6d2901b8773928fa2c0c48b51ac6f7
Signed-off-by: Prasad Kumpatla <nkumpat@codeaurora.org>
2020-04-29 23:25:56 -07:00
Vatsal Bucha
f118f0b5b3 bolero: tx-macro: Fix audio distortion during amic record
Distortion is heard during CTS audio record. Do not
add delay while toggle hpf frequency and zero gate
to resolve distortion.

Change-Id: I234cfcce43a6fb5d9c372f2655abdb2f8b5c4853
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-04-28 22:54:33 -07:00
Aditya Bavanari
05ae12f1e0 asoc: codecs: Add BCS channel select mixer control
Add mixer control to support BCS SWR channel selection
in bolero.

Change-Id: Id26b20d674026d1798239c0e4e7e4c2d18ba89db
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-04-27 21:37:58 -07:00
Aditya Bavanari
236ff485d2 codecs: Enable clock voting logs to debug AHB/NOC issues
Enable clock voting logs to debug stability issues.

Change-Id: Ie1f995ab004778a81ea42baad15ea36858407e9a
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2020-04-20 10:17:02 -07:00
Meng Wang
5e7cf016e2 asoc: bolero: check if va is enabled when register/deregister wakeup irq
When LPI SVA is enabled, start recording and stop LPI SVA, wakeup irq
is not deregistered as tx_swr_clk_cnt is not 0. Add new check for
va_swr_clk_cnt to resolve the issue.

Change-Id: I441394f26b42f554169400194d021309ef70af9e
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-04-16 01:21:21 -07:00
qctecmdr
79a655928a Merge "ASoC: Remove glitch during amic record" 2020-04-08 21:02:08 -07:00
qctecmdr
26cced1678 Merge "ASoC: bolero: Fix higher btn press noise issue" 2020-04-08 21:02:07 -07:00
Vatsal Bucha
271dbe101b ASoC: Remove glitch during amic record
Glitch is coming sometimes during amic record.
Correct sequence to resolve the glitch.

Change-Id: I3c062632229826f6fe32e2f1ea9e07381c21d902
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-04-02 22:28:39 -07:00
Vatsal Bucha
1111e93af1 ASoC: bolero: Fix higher btn press noise issue
There is higher noise during headset btn press on some
headsets. Change hold time after button release to 600ms
to resolve the noise.

Change-Id: I87e5e13ce39849090da3d3e50ec53e7fd5fdc0e7
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-04-01 17:13:02 -07:00
Sudheer Papothi
93bc6299f3 ASoC: bolero: check clock source before clock switch
Check soundwire clock source before clock switch to avoid
redundant soundwire device suspend for the same clock source.

Change-Id: I613789b23c171959a60c9a059a30b3f1494f3dfa
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-04-01 11:49:25 -07:00