Commit graph

1042884 commits

Author SHA1 Message Date
Mark Brown
c7801a3c68
ASoC: ep93xx: Convert to modern clocking terminology
As part of the effort to remove our old APIs based on outdated terminology
update the EP93xx drivers to use modern terminology.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210916143828.36215-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:54 +01:00
Arnd Bergmann
501849d97e
ASoC: samsung: add missing "fallthrough;"
With gcc, we get a warning in this file:

In file included from include/linux/io.h:13,
                 from sound/soc/samsung/s3c-i2s-v2.c:16:
sound/soc/samsung/s3c-i2s-v2.c: In function 's3c2412_i2s_trigger':
arch/arm/include/asm/io.h:92:22: error: this statement may fall through [-Werror=implicit-fallthrough=]
 #define __raw_writel __raw_writel
                      ^
arch/arm/include/asm/io.h:299:29: note: in expansion of macro '__raw_writel'
 #define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c)
                             ^~~~~~~~~~~~
arch/arm/include/asm/io.h:307:36: note: in expansion of macro 'writel_relaxed'
 #define writel(v,c)  ({ __iowmb(); writel_relaxed(v,c); })
                                    ^~~~~~~~~~~~~~
sound/soc/samsung/s3c-i2s-v2.c:398:3: note: in expansion of macro 'writel'
   writel(0x0, i2s->regs + S3C2412_IISFIC);
   ^~~~~~
sound/soc/samsung/s3c-i2s-v2.c:400:2: note: here
  case SNDRV_PCM_TRIGGER_RESUME:
  ^~~~

From all I can tell, this was indeed meant to fall through, so
add "fallthrough;" statement to avoid the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20210927095449.1070639-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:53 +01:00
Mark Brown
3e8908fbfd
ASoC: ak4642: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the ak4642 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210920164042.16624-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:52 +01:00
Yassine Oudjana
a270bd9abd
ASoC: wcd9335: Use correct version to initialize Class H
The versioning scheme was changed in an earlier patch, which caused the version
being used to initialize WCD9335 to be interpreted as if it was WCD937X, which
changed code paths causing broken headphones output. Pass WCD9335 instead of
WCD9335_VERSION_2_0 to wcd_clsh_ctrl_alloc to fix it.

