Commit graph

27 commits

Author SHA1 Message Date
Mark Brown
af08458988
ASoC: Merge up fixes
For the benefit of CI.
2023-09-26 16:14:44 +02:00
Kuninori Morimoto
14ec63f678
ASoC: fsl: convert not to use asoc_xxx()
ASoC is now unified asoc_xxx() into snd_soc_xxx().
This patch convert asoc_xxx() to snd_soc_xxx().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/874jk0s24t.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-25 14:16:20 +02:00
Shengjiu Wang
b19a5733de
ASoC: imx-audmix: Fix return error with devm_clk_get()
The devm_clk_get() can return -EPROBE_DEFER error,
modify the error code to be -EINVAL is not correct, which
cause the -EPROBE_DEFER error is not correctly handled.

This patch is to fix the return error code.

Fixes: b86ef53677 ("ASoC: fsl: Add Audio Mixer machine driver")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/1694757731-18308-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-15 13:16:21 +01:00
Claudiu Beznea
2f76e1d6ca
ASoC: imx-audmix: check return value of devm_kasprintf()
devm_kasprintf() returns a pointer to dynamically allocated memory.
Pointer could be NULL in case allocation fails. Check pointer validity.
Identified with coccinelle (kmerr.cocci script).

Fixes: b86ef53677 ("ASoC: fsl: Add Audio Mixer machine driver")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20230614121509.443926-1-claudiu.beznea@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-19 12:59:27 +01:00
Claudiu Beznea
2f3092e77f
ASoC: do not include pm_runtime.h if not used
Do not include pm_runtime.h header in files where APIs exported by
pm_runtime.h are not used.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> # for omap-mcbsp-st.c
Link: https://lore.kernel.org/r/20230517094903.2895238-2-claudiu.beznea@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-05-23 13:55:55 +01:00
Kuninori Morimoto
87e39e9b00
ASoC: fsl: use asoc_dummy_dlc
Now we can share asoc_dummy_dlc. This patch use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/874jp60zwq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-08 08:47:09 +09:00
Kuninori Morimoto
dc801ea8ae
ASoC: fsl: imx-audmix: remove dummy dai_link->platform
Dummy dai_link->platform is not needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Tested-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/877cu6f619.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-21 13:45:07 +01:00
Kuninori Morimoto
3ce08f8513
ASoC: fsl: imx-audmix: cleanup platform which is using Generic DMA
If CPU is using soc-generic-dmaengine-pcm, Platform Component will be
same as CPU Component. In this case, we can use CPU dlc for Platform dlc.
This patch shares CPU dlc with Platform, and add comment.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Tested-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/878remf61j.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-21 13:45:06 +01:00
Shengjiu Wang
09cda70586
ASoC: fsl: Restore configuration of platform
This reverts commit 33683cbf49 ("ASoC: fsl: remove unnecessary
dai_link->platform").

dai_link->platform is needed. The platform component is
"snd_dmaengine_pcm", which is registered from cpu driver,

If dai_link->platform is not assigned, then platform
component will not be probed, then there will be issue:

aplay: main:831: audio open error: Invalid argument

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1681900158-17428-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-19 15:36:30 +01:00
Kuninori Morimoto
33683cbf49
ASoC: fsl: remove unnecessary dai_link->platform
dai_link->platform is no longer needed if CPU and Platform are
same Component. This patch removes unnecessary dai_link->platform.
Dummy Platform is also not necessary.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o7ojjd06.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-03-24 12:15:17 +00:00
Charles Keepax
3b14c15a33
ASoC: fsl: Update to use set_fmt_new callback
As part of updating the core to directly tell drivers if they are clock
provider or consumer update these CPU side drivers to use the new direct
callback.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220519154318.2153729-9-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-06-06 12:33:32 +01:00
Mark Brown
bf10102248
ASoC: imx-audmix: Update to modern clocking terminology
As part of moving to remove the old style defines for the bus clocks update
the imx-audmix driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20210921213542.31688-8-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-22 13:23:23 +01:00
Rikard Falkeborn
815b55e110
ASoC: fsl: Constify static snd_soc_ops
These are only assigned to the ops field in the snd_soc_dai_link struct
which is a pointer to const struct snd_soc_ops. Make them const to allow
the compiler to put them in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20210920193947.10237-1-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-21 13:24:51 +01:00
Zhen Lei
723ca2f894
ASoC: fsl: remove unnecessary oom message
Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/r/20210617103141.1765-1-thunder.leizhen@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-23 11:49:38 +01:00
Xu Wang
f95cc5c18c
ASoC: fsl: imx-audmix: Use devm_kcalloc() instead of devm_kzalloc()
A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "devm_kcalloc".

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Link: https://lore.kernel.org/r/20200921015918.24157-1-vulab@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-09-25 20:50:39 +01:00
Mark Brown
d1e2a97b36
Merge series "ASoC: add asoc_substream_to_rtd() macro" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark

Many ASoC drivers are getting rtd from substream by

	rtd = substream->private_data

OTOH, we have snd_pcm_substream_chip() macro for it.

	#define snd_pcm_substream_chip(substream) ((substream)->private_data)

But, both are not understandable for reader.
This patch adds new asoc_substream_to_rtd() which is easy to understand.

These are not important, but for readable code.

Kuninori Morimoto (29):
  ASoC: soc-xxx: add asoc_substream_to_rtd()
  ASoC: ux500: use asoc_substream_to_rtd()
  ASoC: ti: use asoc_substream_to_rtd()
  ASoC: tegra: use asoc_substream_to_rtd()
  ASoC: sunxi: use asoc_substream_to_rtd()
  ASoC: stm: use asoc_substream_to_rtd()
  ASoC: sof: use asoc_substream_to_rtd()
  ASoC: sh: use asoc_substream_to_rtd()
  ASoC: samsung: use asoc_substream_to_rtd()
  ASoC: pxa: use asoc_substream_to_rtd()
  ASoC: cirrus: use asoc_substream_to_rtd()
  ASoC: rockchip: use asoc_substream_to_rtd()
  ASoC: amd: use asoc_substream_to_rtd()
  ASoC: fsl: use asoc_substream_to_rtd()
  ASoC: mediatek: use asoc_substream_to_rtd()
  ASoC: atmel: use asoc_substream_to_rtd()
  ASoC: qcom: use asoc_substream_to_rtd()
  ASoC: dwc: use asoc_substream_to_rtd()
  ASoC: intel: use asoc_substream_to_rtd()
  ASoC: meson: use asoc_substream_to_rtd()
  ASoC: au1x: use asoc_substream_to_rtd()
  ASoC: bcm: use asoc_substream_to_rtd()
  ASoC: codecs: use asoc_substream_to_rtd()
  ASoC: generic: use asoc_substream_to_rtd()
  ASoC: sprd: use asoc_substream_to_rtd()
  ASoC: kirkwood: use asoc_substream_to_rtd()
  ASoC: xtensa: use asoc_substream_to_rtd()
  ASoC: mxs: use asoc_substream_to_rtd()
  ASoC: uniphier: use asoc_substream_to_rtd()

 include/sound/soc.h                           |  2 +
 sound/soc/amd/acp-da7219-max98357a.c          | 12 ++--
 sound/soc/amd/acp-pcm-dma.c                   |  2 +-
 sound/soc/amd/acp-rt5645.c                    |  2 +-
 sound/soc/amd/acp3x-rt5682-max9836.c          |  8 +--
 sound/soc/amd/raven/acp3x-i2s.c               |  2 +-
 sound/soc/amd/raven/acp3x-pcm-dma.c           |  6 +-
 sound/soc/atmel/atmel-classd.c                |  8 +--
 sound/soc/atmel/atmel-pcm-dma.c               |  4 +-
 sound/soc/atmel/atmel-pcm-pdc.c               |  2 +-
 sound/soc/atmel/atmel-pdmic.c                 | 10 +--
 sound/soc/atmel/atmel_wm8904.c                |  2 +-
 sound/soc/au1x/db1200.c                       |  2 +-
 sound/soc/au1x/dbdma2.c                       |  2 +-
 sound/soc/au1x/dma.c                          |  2 +-
 sound/soc/bcm/bcm63xx-pcm-whistler.c          | 12 ++--
 sound/soc/bcm/cygnus-pcm.c                    | 16 ++---
 sound/soc/cirrus/edb93xx.c                    |  2 +-
 sound/soc/cirrus/snappercl15.c                |  2 +-
 sound/soc/codecs/rt5677-spi.c                 |  4 +-
 sound/soc/dwc/dwc-pcm.c                       |  2 +-
 sound/soc/fsl/eukrea-tlv320.c                 |  2 +-
 sound/soc/fsl/fsl-asoc-card.c                 |  2 +-
 sound/soc/fsl/fsl_asrc_dma.c                  |  4 +-
 sound/soc/fsl/fsl_dma.c                       |  2 +-
 sound/soc/fsl/fsl_spdif.c                     | 10 +--
 sound/soc/fsl/fsl_ssi.c                       |  8 +--
 sound/soc/fsl/imx-audmix.c                    |  6 +-
 sound/soc/fsl/imx-mc13783.c                   |  2 +-
 sound/soc/fsl/mpc5200_dma.c                   |  8 +--
 sound/soc/fsl/mpc5200_psc_i2s.c               |  2 +-
 sound/soc/fsl/mpc8610_hpcd.c                  |  2 +-
 sound/soc/fsl/mx27vis-aic32x4.c               |  2 +-
 sound/soc/fsl/p1022_ds.c                      |  2 +-
 sound/soc/fsl/p1022_rdk.c                     |  2 +-
 sound/soc/fsl/wm1133-ev1.c                    |  2 +-
 sound/soc/generic/simple-card-utils.c         |  6 +-
 sound/soc/intel/atom/sst-mfld-platform-pcm.c  |  6 +-
 sound/soc/intel/baytrail/sst-baytrail-pcm.c   | 16 ++---
 sound/soc/intel/boards/bdw-rt5650.c           |  2 +-
 sound/soc/intel/boards/bdw-rt5677.c           |  4 +-
 sound/soc/intel/boards/broadwell.c            |  2 +-
 sound/soc/intel/boards/bxt_rt298.c            |  2 +-
 sound/soc/intel/boards/byt-rt5640.c           |  2 +-
 sound/soc/intel/boards/bytcht_da7213.c        |  4 +-
 sound/soc/intel/boards/bytcr_rt5640.c         |  2 +-
 sound/soc/intel/boards/bytcr_rt5651.c         |  2 +-
 sound/soc/intel/boards/cht_bsw_max98090_ti.c  |  2 +-
 sound/soc/intel/boards/cht_bsw_nau8824.c      |  2 +-
 sound/soc/intel/boards/cht_bsw_rt5645.c       |  2 +-
 sound/soc/intel/boards/cht_bsw_rt5672.c       |  2 +-
 sound/soc/intel/boards/cml_rt1011_rt5682.c    |  4 +-
 sound/soc/intel/boards/ehl_rt5660.c           |  2 +-
 sound/soc/intel/boards/glk_rt5682_max98357a.c |  2 +-
 sound/soc/intel/boards/haswell.c              |  2 +-
 sound/soc/intel/boards/kbl_da7219_max98927.c  |  8 +--
 sound/soc/intel/boards/kbl_rt5660.c           |  2 +-
 sound/soc/intel/boards/kbl_rt5663_max98927.c  |  4 +-
 .../intel/boards/kbl_rt5663_rt5514_max98927.c |  4 +-
 .../soc/intel/boards/skl_nau88l25_max98357a.c |  2 +-
 sound/soc/intel/boards/skl_nau88l25_ssm4567.c |  2 +-
 sound/soc/intel/boards/skl_rt286.c            |  2 +-
 sound/soc/intel/boards/sof_da7219_max98373.c  |  2 +-
 sound/soc/intel/boards/sof_maxim_common.c     |  4 +-
 sound/soc/intel/boards/sof_pcm512x.c          |  4 +-
 sound/soc/intel/boards/sof_rt5682.c           |  4 +-
 sound/soc/intel/boards/sof_sdw_rt1308.c       |  2 +-
 sound/soc/intel/boards/sof_wm8804.c           |  2 +-
 sound/soc/intel/haswell/sst-haswell-pcm.c     | 12 ++--
 sound/soc/intel/keembay/kmb_platform.c        |  2 +-
 sound/soc/intel/skylake/skl-pcm.c             |  8 +--
 sound/soc/kirkwood/armada-370-db.c            |  2 +-
 sound/soc/mediatek/common/mtk-afe-fe-dai.c    | 12 ++--
 .../mediatek/common/mtk-afe-platform-driver.c |  2 +-
 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c    |  2 +-
 sound/soc/mediatek/mt2701/mt2701-cs42448.c    |  2 +-
 sound/soc/mediatek/mt2701/mt2701-wm8960.c     |  2 +-
 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c    |  4 +-
 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c    |  2 +-
 sound/soc/mediatek/mt8173/mt8173-max98090.c   |  2 +-
 .../mediatek/mt8173/mt8173-rt5650-rt5514.c    |  2 +-
 .../mediatek/mt8173/mt8173-rt5650-rt5676.c    |  2 +-
 sound/soc/mediatek/mt8173/mt8173-rt5650.c     |  2 +-
 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c    |  4 +-
 .../mediatek/mt8183/mt8183-da7219-max98357.c  |  8 +--
 .../mt8183/mt8183-mt6358-ts3a227-max98357.c   | 12 ++--
 sound/soc/meson/axg-card.c                    |  2 +-
 sound/soc/meson/gx-card.c                     |  2 +-
 sound/soc/meson/meson-card-utils.c            |  2 +-
 sound/soc/meson/meson-codec-glue.c            |  2 +-
 sound/soc/mxs/mxs-sgtl5000.c                  |  2 +-
 sound/soc/pxa/brownstone.c                    |  2 +-
 sound/soc/pxa/corgi.c                         |  4 +-
 sound/soc/pxa/hx4700.c                        |  2 +-
 sound/soc/pxa/imote2.c                        |  2 +-
 sound/soc/pxa/magician.c                      |  6 +-
 sound/soc/pxa/mmp-pcm.c                       |  2 +-
 sound/soc/pxa/poodle.c                        |  4 +-
 sound/soc/pxa/pxa2xx-i2s.c                    |  2 +-
 sound/soc/pxa/spitz.c                         |  4 +-
 sound/soc/pxa/tosa.c                          |  2 +-
 sound/soc/pxa/z2.c                            |  2 +-
 sound/soc/pxa/zylonite.c                      |  2 +-
 sound/soc/qcom/apq8096.c                      |  2 +-
 sound/soc/qcom/lpass-platform.c               | 14 ++---
 sound/soc/qcom/qdsp6/q6asm-dai.c              |  6 +-
 sound/soc/qcom/qdsp6/q6routing.c              |  2 +-
 sound/soc/qcom/sdm845.c                       | 14 ++---
 sound/soc/qcom/storm.c                        |  2 +-
 sound/soc/rockchip/rk3288_hdmi_analog.c       |  2 +-
 sound/soc/rockchip/rk3399_gru_sound.c         |  8 +--
 sound/soc/rockchip/rockchip_i2s.c             |  2 +-
 sound/soc/rockchip/rockchip_max98090.c        |  2 +-
 sound/soc/rockchip/rockchip_rt5645.c          |  2 +-
 sound/soc/samsung/aries_wm8994.c              |  4 +-
 sound/soc/samsung/arndale.c                   |  4 +-
 sound/soc/samsung/h1940_uda1380.c             |  2 +-
 sound/soc/samsung/i2s.c                       |  2 +-
 sound/soc/samsung/jive_wm8750.c               |  2 +-
 sound/soc/samsung/littlemill.c                |  2 +-
 sound/soc/samsung/neo1973_wm8753.c            |  8 +--
 sound/soc/samsung/odroid.c                    |  6 +-
 sound/soc/samsung/pcm.c                       |  4 +-
 sound/soc/samsung/rx1950_uda1380.c            |  2 +-
 sound/soc/samsung/s3c-i2s-v2.c                |  2 +-
 sound/soc/samsung/s3c24xx_simtec.c            |  2 +-
 sound/soc/samsung/s3c24xx_uda134x.c           |  6 +-
 sound/soc/samsung/smartq_wm8987.c             |  2 +-
 sound/soc/samsung/smdk_spdif.c                |  2 +-
 sound/soc/samsung/smdk_wm8580.c               |  2 +-
 sound/soc/samsung/smdk_wm8994.c               |  2 +-
 sound/soc/samsung/smdk_wm8994pcm.c            |  2 +-
 sound/soc/samsung/snow.c                      |  2 +-
 sound/soc/samsung/spdif.c                     |  6 +-
 sound/soc/samsung/tm2_wm5110.c                |  8 +--
 sound/soc/sh/dma-sh7760.c                     | 12 ++--
 sound/soc/sh/fsi.c                            |  2 +-
 sound/soc/sh/migor.c                          |  4 +-
 sound/soc/sh/rcar/core.c                      |  4 +-
 sound/soc/soc-component.c                     | 20 +++---
 sound/soc/soc-dai.c                           |  8 +--
 sound/soc/soc-dapm.c                          |  6 +-
 sound/soc/soc-generic-dmaengine-pcm.c         |  4 +-
 sound/soc/soc-link.c                          | 12 ++--
 sound/soc/soc-pcm.c                           | 62 +++++++++----------
 sound/soc/soc-utils.c                         |  2 +-
 sound/soc/sof/intel/hda-dai.c                 | 10 +--
 sound/soc/sof/intel/hda-dsp.c                 |  2 +-
 sound/soc/sof/intel/hda-pcm.c                 |  2 +-
 sound/soc/sof/pcm.c                           | 18 +++---
 sound/soc/sprd/sprd-pcm-dma.c                 |  2 +-
 sound/soc/stm/stm32_adfsdm.c                  | 12 ++--
 sound/soc/stm/stm32_sai_sub.c                 |  2 +-
 sound/soc/sunxi/sun4i-codec.c                 | 12 ++--
 sound/soc/sunxi/sun4i-spdif.c                 |  2 +-
 sound/soc/tegra/tegra_alc5632.c               |  2 +-
 sound/soc/tegra/tegra_max98090.c              |  2 +-
 sound/soc/tegra/tegra_rt5640.c                |  2 +-
 sound/soc/tegra/tegra_rt5677.c                |  2 +-
 sound/soc/tegra/tegra_sgtl5000.c              |  2 +-
 sound/soc/tegra/tegra_wm8753.c                |  2 +-
 sound/soc/tegra/tegra_wm8903.c                |  2 +-
 sound/soc/tegra/trimslice.c                   |  2 +-
 sound/soc/ti/davinci-evm.c                    |  6 +-
 sound/soc/ti/davinci-vcif.c                   |  4 +-
 sound/soc/ti/j721e-evm.c                      |  6 +-
 sound/soc/ti/n810.c                           |  4 +-
 sound/soc/ti/omap-abe-twl6040.c               |  4 +-
 sound/soc/ti/omap-mcbsp.c                     |  4 +-
 sound/soc/ti/omap-twl4030.c                   |  2 +-
 sound/soc/ti/omap3pandora.c                   |  2 +-
 sound/soc/ti/osk5912.c                        |  2 +-
 sound/soc/ti/rx51.c                           |  4 +-
 sound/soc/uniphier/aio-dma.c                  |  6 +-
 sound/soc/ux500/mop500_ab8500.c               |  8 +--
 sound/soc/ux500/ux500_pcm.c                   |  2 +-
 sound/soc/xtensa/xtfpga-i2s.c                 |  2 +-
 177 files changed, 397 insertions(+), 395 deletions(-)

--
2.25.1
2020-07-23 19:52:30 +01:00
Alexander A. Klimov
1ce8f643ed
ASoC: fsl: Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
	  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200718111209.11760-1-grandmaster@al2klimov.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:52:22 +01:00
Kuninori Morimoto
9f5f078aed
ASoC: fsl: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87eep70ytr.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:07:31 +01:00
Kuninori Morimoto
17198ae76e
ASoC: fsl: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87v9mvir89.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-27 14:44:36 +00:00
Kuninori Morimoto
eea2395217
ASoC: fsl: imx-audmix: use snd_soc_dai_link_component for codec_conf
We can use snd_soc_dai_link_component to specify codec_conf.
Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87k17159kb.wl-kuninori.morimoto.gx@renesas.com
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-16 12:02:02 +00:00
Shengjiu Wang
9573820eb1
ASoC: imx-audmix: register the card on a proper dev
This platform device is registered from "fsl_audmix", which is
its parent device. If use pdev->dev.parent for the priv->card.dev,
the value set by dev_set_drvdata in parent device will be covered
by the value in child device.

Fixes: b86ef53677 ("ASoC: fsl: Add Audio Mixer machine driver")
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/1566921315-23402-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-27 11:44:39 +01:00
Kuninori Morimoto
9213866ac4
ASoC: fsl: imx-audmix: consider CPU-Platform possibility
commit d8893261a7 ("ASoC: fsl: imx-audmix: don't select unnecessary
Platform")

Current ALSA SoC avoid to add duplicate component to rtd,
and this driver was selecting CPU component as Platform component.
Thus, above patch removed Platform settings from this driver,
because it assumed these are same component.

But, some CPU driver is using generic DMAEngine, in such case, both
CPU component and Platform component will have same of_node/name.
In other words, there are some components which are different but
have same of_node/name.

In such case, Card driver definitely need to select Platform even
though it is same as CPU.
It is depends on CPU driver, but is difficult to know it from Card driver.
This patch reverts above patch.

Fixes: commit d8893261a7 ("ASoC: fsl: imx-audmix: don't select unnecessary Platform")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-06-28 15:12:39 +01:00
Kuninori Morimoto
d8893261a7
ASoC: fsl: imx-audmix: don't select unnecessary Platform
ALSA SoC is now supporting "no Platform". Sound card doesn't need to
select "CPU component" as "Platform" anymore if it doesn't need
special Platform.
This patch removes such settings.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-06-19 12:51:29 +01:00
Kuninori Morimoto
79782e283e
ASoC: fsl: imx-audmix: use modern dai_link style
ASoC is now supporting modern style dai_link
(= snd_soc_dai_link_component) for CPU/Codec/Platform.
This patch switches to use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-06-06 21:43:53 +01:00
Viorel Suman
8bb678d759
ASoC: imx-audmix: fix object reference leaks in probe
Release the reference to the underlying device taken
by of_find_device_by_node() call.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reported-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-05-02 10:46:14 +09:00
Colin Ian King
de70b2a581
ASoC: fsl: fix spelling mistake: "missign" -> "missing"
There is a spelling mistake in a dev_err message. Fix this.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Acked-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-01 15:05:03 +07:00
Viorel Suman
b86ef53677
ASoC: fsl: Add Audio Mixer machine driver
This patch implements Audio Mixer machine driver for NXP iMX8 SOCs.
It connects together Audio Mixer and related SAI instances.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-26 14:07:51 +00:00