Commit graph

33 commits

Author SHA1 Message Date
Mark Brown
a23d7f4a7c
Merge series "ASoC: remove rtd->cpu/codec_dai{s}" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark

Now, CPU/Codec DAI(s) were replaced by rtd->dais.
Thus, We don't need rtd->cpu/codec_dai{s} anymore.
This pathset replaces it by new macro.

Kuninori Morimoto (36):
  ASoC: soc-core: add asoc_rtd_to_cpu/codec() macro
  ASoC: amd: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: atmel: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: au1x: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: bcm: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: cirrus: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: dwc: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: fsl: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: generic: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: img: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: intel: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: kirkwood: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: mediatek: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: meson: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: mxs: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: pxa: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: qcom: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: rockchip: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: samsung: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: sh: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: sof: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: sprd: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: stm: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: sunxi: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: tegra: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: ti: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: txx9: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: uniphier: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: ux500: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: xtensa: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: arm: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: codecs: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: soc: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
  ASoC: soc-core: set rtd->num_cpu/codec at soc_new_pcm_runtime()
  ASoC: soc-core: tidyup soc_new_pcm_runtime() rtd setups
  ASoC: soc-core: remove cpu_dai/codec_dai/cpu_dais/codec_dais

 include/sound/soc.h                           | 30 +++++++------
 sound/arm/pxa2xx-pcm-lib.c                    |  8 ++--
 sound/soc/amd/acp-da7219-max98357a.c          |  2 +-
 sound/soc/amd/acp-rt5645.c                    |  4 +-
 sound/soc/amd/acp3x-rt5682-max9836.c          |  6 +--
 sound/soc/atmel/atmel-pcm-dma.c               |  4 +-
 sound/soc/atmel/atmel-pcm-pdc.c               |  2 +-
 sound/soc/atmel/atmel_wm8904.c                |  2 +-
 sound/soc/atmel/mikroe-proto.c                |  2 +-
 sound/soc/atmel/sam9g20_wm8731.c              |  2 +-
 sound/soc/atmel/sam9x5_wm8731.c               |  2 +-
 sound/soc/au1x/db1200.c                       |  2 +-
 sound/soc/au1x/dbdma2.c                       |  2 +-
 sound/soc/au1x/dma.c                          |  2 +-
 sound/soc/au1x/psc-ac97.c                     |  2 +-
 sound/soc/bcm/bcm63xx-pcm-whistler.c          | 16 +++----
 sound/soc/bcm/cygnus-pcm.c                    | 22 +++++-----
 sound/soc/cirrus/edb93xx.c                    |  4 +-
 sound/soc/cirrus/snappercl15.c                |  4 +-
 sound/soc/codecs/cs47l15.c                    |  4 +-
 sound/soc/codecs/cs47l24.c                    |  6 +--
 sound/soc/codecs/cs47l35.c                    |  6 +--
 sound/soc/codecs/cs47l85.c                    |  6 +--
 sound/soc/codecs/cs47l90.c                    |  6 +--
 sound/soc/codecs/cs47l92.c                    |  4 +-
 sound/soc/codecs/wm5110.c                     |  6 +--
 sound/soc/codecs/wm_adsp.c                    | 10 ++---
 sound/soc/dwc/dwc-pcm.c                       |  2 +-
 sound/soc/fsl/eukrea-tlv320.c                 |  4 +-
 sound/soc/fsl/fsl-asoc-card.c                 | 10 ++---
 sound/soc/fsl/fsl_asrc_dma.c                  |  6 +--
 sound/soc/fsl/fsl_spdif.c                     | 10 ++---
 sound/soc/fsl/fsl_ssi.c                       |  8 ++--
 sound/soc/fsl/imx-audmix.c                    |  8 ++--
 sound/soc/fsl/imx-mc13783.c                   |  4 +-
 sound/soc/fsl/imx-sgtl5000.c                  |  2 +-
 sound/soc/fsl/mpc5200_dma.c                   | 10 ++---
 sound/soc/fsl/mpc5200_psc_i2s.c               |  2 +-
 sound/soc/fsl/mpc8610_hpcd.c                  |  4 +-
 sound/soc/fsl/mx27vis-aic32x4.c               |  4 +-
 sound/soc/fsl/p1022_ds.c                      |  4 +-
 sound/soc/fsl/p1022_rdk.c                     |  4 +-
 sound/soc/fsl/wm1133-ev1.c                    |  6 +--
 sound/soc/generic/simple-card-utils.c         | 12 +++---
 sound/soc/img/img-i2s-in.c                    |  2 +-
 sound/soc/img/img-i2s-out.c                   |  2 +-
 sound/soc/intel/atom/sst-mfld-platform-pcm.c  |  6 +--
 sound/soc/intel/boards/bdw-rt5650.c           |  6 +--
 sound/soc/intel/boards/bdw-rt5677.c           |  6 +--
 sound/soc/intel/boards/broadwell.c            |  4 +-
 sound/soc/intel/boards/bxt_da7219_max98357a.c |  8 ++--
 sound/soc/intel/boards/bxt_rt298.c            |  8 ++--
 sound/soc/intel/boards/byt-max98090.c         |  2 +-
 sound/soc/intel/boards/byt-rt5640.c           |  4 +-
 sound/soc/intel/boards/bytcht_cx2072x.c       | 10 ++---
 sound/soc/intel/boards/bytcht_da7213.c        |  8 ++--
 sound/soc/intel/boards/bytcht_es8316.c        |  8 ++--
 sound/soc/intel/boards/bytcht_nocodec.c       |  4 +-
 sound/soc/intel/boards/bytcr_rt5640.c         |  8 ++--
 sound/soc/intel/boards/bytcr_rt5651.c         |  8 ++--
 sound/soc/intel/boards/cht_bsw_max98090_ti.c  |  6 +--
 sound/soc/intel/boards/cht_bsw_nau8824.c      |  4 +-
 sound/soc/intel/boards/cht_bsw_rt5645.c       | 14 +++----
 sound/soc/intel/boards/cht_bsw_rt5672.c       |  8 ++--
 sound/soc/intel/boards/cml_rt1011_rt5682.c    |  6 +--
 sound/soc/intel/boards/glk_rt5682_max98357a.c | 10 ++---
 sound/soc/intel/boards/haswell.c              |  2 +-
 sound/soc/intel/boards/kbl_da7219_max98357a.c |  8 ++--
 sound/soc/intel/boards/kbl_da7219_max98927.c  |  6 +--
 sound/soc/intel/boards/kbl_rt5660.c           |  6 +--
 sound/soc/intel/boards/kbl_rt5663_max98927.c  |  8 ++--
 .../intel/boards/kbl_rt5663_rt5514_max98927.c |  8 ++--
 .../soc/intel/boards/skl_nau88l25_max98357a.c | 12 +++---
 sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 16 +++----
 sound/soc/intel/boards/skl_rt286.c            |  8 ++--
 sound/soc/intel/boards/sof_da7219_max98373.c  |  8 ++--
 sound/soc/intel/boards/sof_pcm512x.c          |  8 ++--
 sound/soc/intel/boards/sof_rt5682.c           |  6 +--
 sound/soc/intel/haswell/sst-haswell-pcm.c     | 26 ++++++------
 sound/soc/intel/skylake/skl-pcm.c             | 10 ++---
 sound/soc/kirkwood/armada-370-db.c            |  2 +-
 sound/soc/kirkwood/kirkwood-dma.c             |  2 +-
 sound/soc/mediatek/common/mtk-afe-fe-dai.c    | 10 ++---
 .../mediatek/common/mtk-afe-platform-driver.c |  2 +-
 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c    |  2 +-
 sound/soc/mediatek/mt2701/mt2701-cs42448.c    |  4 +-
 sound/soc/mediatek/mt2701/mt2701-wm8960.c     |  4 +-
 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c    |  2 +-
 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c    |  2 +-
 sound/soc/mediatek/mt8173/mt8173-max98090.c   |  4 +-
 .../mediatek/mt8173/mt8173-rt5650-rt5514.c    |  2 +-
 .../mediatek/mt8173/mt8173-rt5650-rt5676.c    |  4 +-
 sound/soc/mediatek/mt8173/mt8173-rt5650.c     |  6 +--
 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c    |  2 +-
 .../mediatek/mt8183/mt8183-da7219-max98357.c  |  4 +-
 .../mt8183/mt8183-mt6358-ts3a227-max98357.c   |  2 +-
 sound/soc/meson/aiu-fifo.c                    |  2 +-
 sound/soc/meson/axg-card.c                    |  8 ++--
 sound/soc/meson/axg-fifo.c                    |  2 +-
 sound/soc/meson/meson-card-utils.c            |  2 +-
 sound/soc/mxs/mxs-sgtl5000.c                  |  4 +-
 sound/soc/pxa/brownstone.c                    |  4 +-
 sound/soc/pxa/corgi.c                         |  4 +-
 sound/soc/pxa/hx4700.c                        |  4 +-
 sound/soc/pxa/imote2.c                        |  4 +-
 sound/soc/pxa/magician.c                      |  8 ++--
 sound/soc/pxa/mioa701_wm9713.c                |  4 +-
 sound/soc/pxa/mmp-pcm.c                       |  2 +-
 sound/soc/pxa/mmp-sspa.c                      |  2 +-
 sound/soc/pxa/poodle.c                        |  4 +-
 sound/soc/pxa/pxa2xx-i2s.c                    |  2 +-
 sound/soc/pxa/spitz.c                         |  4 +-
 sound/soc/pxa/ttc-dkb.c                       |  2 +-
 sound/soc/pxa/z2.c                            |  4 +-
 sound/soc/pxa/zylonite.c                      |  6 +--
 sound/soc/qcom/apq8016_sbc.c                  |  2 +-
 sound/soc/qcom/apq8096.c                      |  6 +--
 sound/soc/qcom/lpass-platform.c               |  2 +-
 sound/soc/qcom/qdsp6/q6asm-dai.c              |  4 +-
 sound/soc/qcom/qdsp6/q6routing.c              |  2 +-
 sound/soc/qcom/sdm845.c                       | 22 +++++-----
 sound/soc/qcom/storm.c                        |  2 +-
 sound/soc/rockchip/rk3288_hdmi_analog.c       |  4 +-
 sound/soc/rockchip/rk3399_gru_sound.c         | 16 +++----
 sound/soc/rockchip/rockchip_max98090.c        |  6 +--
 sound/soc/rockchip/rockchip_rt5645.c          |  6 +--
 sound/soc/samsung/arndale.c                   |  6 +--
 sound/soc/samsung/bells.c                     | 16 +++----
 sound/soc/samsung/h1940_uda1380.c             |  2 +-
 sound/soc/samsung/i2s.c                       |  2 +-
 sound/soc/samsung/jive_wm8750.c               |  4 +-
 sound/soc/samsung/littlemill.c                | 14 +++----
 sound/soc/samsung/lowland.c                   |  4 +-
 sound/soc/samsung/neo1973_wm8753.c            | 10 ++---
 sound/soc/samsung/odroid.c                    |  2 +-
 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            |  4 +-
 sound/soc/samsung/s3c24xx_uda134x.c           |  6 +--
 sound/soc/samsung/smartq_wm8987.c             |  4 +-
 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            |  4 +-
 sound/soc/samsung/snow.c                      |  4 +-
 sound/soc/samsung/spdif.c                     |  8 ++--
 sound/soc/samsung/speyside.c                  |  8 ++--
 sound/soc/samsung/tm2_wm5110.c                | 16 +++----
 sound/soc/samsung/tobermory.c                 |  8 ++--
 sound/soc/sh/dma-sh7760.c                     | 16 +++----
 sound/soc/sh/fsi.c                            |  2 +-
 sound/soc/sh/migor.c                          |  6 +--
 sound/soc/sh/rcar/core.c                      |  2 +-
 sound/soc/soc-compress.c                      | 36 ++++++++--------
 sound/soc/soc-core.c                          | 42 +++++++------------
 sound/soc/soc-dapm.c                          |  4 +-
 sound/soc/soc-generic-dmaengine-pcm.c         |  6 +--
 sound/soc/soc-pcm.c                           | 30 ++++++-------
 sound/soc/sof/intel/hda-dai.c                 |  6 +--
 sound/soc/sof/intel/hda-dsp.c                 |  2 +-
 sound/soc/sprd/sprd-pcm-compress.c            |  4 +-
 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-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                |  6 +--
 sound/soc/tegra/trimslice.c                   |  2 +-
 sound/soc/ti/ams-delta.c                      |  4 +-
 sound/soc/ti/davinci-evm.c                    |  4 +-
 sound/soc/ti/davinci-vcif.c                   |  4 +-
 sound/soc/ti/n810.c                           |  2 +-
 sound/soc/ti/omap-abe-twl6040.c               |  6 +--
 sound/soc/ti/omap-mcbsp-st.c                  |  2 +-
 sound/soc/ti/omap-mcbsp.c                     |  4 +-
 sound/soc/ti/omap-mcpdm.c                     |  2 +-
 sound/soc/ti/omap3pandora.c                   |  4 +-
 sound/soc/ti/osk5912.c                        |  2 +-
 sound/soc/ti/rx51.c                           |  2 +-
 sound/soc/txx9/txx9aclc.c                     |  2 +-
 sound/soc/uniphier/aio-compress.c             | 22 +++++-----
 sound/soc/uniphier/aio-dma.c                  |  6 +--
 sound/soc/ux500/mop500_ab8500.c               |  6 +--
 sound/soc/ux500/ux500_pcm.c                   |  8 ++--
 sound/soc/xtensa/xtfpga-i2s.c                 |  2 +-
 191 files changed, 573 insertions(+), 577 deletions(-)