Fixes: 19c5d1f6a0 ("ASoC: codecs: wcd-clsh: add new version support")
Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210925022339.786296-1-y.oudjana@protonmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:51 +01:00
Mark Brown
155acb01bf
ASoC: alc5632: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the alc5632 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210920165128.17224-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:50 +01:00
Mark Brown
8515f828c5
ASoC: ak4104: Update to modern clocking terminology
As part of moving to remove the old style defines for the bus clocks update
the ak4104 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210916150922.20183-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:48 +01:00
Mark Brown
2b0a5d8d28
ASoC: ak4118: Update to modern clocking terminology
As part of moving to remove the old style defines for the bus clocks update
the ak4118 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210916150804.20058-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:47 +01:00
Mark Brown
c5bc627511
ASoC: zl38060: Update to modern clocking terminology
As part of moving to remove the old style defines for the bus clocks update
the zl38060 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210921205117.4393-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:46 +01:00
Masanari Iida
d24d3f7288
ASoC: q6afe: q6asm: Fix typos in qcom,q6afe.txt and qcom,q6asm.txt
This patch fixes two spelling typos in qcom,q6afe.txt
and qcom,q6asm.txt

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Link: https://lore.kernel.org/r/20210924070044.569541-1-standby24x7@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:45 +01:00
Simon Trimmer
f6bc909e76
firmware: cs_dsp: add driver to support firmware loading on Cirrus Logic DSPs
wm_adsp originally provided firmware loading on some audio DSP and was
implemented as an ASoC codec driver. However, the firmware loading now
covers a wider range of DSP cores and peripherals containing them,
beyond just audio. So it needs to be available to non-audio drivers. All
the core firmware loading support has been moved into a new driver
cs_dsp, leaving only the ASoC-specific parts in wm_adsp.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-17-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:42 +01:00
Simon Trimmer
2dd044641e
ASoC: wm_adsp: Separate wm_adsp specifics in cs_dsp_client_ops
This is preparation for moving the generic DSP support out of ASoC.
The event callbacks let the client add custom handling of events.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-16-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:41 +01:00
Simon Trimmer
e146820215
ASoC: wm_adsp: Split out struct cs_dsp from struct wm_adsp
In preparation for moving the generic DSP support out of ASoC split
struct wm_adsp into two parts, one will form the structure for the new
generic DSP code and embed that one into wm_adsp.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-15-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:40 +01:00
Simon Trimmer
a828056fa1
ASoC: wm_adsp: move firmware loading to client
This is preparation for moving the generic DSP support out of ASoC.
Passing the firmware as parameters into the power_up functions
simplifies the generic code that will be moved out of wm_adsp.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-14-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:39 +01:00
Simon Trimmer
2169f2f151
ASoC: wm_adsp: Pass firmware names as parameters when starting DSP core
As preparation for moving the generic DSP support out of ASoC pass the
firmware names used when loading files as parameters as the generic code
can't refer directly to the array specific to wm_adsp. The code
remaining in wm_adsp.c doesn't need to change, it can continue to use
the string arrays directly.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-13-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:38 +01:00
Simon Trimmer
edb1d6d7f0
ASoC: wm_adsp: Move check of dsp->running to better place
In preparation for moving the generic DSP support out of ASoC, move
the check of dsp->running to a more appropriate place that will move
to the generic code.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-12-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:37 +01:00
Simon Trimmer
0700bc2fb9
ASoC: wm_adsp: Separate generic cs_dsp_coeff_ctl handling
This is preparation for moving the generic DSP support out of ASoC. The
majority of the handling of firmware controls is generic and this change
separates the generic and ASoC specific details into separate structures
and functions and renames the generic code named wm_* to cs_*.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-11-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:36 +01:00
Charles Keepax
6092be2d93
ASoC: wm_adsp: Move sys_config_size to wm_adsp
sys_config_size is part of the compressed stream support, move it from
what will become generic DSP code so that it remains in ASoC.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-10-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:35 +01:00
Simon Trimmer
186152df4d
ASoC: wm_adsp: Split DSP power operations into helper functions
This is preparation for moving the generic DSP support out of
ASoC. This change separates the generic handling of power and state
transitions from the DAPM API wrapper.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-9-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:35 +01:00
Simon Trimmer
25ca837ba6
ASoC: wm_adsp: Separate some ASoC and generic functions
Split some functions into ASoC and generic portions so that existing
interfaces can be retained whilst allowing the implementation to be
moved out of ASoC.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-8-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:34 +01:00
Simon Trimmer
6ab1d0cc84
ASoC: wm_adsp: Introduce cs_dsp logging macros
In preparation for moving the generic DSP support out of ASoC, add
some new logging macros that will be used from the generic code.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-7-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:33 +01:00
Simon Trimmer
5beb8eeade
ASoC: wm_adsp: Rename generic DSP support
This rename is preparation for moving the generic DSP support out of
ASoC, generic code named wm_* will be renamed to cs_*.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-6-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:31 +01:00
Simon Trimmer
df6c505c12
ASoC: wm_adsp: Cancel ongoing work when removing controls
Removes wm_adsp_ctl_work and integrates the work_struct into
wm_coeff_ctl so it may be referenced.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-5-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:31 +01:00
Charles Keepax
04ae085967
ASoC: wm_adsp: Switch to using wm_coeff_read_ctrl for compressed buffers
When parsing a compressed buffer from the firmware the driver currently
open codes reading the firmware coefficient containing the buffer
description. Improve this slightly by using the coefficient read
functions already provided by the wm_adsp driver. It is worth noting
this change requires the running variable to be set before
wm_adsp_buffer_init is called, however this is safe, since its all still
under the power lock and nothing in the compressed code gates itself on
running.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-4-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:30 +01:00
Charles Keepax
6477960755
ASoC: wm_adsp: Move check for control existence
Checking earlier in the function if a control already exists avoids
superfluous string construction and also prepares for future
refactoring.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-3-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:29 +01:00
Simon Trimmer
d07a6d454f
ASoC: wm_adsp: Remove use of snd_ctl_elem_type_t
In preparation for moving the generic DSP support out of ASoC, remove
the use of the ALSA specific types for the control type. The use of an
ALSA type was unnecessary, the simplified code is easier to read and
avoids Sparse warnings.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210913160057.103842-2-simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27 13:00:28 +01:00
Mark Brown
39e178a4cc
ASoC: pl1022_rdk: Update to modern clocking terminology
As part of moving to remove the old style defines for the bus clocks update
the pl1022_rdk 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-16-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-22 13:23:31 +01:00
Mark Brown
fcd444bf6a
ASoC: pl1022_ds: Update to modern clocking terminology
As part of moving to remove the old style defines for the bus clocks update
the pl1022_ds 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-15-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-22 13:23:30 +01:00
Mark Brown
8a7f299b85
ASoC: mpc8610_hpcd: Update to modern clocking terminology
As part of moving to remove the old style defines for the bus clocks update
the mpc8610_hpcd 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-14-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-22 13:23:29 +01:00
Mark Brown
419099b4c3
ASoC: imx-sgtl5000: Update to modern clocking terminology
As part of moving to remove the old style defines for the bus clocks update
the imx-sgtl5000 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-13-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-22 13:23:28 +01:00
Mark Brown
caa0a6075a
ASoC: imx-rpmsg: Update to modern clocking terminology
As part of moving to remove the old style defines for the bus clocks update
the imx-rpmsg 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-12-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-22 13:23:27 +01:00
Mark Brown
a90f847ad2
ASoC: imx-hdmi: Update to modern clocking terminology
As part of moving to remove the old style defines for the bus clocks update
the imx-hdmi 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-11-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-22 13:23:26 +01:00
Mark Brown
56b69e4e4b
ASoC: imx-es8328: Update to modern clocking terminology
As part of moving to remove the old style defines for the bus clocks update
the imx-es8328 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-10-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-22 13:23:25 +01:00
Mark Brown
d689e28012
ASoC: imx-card: Update to modern clocking terminology
As part of moving to remove the old style defines for the bus clocks update
the imx-card 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-9-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-22 13:23:24 +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
Mark Brown
89efbdaaa4
ASoC: fsl_ssi: Update to modern clocking terminology
As part of moving to remove the old style defines for the bus clocks update
the fsl_ssi 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-7-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-22 13:23:22 +01:00
Mark Brown
361284a4eb
ASoC: fsl_sai: Update to modern clocking terminology
As part of moving to remove the old style defines for the bus clocks update
the fsl_sai 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-6-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-22 13:23:21 +01:00
Mark Brown
a51da9dc9b
ASoC: fsl-mqs: Update to modern clocking terminology
As part of moving to remove the old style defines for the bus clocks update
the fsl-mqs 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-5-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-22 13:23:20 +01:00
Mark Brown
e0b64fa34c
ASoC: fsl-esai: Update to modern clocking terminology
As part of moving to remove the old style defines for the bus clocks update
the fsl-esai 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-4-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-22 13:23:19 +01:00
Mark Brown
2757b340b2
ASoC: fsl-audmix: Update to modern clocking terminology
As part of moving to remove the old style defines for the bus clocks update
the fsl-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-3-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-22 13:23:18 +01:00
Mark Brown
8fcfd34934
ASoC: fsl-asoc-card: Update to modern clocking terminology
As part of moving to remove the old style defines for the bus clocks update
the fsl-asoc-card 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-2-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-22 13:23:17 +01:00
Mark Brown
4348be6330
ASoC: eureka-tlv320: Update to modern clocking terminology
As part of moving to remove the old style defines for the bus clocks update
the eureka-tlv320 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-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-22 13:23:16 +01:00
Mark Brown
94767044f0
ASoC: cros_ec_codec: Use modern ASoC DAI format terminology
As part of moving to remove the old style defines for the bus clocks update
the cros_ec_codec driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20210920170414.17903-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-22 13:23:15 +01:00
Sameer Pujar
013148fe7f
ASoC: Fix warning related to 'sound-name-prefix' binding
commit 82d3ec1d89 ("ASoC: Use schema reference for sound-name-prefix")
added name-prefix.yaml schema and the same reference was used in couple
of other schemas. But this is causing following warning and the same is
fixed in current patch.

 Documentation/devicetree/bindings/sound/nxp,tfa989x.example.dt.yaml:
 audio-codec@34: 'sound-name-prefix' does not match any of the regexes:
 'pinctrl-[0-9]+'
  From schema: Documentation/devicetree/bindings/sound/nxp,tfa989x.yaml
 Documentation/devicetree/bindings/sound/nxp,tfa989x.example.dt.yaml:
 audio-codec@36: 'sound-name-prefix' does not match any of the regexes:
 'pinctrl-[0-9]+'
  From schema: Documentation/devicetree/bindings/sound/nxp,tfa989x.yaml

