1
0
Fork 0
Commit Graph

1610 Commits (redonkable)

Author SHA1 Message Date
Andrey Zhizhikin 4c7342a1d4 This is the 5.4.73 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl+ahE8ACgkQONu9yGCS
 aT4j1A/9HzkKKoqZ2vXYQ1/uEnUqZech9ly1KxpNTBrSZYAtx3MaWY7tGDEx2BqD
 y6iw9x4MymhHEbpwLg6YmmdWuMQLNNYJGoyLiPJgWhkE4c7zHadhNz1DcPEI8F7z
 bSlUJ3Oebr8gzv0FvUmeVXw7Z2EuOqM1zGgTAZfnKY3DkYHbLnrzUJ4AiI8TNeba
 pPIhjfIJ1TvhF+s5ggf2m8OtSWLZ0doCWCPmCFe2WyERX2WYCzPgsm0yL7L7oXME
 ZqWpOcClBsiYekBNcZ4kxozhJtArCnv24n9VoXJ/YJIlWKvCA6uC8r527nGN/z08
 dfFelj1nDs7/VrCSP4+109EjxLQnSYGgIWP0g0OsC+9wOmrQsYJ1azP1eNjm+NuC
 hPa8uYVEZxwVyJuEfu4ZB4NMZBlD2qnHoskvBKbyZ8yaVnbvlMp552XMwsmJBpCs
 8wArzabrJEz396LUUIYG829D7NBDuRav1Miu+FTzlbn+xZ/Y/S8OmhoG2stWa4wV
 y5x0M0DWgrqiZ9rMkz9A03UNnCInQVTfIBoMl63xFitW4/0vLsln3+CjzlKm7H46
 rD/tKACUoCDjR5DN+JwQzmTdL9zBb4p1cXwWjWb6rON3BkXmO0JVAxzurxI9PfX0
 ZWDydZ3HNmrm0d3J12zf3kTX56PfPFAGWUsEc4Ntb5zdWXSQJsE=
 =fZ3T
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdQaENiSDAlGTDEbB7G51OISzHs0FAl+bPfIACgkQ7G51OISz
 Hs1LaA/9GOp34DrKBM/z7eN7gcbU4rJUhnggZ3vCXShRs3vtjEJ7wptzJb7lErXX
 6JCS/OjZpQpZJcHdBX0Kxovf8LVgvDrsbAhRhQkdFr0dESQQ4UY+vT5me9Y9Ot1F
 biG2z2HduLAxBgrYB2uA7VeRqlLiAa7ELS5EWB90xjY49w7gy5kK7AFrBRQdme9G
 r4fY89RD9sJVzo4sxgQwUYXuNJi5OmwbN+wrkwk8HXyL0tAB9SNQJ7A962Gxamao
 AIXT0CvNpNSkR/4JeqDXbJu54fMZxaF4A7a9mgL42fWe45jQs2zYSNx3vdZskzK8
 8z+4FCmShNkGMMLV5k6Ds/lJ8uF1yOkUBJJeiHJxnpZw93xKVWZfOVmgm+WO/mNq
 POmJVfALFFzwvNllyMX8D++0yhORunzfhzQyKgVAthwmScGQ5TK0cerwAa9VEz1T
 40e7AqsNKUxRPnoZYQwM0Y2Vskn6qZ8pOW3rSSQx2YI2lhQHGeUMAugHzYivERkF
 8d5hDPaQgfJXmS+S8Xp45zafeMDjoNQFQhZLAptmoF9+NGXdJduPSPJxQ0R/29GT
 2LEHNsneGotslpXwluk8x2VlXryf/7okEdR7RLq9kjEyM5BGOc2wcZrD6GXvnAf0
 JorbYZPriCaNHrGDdEiRFZmRlKaiR4CbcR3JtYkFJebirmIc1N0=
 =8w9z
 -----END PGP SIGNATURE-----

Merge tag 'v5.4.73' into 5.4-2.2.x-imx

This is the 5.4.73 stable release

Conflicts:
- arch/arm/boot/dts/imx6sl.dtsi:
Commit [a1767c9019] in NXP tree is now covered with commit [5c4c2f437c]
from upstream.

- drivers/gpu/drm/mxsfb/mxsfb_drv.c:
Resolve merge hunk for patch [ed8b90d303] from upstream

- drivers/media/i2c/ov5640.c:
Patch [aa4bb8b883] in NXP tree is now covered by patches [79ec0578c7]
and [b2f8546056] from upstream. Changes from NXP patch [99aa4c8c18] are
covered in upstream version as well.

- drivers/net/ethernet/freescale/fec_main.c:
Fix merge fuzz for patch [9e70485b40] from upstream.

- drivers/usb/cdns3/gadget.c:
Keep NXP version of the file, upstream version is not compatible.

- drivers/usb/dwc3/core.c:
- drivers/usb/dwc3/core.h:
Fix merge fuzz of patch [08045050c6] together wth NXP patch [b30e41dc1e]