--
2.17.1
2020-03-27 15:33:10 +00:00
Wolfram Sang
17fb543315
ASoC: pxa: magician: convert to use i2c_new_client_device()
Move away from the deprecated API and return the shiny new ERRPTR where
useful.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20200326211010.13471-2-wsa+renesas@sang-engineering.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-27 15:33:07 +00:00
Kuninori Morimoto
8d8fef280c
ASoC: pxa: 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/87k13bir62.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-27 14:44:43 +00:00
Mark Brown
53c8b29abe Linux 5.2-rc6
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAl0Os1seHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGtx4H/j6i482XzcGFKTBm
 A7mBoQpy+kLtoUov4EtBAR62OuwI8rsahW9di37QKndPoQrczWaKBmr3De6LCdPe
 v3pl3O6wBbvH5ru+qBPFX9PdNbDvimEChh7LHxmMxNQq3M+AjZAZVJyfpoiFnx35
 Fbge+LZaH/k8HMwZmkMr5t9Mpkip715qKg2o9Bua6dkH0AqlcpLlC8d9a+HIVw/z
 aAsyGSU8jRwhoAOJsE9bJf0acQ/pZSqmFp0rDKqeFTSDMsbDRKLGq/dgv4nW0RiW
 s7xqsjb/rdcvirRj3rv9+lcTVkOtEqwk0PVdL9WOf7g4iYrb3SOIZh8ZyViaDSeH
 VTS5zps=
 =huBY
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCgAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl0TWXgTHGJyb29uaWVA
 a2VybmVsLm9yZwAKCRAk1otyXVSH0JS1B/oDGe3XnBkiet3oYHSCqAroxTHPEp8O
 vi5Ad3+oxwKImkiysuO9yftRTN0S9xbnpZw5rCSICZytxuwxWbzNTUTENQaHtX3r
 97LHgINoIJhIAai1tWrt6oK3IyerdaqAMDTWJPY5p9cenpWNfuQhuyCC+2lV5lnz
 Dp2ux9Xk7Xo9Nu5fymucGH+idXRpnh5zjB6Rx3vMF5IKXc0RSZr87tcwuC6OA0Jj
 y3TCLZ+NPfrFgIbK7pSYEr5dFJX2Y+Os3tahvkYqYbabMDGOsvns/pt4N0ygItTH
 YsNMhSX45zijE9JdHLgwgN60RTxDCGk1st1djpKKH5jSZH4BoArI0oUs
 =e7U4
 -----END PGP SIGNATURE-----