Fixes: 82d3ec1d89 ("ASoC: Use schema reference for sound-name-prefix")
Reported-by: Rob Herring <robh+dt@kernel.org>
Suggested-by: Rob Herring <robh+dt@kernel.org>
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1632238860-16947-1-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-21 17:39:11 +01:00
Colin Ian King
b5377a7678
ASoC: qdsp6: q6afe-dai: Fix spelling mistake "Fronend" -> "Frontend"
There is a spelling mistake in the module description. Fix it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210920184152.18109-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-21 15:03:33 +01:00
Shengjiu Wang
a635d66be1
ASoC: fsl_spdif: Add support for i.MX8ULP
On i.MX8ULP the spdif works with EDMA, so add compatible
string and soc specific data for i.MX8ULP.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1631238562-27081-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-21 13:24:52 +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
Mark Brown
8e8f2ac09d
ASoC: Drop mistakenly applied SPI patch
Revert 6e8cc4ddce ("spi: tegra20-slink: Declare runtime suspend and
resume functions conditionally") which was mistakenly applied to the
ASoC tree not the SPI tree (where it was also applied.

Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-20 16:21:19 +01:00
Mark Brown
cca46db7e2
Merge series "ASoC: compress: Support module_get on stream open" from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:
Hi,

SOF is marking all componet drivers with module_get_upon_open = 1 which works
fine with normal PCM streams, however on compressed side the module get upon
open is not supported. The module_get works when module_get_upon_open is not set
becasue the snd_soc_component_module_get_when_probe() will pass NULL for the
substream parameter of snd_soc_component_module_get().

In order to re-use the existing infrastructure for module_get, the proposal is
to convert the mark_module to void pointer (like the pm mark) and implement
matching code for the compressed open/free to pcm open/close.

Regards,
Peter
---
Peter Ujfalusi (2):
  ASoC: soc-component: Convert the mark_module to void*
  ASoC: compress/component: Use module_get_when_open/put_when_close for
    cstream

 include/sound/soc-component.h | 14 ++++----
 sound/soc/soc-component.c     | 61 +++++++++++++++--------------------
 sound/soc/soc-compress.c      | 43 +++++++++++++++++++++---
 3 files changed, 71 insertions(+), 47 deletions(-)

--
2.33.0
2021-09-20 15:46:54 +01:00
Mark Brown
2a07ef63f5
Merge series "Extend AHUB audio support for Tegra210 and later" from Sameer Pujar <spujar@nvidia.com>:
Earlier as part of series [0], support for ADMAIF and I/O modules (such
as I2S, DMIC and DSPK) was added. This series aims at exposing some of
the AHUB internal modules (listed below), which can be used for audio
pre or post processing.

  * SFC (Sampling Frequency Converter)
  * MVC (Master Volume Control)
  * AMX (Audio Multiplexer)
  * ADX (Audio Demultiplexer)
  * Mixer

These modules can be plugged into audio paths and relevant processing
can be done. The MUX routes are extended to allow add or remove above
modules in the path via mixer controls. This is similar to how specific
ADMAIF channels are connected to relevant I/O module instances at the
moment.

Some of these modules can alter PCM parameters. Consider example of
resampler (44.1 -> 48 kHz) in the path.

  aplay(44.1 kHz) -> ADMAIF -> SFC -> (48 kHz) I2S -> (48kHz) Codec

The modules following SFC should be using converted sample rate and DAIs
need to be configured accordingly. The audio-graph driver provides a
mechanism to fixup the new parameters which can be specified in DT for a
given DAI. Then core uses these new values via fixup callback and then
pass it to respective DAIs hw_param() callback. The "convert-rate",
described in [1], property can be used when there is rate conversion in
the audio path. Similarly "convert-channels" can be used when there is
channel conversion in the path. There is no "convert-xxx" property for
sample size conversions. It can be added if necessary.

[0] https://www.lkml.org/lkml/2020/7/21/1357
[1] Documentation/devicetree/bindings/sound/audio-graph-port.yaml

Changelog
=========

v1 -> v2
--------
 * Put comments for soft reset application in the drivers.
 * Split out mute/volume control logic in put() calls of MVC driver and
   use separate callbacks for the respective kcontrols.
 * Update kcontrol put() callback in MVC driver to return 1 whenever
   there is change. Similar change is done in other drivers too.
 * Use name-prefix.yaml reference for the driver documentation now.
 * Add sound-name-prefix pattern for MIXER driver and use prefix
   accordingly in DT.

Sameer Pujar (13):
  ASoC: soc-pcm: Don't reconnect an already active BE
  ASoC: simple-card-utils: Increase maximum DAI links limit to 512
  ASoC: audio-graph: Fixup CPU endpoint hw_params in a BE<->BE link
  ASoC: dt-bindings: tegra: Few more Tegra210 AHUB modules
  ASoC: tegra: Add routes for few AHUB modules
  ASoC: tegra: Add Tegra210 based MVC driver
  ASoC: tegra: Add Tegra210 based SFC driver
  ASoC: tegra: Add Tegra210 based AMX driver
  ASoC: tegra: Add Tegra210 based ADX driver
  ASoC: tegra: Add Tegra210 based Mixer driver
  arm64: defconfig: Enable few Tegra210 based AHUB drivers
  arm64: tegra: Add few AHUB devices for Tegra210 and later
  arm64: tegra: Extend APE audio support on Jetson platforms

 .../bindings/sound/nvidia,tegra210-adx.yaml        |   76 +
 .../bindings/sound/nvidia,tegra210-ahub.yaml       |   20 +
 .../bindings/sound/nvidia,tegra210-amx.yaml        |   76 +
 .../bindings/sound/nvidia,tegra210-mixer.yaml      |   74 +
 .../bindings/sound/nvidia,tegra210-mvc.yaml        |   76 +
 .../bindings/sound/nvidia,tegra210-sfc.yaml        |   73 +
 arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts | 1554 ++++++++-
 arch/arm64/boot/dts/nvidia/tegra186.dtsi           |  120 +
 arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts | 1493 +++++++-
 .../arm64/boot/dts/nvidia/tegra194-p3509-0000.dtsi | 1520 ++++++++-
 arch/arm64/boot/dts/nvidia/tegra194.dtsi           |  116 +
 arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts |  876 +++++
 arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts |  876 +++++
 arch/arm64/boot/dts/nvidia/tegra210.dtsi           |   77 +
 arch/arm64/configs/defconfig                       |    5 +
 include/sound/simple_card_utils.h                  |    2 +-
 sound/soc/generic/audio-graph-card.c               |    4 +-
 sound/soc/soc-pcm.c                                |    4 +
 sound/soc/tegra/Kconfig                            |   48 +
 sound/soc/tegra/Makefile                           |   10 +
 sound/soc/tegra/tegra210_adx.c                     |  531 +++
 sound/soc/tegra/tegra210_adx.h                     |   72 +
 sound/soc/tegra/tegra210_ahub.c                    |  511 ++-
 sound/soc/tegra/tegra210_amx.c                     |  600 ++++
 sound/soc/tegra/tegra210_amx.h                     |   93 +
 sound/soc/tegra/tegra210_mixer.c                   |  674 ++++
 sound/soc/tegra/tegra210_mixer.h                   |  100 +
 sound/soc/tegra/tegra210_mvc.c                     |  645 ++++
 sound/soc/tegra/tegra210_mvc.h                     |  117 +
 sound/soc/tegra/tegra210_sfc.c                     | 3549 ++++++++++++++++++++
 sound/soc/tegra/tegra210_sfc.h                     |   78 +
 31 files changed, 13647 insertions(+), 423 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-adx.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-amx.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-mixer.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-mvc.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-sfc.yaml
 create mode 100644 sound/soc/tegra/tegra210_adx.c
 create mode 100644 sound/soc/tegra/tegra210_adx.h
 create mode 100644 sound/soc/tegra/tegra210_amx.c
 create mode 100644 sound/soc/tegra/tegra210_amx.h
 create mode 100644 sound/soc/tegra/tegra210_mixer.c
 create mode 100644 sound/soc/tegra/tegra210_mixer.h
 create mode 100644 sound/soc/tegra/tegra210_mvc.c
 create mode 100644 sound/soc/tegra/tegra210_mvc.h
 create mode 100644 sound/soc/tegra/tegra210_sfc.c
 create mode 100644 sound/soc/tegra/tegra210_sfc.h

--
2.7.4
2021-09-20 15:46:53 +01:00
Wolfram Sang
0f9a84b20f
ASoC: codecs: max98390: simplify getting the adapter of a client
We have a dedicated pointer for that, so use it. Much easier to read and
less computation involved.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20210918213553.14514-2-wsa+renesas@sang-engineering.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-20 15:46:40 +01:00