- sound/soc/fsl/fsl_sai.c:
- sound/soc/fsl/fsl_sai.h:
Commit [2ea70e51eb72a] in NXP tree is now covered with commit [1ad7f52fe6]
from upstream.

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
2020-10-29 22:09:24 +00:00
Shengjiu Wang 1ad7f52fe6 ASoC: fsl_sai: Instantiate snd_soc_dai_driver
[ Upstream commit 22a16145af ]

Instantiate snd_soc_dai_driver for independent symmetric control.
Otherwise the symmetric setting may be overwritten by other
instance.

Fixes: 08fdf65e37 ("ASoC: fsl_sai: Add asynchronous mode support")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1600424760-32071-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-29 09:57:42 +01:00
Yu Kuai 4d861784f0 ASoC: fsl: imx-es8328: add missing put_device() call in imx_es8328_probe()
[ Upstream commit e525db7e4b ]

if of_find_device_by_node() succeed, imx_es8328_probe() doesn't have
a corresponding put_device(). Thus add a jump target to fix the exception
handling for this function implementation.

Fixes: 7e7292dba2 ("ASoC: fsl: add imx-es8328 machine driver")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Link: https://lore.kernel.org/r/20200825130224.1488694-1-yukuai3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-29 09:57:39 +01:00
Andrey Zhizhikin ee7b6ad15b This is the 5.4.67 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl9rJlYACgkQONu9yGCS
 aT6WbRAAga6QVKrO6R4NeKk0fPqKQQoQeTK+phBOFA7jAoX/rIRKyob2Si9BwhBA
 F77vZ6HIZ7+e/o35JJQYQbffbHYs0ANuS1oHGqe0vgbh+72Viaan6g7lFOhpx8qf
 y0YS7q+hw4WLZB0gGlBM7nkPXRiis32IrEVabQW+t8hmT2lWyutY8E2yFAU60tvI
 Tvjm2c2pvHEcHz9MrjEd/jIVxMFnIl42FBTx9bGsbDUCDzBwEvPArS4bNioP7EFJ
 O+rrGCNvwtiv0DuKzX1UIZzQ88IROmU3ZjsIlgOwla7xJWv4QDgmPfyAyRI48QhH
 PAZQmSntz+y+MP6B3z3ZBrxc2Fx0kCDtugn2P9+2RVUEpheANJ293vUgYTKN9Roy
 dHdWHFWNTO9IYpIN0cZjc25db4ULdjerWQrKcCr6ZO8+Ep/0mSzx3lkWjfuUP8Hr
 L2RD6rAm259OpPq8xhAcJpJvoQLwGxaBHyr4QYUmRgmNVURoqe9Q0MTZuiyGsXhm
 rtcNky9WvmyyI1lJgXi4A+vmsIThCHEstEMycgTejfJ4itIVA9e1ctJVVomWULCn
 9oNStBJpmHw0myDCohbKNjeO1UX/erdF9NaoGto5bnfIhcSae1YQEjRB8zKmzbg1
 DpgC1f7IZ7q53vfrDGsAjInOcuEwAn/Y5JMLJOL4mdA9j3XlX2o=
 =Ot99
 -----END PGP SIGNATURE-----

Merge tag 'v5.4.67' into 5.4-2.2.x-imx

This is the 5.4.67 stable release

This updates the kernel present in the NXP release imx_5.4.47_2.2.0 to the
latest patchset available from stable korg.

Base stable kernel version present in the NXP BSP release is v5.4.47.

Following conflicts were recorded and resolved:
- arch/arm/mach-imx/pm-imx6.c
NXP version has a different PM vectoring scheme, where the IRAM bottom
half (8k) is used to store IRAM code and pm_info. Keep this version to
be compatible with NXP PM implementation.

- arch/arm64/boot/dts/freescale/imx8mm-evk.dts
- arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts
NXP patches kept to provide proper LDO setup:
imx8mm-evk.dts: 975d8ab07267ded741c4c5d7500e524c85ab40d3
imx8mn-ddr4-evk.dts: e8e35fd0e759965809f3dca5979a908a09286198

- drivers/crypto/caam/caamalg.c
Keep NXP version, as it already covers the functionality for the
upstream patch [d6bbd4eea2]

- drivers/gpu/drm/imx/dw_hdmi-imx.c
- drivers/gpu/drm/imx/imx-ldb.c
- drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c
Port changes from upstream commit [1a27987101], which extends
component lifetime by moving drm structures allocation/free from
bind() to probe().

- drivers/gpu/drm/imx/imx-ldb.c
Merge patch [1752ab50e8] from upstream to disable both LVDS channels
when Enoder is disabled

- drivers/mmc/host/sdhci-esdhc-imx.c
Fix merge fuzz produced by [6534c897fd].

- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
Commit d1a00c9bb1 from upstream solves the issue with improper error
reporting when qdisc type support is absent. Upstream version is merged
into NXP implementation.

- drivers/net/ethernet/freescale/enetc/enetc.c
Commit [ce06fcb6a6] from upstream merged,
base NXP version kept

- drivers/net/ethernet/freescale/enetc/enetc_pf.c
Commit [e8b86b4d87] from upstream solves
the kernel panic in case if probing fails. NXP has a clean-up logic
implemented different, where the MDIO remove would be invoked in any
failure case. Keep the NXP logic in place.

- drivers/thermal/imx_thermal.c
Upstream patch [9025a5589c] adds missing
of_node_put call, NXP version has been adapted to accommodate this patch
into the code.

- drivers/usb/cdns3/ep0.c
Manual merge of commit [be8df02707] from
upstream to protect cdns3_check_new_setup

- drivers/xen/swiotlb-xen.c
Port upstream commit cca58a1669 to NXP tree, manual hunk was
resolved during merge.

- sound/soc/fsl/fsl_esai.c
Commit [53057bd4ac] upstream addresses the problem of endless isr in
case if exception interrupt is enabled and tasklet is scheduled. Since
NXP implementation has tasklet removed with commit [2bbe95fe6c],
upstream fix does not match the main implementation, hence we keep the
NXP version here.

- sound/soc/fsl/fsl_sai.c
Apply patch [b8ae2bf5cc] from upstream, which uses FIFO watermark
mask macro.

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
2020-09-26 20:54:42 +00:00
Shengjiu Wang b8ae2bf5cc ASoC: fsl_sai: Fix value of FSL_SAI_CR1_RFW_MASK
[ Upstream commit 5aef1ff239 ]

The fifo_depth is 64 on i.MX8QM/i.MX8QXP, 128 on i.MX8MQ, 16 on
i.MX7ULP.

Original FSL_SAI_CR1_RFW_MASK value 0x1F is not suitable for
these platform, the FIFO watermark mask should be updated
according to the fifo_depth.

Fixes: a860fac420 ("ASoC: fsl_sai: Add support for imx7ulp/imx8mq")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/1596176895-28724-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-08-19 08:16:18 +02:00
Bing Song c731ea37ee MLK-24501-5 dsp: add lpa pcm support.
Use reserved memory as PCM mode need more memory.
Use ping-pong buffer for PCM LPA playback to avoid underrun.

Signed-off-by: Bing Song <bing.song@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-08-14 16:48:50 +08:00
Bing Song 5ae911fd64 MLK-24501-4 dsp: disable mxc_hifi4 when LPA.
FW is locate on OCRAM_A when lpa. core decoder can't put in reserved
memory as HIFI4 has 1G memory limitation. Disable DSP wrapper decoder
when lpa. lpa PCM mode will use SW decoder.

Signed-off-by: Bing Song <bing.song@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-08-14 16:48:44 +08:00
Bing Song 0581bdbb6d MLK-24501-3 dsp: interrupt suspend when lpa.
Input buffer maybe return when suspending. Interrupt suspend if
MU from DSP to ARM core.

Signed-off-by: Bing Song <bing.song@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-08-14 16:48:38 +08:00
Bing Song f0520eee03 MLK-24501-1 dsp: change input buffer size for lpa.
Enlarge the buffer size to 128K. So ARM can sleep longer time for
MP3 LPA playback.

Signed-off-by: Bing Song <bing.song@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-08-14 16:47:56 +08:00
Zhang Peng 9be4f0ea58 MLK-24462 ASoC: fsl_dsp: Fix build error when add pause
Coding error cause build error, now fix it.

Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
2020-08-04 10:35:05 +08:00
Zhang Peng 14a1f3afd3 MLK-24453 ASoC: fsl_dsp: Add pause&pause_release in dsp
Add dsp support pause and pause_release cmd.

Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
2020-08-03 19:32:57 +08:00
Shengjiu Wang e17ee871b9 MLK-24444-1: ASoC: fsl_dsp: Support PCM format for compress sound card
For PCM format the supported format is mono/stereo, S16_LE/S32_LE,
and 8KHz-192kHz frequency.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-07-30 09:54:07 +08:00
Viorel Suman edfae0f3a6 MLK-24413: ASoC: fsl_xcvr: fix SPDIF RX/TX sequence issue
In SPDIF full duplex mode in order to get both RX and TX working we
need to start RX first, and TX second, fix this by porting SPDIF RX
configuration code from XCVR FW into Kernel driver and avoid using
M0+ core for SPDIF configuration.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-07-28 14:02:27 +03:00
Viorel Suman 025891eaa5 MLK-24430: ASoC: fsl_xcvr: reverse the order of Channel Status bits
The Channel Status bits must be reversed.

