Commit Graph

396 Commits

Author SHA1 Message Date
Boyuan Yan
8972574067 asoc: Add build option for qcs6490
Add build option for qcs6490.

Change-Id: I2cd3ac1e296c8eb64702d26d0cb461052bc3ade2
Signed-off-by: Boyuan Yan <quic_boyuyan@quicinc.com>
2023-02-07 01:37:53 -08:00
Kogara Naveen Kumar
2283a81ea0 audio-kernel: Reset client info on deregister.
For elite and audioreach co-exit, we need keep source file same.
This patch exit in audioreach but not included in elite, cp it to keep file same.
Leveraged from audio-ar commit id ac15eb7016aff23a2be2a57289635d741cb95340

Change-Id: I187909403e9b54c8f6836477208de5e8311bf4ff
Signed-off-by: Kogara Naveen Kumar <quic_nkogara@quicinc.com>
2022-07-13 04:29:54 -07:00
qctecmdr
8247a993b5 Merge "soc: swr-mstr-ctrl: Fix swr overflow for wsa" 2022-07-08 04:22:28 -07:00
Shuai Zhang
f29f6cfcad soc: swr-mstr-ctrl: Fix swr overflow for wsa
Add 500us delay to wait fifo availability.

Change-Id: Idea94f036f5758febecbf2e1e1c6dc900238ebfe
Signed-off-by: Shuai Zhang <quic_shuzhan@quicinc.com>
2022-06-18 10:46:06 +05:30
Faiz Nabi Kuchay
26aeee1f6b audio-kernel: Disable clock voting logs
trace_printk is recommended for debugging purpose as it
requires temporary memory to handle strings. If used
anywhere within the kernel, memory will be allocated to it.
Hence removed it to avoid any unnecessary memory allocation.

Change-Id: If7b0cada91c97b21987f91e0ff7b7a15ce2145e2
Signed-off-by: Faiz Nabi Kuchay <quic_fkuchay@quicinc.com>
2022-06-14 15:03:01 +05:30
qctecmdr
b3a157d968 Merge "Audio-kernel: Comparison of unsigned value" 2022-05-15 22:17:26 -07:00
Shazmaan Ali
4de0f17990 asoc: codecs: Add nullptr check
fix for nullptr deref issue

Change-Id: I26acf2c5c696038c6d5c64d858174b2f2c58a7d3
Signed-off-by: Shazmaan Ali <quic_shazmaan@quicinc.com>
2022-05-11 06:27:07 -07:00
Kogara Naveen Kumar
a1f22acc7a Audio-kernel: Comparison of unsigned value
Make unsign value as sign value.

Signed-off-by: Kogara Naveen Kumar <quic_nkogara@quicinc.com>
2022-05-10 17:25:07 +05:30
Hexuan Zhu
a5cac99417 audio-kernel: add ar conf in makefie
Use CONFIG_SND_SOC_AR to load ar conf for audio kernel.

Change-Id:I2598d21b28cfd02083d42116dcab4f25800bd089
Signed-off-by: Hexuan Zhu <quic_hexuzhu@quicinc.com>
2022-04-13 16:16:50 +08:00
Shuai Zhang
31b7445e17 soc: swr-mstr-ctrl: Fix SWR cmd FIFO overflow error
Fix SWR cmd FIFO overflow error.
In 5.4 kernel there are few additional register writes added in soundwire driver,
one of the register(SWRS_DP_SAMPLE_CONTROL_2_BANK) write is causing overflow error.

Change-Id: I31f4855af52b24ceac53f55010ce1935c3bc1ea6
Signed-off-by: Shuai Zhang <quic_shuzhan@quicinc.com>
2022-03-07 12:50:23 +05:30
Hongtao Peng
8985f86c67 soc: add snd_event_init func for mark audio KPI
snd_event_dlkm is loaded as the first module.
Add init function and place mark in it to indicate the
start time of audio driver initialization.

Change-Id: Ie0c85b9166686d91f71ff773224eca59d85a36e5
Signed-off-by: Hongtao Peng <hongtaop@codeaurora.org>
2021-11-25 14:29:22 +08:00
Meng Wang
e92fbc265e soc: swr-mstr-ctrl: Move to CPU-1 FIFO for swr register read/write
Both APSS and ADSP are accessing CPU-0 FIFO when CPS is enabled
during speaker playback. This causes underflow issue when accessing
wsa register from APSS. Move APSS to CPU-1 FIFO to resolve underflow
issue.

Change-Id: I5ed9143bc78757468fbe4bcc686196149ca521f2
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-11-03 01:07:29 -07:00
qctecmdr
ad7d534b55 Merge "wsa: soundwire: Add support for 4p8MHz DAC rate" 2021-04-11 22:36:54 -07:00
Laxminath Kasam
b82a120fb9 wsa: soundwire: Add support for 4p8MHz DAC rate
Add support to use 4p8MHz DAC rate for receiver
over WSA.

Change-Id: Ia0811670326be8131687fbdff70464da063902b2
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2021-04-05 09:57:42 +05:30
Deru Wang
5922d64b86 ASoC: add gvm config file for auto sa8295 platform
Bring up LV GVM audio module for automotive sa8295 platform.

Change-Id: If56b83c3bf0f49480bd1531474e5942c607741b0
Signed-off-by: Deru Wang <deruwang@codeaurora.org>
2021-03-31 19:28:14 +08:00
qctecmdr
0ff598a201 Merge "soc: swr-mstr-ctrl: update sampleinterval low only when disconnect swr port" 2021-01-21 09:53:28 -08:00
Meng Wang
d912b11368 soc: swr-mstr-ctrl: update sampleinterval low only when disconnect swr port
Register SWRM_DP_PORT_CTRL_BANK only has sample interval low.
When disconnecting swr port, only update sampleinterval low for
active port.

