Commit Graph

547 Commits

Author SHA1 Message Date
Bhalchandra Gajare
c5f43a1eec ASoC: wcd-spi: add SPI bus arbitration logic
On some platforms, WCD SPI bus can be shared with other processors
(ex: sensor processor). In such cases, there is need for software
to arbitrate the bus control. Add functionality to perform SPI bus
arbitration.

Change-Id: I7df933f55ac5035a55173a04e74b74f7af1f7ece
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2019-04-15 02:49:09 -07:00
qctecmdr
e039f16fa4 Merge "ASoC: Bolero: Vote for LPASS HW core during register access" 2019-04-14 23:24:39 -07:00
qctecmdr
d980ab306c Merge "ASoC: wcd938x: Add support for wcd938x codec variants" 2019-04-14 23:20:39 -07:00
qctecmdr
e35360a8ab Merge "ASoC: bolero: Enable RCO for VA usecase" 2019-04-14 23:18:37 -07:00
qctecmdr
0d9b09f760 Merge "asoc: codecs: add null check before access" 2019-04-10 13:41:16 -07:00
Sudheer Papothi
7601cc6db6 ASoC: Bolero: Vote for LPASS HW core during register access
Vote for LPASS HW core in soundwire clock request before
soundwire register access to avoid LPASS going to sleep.

Change-Id: I1e54ece19130cf6bd63fbf75a8a0716856c3b73e
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-04-10 12:45:29 -07:00
Sudheer Papothi
a7397947d3 ASoC: bolero: Enable RCO for VA usecase
Add support to enable RCO during VA usecase.

Change-Id: Ic6b640f62a8a88b5d5b616fc05798917913356ed
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-04-11 01:14:19 +05:30
qctecmdr
cab1c77976 Merge "ASoC: bolero: Enable TX clock during VA path setup" 2019-04-10 11:28:31 -07:00
Sudheer Papothi
bb650fc65c ASoC: wcd938x: Add support for wcd938x codec variants
Add support for wcd938x codec variants. Changes detect the
variant and enable the corresponding features supported by
the codec variant.

Change-Id: Ib990465b42b903174391bb87115af47431b862ec
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-04-10 05:09:56 +05:30
Vignesh Kulothungan
864f843779 asoc: codecs: add null check before access
Add null check before accessing wcd938x private data.

Change-Id: Ia2226202deccccbd07e6c0d501daaded2b7e72d8
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2019-04-09 10:30:35 -07:00
Linux Build Service Account
088ff5589b Merge "ASoC: boloero: Add DAPM widgets for soundwire clock" into audio-drivers.lnx.4.0 2019-04-09 01:35:26 -07:00
Linux Build Service Account
badd1c794d Merge "asoc: codecs: bolero: add clk resource manager driver" into audio-drivers.lnx.4.0 2019-04-08 23:54:01 -07:00
Linux Build Service Account
addb5293a8 Merge "ASoC: wcd-mbhc: Remove hardcoding of hphl and gnd swh to NC for analog USBC" into audio-drivers.lnx.4.0 2019-04-08 23:54:01 -07:00
Sudheer Papothi
e826ba5129 ASoC: bolero: Enable TX clock during VA path setup
Enable TX clock during VA path setup for SVA usecase to make
sure LPASS audio is in active state.

Change-Id: Ic835905e48919e3c97ab2b82b43b90a146f4f32e
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-04-07 22:42:25 -07:00
qctecmdr
abca8128dd Merge "ASoC: wcd937x: Fix playback stop issue after SSR/PDR on special hs" 2019-04-06 23:14:37 -07:00
qctecmdr
4b17acc4cf Merge "asoc: wcd938x: stop mbhc during ssr down" 2019-04-06 23:14:37 -07:00
Vidyakumar Athota
5d45f4c865 asoc: codecs: bolero: add clk resource manager driver
Add Bolero clock resource manager driver to handle/manage
bolero clocks for all the concurrency usecases like record
+ voice activation.

Change-Id: I970a05d96fc9060b44bfe670d465f0b9d72cc53b
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2019-04-05 08:00:03 -07:00
Vatsal Bucha
15e7831783 ASoC: wcd-mbhc: Remove hardcoding of hphl and gnd swh to NC for analog USBC
Read hphl_swh and gnd_swh from dtsi instead of hardcoding to NC
for every USBC target. Some platforms use NO switch.