Fixes: 86401d592b ("MLK-23725-1: ASoC: fsl_xcvr: reimplement CS read function")
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-07-21 09:38:32 +03:00
Adrian Alonso cdfd304a32 MLK-24423: sound: soc: fsl: imx pdm: fixed mclk improve voice
Add fixed sai mclk for PDM software decimation improve
libimxswpdm conversion algorithm performance for
voice applications by using exact division ratios for
clock configurations mclk, bitclk.

Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-07-20 11:02:44 -05:00
Adrian Alonso de79414d59 MLK-24422: sound: soc: fsl: imx pdm: over sampling ratio control
Add Over sample ratio kcontrol interface, allow user
to specify over sample ratio

amixer -c1 cget numid=1
numid=1,iface=MIXER,name='over sampling ratio'
  ; type=ENUMERATED,access=rw------,values=1,items=5
  ; Item #0 'OSR_4x12'
  ; Item #1 'OSR_4x16'
  ; Item #2 'OSR_4x24'
  ; Item #3 'OSR_4x32'
  ; Item #4 'OSR_4x48'
  : values=0

Set different OSR
amixer -c1 cset numid=1 2

Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-07-20 11:02:29 -05:00
Viorel Suman 50698e4d7b MLK-24412: ASoC: fsl_xcvr: remove support for S24_LE TX
There is no need for S24_LE support on TX since IEC958 ALSA
plugin is now configured to cover this function.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-07-17 12:13:52 +03:00
Bing Song 3e26378f53 MLK-24365-11 dsp: wait DSP idle before close it.
Wait DSP to idle before gate OCRAM_A clock as FW code locate on
OCRAM_A when LPA. Or DSP will hang.

Signed-off-by: Bing Song <bing.song@nxp.com>
2020-07-10 16:48:12 +08:00
Bing Song 3e415d0fad MLK-24365-10 codec: support lpa in audio codec.
Audio codec need ignore suspend/resume for LPA.

Signed-off-by: Bing Song <bing.song@nxp.com>
2020-07-10 16:48:12 +08:00
Bing Song 7c5ec722f0 MLK-24365-8 dsp: ignore suspend/resume.
ignore suspend/resume when LPA mode.

Signed-off-by: Bing Song <bing.song@nxp.com>
2020-07-10 16:48:11 +08:00
Bing Song 9ebecb7a7b MLK-24365-7 dsp: add dsp mu interrupt into wakeup source.
Add dsp mu interrupt into wakeup source when LPA mode.
So the interrupt will wakeup A core when DSP consumed
all audio bitstream data.

Signed-off-by: Bing Song <bing.song@nxp.com>
2020-07-10 16:48:11 +08:00
Bing Song 14a5a9ace5 MLK-24365-6 dsp: enlarge the audio bitstream buffer.
The buffer is share between A core and DSP. Enlarge it, so A core will
suspend longer when DSP is playbacking audio.

Signed-off-by: Bing Song <bing.song@nxp.com>
2020-07-10 16:48:11 +08:00
Bing Song 777b92ecd0 MLK-24365-5 dsp: setup memory for dsp.
LPA only use OCRAM as DRAM will in retention mode when LPA.

Signed-off-by: Bing Song <bing.song@nxp.com>
2020-07-10 16:48:11 +08:00
Bing Song 23219672c1 MLK-24365-4 dsp: enable dsp lpa.
One big buffer shared between A core and DSP to buffer audio
bitstram. So A core can sleep more time when DSP is playing
buffered audio bit stream.

Signed-off-by: Bing Song <bing.song@nxp.com>
2020-07-10 16:48:11 +08:00
Bing Song 3818e25a7f MLK-24365-2 dsp: manage audiomix clock in dsp driver.
IMX8MP_CLK_AUDIO_ROOT and IMX8MP_CLK_AUDIO_AXI_DIV will gated when
suspend even if dsp driver ignored suspend when low power audio offload
playback. The root cause is the two clocks is controlled when audiomix
power on/off. Add the two clocks in dsp driver, so driver will add
one ref count when useing dsp, so the two clocks don't be gated when
A core suspend during low power audio playback.

Signed-off-by: Bing Song <bing.song@nxp.com>
2020-07-10 16:48:11 +08:00
Viorel Suman 71e9774899 ASoC: fsl_micfil: fix PDM root clock frequency
Depending on sample rate the PDM must be clocked at either 24.576MHz or
22.5792MHz. CLK_DIV is later calculated as function of PDM root clock
frequency and FS. Setting PDM root clock = FS * 1024 is wrong because
for low sample rate such as 8000 the PDM root clock will be 8000 * 1024
= 8192000 Hz so PDM will be underclocked for this sample rate.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2020-07-02 11:13:26 +03:00
Shengjiu Wang b59ed5668c ASoC: fsl_ssi: Fix bclk calculation for mono channel
[ Upstream commit ed1220df6e ]

For mono channel, SSI will switch to Normal mode.

In Normal mode and Network mode, the Word Length Control bits
control the word length divider in clock generator, which is
different with I2S Master mode (the word length is fixed to
32bit), it should be the value of params_width(hw_params).

