1
0
Fork 0
Commit Graph

34344 Commits (d66c6d6af88f0d0a8cbbbbb6c53659988aafaffd)

Author SHA1 Message Date
Zhang Peng 92d77a4619 MLK-23701-3 ASoc: fsl: Fill pcm_io_frames and sampling_rate
Get samplerate and consumed data from dsp when call
snd_compr_ops.pointer.

Signed-off-by: Zhang Peng <peng_zhang_8@nxp.com>
2020-04-07 12:48:18 +08:00
Zhang Peng d235be4b28 MLK-23701-2 ASoc:fsl: Add support cplay in mp board
1. Add clk necessary in dsp driver
2. Add renderer type for select sai or esai

Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
2020-04-07 12:48:18 +08:00
Zhang Peng 5e9570b387 MLK-23701-1 Asoc:fsl: Add to choose codec depend on dtb
Before fixed codec name cs42888, now also support wm8960 codec,
thus add to choose set codec name depend on enabled codec.

Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
2020-04-07 12:48:18 +08:00
Viorel Suman 2513444554 MLK-23732: fsl_xcvr: implement eARC RX fallback mode
There are 2 configurable options for eARC RX fallback
to ARC mode: "ARC single ended" or "ARC common".
Add amixer control in order to allow setting it
from userspace.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-04-02 11:57:02 +03:00
Viorel Suman ca5fccb261 MLK-23734: ASoC: fsl_xcvr: remove sample bits constraint
Sample bits constraint is meaningless given that the only
supported format is SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2020-04-02 11:35:18 +03:00
Viorel Suman c336672cb0 MLK-23725-3: ASoC: fsl_xcvr: fix CS comment
Fix Channel Status comments.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-04-01 16:07:34 +03:00
Viorel Suman bbca32f615 MLK-23725-2: ASoC: fsl_xcvr: add RX CS bytes control
For IEC958 kcontrol type amixer tool returns just first 4 bytes,
add a byte array control so that we'll be able to see all 24 bytes
by using amixer.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-04-01 16:07:34 +03:00
Viorel Suman 86401d592b MLK-23725-1: ASoC: fsl_xcvr: reimplement CS read function
CS_DATA registers are supposed to be used by M0+
core, according to block guide host core must read
channel status structure from data memory.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-04-01 16:07:34 +03:00
Shengjiu Wang 3ace7799e9 MLK-23702-4: ASoC: imx-rpmsg: support rpmsg audio for i.MX8MP
in i.MX8MP, the audio codec is registered by DT, and we reserve
a memory in DT that we can allocate dma memory from the
reserved pool.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-03-31 15:04:10 +08:00
Shengjiu Wang ccb83f789e MLK-23702-3: ASoC: rpmsg_wm8960: Add i2c interface
rpmsg wm8960 also can be registered as an i2c device.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-03-31 15:04:07 +08:00
Shengjiu Wang 0bc59849c4 MLK-23702-2: ASoC: imx-pcm-rpmsg: Don't register codec driver if it is from DT
Don't register codec driver if it is from DT.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-03-31 15:04:03 +08:00
Shengjiu Wang ca2170e0fb MLK-23702-1: ASoC: fsl_rpmsg_i2s: Support rpmsg audio for i.MX8MP
in i.MX8MP, the audio codec is registered by DT. So we add
a new flag: codec_in_dt

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-03-31 15:04:00 +08:00
Viorel Suman a063fac437 MLK-23603-6: ASoC: fsl_xcvr: move clks management into suspend/resume
Move clocks prepare_enable and disable_unprepare calls
into runtime_resume and runtime_suspend respectively.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-03-25 10:49:09 +02:00
Viorel Suman 9c6b7f731a MLK-23603-5: ASoC: fsl_xcvr: move static IP config code into fw load
Move static XCVR IP configuration code into firmware load
method in order to avoid the need to have bus clock started
in "startup" callback.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-03-25 10:49:09 +02:00
Viorel Suman 6bd55541d4 MLK-23603-4: ASoC: fsl_xcvr: adjust watermark and max burst values
Set watermarks values at half FIFO size, and max burst to 1/8
of FIFO size.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-03-25 10:49:09 +02:00
Viorel Suman ff5a36241f MLK-23603-3: ASoC: fsl_xcvr: prepare for suspend/resume
"startup" callback is not called in a subsequent
"runtime_resume" sequence, so move IP init code
into "prepare" callback. Aside of this move
constraint check code from "prepare" to "startup"
since constraint checking is required once at stream
startup.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-03-25 10:49:09 +02:00
Viorel Suman 8a05c23ef2 MLK-23603-2: ASoC: fsl_xcvr: refactor constraint handling
Refactor constraint handling in order to facilitate
unimplemented cases, such as for ARC and SPDIF.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-03-25 10:49:09 +02:00
Viorel Suman 6a3380a43a MLK-23603-1: ASoC: fsl_xcvr: fix compliation warnings
Fix two compilation warnings.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-03-25 10:49:08 +02:00
Shengjiu Wang 6a895a2c4c MLK-23650-2: ASoC: fsl_asrc_m2m: Fix oops error
Don't need to add one more buffer, if the buffer
size is same as ASRC_MAX_BUFFER_SIZE.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-03-23 17:48:15 +08:00
Shengjiu Wang 091d9d8e65 MLK-23650-1: ASoC: fsl_easrc_m2m: Fix oops error
swiotlb don't allow the buffer length is zero. So
we should not add one more buffer, if the buffer
size is same as max_buf_size.