Merge tag 'v5.2-rc6' into asoc-5.3

Linux 5.2-rc6
2019-06-26 12:39:34 +01:00
Kuninori Morimoto
018252749c
ASoC: pxa: magician: 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:33:47 +01:00
Thomas Gleixner
2874c5fd28 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 3029 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-30 11:26:32 -07:00
Daniel Mack
a8e43c21a8
ASoC: pxa: remove clock divider and pll setup from zylonite and magician
The SSP DAI now handles the clocking setup itself, all it needs is the
master clock frequency. Remove the code from Zylonite and Magician
platforms.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-20 17:41:26 +01:00
Bhumika Goyal
943b73112d ASoC: pxa: constify snd_soc_ops structures
Declare snd_soc_ops structures as const as they are only stored
in the ops field of a snd_soc_dai_link structure. This field is
of type const, so snd_soc_ops structures having this property
can be made const too.

The .o files did not compile for all the changed .c files.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-15 13:34:16 +00:00
Lars-Peter Clausen
92be58106e ASoC: pxa: Make static string arrays 'const 'char * const []'
const char * const [] is the preferred type for static string arrays since
this states explicitly that the individual entries are not going to be
changed. Due to limitations in the ASoC API it was not possible to use it
for enum text arrays. Commit 87023ff74 ('ASoC: Declare const properly for
enum texts') changed this, but most drivers still use 'const char
* []' as the type for their enum text arrays.

Change these occurrences of 'static * const char * []' to 'static const
char * const []'.

The conversion was done automatically using the following coccinelle semantic
patch:
// <smpl>
@disable optional_qualifier@
identifier s;
@@
 static
-const char *
+const char * const
 s[] = ...;
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-13 11:36:59 +00:00
Takashi Iwai
127ee199d5 ASoC: pxa: magician: Fix enum ctl accesses in a wrong type
"Input Select" ctl in magician driver is an enum, while the current
driver accesses wrongly via value.integer.value[].  They have to be
via value.enumerated.item[] instead.

(Meanwhile "Headphone Switch" and "Speaker Switch" are boolean, so
 they should stay to access via value.integer.value[] as is.)

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-01 12:02:05 +09:00
Lars-Peter Clausen
3cfaaaa0e7 ASoC: magician: Automatically disconnect non-connected pins
All DAPM input and output pins of the uda1380 are either used in the card's
DAPM routing table or are marked as not connected.

Set the fully_routed flag of the card instead of manually marking the unused
inputs and outputs as not connected. This makes the code a bit shorter and
cleaner.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-09 21:05:55 +00:00
Lars-Peter Clausen
0fbd44ab77 ASoC: pxa: magician: Convert to table based DAPM and control setup
Use table based setup to register the controls and DAPM widgets and routes. This
on one hand makes the code a bit shorter and cleaner and on the other hand the
board level DAPM elements get registered in the card's DAPM context rather than
in the CODEC's DAPM context.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-13 09:41:00 +00:00
Mark Brown
7a87ac1f66 Merge branch 'topic/dapm' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-pxa 2014-03-13 09:40:56 +00:00
Lars-Peter Clausen
9b87a5b0d4 ASoC: pxa: Remove superfluous locking
The locking here was added in commit 71a295602e ("ASoC: Lock the CODEC in PXA
external jack controls") to protect the DAPM changes that are made inside of
${board}_ext_control() against concurrent updates. The ASoC core was updated in
commit a73fb2df01 ("ASoC: dapm: Use DAPM mutex for DAPM ops instead of codec
mutex") to use a card wide lock rather the CODEC mutex to protect DAPM
operations. We now have proper locking inside ${board}_ext_control() itself, so
taking the CODEC lock can be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-23 10:51:05 +09:00
Charles Keepax
f71b0fbe52 ASoC: pxa: magician: Update locking around use of DAPM pin API
The pin updates in this driver look like they are intended to be done
atomically, update to do so.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 19:23:00 +09:00
Liam Girdwood
022658beab ASoC: core: Add support for DAI and machine kcontrols.
Currently ASoC can only add kcontrols using codec and platform component device
handles. It's also desirable to add kcontrols for DAIs (i.e. McBSP) and for
SoC card machine drivers too. This allows the kcontrol to have a direct handle to
the parent ASoC component DAI/SoC Card/Platform/Codec device and hence easily
get it's private data.

This change makes snd_soc_add_controls() static and wraps it in the folowing
calls (card and dai are new) :-

snd_soc_add_card_controls()
snd_soc_add_codec_controls()
snd_soc_add_dai_controls()
snd_soc_add_platform_controls()

This patch also does a lot of small mechanical changes in individual codec drivers
to replace snd_soc_add_controls() with snd_soc_add_codec_controls().

It also updates the McBSP DAI driver to use snd_soc_add_dai_controls().

Finally, it updates the existing machine drivers that register controls to either :-

1) Use snd_soc_add_card_controls() where no direct codec control is required.
2) Use snd_soc_add_codec_controls() where there is direct codec control.

In the case of 1) above we also update the machine drivers to get the correct
component data pointers from the kcontrol (rather than getting the machine pointer
via the codec pointer).

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-04 12:40:11 +00:00
Axel Lin
561c6a172f ASoC: pxa: Add .owner to struct snd_soc_card
Missed .owner of struct snd_soc_card will prevent the module from being
removed from underneath its users.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-22 11:04:18 +00:00
Mark Brown
87bea31c7b ASoC: Remove redundant snd_soc_dapm_sync() calls from machine drivers
The core will sync DAPM as part of the card initialization, there is no
need for machine drivers to do so during their setup.