The condition "slots == 2" is not good for I2S Master mode,
because for Network mode and Normal mode, the slots can also
be 2. Then we need to use (ssi->i2s_net & SSI_SCR_I2S_MODE_MASK)
to check if it is I2S Master mode.

So we refine the formula for mono channel, otherwise there
will be sound issue for S24_LE.

Fixes: b0a7043d5c ("ASoC: fsl_ssi: Caculate bit clock rate using slot number and width")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/034eff1435ff6ce300b6c781130cefd9db22ab9a.1592276147.git.shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-30 15:36:55 -04:00
Xiyu Yang 1957ac8d1b ASoC: fsl_asrc_dma: Fix dma_chan leak when config DMA channel failed
[ Upstream commit 36124fb19f ]

fsl_asrc_dma_hw_params() invokes dma_request_channel() or
fsl_asrc_get_dma_channel(), which returns a reference of the specified
dma_chan object to "pair->dma_chan[dir]" with increased refcnt.

The reference counting issue happens in one exception handling path of
fsl_asrc_dma_hw_params(). When config DMA channel failed for Back-End,
the function forgets to decrease the refcnt increased by
dma_request_channel() or fsl_asrc_get_dma_channel(), causing a refcnt
leak.

Fix this issue by calling dma_release_channel() when config DMA channel
failed.

Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn>
Signed-off-by: Xin Tan <tanxin.ctf@gmail.com>
Link: https://lore.kernel.org/r/1590415966-52416-1-git-send-email-xiyuyang19@fudan.edu.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-24 17:50:36 +02:00
Shengjiu Wang 53057bd4ac ASoC: fsl_esai: Disable exception interrupt before scheduling tasklet
[ Upstream commit 1fecbb71fe ]

Disable exception interrupt before scheduling tasklet, otherwise if
the tasklet isn't handled immediately, there will be endless xrun
interrupt.

Fixes: 7ccafa2b38 ("ASoC: fsl_esai: recover the channel swap after xrun")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/a8f2ad955aac9e52587beedc1133b3efbe746895.1587968824.git.shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-24 17:50:09 +02:00
Daniel Baluta dd53cbb0fd MLK-24263-7 ASoC: fsl_dsp_audiomix: Introduce imx_audiomix_dsp_stall
This function is used to stall the DSP and it will be used
together with PWRCTL register in order to properly reset the
DSP to handle the Power Management use case.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-06-19 17:01:30 +03:00
Daniel Baluta b3adec224c MLK-24263-6 ASoC: fsl_dsp_audiomix: Remove hardcoded value
Use a meaningful named macro to represent RunStall bit from
AudioDSP_REG2 register.

This register is used to Run/Stall the DSP.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-06-19 17:01:30 +03:00
Viorel Suman bdf3474115 MLK-24276: ASoC: fsl_xcvr: fix SPDIF TX suspend/resume
SPDIF TX fails to play after resume because PHY is put in reset on suspend,
and is not re-initialized on resume. Move SPDIF TX configuration in "prepare"
callback since "prepare" is called after resume.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-06-11 12:42:50 +03:00
Peter Chen 65e9cfc5f0
MLK-24290-3 ASoC: imx-wm8960: change dev_err for dev_dbg for -EPROBE_DEFER case
For the -EPROBE_DEFER case, it is not real error, and just resource is
not ready. It needs to use debug message instead of error message for it.
It could avoid unexpected console message for every device's probe, eg
SD/USB devices plug in.

Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
2020-06-10 11:18:02 +08:00
Peter Chen 4e94c9e1a0
MLK-24290-2 ASoC: imx-wm8524: change dev_err for dev_dbg for -EPROBE_DEFER case
For the -EPROBE_DEFER case, it is not real error, and just resource is
not ready. It needs to use debug message instead of error message for it.
It could avoid unexpected console message for every device's probe, eg
SD/USB devices plug in.

Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
2020-06-10 11:17:30 +08:00
Peter Chen b22d33047d
MLK-24290-1 ASoC: imx-cs42888: change dev_err for dev_dbg for -EPROBE_DEFER case
For the -EPROBE_DEFER case, it is not real error, and just resource is
not ready. It needs to use debug message instead of error message for it.
It could avoid unexpected console message for every device's probe, eg
SD/USB devices plug in, suspend/resume process, etc.

SD device plug in:
mmc1: new high speed SDHC card at address aaaa
mmcblk1: mmc1:aaaa SA16G 14.8 GiB
imx-cs42888 sound-cs42888: failed to find codec platform device