Change-Id: Iec7c266fce76ce140a43f9e410126ad5560f5b81
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2021-01-15 11:08:37 +08:00
Vatsal Bucha
673d4a9777 soc: swr-mstr: Fix headset detect issue during clk stop wakeup
When ext clk stop wakeup and slave_pending_irq come together
then interrupt at swrslave is cleared due to calling
enable_slave_irq. Do not clear interrupts for enable_slave_irq
when its called from clk stop wakeup.

Change-Id: Ia710030ab80306d6750bea7264f0d4c07053d701
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2021-01-08 13:18:36 +05:30
Meng Wang
b273c82691 soc: swr-mstr: return when requesting hw vote fails
SSR notification may not come to swr master control
in time and cause swrm_runtime_resume tries to access
SWR registers. Update the logic to return when requesting
hw vote fails.

Change-Id: Ia85e9ce540ff88d16e8e73c48bab26fb277b86bb
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-12-06 21:35:32 -08:00
qctecmdr
8f873b516f Merge "soc: swr-mstr: update logic to dump soundwire register" 2020-11-29 23:55:13 -08:00
qctecmdr
65c5953d9a Merge "soc: swr-mstr: Avoid underflow due to CPS spkr prot enabled" 2020-11-25 18:57:01 -08:00
qctecmdr
8527c974cb Merge "soc: swr-mstr: Update soundwire state to SSR during UP" 2020-11-25 18:57:01 -08:00
Laxminath Kasam
643c33dcd6 soc: swr-mstr: Update soundwire state to SSR during UP
During SSR up event handler, if soundwire state is
already up or auto suspend jiffies is not completed,
ensure put in suspend/SSR state.

Change-Id: I853f42d125eb5a60e3f1f065a60516877e3a463c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2020-11-17 02:30:16 -08:00
Hongtao Peng
eae52c27a7 ASOC: fix audio machine driver compile issue
LV Platform use the same LVGVM cause Kbuild mismatch issue

Change-Id: Iad092ebcbd991e52daedb87406920055528e3a1c
Signed-off-by: Hongtao Peng <hongtaop@codeaurora.org>
2020-11-15 18:32:38 -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
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
5872bd0838 Merge "asoc: wcd937x: Update slave port config table for BCS" 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
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
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
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
Vatsal Bucha
760bd4ab46 soc: swr-mstr: Check for fifo avail before bulk write
Check for fifo availability before writing slave registers
during swrm master bulk write so as to prevent swr
overflow, underflow errors.

Change-Id: I97a914cac289b3f1215ccf5c1abec88b959a9f21
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2020-10-18 12:45:38 +05:30
Vignesh Kulothungan
941b438117 soc: update port config table to handle sva/voip
Update sample interval in 4.8MHZ port config table of soundwire
digital mic slave and TX1 soundwire master port.
Update the block offset of soundwire digital mics 0 and 3 to handle
voip/sva dmic concurrency in both handset and speaker mode.

Change-Id: I85480c3609a72d4be3c4643b0123f09d71b97fef
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-10-12 15:32:37 -07:00
qctecmdr
ef3408efeb Merge "soc: Add ratelimit to supress the pr_err/dev_err." 2020-10-12 10:10:29 -07:00
Prasad Kumpatla
a07613afcd soc: Add ratelimit to supress the pr_err/dev_err.
Add ratelimit to supress the logs flooding at the
time of SSR.In all places defined ratelimit as,
in 1sec one debug msg prints.

Change-Id: I6dfe140848e5cecb1b311c432f8311cdf0615a58
Signed-off-by: Prasad Kumpatla <nkumpat@codeaurora.org>
2020-10-07 10:21:42 +05:30
Harshal Ahire
4015ed0c54 soc: fix HS LPI issue for holi target
- Skip audio hm voting during bootup.
- Vote and unvote audio hm vote during swrm_runtime_suspend
  and swrm_runtime_resume

Change-Id: I7a9c20f62ba0d87779b26da218bfe7373132b565
2020-09-29 00:35:35 -07:00
qctecmdr
caf52994ef Merge "soc: remove error log in lpi gpio write" 2020-09-23 22:09:43 -07:00
Sudheer Papothi
001b648150 soc: soundwire: Update frame configuration for native audio playback
Update frame shape configuration for native audio playback for better
performance during native audio playback.

Change-Id: I2d7c22e1cb69e73e4f474be020931d74715a1a60
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2020-09-19 10:58:26 -07:00
Vignesh Kulothungan
26542e0764 soc: remove error log in lpi gpio write
When sound wire master suspend is called, it holds the mutex lock
and does lpi_gpio_write, which gets preempted during pr_err_ratelimited.
Any other calls to master suspend will be blocked waiting for the above
mutex lock resulting in timeouts.
Remove pr_err_ratelimited log when device is down.

Change-Id: I148263ddbb89d436b0ce27bdc4519f196d90679a
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2020-09-17 11:57:51 -07:00
Meng Wang
91437a36ea soc: swr-mstr: check swrm->state in swr_runtime_suepend
in swrm_runtime_suspend, current_state is not updated and
causes audio_core_vote is not disabled. Update to check
swrm->state to resolve this issue.

Change-Id: I2c5be360fe5ddd964d7bc45696e254579aae5392
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-09-08 13:13:56 +08:00
qctecmdr
994eb4e818 Merge "ASOC: fix audio machine driver compile issue" 2020-09-03 18:06:23 -07:00