OMAP drivers are omitted as I know Peter already has patches for them.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-08 14:10:54 +01:00
Axel Lin
c6add3f0e6 ASoC: Remove unused rate variable in magician_playback_hw_params
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-02 19:58:45 +01:00
Jarkko Nikula
505fb824e7 ASoC: Do not include soc-dapm.h
There is no need to include soc-dapm.h since soc.h includes it.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-22 14:04:41 +00:00
Mark Brown
989db2005c Merge branch 'for-2.6.37' into for-2.6.38 2010-11-06 11:35:44 -04:00
Liam Girdwood
ce6120cca2 ASoC: Decouple DAPM from CODECs
Decoupling Dynamic Audio Power Management (DAPM) from codec devices is
required when developing ASoC further. Such as for other ASoC components to
have DAPM widgets or when extending DAPM to handle cross-device paths.

This patch decouples DAPM related variables from struct snd_soc_codec and
moves them to new struct snd_soc_dapm_context that is used to encapsulate
DAPM context of a device. ASoC core and API of DAPM functions are modified
to use DAPM context instead of codec.

This patch does not change current functionality and a large part of changes
come because of structure and internal API changes.

Core implementation is from Liam Girdwood <lrg@slimlogic.co.uk> with some
minor core changes, codecs and machine driver conversions from
Jarkko Nikula <jhnikula@gmail.com>.

Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Manuel Lauss <manuel.lauss@googlemail.com>
Cc: Mike Frysinger <vapier.adi@gmail.com>
Cc: Cliff Cai <cliff.cai@analog.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Ryan Mallon <ryan@bluewatersys.com>
Cc: Timur Tabi <timur@freescale.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Jassi Brar <jassi.brar@samsung.com>
Cc: Daniel Gloeckner <dg@emlix.com>
Cc: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-06 11:28:29 -04:00
Mark Brown
71a295602e ASoC: Lock the CODEC in PXA external jack controls
When doing anything with the system, especially DAPM, we need to hold the
CODEC mutex.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-06 11:11:24 -04:00
Ian Lartey
a2a0086d4b ASoC: pxa2xx-i2s is the proper name of the I2S DAI, not pxa-i2s.
Signed-off-by: Ian Lartey <ian@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-23 13:36:46 +01:00
Liam Girdwood
f0fba2ad1b ASoC: multi-component - ASoC Multi-Component Support
This patch extends the ASoC API to allow sound cards to have more than one
CODEC and more than one platform DMA controller. This is achieved by dividing
some current ASoC structures that contain both driver data and device data into
structures that only either contain device data or driver data. i.e.

 struct snd_soc_codec    --->  struct snd_soc_codec (device data)
                          +->  struct snd_soc_codec_driver (driver data)

 struct snd_soc_platform --->  struct snd_soc_platform (device data)
                          +->  struct snd_soc_platform_driver (driver data)

 struct snd_soc_dai      --->  struct snd_soc_dai (device data)
                          +->  struct snd_soc_dai_driver (driver data)

 struct snd_soc_device   --->  deleted