USB device plug in:
usb 2-1: USB disconnect, device number 2
usb 3-1: new SuperSpeed Gen 1 USB device number 2 using cdns-usb3
usb-storage 3-1:1.0: USB Mass Storage device detected
scsi host0: usb-storage 3-1:1.0
imx-cs42888 sound-cs42888: failed to find codec platform device
scsi 0:0:0:0: Direct-Access     SanDisk  Ultra            1.00 PQ: 0 ANSI: 6
sd 0:0:0:0: [sda] 60062500 512-byte logical blocks: (30.8 GB/28.6 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
 sda: sda1
sd 0:0:0:0: [sda] Attached SCSI removable disk
imx-cs42888 sound-cs42888: failed to find codec platform device

Suspend/resume process:
OOM killer disabled.
Freezing remaining freezable tasks ... (elapsed 0.083 seconds) done.
printk: Suspending console(s) (use no_console_suspend to debug)
fec 5b040000.ethernet eth0: Link is Down
PM: suspend devices took 0.684 seconds
Disabling non-boot CPUs ...
CPU1: shutdown
psci: CPU1 killed (polled 4 ms)
CPU2: shutdown
psci: CPU2 killed (polled 0 ms)
CPU3: shutdown
psci: CPU3 killed (polled 0 ms)
Enabling non-boot CPUs ...
Detected VIPT I-cache on CPU1
GICv3: CPU1: found redistributor 1 region 0:0x0000000051b20000
CPU1: Booted secondary processor 0x0000000001 [0x410fd042]
CPU1 is up
Detected VIPT I-cache on CPU2
GICv3: CPU2: found redistributor 2 region 0:0x0000000051b40000
CPU2: Booted secondary processor 0x0000000002 [0x410fd042]
CPU2 is up
Detected VIPT I-cache on CPU3
GICv3: CPU3: found redistributor 3 region 0:0x0000000051b60000
CPU3: Booted secondary processor 0x0000000003 [0x410fd042]
CPU3 is up
imx-cs42888 sound-cs42888: failed to find codec platform device
PM: resume devices took 0.240 seconds
OOM killer enabled.
Restarting tasks ...

Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
2020-06-10 11:16:51 +08:00
Adrian Alonso 251d8ae450 MLK-24232-2: sound: soc fsl: imx-pdm compute mclk performance mode
Compute mclk to allow low power and performance settings
based on sample_rate:
[ 8000 - 11025] low power mode
[16000 - 64000] performance mode
Update Copyright year.

Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-06-05 11:07:41 -05:00
Adrian Alonso 4169c352d3 MLK-24230: sound: soc fsl: imx pdm add dsd format constraints
Add DSD_U8, DSD_U16_LE and DSD_U32_LE format constrains
in order to use SAI DSD settings for handling multi
channel capture streams. One channel per dataline.

Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-06-05 10:22:19 -05:00
Viorel Suman 321894d403 MLK-24139-4 ASoC: fsl_xcvr: allow playback for SPDIF only
Allow playback for SPDIF only.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-05-29 12:40:39 +03:00
Viorel Suman c94af0b933 MLK-24139-3 ASoC: fsl_xcvr: add SPDIF constraints
Add missing SPDIF constraints.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-05-29 12:40:39 +03:00
Viorel Suman fbdea7bf8e MLK-24139-1 ASoC: fsl_xcvr: split resources for ram, regs and fifos
Split RAM, regs and FIFO resources in DTS.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-05-29 12:40:39 +03:00
Shengjiu Wang 2f07bac002 MLK-24175: ASoC: fsl_sai: instantiate snd_soc_dai_driver
instantiate snd_soc_dai_driver for independent symmetric control.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-05-27 16:55:06 +08:00
Viorel Suman eb01ee5109 MLK-22598: ASoC: fsl_micfil: fix a cherry-pick error
The original patch updates REG_MICFIL_STAT in fsl_micfil_reset
method, but not in configure_hwvad_interrupts, fix this.

Fixes: e12b0060cd ("MLK-22598: ASoC: fsl_micfil: Reset channel output
data Flag")
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2020-05-25 15:43:37 +03:00
Daniel Baluta 61031bfa4f MLK-23638: ASoC: fsl_dai: Make sure clocks are turned on during probe
During probe SOF driver loads the topology, which will send messages
to DSP to create the Audio components.

SOF DAI component at creation time calls probe() and touches DAI
registers thus we need to make sure DAI clocks are turned on during
probe.

Using pm_runtime_get_sync() we force resume to be called which will
enable all necessary clocks.

Later we call the pm_runtime_put_sync() and mark the device as
autosuspend. This will cause suspend to be called which will disable
all clocks to save power.

Later, when userspace uses the sound card (via aplay/arecord) or any
alsa-lib calls the normal runtime resume/suspend flow will happen.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-05-22 12:23:19 +03:00
Shengjiu Wang 466976dd76 MLK-24132: ASoC: fsl_micfil: Fix kernel panic when hwvad is disabled
The reason is that we access the register when power is disabled

reproduce command:
echo 8 > /sys/devices/platform/soc@0/30c00000.bus/30c00000.spba-bus/30ca0000.micfil/hwvad/enable

[  332.838518] SError Interrupt on CPU2, code 0xbf000002 -- SError
[  332.838521] CPU: 2 PID: 1383 Comm: sh Tainted: G           O      5.4.24-2.1.0+g2ad925d15481 #1
[  332.838523] Hardware name: NXP i.MX8MPlus EVK board (DT)
[  332.838525] pstate: 20000085 (nzCv daIf -PAN -UAO)
[  332.838526] pc : regcache_sync_block+0x7c/0x258
[  332.838528] lr : regcache_sync_block+0xf0/0x258
[  332.838531] sp : ffff800012bf3be0
[  332.838532] x29: ffff800012bf3be0 x28: 0000000000000000
[  332.838535] x27: 0000000000000000 x26: 0000000000000001
[  332.838541] x25: ffff00017753ed00 x24: 0000000000000000
[  332.838546] x23: ffff00017706d400 x22: 000000000000002b
[  332.838550] x21: ffff00017753f100 x20: ffff000177538c00
[  332.838554] x19: 0000000000000001 x18: 0000000000000000
[  332.838559] x17: 0000000000000000 x16: 0000000000000000
[  332.838564] x15: 0000000000000000 x14: 0000000000000000
[  332.838567] x13: 0000000000000000 x12: 0000000000000000
[  332.838572] x11: ffff800012bf3d50 x10: ffff000173c0e900
[  332.838577] x9 : ffff00017706d870 x8 : 0000000000000000
[  332.838582] x7 : 00000000000000a8 x6 : 0000000000000000
[  332.838587] x5 : 0000000000000000 x4 : ffff800010769d88
[  332.838592] x3 : ffff80001076d278 x2 : 0000000008000000
[  332.838597] x1 : ffff800023c10000 x0 : 0000000000000000
[  332.838603] Kernel panic - not syncing: Asynchronous SError Interrupt
[  332.838605] CPU: 2 PID: 1383 Comm: sh Tainted: G           O      5.4.24-2.1.0+g2ad925d15481 #1
[  332.838606] Hardware name: NXP i.MX8MPlus EVK board (DT)
[  332.838608] Call trace:
[  332.838609]  dump_backtrace+0x0/0x140
[  332.838612]  show_stack+0x14/0x20
[  332.838613]  dump_stack+0xb4/0xf8
[  332.838617]  panic+0x158/0x324
[  332.838618]  nmi_panic+0x84/0x88
[  332.838621]  arm64_serror_panic+0x74/0x80
[  332.838622]  do_serror+0x80/0x138
[  332.838623]  el1_error+0x84/0xf8
[  332.838627]  regcache_sync_block+0x7c/0x258
[  332.838628]  regcache_rbtree_sync+0x60/0xb0
[  332.838629]  regcache_sync+0xac/0x140
[  332.838633]  disable_hwvad+0x3c/0x1f0
[  332.838634]  micfil_hwvad_handler+0x78/0x170
[  332.838635]  kobj_attr_store+0x14/0x28
[  332.838637]  sysfs_kf_write+0x40/0x50
[  332.838640]  kernfs_fop_write+0xf8/0x210
[  332.838641]  __vfs_write+0x18/0x40
[  332.838642]  vfs_write+0xdc/0x1c8
[  332.838646]  ksys_write+0x68/0xf0
[  332.838647]  __arm64_sys_write+0x18/0x20
[  332.838648]  el0_svc_common.constprop.0+0x68/0x160
[  332.838651]  el0_svc_handler+0x20/0x80
[  332.838653]  el0_svc+0x8/0xc
[  332.838972] SMP: stopping secondary CPUs
[  332.838974] Kernel Offset: disabled
[  332.838975] CPU features: 0x0002,2000200c
[  332.838976] Memory Limit: none

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-05-22 15:03:29 +08:00
Shengjiu Wang 6572404242 MLK-24084-3: ASoC: fsl_easrc_m2m: reset in_filled_len on suspend
in_filled_len need to be reset on suspend, for suspend, every state
will go back to initilization state.

Fixes: 3e87108614d1 ("MLK-24044: ASoC: fsl_easrc_m2m: Fix output length not accurate")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-05-21 18:45:35 +08:00
Shengjiu Wang 3a467c53a7 MLK-24084-2: ASoC: fsl_easrc_m2m: Fix kernel panic in m2m stress test
initilize the m2m->complete in open() to avoid the NULL pointer in suspend
because the suspend can be called before initilizing m2m->complete in convert

[  591.006691] Filesystems sync: 0.084 seconds
[  591.012292] Freezing user space processes ... (elapsed 0.001 seconds) done.
[  591.020768] OOM killer disabled.
[  591.024016] Freezing remaining freezable tasks ... (elapsed 0.105 seconds) done.
[  591.809374] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
[  591.818160] Mem abort info:
[  591.820949]   ESR = 0x96000004
[  591.824000]   EC = 0x25: DABT (current EL), IL = 32 bits
[  591.829307]   SET = 0, FnV = 0
[  591.832356]   EA = 0, S1PTW = 0
[  591.835493] Data abort info:
[  591.838369]   ISV = 0, ISS = 0x00000004
[  591.842200]   CM = 0, WnR = 0
[  591.845165] user pgtable: 4k pages, 48-bit VAs, pgdp=00000001b033e000
[  591.851600] [0000000000000000] pgd=0000000000000000
[  591.856476] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[  591.862043] Modules linked in:
[  591.865097] CPU: 2 PID: 867 Comm: rtcwakeup.out Not tainted 5.4.24-04892-g8b7eb66 #911
[  591.873009] Hardware name: NXP i.MX8MPlus EVK board (DT)
[  591.878317] pstate: a0000085 (NzCv daIf -PAN -UAO)
[  591.883110] pc : __wake_up_common+0x58/0x170
[  591.887377] lr : __wake_up_locked+0x18/0x20
[  591.891555] sp : ffff8000120b3a00
[  591.894866] x29: ffff8000120b3a00 x28: ffff800011b84000
[  591.900174] x27: 0000000000000000 x26: 0000000000000000
[  591.905482] x25: 0000000000000003 x24: 0000000000000000
[  591.910791] x23: 0000000000000001 x22: 0000000000000000
[  591.916099] x21: ffff000171369420 x20: ffff000171369418
[  591.921407] x19: ffff000171369410 x18: 0000000000000000
[  591.926715] x17: 0000000000000000 x16: 0000000000000000
[  591.932023] x15: 0000000000000000 x14: ffff0001760daa00
[  591.937331] x13: ffff80016dbdc000 x12: 0000000034d4d91d
[  591.942639] x11: 0000000000000000 x10: 00000000000009c0
[  591.947948] x9 : ffff000171a30470 x8 : 00000000ffffffff
[  591.953256] x7 : ffff8000120b3a38 x6 : ffffffffffffffe8
[  591.958564] x5 : 0000000000000000 x4 : 0000000000000000
[  591.963871] x3 : 0000000000000000 x2 : 0000000000000001
[  591.969179] x1 : 0000000000000003 x0 : 0000000000000000
[  591.974487] Call trace:
[  591.976931]  __wake_up_common+0x58/0x170
[  591.980851]  __wake_up_locked+0x18/0x20
[  591.984683]  complete+0x48/0x68
[  591.987823]  fsl_easrc_suspend+0x84/0x100
[  591.991831]  dpm_run_callback.isra.0+0x38/0xd8
[  591.996271]  __device_suspend+0xfc/0x3c8
[  592.000191]  dpm_suspend+0xf0/0x1e8
[  592.003676]  dpm_suspend_start+0x98/0xa0
[  592.007596]  suspend_devices_and_enter+0xec/0x5b8
[  592.012297]  pm_suspend+0x2f8/0x340
[  592.015781]  state_store+0x88/0x108
[  592.019267]  kobj_attr_store+0x14/0x28
[  592.023015]  sysfs_kf_write+0x40/0x50
[  592.026674]  kernfs_fop_write+0xf8/0x210
[  592.030594]  __vfs_write+0x18/0x40
[  592.033992]  vfs_write+0xdc/0x1c8
[  592.037303]  ksys_write+0x68/0xf0
[  592.040615]  __arm64_sys_write+0x18/0x20
[  592.044536]  el0_svc_common.constprop.0+0x68/0x160
[  592.049324]  el0_svc_handler+0x20/0x80
[  592.053070]  el0_svc+0x8/0xc
[  592.055950] Code: 54000700 a90153f3 2a0203f7 52800018 (f9400cd3)
[  592.062040] ---[ end trace a36c1a42637c268e ]---

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-05-21 18:45:35 +08:00
Shengjiu Wang 857284dc23 MLK-24084-1: ASoc: fsl_asrc_m2m: Fix kernel panic in m2m stress test
initilize the m2m->complete in open() to avoid the NULL pointer in suspend
because the suspend can be called before initilizing m2m->complete in convert

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-05-21 18:45:35 +08:00
Adrian Alonso 8fb5fb0a66 MLK-24059: sound: soc: fsl add imx-ak5552 compatible
Add fsl,imx-audio-ak5552 to imx-ak5558 machine ASoC
driver, limit actual number of channels for ak5552
ADC support

Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
2020-05-19 13:51:00 -05:00
Shengjiu Wang b020954c94 MLK-24044: ASoC: fsl_easrc_m2m: Fix output length not accurate
We need to accumulate the input data length for calculating the
output length because there are data need to be prefilled in
the beginning. If the fraction part beyond the integrity of
sample is not considered in calculating, which may cause the
output task timeout.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-05-15 17:24:52 +08:00
Viorel Suman a4f24900c3 MLK-23146-1: ASoC: fsl_spdif: add intermediate RX rates for iMX8MM.
Add intermediate RX rates for iMX8MM.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-05-15 11:46:24 +03:00