Commit graph

2,164 commits

Author SHA1 Message Date
Ajit Pandey
248ce5678f asoc: msm-routing: Fix array out of bounds issue.
It seems there is out of bound access chances for lsm_app_type_cfg
array within msm_routing_get_lsm_app_type_cfg_control() callback.
Added case check to return invalid value if user tries to exceed
maximum allocated size of array to avoid it.

Change-Id: Ied86e6c9a957255c55bb126a09741fbde429be32
Signed-off-by: Ajit Pandey <ajitp@codeaurora.org>
2019-09-16 12:36:44 +05:30
qctecmdr
e25db41da1 Merge "soc: pinctrl-lpi: Suspend sooner if resume fails" 2019-09-14 21:06:41 -07:00
qctecmdr
f72b01cee2 Merge "soc: swr-mstr: Vote for core vote before clock request" 2019-09-14 21:01:14 -07:00
qctecmdr
6f23c4ef53 Merge "asoc: codecs: Add core vote functionality for soundwire" 2019-09-14 20:57:13 -07:00
qctecmdr
d598f6e9ad Merge "dsp: lsm: add apr NULL check in apr deregister" 2019-09-14 20:55:34 -07:00
qctecmdr
48d815e732 Merge "asoc: check subsys state in FE instead of q6 state" 2019-09-12 04:02:35 -07:00
qctecmdr
43c43f0605 Merge "asoc: codecs: wcd937x: Update amic4 over adc3 recording" 2019-09-12 03:59:56 -07:00
qctecmdr
6f39bea44a Merge "dsp: lsm: check for mem_map_handle" 2019-09-12 03:57:02 -07:00
qctecmdr
980e17b489 Merge "asoc: Fix out of bounds access in xt logging disable functions" 2019-09-12 03:53:59 -07:00
Karthikeyan Mani
5f59d6c904 soc: pinctrl-lpi: Suspend sooner if resume fails
If PM runtime resume fails, hardware vote will not
happen until it is suspended. So in error scenarios
set for a lesser suspend delay so that voting can
happen sooner.

Change-Id: Ia4175535e45ec291292b8d8656146826ffd05a26
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-09-11 11:22:16 -07:00
Karthikeyan Mani
1d750fe50f soc: swr-mstr: Vote for core vote before clock request
For soundwire devices, if core vote function is available,
do a core vote before doing a clock request. This way
we retain any hardware votes needed before doing a read
or write.

Change-Id: If29b5f102be4f2d60e6d71cae70ac43e3fdaa00c
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-09-11 11:22:13 -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
40e928840f Merge "ASoc: Kona: Add support for group AFE" 2019-09-11 08:50:34 -07:00
qctecmdr
ee29c8d3d7 Merge "asoc: codecs: bolero: Fix L/R swap issue on bolero RX" 2019-09-11 08:47:35 -07:00
qctecmdr
8b6fa0c4b7 Merge "dsp: avtimer: validate payload size before memory copy" 2019-09-11 08:45:25 -07:00
Meng Wang
c893cd2e0d dsp: lsm: add apr NULL check in apr deregister
During SSR, q6lsm_mmapcallback could happen before
q6lsm_mmap_apr_dereg. q6lsm_common.apr and
q6lsm_common.apr_users are cleared in q6lsm_mmapcallback.
Add apr NULL check in q6lsm_mmap_apr_dereg before accessing
q6lsm_common.apr_users.

