Commit Graph

92 Commits

Author SHA1 Message Date
Meng Wang
fe623c6314 asoc: bolero: add channel map for AIF6_PB
Add channel map for AIF6_PB.

Change-Id: If17835b84c17406aaffdc9d06a00348acb0fe18e
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2020-03-19 15:15:23 +08:00
Sudheer Papothi
2e7fc986d2 ASoC: bolero: Add codec DAI to support PCM interface
Add codec DAI to support PCM interface to soundwire master on
RX macro in bolero codec driver.

Change-Id: Iaf5a9d9cf78ec9dc29b60ebd7736504ec6470e57
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-12-27 11:17:19 -08:00
qctecmdr
fec5f13aea Merge "asoc: Audio bringup changes for bengal" 2019-12-05 06:57:05 -08:00
qctecmdr
85661d1f96 Merge "ASoC: bolero: Update the sequence for native audio playback" 2019-12-05 06:52:39 -08:00
Laxminath Kasam
696b14bfa2 asoc: Audio bringup changes for bengal
Audio bringup fixes for bengal target.

Change-Id: Ic79c478fe3c6b80eeb48aa2bcf1887c8dd8f5edc
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-12-04 15:07:29 +05:30
Sudheer Papothi
03eeaf15cd ASoC: bolero: Update the sequence for native audio playback
Update the clock sequence for native audio playback to avoid
any distortion or change in gain during native audio playback
usecase.

Change-Id: Ia9aaa63f3e476b49a07d49b794f4120ed55bac47
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-12-03 06:02:06 +05:30
Linux Build Service Account
1e4e99502b Merge "ASoC: rx-macro: Update rx droop based on sampling rate" into audio-drivers.lnx.4.0 2019-11-24 23:58:23 -08:00
Sudheer Papothi
cef55160eb ASoC: rx-macro: Update rx droop based on sampling rate
Update rx droop based on sampling rate to avoid change in
gains between different sampling rates.

Change-Id: Icb2b0bc51a61395c2ee96f63c29555614fe9e505
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-11-15 23:23:49 +05:30
Karthikeyan Mani
35955cb60f asoc: codecs: bolero: do not perform soft reset
In event handler for soft reset, do not perform
soft resetting of the compander as this is not
the recommended sequence. Compander config
needs to be done only in interpolator enable
function.

Change-Id: I9bb1d493860adc924252827594219618f16309b0
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-10-21 12:02:33 -07:00
qctecmdr
0f6392dc14 Merge "asoc: codecs: Check for core votes count before accessing registers" 2019-10-15 00:22:20 -07:00
qctecmdr
6a164b940d Merge "asoc: codecs: bolero: ignore children for pm suspend" 2019-10-15 00:15:16 -07:00
qctecmdr
f138524159 Merge "asoc: codecs: bolero: Add support to disable aux hpf" 2019-10-12 09:01:00 -07:00
qctecmdr
75b962681c Merge "asoc: codecs: bolero: Do not return error for unused gpio" 2019-10-12 08:58:56 -07:00
Aditya Bavanari
d577af909c asoc: codecs: Check for core votes count before accessing registers
Check for core votes count before accessing swrm registers
to avoid NOC errors.

Change-Id: I5689d6a6db0886ed4cc791738a28290f3d953412
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-10-10 20:29:49 +05:30
Karthikeyan Mani
3d209514a9 asoc: codecs: bolero: ignore children for pm suspend
Allow bolero macro's child  devices to pm enable
irrespective of state of their parents.

Change-Id: Ie615ea2db097760de75682b5881f71a37a735fa2
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-10-06 23:06:32 -07:00
qctecmdr
3c19b49560 Merge "asoc: codecs: bolero: Update mixing path and channel mask for RX path" 2019-09-30 23:31:40 -07:00
qctecmdr
96957b41b9 Merge "ASoC: bolero: Update init registers for tx and rx paths" 2019-09-20 00:29:19 -07:00
Sudheer Papothi
72fef48d6b ASoC: bolero: Update init registers for tx and rx paths
Update init registers for tx and rx paths in an array.

Change-Id: I2738af7639ffec05b5c93e86a2a3f4cf7ccb36fe
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-09-15 00:13:35 +05:30
Karthikeyan Mani
1253c36aea asoc: codecs: bolero: Add support to disable aux hpf
Add a mixer control which can allow for aux hpf
to be either enabled or disabled based on its switch
settings.