Change-Id: I3dca6c7450579e8feb5d80c1340495958683a026
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-04-05 07:59:58 -07:00
qctecmdr
b4c9798b90 Merge "ASoC: wcd938x: Update routing for HDR recording" 2019-04-05 03:46:09 -07:00
qctecmdr
d2c21188e5 Merge "asoc: wcd938x: Add default cases for port mapping" 2019-04-05 03:46:09 -07:00
qctecmdr
7e7016f0a8 Merge "asoc: codecs: bolero: Reduce hpf corner freq delay to 50ms" 2019-04-03 23:09:58 -07:00
Karthikeyan Mani
05588601ac asoc: wcd938x: Add default cases for port mapping
Return error in case of wrong path being selected
for port mapping and port params functions.

Change-Id: I5d66a9cd32e9c8e6d8ebac0ea073b1a1762407b6
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-04-03 12:24:11 -07:00
Meng Wang
e59703ce4e asoc: bolero: remove mutex_lock in bolero_runtime_suspend
There can be deadlock between __bolero_reg_read/write and
bolero_runtime_suspend. Remove the mutex_lock in
bolero_runtime_suspend to avoid deadlock.

Change-Id: I712b9f24adeddda8899b39f90291394965443163
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-04-01 17:49:59 -07:00
Meng Wang
281bd20437 asoc: wcd938x: stop mbhc during ssr down
Stop mbhc operations during ssr down to cancel
any pending detection sequences.

Change-Id: Iff054cf8b3099959a1be561bd937057258f57b81
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-04-02 08:44:38 +08:00
Sudheer Papothi
e456c2ca41 ASoC: boloero: Add DAPM widgets for soundwire clock
Add DAPM widgets for soundwire clock on Tx path and
VA path to enable the desired clock source based on
the usecase.

Change-Id: I48b04e63317cefd8bf12d58b002efb37087f8dc2
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-04-01 11:34:10 -07:00
qctecmdr
b1a49c6b67 Merge "ASoC: bolero: va-macro: Fix ioremap in va macro probe" 2019-03-29 01:41:04 -07:00
Linux Build Service Account
3ad70de4a8 Merge "asoc: wcd937x: Disable EN_CUR_DET bit for receiver noise" 2019-03-26 21:22:47 -07:00
Linux Build Service Account
94de539c53 Merge "asoc: wcd938x: Disable EN_CUR_DET bit for receiver noise" 2019-03-26 21:22:47 -07:00
Mangesh Kunchamwar
3d4eec47ef asoc: codecs: bolero: Reduce hpf corner freq delay to 50ms
Reduce hpf corner freq delay from 300ms to 50ms
to avoid initial mute in recorded audio.

Change-Id: Ibd6e7d60f836e866d73899d3f691c0e8070a3527
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-03-25 10:44:21 +05:30
Meng Wang
578740db71 asoc: wcd937x: Disable EN_CUR_DET bit for receiver noise
Disable EN_CUR_DET to fix receiver noise as per hw team
recommendation.

Change-Id: Icbeea920d02279ff845072e54be1c449db7bd2da
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-03-20 17:24:22 -07:00
Linux Build Service Account
36e68604f0 Merge "asoc: wcd-spi: use CMA memory for TX and RX buffer instead of kzalloc" 2019-03-20 02:29:22 -07:00
Vatsal Bucha
13faf538b3 ASoC: wcd937x: Fix playback stop issue after SSR/PDR on special hs
If we start playback on special hs after record is done and perform
SSR/PDR then playback gets paused. This happens because ANA_TX_DIV2_CLK
which needs to be enabled for special hs gets disabled after record
is stopped. Maintain a count for ANA_DIV2_CLK to enable/disable it
as required.

Change-Id: Ic73475c83cb16e3c014f35b8d46ee22d2e7a2efd
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-03-20 15:44:14 +08:00
Laxminath Kasam
f16ed2f6c2 asoc: wcd938x: Disable EN_CUR_DET bit for receiver noise
Disable EN_CUR_DET to fix receiver noise as per hardware
specifications recommendation.

Change-Id: Ib1ea1eecc3e0f2ffeeb5f41c344e51c903cd2300
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-03-20 08:26:12 +08:00
Sudheer Papothi
828b3114fe ASoC: bolero: va-macro: Fix ioremap in va macro probe
Update va-macro ioremap offset properly during probe.

Change-Id: I3c4b1d6ba24b7935c3ba047059f72ed06bdafe4f
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-03-19 03:04:57 +05:30
Sudheer Papothi
3557d14ce8 ASoC: wcd938x: Update routing for HDR recording
Update audio routings for HDR recording on WCD938x codec
for AMIC1 and AMIC5 paths.