[ 1853.382383] ------------[ cut here ]------------
[ 1853.387011] kernel BUG at kernel/dma/swiotlb.c:497!
[ 1853.391889] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
[ 1853.397372] Modules linked in: crct10dif_ce flexcan can_dev
[ 1853.402950] CPU: 2 PID: 17298 Comm: easrc_testapp Not tainted 5.4.3-2.0.0+gfd263a3edd95 #1
[ 1853.411210] Hardware name: FSL i.MX8MP EVK (DT)
[ 1853.415739] pstate: 80000005 (Nzcv daif -PAN -UAO)
[ 1853.420535] pc : swiotlb_tbl_map_single+0x1fc/0x310
[ 1853.425413] lr : swiotlb_map+0x60/0x148
[ 1853.429245] sp : ffff800025fdba80
[ 1853.432557] x29: ffff800025fdba80 x28: 0000000000000000
[ 1853.437867] x27: ffff000177818638 x26: ffff800011b14000
[ 1853.443176] x25: ffff800011b149f8 x24: 0000000000000000
[ 1853.448485] x23: 00000001b1e0c000 x22: 0000000000000000
[ 1853.453793] x21: ffff0001763ef410 x20: 0000000000180000
[ 1853.459102] x19: ffff0001763ef410 x18: 0000000000000000
[ 1853.464411] x17: 0000000000000000 x16: 0000000000000000
[ 1853.469720] x15: 0000000000000000 x14: 001df82f001df82f
[ 1853.475029] x13: ffff00017f34e000 x12: 0000000000000018
[ 1853.480338] x11: 00000000001fffff x10: 0001000000000000
[ 1853.485646] x9 : 0000000000000000 x8 : 0000000000000000
All test[s  1p8a5s3s.e4d90 w95i5] x7 : 0000000000000000 x6 : 0000000000000000
h success
[ 1853.497911] x5 : 0000000000200000 x4 : 0000000000000000
[ 1853.504171] x3 : 0000000000000001 x2 : 00000001b1e0c000
[ 1853.509480] x1 : 00000000c0000000 x0 : 0000000000000000
[ 1853.514789] Call trace:
[ 1853.517237]  swiotlb_tbl_map_single+0x1fc/0x310
[ 1853.521766]  swiotlb_map+0x60/0x148
[ 1853.525253]  dma_direct_map_page+0xf0/0x130
[ 1853.529434]  dma_direct_map_sg+0x78/0xe0
[ 1853.533356]  fsl_easrc_dmaconfig+0x10c/0x398
[ 1853.537624]  fsl_easrc_ioctl+0xcf4/0x1490
[ 1853.541633]  do_vfs_ioctl+0x964/0xb48
[ 1853.545293]  ksys_ioctl+0x78/0xa8
[ 1853.548607]  __arm64_sys_ioctl+0x1c/0x28
[ 1853.552530]  el0_svc_common.constprop.0+0x68/0x160
[ 1853.557320]  el0_svc_handler+0x20/0x80
[ 1853.561067]  el0_svc+0x8/0xc
[ 1853.563949] Code: 912e4021 9417b69a a94363f7 17ffffd5 (d4210000)
[ 1853.570042] ---[ end trace 5e9c94fcfabda124 ]---

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-03-23 17:44:00 +08:00
Shengjiu Wang bb6511173a MLK-23651: ASoC: fsl_spdif: Fix hang issue in reboot
In reboot, system will try to access regisers through
the dai controls, but the clock is not bind with regmap,
then system hang.