Change-Id: Ie300c89e1e2f3669846d6bab250b7f4da4a7632a
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-09-12 11:35:30 -07:00
Karthikeyan Mani
8d40a06347 asoc: codecs: Add core vote functionality for soundwire
Add callback to vote for core votes that the
soundwire master can use while doing a clock request.
Check for pinctrl function errors and in case of any
failures return from clock enable with an error.

Change-Id: Ic5c200d7179a1e3a9695955d8711358cd7618bd1
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-09-11 11:20:27 -07:00
qctecmdr
ee29c8d3d7 Merge "asoc: codecs: bolero: Fix L/R swap issue on bolero RX" 2019-09-11 08:47:35 -07:00
Karthikeyan Mani
b44e4551b1 asoc: codecs: bolero: Do not return error for unused gpio
If soundwire gpio is not used, then no need to return
error if not able to get gpio data.

Change-Id: I97705b49d3b01f99b7a4e91190a15ffb211d32f2
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-09-09 23:08:07 -07:00
Laxminath Kasam
f8adb5f3c3 asoc: codecs: bolero: Update mixing path and channel mask for RX path
RX_CDC_DMA_RX0/1/2/3 ports  drives RX0/RX1, RX2/RX3, RX4 and RX5
channels on bolero rx-macro. Update channel mask
as per these mapping and return to channel map
accordingly.

Change-Id: I2e66e601b5137ebc513527827332bbb7cde0acb3
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-09-09 10:47:49 +05:30
qctecmdr
96ea26f502 Merge "asoc: codecs: bolero: load hph filter coefficients" 2019-09-04 03:16:16 -07:00
Laxminath Kasam
52ae6581d7 asoc: codecs: bolero: Fix L/R swap issue on bolero RX
Left and right channel content can get swapped
in new cdc_dma interface.

DMA interfaces underrun results in Channels being swapped.