Change-Id: I67b93fe11c7a5b16ffd4bb8b58431be9dfba615e
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-03-13 14:05:19 -07:00
Xiaoyu Ye
89cc889a44 asoc: wcd-spi: use CMA memory for TX and RX buffer instead of kzalloc
In wcd-spi driver, the kzalloc is used to allocate memory for TX and
RX buffer. Those allocations are order4 or order5, which could fail
on some kernels. To avoid potential memory allocation failure, the CMA
region is used for those allocations by dma_alloc_coherent API.

Change-Id: I0a4d6c6b5e0e47f96187563272e63c3a006e469f
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
2019-03-13 15:22:12 +08:00
Sudheer Papothi
a1351b945f ASoC: codecs: Add support for soundwire clock for VA usecase
Add support for soundwire clock for VA usecase.

Change-Id: I1f56678ad36e4ae6c8dd458c0b7e96e847694050
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-03-07 18:55:11 +05:30
Mangesh Kunchamwar
cdd68dbe72 msm: vote for LPASS core while access LPASS registers
When ADSP is in power collapse or island state, it would fail
to access LPASS codec register.Vote for LPASS core to avoid
LPASS power collapse with pmruntime approach while accessing
LPASS registers & TLMM.

Change-Id: I74d037e499fb6f1245b9a1bd1b0a77200608c27b
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2019-03-06 08:50:31 +08:00
Karthikeyan Mani
01f1ba49be asoc: codecs: bolero: enable gpio and clk in right sequence
Enable soundwire gpio before enabling soundwire clock
so that bus clash does not happen when interrupts are
received.

Change-Id: I40983b8837373f1ea7ac8fa6add7c56225ff0592
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-03-01 19:17:12 -08:00
Linux Build Service Account
52bdcf758c Merge "ASoC: bolero: Check for valid handle before pm_runtime_resume" 2019-03-01 03:31:30 -08:00
Sudheer Papothi
f2afc390ce ASoC: bolero: Check for valid handle before pm_runtime_resume
Check for valid handle before pm_runtime_resume in bolero register
read/write functions to avoid dereference.

Change-Id: I34d567e7575202817f4fcda784d0f3df2ed77bde
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-03-01 08:09:50 +05:30
Linux Build Service Account
74d9fedcb2 Merge "asoc: codecs: bolero: leave frame sync to default value" 2019-02-27 14:35:14 -08:00
Linux Build Service Account
1ede4485f7 Merge "ASoC: wcd938x: Clear tx hold hpf after device path setup" 2019-02-27 11:28:29 -08:00
Linux Build Service Account
dcd3cb3de2 Merge "ASoC: rx-macro: Enable hph idle detect feature" 2019-02-27 01:15:35 -08:00
Linux Build Service Account
b5e985e40c Merge "asoc: codecs: Add pm6125_divclk entry" 2019-02-27 01:15:31 -08:00
Linux Build Service Account
4b44ce5637 Merge "ASoC: wcd-mbhc: Disable moisture_en when duty cycle is enabled" 2019-02-27 01:15:28 -08:00
Karthikeyan Mani
2797084510 asoc: codecs: bolero: leave frame sync to default value
Frame sync of bolero macros need to be at 4KHz default
value.

Change-Id: Ia5399a3c4bee7e0f74115e5ffcb1ed51cbd07639
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-02-26 13:30:23 -08:00
Sudheer Papothi
d6c61bd617 ASoC: wcd938x: Clear tx hold hpf after device path setup
During capture path setup, tx path hpf is set to hold.
Clear tx path hpf hold after device path setup.

Change-Id: I3299fc5d84d6e86e23c9ef150c8770ef9d59a870
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-02-23 07:36:18 +05:30
Vatsal Bucha
8bcc97c618 ASoC: rx-macro: Enable hph idle detect feature
Headset Idle detect feature powers off PAs when
there is no signal. Add widget to enable
this feature for headset path.

Change-Id: I4c88057b347e40317578b5eb014053c17d196b85
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-02-20 19:20:12 +08:00
Aditya Bavanari
94eb98b659 asoc: codecs: Add pm6125_divclk entry
Add pm6125_divclk entry in pmi clock
array to support tasha codec in trinket target.

Change-Id: Ib2bacbeebb48d9b711abbc9f923a3b4b22cd7629
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-02-20 03:04:25 -08:00