So we enable regcache_cache_only in probe to fix this
issue.

Fixes: d55d453fdf ("MLK-23618-11: ASoC: fsl_spdif: Don't bind clock with regmap")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-03-23 17:43:48 +08:00
Shengjiu Wang d55d453fdf MLK-23618-11: ASoC: fsl_spdif: Don't bind clock with regmap
The call flow:
devm_regmap_init_mmio_clk
   - clk_prepare()
      - clk_pm_runtime_get()

Cause the power domain of lpcg clock always be enabled.
which impact the power consumption.

So we can't bind clock with regmap, then explicitly enable
clock when using. As we already enable all clock in
pm_runtime_resume, so only need to enable clock in probe.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-03-18 15:42:07 +08:00
Shengjiu Wang d91068f322 MLK-23618-10: ASoC: fsl_esai: Don't bind clock with regmap
The call flow:
devm_regmap_init_mmio_clk
   - clk_prepare()
      - clk_pm_runtime_get()

Cause the power domain of lpcg clock always be enabled.
which impact the power consumption.

So we can't bind clock with regmap, then explicitly enable
clock when using. As we already enable all clock in
pm_runtime_resume, so only need to enable clock in probe.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-03-18 15:42:03 +08:00
Shengjiu Wang c2641e1974 MLK-23618-9: ASoC: fsl_sai: Don't bind clock with regmap
The call flow:
devm_regmap_init_mmio_clk
   - clk_prepare()
      - clk_pm_runtime_get()

Cause the power domain of lpcg clock always be enabled.
which impact the power consumption.

So we can't bind clock with regmap, then explicitly enable
clock when using. As we already enable all clock in
pm_runtime_resume, so only need to enable clock in probe.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-03-18 15:41:58 +08:00
Shengjiu Wang 45db541836 MLK-23618-8: ASoC: fsl_audmix: Don't bind clock with regmap
The call flow:
devm_regmap_init_mmio_clk
   - clk_prepare()
      - clk_pm_runtime_get()

Cause the power domain of lpcg clock always be enabled.
which impact the power consumption.

So we can't bind clock with regmap, then explicitly enable
clock when using. As we already enable all clock in
pm_runtime_resume, so only need to enable clock in probe.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-03-18 15:41:54 +08:00
Shengjiu Wang 1d46a32f50 MLK-23618-7: ASoC: fsl_asrc: Don't bind clock with regmap
The call flow:
devm_regmap_init_mmio_clk
   - clk_prepare()
     - clk_pm_runtime_get()

Cause the power domain of lpcg clock always be enabled.
which impact the power consumption.

So we can't bind clock with regmap, then explicitly enable
clock when using. As we already enable all clock in
pm_runtime_resume, so only need to enable clock in probe.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-03-18 15:41:50 +08:00
Shengjiu Wang ee1a47b87f MLK-23618-6: ASoC: fsl_dsp: refine handling of multi power domain
The attached multi power domain is enabled by device_link_add
So we need to disable them in probe, otherwise it may impact
the power consumption.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-03-18 15:41:46 +08:00
Shengjiu Wang c43a9a158c MLK-23618-5: Revert "ASoC: cs42xx8: support multi power domain"
This reverts commit 62e2861cf0.