This issue is a side effect current SW setup for RX path:
  1.  HLOS Setup WCD Analog Path, Bolero CODEC.
      CODEC would drive Fs to LPASS DMAs requesting for PCM samples.
  2.  DSP setup RX Buffers in Memory :
  3.  DSP Configures RD DMAs and DMA RXTX CODEC interface
      (Enable CODEC DMA interface buffer and
       Enable DMA LPASS_RXTX_LPAIF_RDDMA_CTL0.ENABLE
       and LPASS_RXTX_LPAIF_RDDMA_CODEC_INTF0.ENABLE
    If CODEC Fs, aligns with DMA interface being enabled
    there is an underrun as DMA interface pingpong buffer is empty.
    This results in channels being swapped.

Proposed work around while keeping current SW setup order.
Provide a workaround to Keep Fs disabled  until DMAs and
CODEC DMA interface are enabled and HW could  prefetch all buffers.
SW would keep existing setup order:
  1.  HLOS Setup WCD Analog Path, Bolero CODEC.
      CODEC would drive Fs to LPASS DMAs requesting for PCM samples.
  2.  DSP setup RX Buffers in Memory :
  3.  DSP Configures DMAs and DMA CODEC interface
      (Enable CODEC DMA interface buffer and
       Enable DMA LPASS_RXTX_LPAIF_RDDMA_CTL0.ENABLE
       and LPASS_RXTX_LPAIF_RDDMA_CODEC_INTF0.ENABLE)
  4.  Enable Fs Set #LPASS_RX_CDC_RX0_RX_PATH_CTL. CLK_EN to ONE

Change-Id: I7916667f5d857464cc7d77b51da307ab234cc7bb
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-08-28 19:08:02 +05:30
qctecmdr
efdfdf2782 Merge "ASoC: bolero: check for port validation before configuration" 2019-08-25 03:14:53 -07:00
Karthikeyan Mani
75ea1b8ade asoc: codecs: bolero: load hph filter coefficients
On hph playback usecase with compander enabled, load
hph filter coefficients to better center gain errors.

Change-Id: I3ce50d6e7b9a10255df8084adb0566d8bf9b47c7
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-08-22 15:09:49 -07:00
qctecmdr
ab0a45b0db Merge "soc: swr: avoid SSR state when switching between 44.1 and 48k family" 2019-08-20 00:02:12 -07:00
Sudheer Papothi
c0f75b7727 ASoC: bolero: check for port validation before configuration
Check for valid port before mux configuration.

Change-Id: Iaa32925f0c23305a2a3cedd0e476372aac380e0c
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-08-19 22:52:56 +05:30
Ramprasad Katkam
2e85a54634 soc: swr: avoid SSR state when switching between 44.1 and 48k family
Avoid SSR state, and do only clock-stop-resume to reset master  when
switching between 44.1 and 48k to avoid redundant re-enumeration.

Change-Id: Iaa955c4ceb75f30c68106468676ddb2551537de4
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2019-08-12 01:31:48 -07:00
Aditya Bavanari
50ef13eca6 asoc: codecs: Fix LPI TLMM GPIO invalid access issue
Runtime suspend gets called multiple times during SSR
scenarios leading to clock count mismatch. Add logic
to prevent this in all macros and pinctrl lpi driver.

Change-Id: I380631c1db8cd7d94a8909affd8c96c87f24817c
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-08-09 15:14:43 +05:30
qctecmdr
330f03de80 Merge "asoc: bolero: force bolero runtime suspend during adsp ssr" 2019-07-06 08:48:33 -07:00
Meng Wang
bf1fe8fbad asoc: bolero: force bolero runtime suspend during adsp ssr
During adsp SSR, bolero runtime suspend is not called and
hw vote clks are not reset. Force bolero runtime suspend
during adsp SSR to avoid kernel panic.

Change-Id: Iff5983ef07f77ecc7f3f344948c013906b4bad60
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-07-02 08:26:55 +08:00
Karthikeyan Mani
c14c27a7c6 asoc: codecs: bolero: add compander soft reset event
Add compander soft reset event that can be requested
from a slave codec to reset at power down to reduce
click and pop noise.

Change-Id: I2f6ff182e258e02979166b0e76b6a1d439b1cf87
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-06-21 14:14:47 -07:00
qctecmdr
1dffa77438 Merge "asoc: bolero: reset all clks after SSR/PDR" 2019-06-17 21:04:15 -07:00
qctecmdr
45b4733d63 Merge "asoc: codecs: defer probe if soundwire pin is not ready" 2019-06-17 20:25:32 -07:00
Karthikeyan Mani
326536d1d6 asoc: codecs: defer probe if soundwire pin is not ready
Defer codec macro probes if soundwire pins are not
ready to be accessed yet during boot up.

Change-Id: I20173e49043a076d73cdbb811863afbff87d4a3b
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-06-11 17:48:35 -07:00
Karthikeyan Mani
3bd80a59b2 asoc: codecs: add support to disable soundwire devices
Add changes to support disabling of soundwire devices
so that soundwire pins can be freed for other purposes
if needed.

Change-Id: Iae14d43c2c3d5380347be4c3b443c209b2612a97
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-06-10 17:14:36 -07:00
Meng Wang
8ef0cc2ed4 asoc: bolero: reset all clks after SSR/PDR
After SSR/PDR, the lpass clocks will be in off state. Force restart
clocks after SSR/PDR, if enabled before SSR/PDR, to reenable the clocks.

Change-Id: I3d850d92bdc6324aa7a64a83a9066f388a85c7f7
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-06-06 08:45:19 +08:00
qctecmdr
34b7d3b2fd Merge "ASoC: hide bind/unbind in sysfs" 2019-05-21 20:33:23 -07:00
Xiaojun Sang
53cd13a1ab ASoC: hide bind/unbind in sysfs
Exposure of driver bind/unbind to userspace via sysfs may
lead to unexpected behavior.
Hide bind and unbind by driver attribute.

Change-Id: I20d6ee653bcc16af15d6368664aaf240c6645cd0
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2019-05-17 15:00:33 +08:00
Karthikeyan Mani
c141ca9e3d asoc: codecs: bolero: Reset power mode register at teardown
Reset the compander power mode register to default
value upon teardown sequence, so that at next startup
use case it has proper power value.

Change-Id: I851e8a62a910d7018ac74e93abee47a615b3e50c
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-05-13 14:43:41 -07:00
qctecmdr
23baae7456 Merge "asoc: Fix aux path noise issue" 2019-04-17 04:37:36 -07:00
Laxminath Kasam
1a4dd6d9ac asoc: Fix aux path noise issue
Observing noise on aux path playback.
Update sequences on digital side and
swr port params as per latest HW sequence
recommendation.

Change-Id: Ic07ec35b091985ef0146957ceca830bd1162e7ec
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2019-04-12 11:27:09 +05:30
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
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
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
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
Ramprasad Katkam
452772abf9 asoc: bolero: Do not disable mclk in widget power down upon enable failure
If mclk enable is failed during mclk widget power up event, it would
still send a power down event for the widget during disable, which could
disable the mclk voted by other client like soundwire. Do not disable
mclk during power down if enable is failed during power up.

Change-Id: If782b34f9ef414501590ed8cf681bbe58f1dda76
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2019-01-22 12:51:39 +08:00
Linux Build Service Account
a0b8337922 Merge "asoc: bolero: Call swr device down before setting ssr down" 2019-01-08 05:31:57 -08:00