Change-Id: Ia0ff57b3fff0a0e4f26b836a8a15324406af1a14
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-09-09 09:27:45 +08:00
qctecmdr
018a061578 Merge "ASoC: msm: Loopback Driver Reg Stream in Prepare Stage" 2019-09-06 11:21:14 -07:00
qctecmdr
2eb4da98bc Merge "asoc: Update the senary MI2S interface port id index" 2019-09-06 11:07:43 -07:00
qctecmdr
ca34d4602c Merge "ASoC: wcd938x: Update mibias configuration on WCD938x" 2019-09-06 11:04:49 -07:00
qctecmdr
16bfcd8c36 Merge "asoc: Add HiFi Filter support in driver" 2019-09-06 11:02:24 -07:00
qctecmdr
203c6c4eb4 Merge "ASoC: codecs: Use resource managed function calls during irq exit" 2019-09-06 10:59:54 -07:00
qctecmdr
04a0e0e298 Merge "asoc: codec: bolero: add adc mode control" 2019-09-06 10:57:56 -07:00
qctecmdr
a1cacab61b Merge "dsp: lsm: adjust mutex_lock to avoid deadlock" 2019-09-06 10:54:21 -07:00
Aditya Bavanari
b6556116f9 asoc: Fix out of bounds access in xt logging disable functions
Extract dai data from codec dma dai instead of generic
dma dai structure in xt logging disable get and put functions
to fix out of bounds access. Use separate callback functions
for slimbus and codec dma dais.

Change-Id: Ic72640518cb255fa09563e99576d508c7cc21a7b
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-09-05 23:26:25 +05:30
qctecmdr
43e90d44b6 Merge "asoc: Add sysfs node for spdif pre-emphase status" 2019-09-04 03:48:00 -07:00
qctecmdr
9c7228e99b Merge "asoc: codecs: Add ep92 pre-emphasis status" 2019-09-04 03:42:06 -07:00
qctecmdr
bfa4bebe53 Merge "asoc: qcs405: Add support for META MI2S ports" 2019-09-04 03:40:09 -07:00
qctecmdr
bd95d2fa1c Merge "ASoC: compr: add amrwbplus offload support" 2019-09-04 03:38:00 -07:00
qctecmdr
9197a2e94a Merge "asoc: codecs: No I2C activity when EP92 is inactive" 2019-09-04 03:35:11 -07:00
qctecmdr
a634c77018 Merge "asoc: Add support for META MI2S ports" 2019-09-04 03:32:55 -07:00
qctecmdr
d8a58c6c05 Merge "soc: swr-mstr: Reduce swr register write sleep timings" 2019-09-04 03:30:25 -07:00
qctecmdr
b4ef63f700 Merge "ASoC: routing: update echo reference index for dp" 2019-09-04 03:26:59 -07:00
qctecmdr
d7c16ff4f4 Merge "soc: Fix out of bounds access in register show function" 2019-09-04 03:24:02 -07:00
qctecmdr
8ff9993fa0 Merge "SoC: soundwire: Add support to register for event listener" 2019-09-04 03:21:31 -07:00
qctecmdr
23104da29d Merge "soc: swr-mstr: reset slave pending irq flag before every call" 2019-09-04 03:18:36 -07:00
qctecmdr
96ea26f502 Merge "asoc: codecs: bolero: load hph filter coefficients" 2019-09-04 03:16:16 -07:00
qctecmdr
51603b4bf0 Merge "dsp: Add support for META MI2S ports" 2019-09-04 03:12:28 -07:00
Meng Wang
fae3404de2 dsp: lsm: check for mem_map_handle
Sometimes adsp may fail to allocate memory for SVA calibration
data and add check if mem_map_handle is assigned with valid
non-zero handle to avoid panic.

Change-Id: Icad722edc52906e63d581aafa02b42b8518ebca6
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-09-04 08:13:18 +08:00
Cong Tang
d083a83b6e ASoC: msm: Loopback Driver Reg Stream in Prepare Stage
Move the msm_pcm_routing_reg_phy_stream() to prepare stage.
Then it allows to set channel mixer configuration pre usecase start.

Change-Id: I1811c4d9bcbdd2bb1ee425044407a2c61e794a9a
Signed-off-by: Cong Tang <congt@codeaurora.org>
Signed-off-by: Viraja Kommaraju <virajak@codeaurora.org>
2019-09-03 14:50:22 +05:30
Ramprasad Katkam
17f0516574 asoc: check subsys state in FE instead of q6 state
audio can use adsp or modem. Hence check
apr subsys state commonly instead of adsp or modem.