This now allows ASoC to be more tightly aligned with the Linux driver model and
also means that every ASoC codec, platform and (platform) DAI is a kernel
device. ASoC component private data is now stored as device private data.

The ASoC sound card struct snd_soc_card has also been updated to store lists
of it's components rather than a pointer to a codec and platform. The PCM
runtime struct soc_pcm_runtime now has pointers to all its components.

This patch adds DAPM support for ASoC multi-component and removes struct
snd_soc_socdev from DAPM core. All DAPM calls are now made on a card, codec
or runtime PCM level basis rather than using snd_soc_socdev.

Other notable multi-component changes:-

 * Stream operations now de-reference less structures.
 * close_delayed work() now runs on a DAI basis rather than looping all DAIs
   in a card.
 * PM suspend()/resume() operations can now handle N CODECs and Platforms
   per sound card.
 * Added soc_bind_dai_link() to bind the component devices to the sound card.
 * Added soc_dai_link_probe() and soc_dai_link_remove() to probe and remove
   DAI link components.
 * sysfs entries can now be registered per component per card.
 * snd_soc_new_pcms() functionailty rolled into dai_link_probe().
 * snd_soc_register_codec() now does all the codec list and mutex init.

This patch changes the probe() and remove() of the CODEC drivers as follows:-

 o Make CODEC driver a platform driver
 o Moved all struct snd_soc_codec list, mutex, etc initialiasation to core.
 o Removed all static codec pointers (drivers now support > 1 codec dev)
 o snd_soc_register_pcms() now done by core.
 o snd_soc_register_dai() folded into snd_soc_register_codec().