The power domain of clock should be controlled by clock driver,
We don't need to control it in audio driver, so we don't
need to support multi power domain in audio driver.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-03-18 15:41:41 +08:00
Shengjiu Wang 529a1cb73d MLK-23618-4: Revert "ASoC: fsl_spdif:Support multi power domains"
This reverts commit bd7b26036e.

The power domain of clock should be controlled by clock driver,
We don't need to control it in audio driver, so we don't
need to support multi power domain in audio driver.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-03-18 15:41:36 +08:00
Shengjiu Wang b1024cf8bb MLK-23618-3: Revert "ASoC: fsl_asrc: support multi power domain"
This reverts commit 442ad6fd0c.

The power domain of clock should be controlled by clock driver,
We don't need to control it in audio driver, so we don't
need to support multi power domain in audio driver.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-03-18 15:41:31 +08:00
Shengjiu Wang 6ee466819d MLK-23618-2: Revert "ASoC: fsl_esai: support multi power domain"
This reverts commit 4058ef0bb8.

The power domain of clock should be controlled by clock driver,
We don't need to control it in audio driver, so we don't
need to support multi power domain in audio driver.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-03-18 15:41:26 +08:00
Shengjiu Wang 1fe9eac911 MLK-23618-1: Revert "ASoC: fsl_sai: support multi power domain"
This reverts commit 53915e7ea9.

The power domain of clock should be controlled by clock driver,
We don't need to control it in audio driver, so we don't
need to support multi power domain in audio driver.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-03-18 15:41:20 +08:00
Daniel Baluta ec19a7176f MLK-23560-4 ASoC: SOF: Fix maybe used unitialized warning
This fixes the following compilation warning:

sound/soc/sof/imx/imx8.c: In function ‘imx8_probe’:
sound/soc/sof/imx/imx8.c:210:6: warning: ‘i’ may be used uninitialized
in this function [-Wmaybe-uninitiali

Warning introduce with commit commit 352ad24ec
("MLK-23350-1 ASoC: sof: Skip power domain handline when num_domains")

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-03-13 16:58:57 +02:00
Pierre-Louis Bossart 236ee9e163 MLK-23560-3 ASoC: SOF: define INFO_ flags in dsp_ops
Currently the INFO_ flags such as PAUSE/NO_PERIOD_WAKEUP are defined
in the SOF PCM core, which doesn't scale. To account for platform
variations, these flags need to be set in DSP ops.

This patch only moves the definitions and does not change any
functionality.

Reviewed-by: Jaska Uimonen <jaska.uimonen@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191024210318.30068-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-13 16:58:45 +02:00
Daniel Baluta e5e991a741 MLK-23560-2: ASoC: SOF: Enable PM support
We need to provide PM macros in order for the SOF core
to suspend/resume the DSP.

PM support on the DSP side is quite limited and we are mostly
doing PM for ARM core.

Without this patch DSP won't be restarted after a resume causing
SOF driver calls to time out.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-03-13 15:34:16 +02:00
Shengjiu Wang 4d23edf7b3 MLK-23585-3: ASoC: imx-wm8960: support capture_only and playback_only
In imx8dxl-evk, some of wm8960s only support capture function,
So we support capture_only and playback_only in driver

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-03-13 16:26:02 +08:00
Shengjiu Wang 002cd44ea1 MLk-23585-2: ASoC: imx-wm8960: support multi instance
Move the golbal variables to structure, so all variables
are private for each instance.

replace the DRIVER_ATTR with DEVICE_ATTR to support
multi instance.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-03-13 16:26:02 +08:00
Shengjiu Wang 72b1cc1310 MLK-23585-1: ASoC: imx-wm8960: fix warning message
replace gpio_get_value with gpio_get_value_cansleep

[   35.872238] ------------[ cut here ]------------
[   35.876899] WARNING: CPU: 1 PID: 218 at drivers/gpio/gpiolib.c:3407 gpiod_get_raw_value+0x78/0x80
[   35.885774] Modules linked in:
[   35.888840] CPU: 1 PID: 218 Comm: kworker/u4:5 Tainted: G        W         5.4.24-04375-g6de4b3212b29-dirty #7367
[   35.899102] Hardware name: Freescale i.MX8DXL EVK (DT)
[   35.904247] Workqueue: events_power_efficient gpio_work
[   35.909477] pstate: 20000005 (nzCv daif -PAN -UAO)
[   35.914275] pc : gpiod_get_raw_value+0x78/0x80
[   35.918721] lr : gpiod_get_raw_value+0x20/0x80
[   35.923164] sp : ffff800012a1bd30
[   35.926476] x29: ffff800012a1bd30 x28: 0000000000000000
[   35.931791] x27: ffff00003b4152b8 x26: ffff8000119df7d0
[   35.937107] x25: 0000000000000000 x24: ffff800011ae2d48
[   35.942424] x23: ffff00001050c000 x22: ffff000010507100
[   35.947741] x21: ffff800011ae2000 x20: ffff800011ae2d10
[   35.953060] x19: ffff00003adf8640 x18: 0000000000000000
[   35.958374] x17: 0000000000000000 x16: 0000000000000000
[   35.963691] x15: 0000000000000000 x14: 0000000000000000
[   35.969008] x13: 0000000000000001 x12: 0000000000000000
[   35.974325] x11: 000000000002e708 x10: 00000000000009c0
[   35.979641] x9 : ffff800012a1b920 x8 : ffff00003a310a20
[   35.984958] x7 : ffff00003efec340 x6 : 0000000000000000
[   35.990276] x5 : 0000000000000000 x4 : ffff800011a01748
[   35.995593] x3 : ffff00003b005c00 x2 : 0000000000000001
[   36.000911] x1 : ffff00003b005c00 x0 : ffff00003b00ba18
[   36.006228] Call trace:
[   36.008684]  gpiod_get_raw_value+0x78/0x80
[   36.012790]  hp_jack_status_check+0x2c/0xf8
[   36.016977]  gpio_work+0x4c/0x70
[   36.020215]  process_one_work+0x1dc/0x370
[   36.024221]  worker_thread+0x48/0x468
[   36.027892]  kthread+0xf0/0x120
[   36.031036]  ret_from_fork+0x10/0x1c
[   36.034610] ---[ end trace b40bcf5f3cf8bd40 ]---

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-03-13 16:26:02 +08:00
Zhang Peng 10abba22b3 MLK-23570i fsl: fsl_dsp: Fix dsp suspend issue on imx.mp board
1. Add check pm runtime state to decide send suspend msg to dsp when
call fsl_dsp_suspend.
2. Set proxy->dsp_mu_init be zero in fsl_dsp_suspend for imx.mp.

Signed-off-by: Zhang Peng <peng_zhang_8@nxp.com>
2020-03-11 14:29:31 +01:00
Shengjiu Wang dc5a481843 LF-941: ASoC: fsl_easrc: Switch to 32 taps for resampling filter
With 128 taps of resampling filter, there is performance issue
for high sample rate and mulitchannel. For example, there is
noise issue for converting 48kHz to 768kHz, channel number
is larger than 5 channels, and p2p case.

So in order to increase performance, we reduce the taps number
to 32 in default, the quality is relatively downgraded.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-03-11 17:43:38 +08:00
Viorel Suman 69a1a919b9 MLK-23567-3: ASoC: fsl_xcvr: add TX CS control
TX CS control is needed for SPDIF/eARC TX function,
so add it. Aside of this separate TX controls from
RX controls so that controls can be added as function
of RX/TX flags of "fsl,xcvr-mode" DTS variable.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-03-10 11:08:35 +02:00
Viorel Suman e40f7a6b1a MLK-23567-2: ASoC: fsl_xcvr: use same format for both RX and TX
The only supported XCVR format is IEC958_SUBFRAME_LE, so use it
for both RX and TX.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-03-10 11:08:35 +02:00
Jason Liu 335d2828a9 This is the 5.4.24 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl5hHjgACgkQONu9yGCS
 aT6CSBAA0c16mnDb59jgmW/sBj/p/MrlD/WJzLriqiKN5BUsPt9++I5mNj8mG+d2
 Glm4086e8L826zv8oKiZm23xk93on+78ExhVFVZvZNaEUpiRNYCGSuDq2NrHW0z+
 kpagkAFLfCUZFoKtmWo+bpl0YtF4dd/fg7+EjyL6qT1DBs8NVMwZx7i/v0xXv7Wc
 0vsGCLYoBLzcW1FB2d9cfAUPCBuGEzL/7TdifNOXRgI9owGsZndFJgXgIzoBUt/P
 tqB8RLjIupCiMEPtsEAZ/rgEQLPFkb3yrBvgjd1wDI8bHUIQU0clqThKVNvmNSmv
 UTBSNgPAhkP8nZG7X9xCkyfEsUefejBJy66da9n4XTGGrXf9ga0BL0nNrOGwOesr
 m+tNnBSFsbFCMqFopQnt4zZSnaf67AOk2mzxbEu4E+sStyW943aDO9MoRRFgaYGH
 pfie3qOKtKta2MuNTJA+q6F0W9H+V5MtMpwbyuy1/dp2eVln2wewBBMvXYdL1YOy
 E/Z87nsQgalsDynz9m/niv32J4JAxHptyOyROkktDLBSzL5RawNn+Op8X5EtmZOe
 sPkiYicqp9CLmMj13qWXJhtuyNdD4wk6FyyAy6cX9mF44+EZGOBkyNP+n8g789Kn
 sqFJ7sfTfOnwLBFciMA5PaMTGNWROyWXNkvvUzO+9t0CyFAnT2U=
 =abGA
 -----END PGP SIGNATURE-----

Merge tag 'v5.4.24' into imx_5.4.y

Merge Linux stable release v5.4.24 into imx_5.4.y

* tag 'v5.4.24': (3306 commits)
  Linux 5.4.24
  blktrace: Protect q->blk_trace with RCU
  kvm: nVMX: VMWRITE checks unsupported field before read-only field
  ...

Signed-off-by: Jason Liu <jason.hui.liu@nxp.com>

 Conflicts:
	arch/arm/boot/dts/imx6sll-evk.dts
	arch/arm/boot/dts/imx7ulp.dtsi
	arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
	drivers/clk/imx/clk-composite-8m.c
	drivers/gpio/gpio-mxc.c
	drivers/irqchip/Kconfig
	drivers/mmc/host/sdhci-of-esdhc.c
	drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
	drivers/net/can/flexcan.c
	drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
	drivers/net/ethernet/mscc/ocelot.c
	drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
	drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
	drivers/net/phy/realtek.c
	drivers/pci/controller/mobiveil/pcie-mobiveil-host.c
	drivers/perf/fsl_imx8_ddr_perf.c
	drivers/tee/optee/shm_pool.c
	drivers/usb/cdns3/gadget.c
	kernel/sched/cpufreq.c
	net/core/xdp.c
	sound/soc/fsl/fsl_esai.c
	sound/soc/fsl/fsl_sai.c
	sound/soc/sof/core.c
	sound/soc/sof/imx/Kconfig
	sound/soc/sof/loader.c
2020-03-08 18:57:18 +08:00
Shengjiu Wang 1d12f4912e LF-601-2: ASoC: fsl_esai: add chan_name for dma_params
The chan_name is missed, otherwise:

[   68.051062] of_dma_request_slave_channel: not enough information provided
[   68.058700] fsl-esai-dai 59010000.esai: ASoC: can't open component 59010000.esai: -6

Fixes: 6ee6ebd6efae ("LF-601-1: ASoC: fsl_esai: Switch to imx-pcm-dma-v2")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-03-07 11:06:28 +08:00
Shengjiu Wang 5fb9ae16b7 LF-601-2: ASoC: fsl_asrc_dma: use dma channel of ESAI for p2p
With EDMA, there is two dma channels can be used for p2p,
one is from ASRC, one is from another peripheral (ESAI or SAI)
previously we select the dma channel of ASRC, but find an issue
for ideal ratio case, there is no control for data copy
speed, the speed is faster than expected.

So we switch to dma channel of peripheral (ESAI or SAI), that
copy speed of DMA is controlled by data consumption speed
in the peripheral FIFO.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-03-05 12:19:05 +08:00
Shengjiu Wang e827b5e3f9 LF-601-1: ASoC: fsl_esai: Switch to imx-pcm-dma-v2
With the imx-pcm-dma, the dma channel will be allocated in probe,
with EDMA, the channel allocation is fixed for each peripheral.

In ASRC->ESAI->CODEC case, we have two sound card device, hw:x,0
and hw:x,1, with imx-pcm-dma, the channel for esai will be ocuppied
by hw:x,0 in boot up.  when asrc platform driver want to request
the dma channnel for esai, it will fail.

So we switch to imx-pcm-dma-v2, with imx-pcm-dma-v2, the dma
channel is allocated when running, not in probe.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2020-03-05 12:18:48 +08:00
Daniel Baluta f23142593e MLK-23350-14 ASoC: SOF: fsl_dai: Introduce dai-index property
With the help of dai-index we figure out the correct name for a DAI.
In topology files DAI name is formed by concatenating DAI type ("sai",
"esai", etc) with DAI index.

So, this patch removes hardcoded DAI names esai0, sai1 and figures out
the names based on DAI type/index.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-03-02 13:20:41 +02:00
Sathyanarayana Nujella bb7ffcbec2 ASoC: SOF: Intel: hda: Add iDisp4 DAI
commit e68d669657 upstream.

TGL supports more than three iDisp DAI's.
Add support for iDisp4 CPU DAI.

Without this patch, we saw the below error on our TGL DUT:
   sof_rt5682 tgl_max98357a_rt5682: ASoC: CPU DAI iDisp4 Pin not registered

Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Signed-off-by: Jairaj Arava <jairaj.arava@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191220171037.10689-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-28 17:22:29 +01:00
Takashi Iwai 86502c68b8 ALSA: seq: Fix concurrent access to queue current tick/time
commit dc7497795e upstream.

snd_seq_check_queue() passes the current tick and time of the given
queue as a pointer to snd_seq_prioq_cell_out(), but those might be
updated concurrently by the seq timer update.

Fix it by retrieving the current tick and time via the proper helper
functions at first, and pass those values to snd_seq_prioq_cell_out()
later in the loops.

snd_seq_timer_get_cur_time() takes a new argument and adjusts with the
current system time only when it's requested so; this update isn't
needed for snd_seq_check_queue(), as it's called either from the
interrupt handler or right after queuing.

Also, snd_seq_timer_get_cur_tick() is changed to read the value in the
spinlock for the concurrency, too.

Reported-by: syzbot+fd5e0eaa1a32999173b2@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20200214111316.26939-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-28 17:22:27 +01:00
Takashi Iwai 2b550d1c7a ALSA: seq: Avoid concurrent access to queue flags
commit bb51e669fa upstream.

The queue flags are represented in bit fields and the concurrent
access may result in unexpected results.  Although the current code
should be mostly OK as it's only reading a field while writing other
fields as KCSAN reported, it's safer to cover both with a proper
spinlock protection.

This patch fixes the possible concurrent read by protecting with
q->owner_lock.  Also the queue owner field is protected as well since
it's the field to be protected by the lock itself.

Reported-by: syzbot+65c6c92d04304d0a8efc@syzkaller.appspotmail.com
Reported-by: syzbot+e60ddfa48717579799dd@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20200214111316.26939-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-28 17:22:27 +01:00