Change-Id: Ice70ab23797ec5f940e1bda3fa1b2d84c196fc56
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2019-09-03 14:43:05 +08:00
Meng Wang
818d4e9b7f dsp: lsm: adjust mutex_lock to avoid deadlock
When dispatch_event in apr and q6lsm_client_free in q6lsm
are running concurrently, there may be deadlock between
session_lock in lsm and svc->m_lock in apr. Adjust session_lock
in q6lsm_client_free to avoid deadlock.

Change-Id: I26eb788d4c17af78272dd1f717717e865dfbd0ac
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-08-30 15:44:49 +08:00
Ramlal Karra
b6ef9e0377 asoc: Add HiFi Filter support in driver
Open adm with 32 bit-width when HiFi Filter control is set

Change-Id: I2c4c4c732b15b26b42d8169ae4c945356bf2bfa6
Signed-off-by: Ramlal Karra <rkarra@codeaurora.org>
2019-08-30 12:23:02 +05:30
Ralf Herz
afaec2af14 asoc: qcs405: Add support for META MI2S ports
QCS405 can group data lines of several MI2S interfaces.
This feature is used with new META MI2S ports.

Change-Id: Iffc72a5aae1da8a0620ad988fdc570e5ed493956
Signed-off-by: Ralf Herz <rherz@codeaurora.org>
2019-08-29 08:31:39 +02:00
Ralf Herz
29e071318d asoc: Add support for META MI2S ports
QCS405 can group data lines of several MI2S interfaces.
Add backend dai links for new META MI2S ports.

Change-Id: I9fc5ff06b61ffc2e085c5f05a75111b63ceeeb68
Signed-off-by: Ralf Herz <rherz@codeaurora.org>
2019-08-29 08:29:05 +02:00
Vignesh Kulothungan
2139a7d178 ASoc: Kona: Add support for group AFE
Add support to configure TDM slots.
Add support to set tdm slot mask.

CRs-Fixed: 2493194
Change-Id: I39cc7f2aee5acb28ea500076ff5026a033350b60
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2019-08-28 17:40:33 -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
Ralf Herz
2725174a50 asoc: Add sysfs node for spdif pre-emphase status
Provide pre-emphasis status in sysfs node that was received in spdif
channel status bits.

Change-Id: Ie25dd67920e2d73f74328d6ce96180d392f3d771
Signed-off-by: Ralf Herz <rherz@codeaurora.org>
2019-08-28 10:02:02 +02:00
Ralf Herz
05441f6789 asoc: codecs: Add ep92 pre-emphasis status
Provide pre-emphasis status in sysfs node that was received in
channel status bits.

Change-Id: Ice6f69806c993e2235b5ecb89dfc4028c03e02b8
Signed-off-by: Ralf Herz <rherz@codeaurora.org>
2019-08-28 10:01:30 +02:00
Ralf Herz
cf16dedb1f asoc: codecs: No I2C activity when EP92 is inactive
Only trigger periodic I2C telegrams when EP92 is in logical power on state.
Rely on EP92 interrupt to notice state change when in power off state.
Fix arc_enable write operation.

Change-Id: Id36f90379280ca5c60984e2ed507844418a612d7
Signed-off-by: Ralf Herz <rherz@codeaurora.org>
2019-08-28 09:59:17 +02:00
Aditya Bavanari
9f599b4a78 soc: Fix out of bounds access in register show function
In register show function, when snprintf returns a negative value
out of bounds access occurs while copying the data to user.
Add return value check on snprintf before copy_to_user
to fix this.

Change-Id: I96bfa64b1603c966852c1d4d4a12651664f17aed
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2019-08-27 22:18:41 +05:30