CS4270 portions:
Acked-by: Timur Tabi <timur@freescale.com>

Some TLV320aic23 and Cirrus platform fixes.
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>

TI CODEC and OMAP fixes
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>

Samsung platform and misc fixes :-
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Seungwhan Youn <sw.youn@samsung.com>

MPC8610 and PPC fixes.
Signed-off-by: Timur Tabi <timur@freescale.com>

i.MX fixes and some core fixes.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

J4740 platform fixes:-
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

CC: Tony Lindgren <tony@atomide.com>
CC: Nicolas Ferre <nicolas.ferre@atmel.com>
CC: Kevin Hilman <khilman@deeprootsystems.com>
CC: Sascha Hauer <s.hauer@pengutronix.de>
CC: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
CC: Kuninori Morimoto <morimoto.kuninori@renesas.com>
CC: Daniel Gloeckner <dg@emlix.com>
CC: Manuel Lauss <mano@roarinelk.homelinux.net>
CC: Mike Frysinger <vapier.adi@gmail.com>
CC: Arnaud Patard <apatard@mandriva.com>
CC: Wan ZongShun <mcuos.com@gmail.com>

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-12 14:00:00 +01:00
Mark Brown
85488037bb ASoC: Add source argument to PLL configuration
More and more devices feature PLLs and FLLs with the ability to select
between multiple input clocks. In order to better support these devices
a new argument, source, has been added to the set_pll() configuration
API. Using set_clkdiv() is often difficult due to the need to stop the
PLL/FLL before any reconfiguration can be done.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-05 18:52:16 +01:00
Daniel Ribeiro
a5479e389e ASoC: change set_tdm_slot api to allow slot_width override.
Extend set_tdm_slot to allow the user to arbitrarily set the frame width
and active TX/RX slots.

Updates magician.c and wm9081.c for the new set_tdm_slot(). wm9081.c
still doesn't handle the slot_width override.

While being there, correct an incorrect use of SlotsPerFrm(7) use in
bitmask on pxa-ssp.c (SSCR0_SlotsPerFrm(x) is (((x) - 1) << 24)) ).

(this series is meant for Mark's for-2.6.32 branch)

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-06 15:52:24 +01:00
Mark Brown
d5fc3b5fe3 Merge branch 'for-2.6.31' into for-2.6.32 2009-06-25 13:58:37 +01:00
Philipp Zabel
1abd918499 ASoC: UDA1380: refactor device registration
This patch mostly follows commit 5998102b90
"ASoC: Refactor WM8731 device registration" to make UDA1380 use standard
device instantiation. Similarly, the I2C device registration temporarily
moves into the magician machine driver before it will find its final
resting place in the board file.

At the same time, platform specific configuration is moved to platform data
and common power/reset GPIO handling moves into the codec driver.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-15 21:54:48 +01:00
Philipp Zabel
33745fb344 ASoC: magician: fix PXA SSP clock polarity
Follow-up fix needed since "ASoC: pxa-ssp.c fix clock/frame invert".

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-14 16:15:07 +01:00
Takashi Iwai
2bf2778e0f ASoC: Optimize switch/case in magician.c
Use default to optimize the switch/case in magicial_playback_hw_params(),
which also fixes the compile warnings below:
  sound/soc/pxa/magician.c:89: warning: 'acds' may be used uninitialized in this function
  sound/soc/pxa/magician.c:89: warning: 'acps' may be used uninitialized in this function

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-15 12:20:52 +02:00
Eric Miao
fd2bd98818 ASoC: magician: remove un-necessary #include of pxa-regs.h and hardware.h
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-09 13:24:19 +01:00
Philipp Zabel
7377226c34 ASoC: Add Magician machine support
HTC Magician has a Philips UDA1380 codec connected via
SSP1 (playback) and I2S (capture).
There is a flip-flop between the SSP frame clock output
and the codec's word select input pin. To make the codec
see proper I2S input, the SSP has to send two frames per
sample.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-02 16:34:13 +01:00