Current ASoC overwrites null_dai_ops to dai->driver->ops if it
was NULL. But, we can remove it if framework always checks
dai->driver->ops when it uses DAI callbacks.
This patch do it, and removes null_dai_ops.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-By: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87zhb1sskc.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
At soc-dai.c, it is good idea to indicate error function and
its component name if there was error.
This patch adds soc_dai_err() for it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-By: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/871rodu74x.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This series provides the following updtes to the Intel machine driver
Kconfig:
1. The first patch adds the explicit dependency on GPIOLIB when
SND_SOC_DMIC is selected.
2. SND_SOC_SOF_HDA_AUDIO_CODEC is required for using the legacy
HDA codec driver for HDMI support in SOF. The last 3 three patches
make the required changes to account for this.
Libin Yang (3):
ASoC: intel: add depends on SND_SOC_SOF_HDA_AUDIO_CODEC for common
hdmi
ASoC: sof-sdw: remove CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC condition
ASoC: sof_pcm512x: remove CONFIG_SND_HDA_CODEC_HDMI condition
Pierre-Louis Bossart (1):
ASoC: Intel: boards: add explicit dependency on GPIOLIB when DMIC is
used
sound/soc/intel/boards/Kconfig | 51 ++++++++++++++-------------
sound/soc/intel/boards/sof_pcm512x.c | 9 -----
sound/soc/intel/boards/sof_sdw.c | 8 -----
sound/soc/intel/boards/sof_sdw_hdmi.c | 7 ----
4 files changed, 26 insertions(+), 49 deletions(-)
--
2.17.1
The machine driver bdw-rt5650 (for Google buddy) supports 2 or 4-channel
recording while other two drivers support only 2-channel recording. HW
constraints are implemented to reflect the hardware limitation on BDW
platform.
Changes since v1:
- Change the patch title.
- Remove the DUAL_CHANNEL and QUAD_CHANNEL macros which are too obvious.
- Follow the naming convertion, using 'bdw_rt5650_' and 'bdw_rt5677_' to
name startup functions.
- Refine the comments in startup functions.
- Redesign the bdw_rt5650_fe_startup() function for readability.
- Add an assignment to initialize runtime->hw.channels_max variable.
Brent Lu (3):
ASoC: bdw-rt5677: add channel constraint
ASoC: bdw-rt5650: add channel constraint
ASoC: broadwell: add channel constraint
sound/soc/intel/boards/bdw-rt5650.c | 29 +++++++++++++++++++++++++++++
sound/soc/intel/boards/bdw-rt5677.c | 26 ++++++++++++++++++++++++++
sound/soc/intel/boards/broadwell.c | 26 ++++++++++++++++++++++++++
3 files changed, 81 insertions(+)
--
2.7.4
BDW boards using this machine driver supports only stereo capture and
playback. Implement a constraint to enforce it.
Signed-off-by: Brent Lu <brent.lu@intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/1588007614-25061-4-git-send-email-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
BDW boards using this machine driver supports only 2 or 4-channel capture.
Implement a constraint to enforce it.
Signed-off-by: Brent Lu <brent.lu@intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/1588007614-25061-3-git-send-email-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
BDW boards using this machine driver supports only stereo capture and
playback. Implement a constraint to enforce it.
Signed-off-by: Brent Lu <brent.lu@intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/1588007614-25061-2-git-send-email-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
SND_SOC_DMIC depends on GPIOLIB, so let's add the dependency before
selecting SND_SOC_DMIC.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200427165211.23463-2-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Automatically choose DMIC pipeline format configuration depending on
information included in NHLT.
Change the access rights of appropriate kcontrols to read-only in order
to prevent user interference.
Signed-off-by: Mateusz Gorski <mateusz.gorski@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200427132727.24942-4-mateusz.gorski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
For pipes supporting multiple input/output formats, kcontrol is
created and selection of pipe input and output configuration
is done based on control set.
If more than one configuration is supported, then this patch
allows user to select configuration of choice
using amixer settings.
Signed-off-by: Mateusz Gorski <mateusz.gorski@linux.intel.com>
Signed-off-by: Pavan K S <pavan.k.s@intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200427132727.24942-3-mateusz.gorski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Add alternative topology binary file name based on used machine driver
and fallback to use this name after failed attempt to load topology file
with name based on NHLT.
This change addresses multiple issues with current mechanism, for
example - there are devices without NHLT table, and that currently
results in tplg_name being empty.
Signed-off-by: Mateusz Gorski <mateusz.gorski@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200427132727.24942-2-mateusz.gorski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
The patch 955ac62405: "ASoC: fsl_easrc: Add EASRC ASoC CPU DAI
drivers" from Apr 16, 2020, leads to the following Smatch complaint:
sound/soc/fsl/fsl_easrc.c:1529 fsl_easrc_hw_free()
warn: variable dereferenced before check 'ctx' (see line 1527)
sound/soc/fsl/fsl_easrc.c
1526 struct fsl_asrc_pair *ctx = runtime->private_data;
1527 struct fsl_easrc_ctx_priv *ctx_priv = ctx->private;
^^^^^
Dereference
1528
1529 if (ctx && (ctx_priv->ctx_streams & BIT(substream->stream))) {
^^^
This check is too late, to prevent a NULL dereference.
1530 ctx_priv->ctx_streams &= ~BIT(substream->stream);
1531 fsl_easrc_release_context(ctx);
Fixes: 955ac62405 ("ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/d23c939f1c9eeb3fce34b6c34d44e2d6156f663a.1587799355.git.shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Fix the following coccicheck warning:
sound/soc/ti/omap-mcbsp.c:1188:5-11: WARNING: Comparison to bool
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Link: https://lore.kernel.org/r/20200426094238.23914-1-yanaijie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
The function mxs_saif_probe() is only called with an
openfirmware platform device. Therefore there is no
need to check that it has an openfirmware node.
Signed-off-by: Shengju Zhang <zhangshengju@cmss.chinamobile.com>
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20200420142509.9728-1-tangbin@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
The number of speaker amplifiers may vary between platforms. UCM
needs to check amp number to include different configuration files.
This patch keeps track of the number of speaker amplifiers and
stores it in components string of the card.
Tested on Comet Lake platforms.
Signed-off-by: randerwang <rander.wang@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20200419183509.4134-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
In the function hi6210_i2s_probe(), devm_clk_get() doesn't return NULL.
Thus use IS_ERR() to validate the return value instead of IS_ERR_OR_NULL().
Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20200427091145.4268-1-tangbin@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Disable exception interrupt before scheduling tasklet, otherwise if
the tasklet isn't handled immediately, there will be endless xrun
interrupt.
Fixes: 7ccafa2b38 ("ASoC: fsl_esai: recover the channel swap after xrun")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/a8f2ad955aac9e52587beedc1133b3efbe746895.1587968824.git.shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
It may be useful to pass the specific model to the generic HDA codec
routines like the legacy HDA driver (snd-hda-intel) allows.
The model name "sofbus" is tricky anyway.
Original proposal: https://lore.kernel.org/alsa-devel/20191203161908.7496-1-perex@perex.cz/
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20200424092520.23989-1-perex@perex.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
gcc-6.5 and earlier show a new warning:
sound/soc/soc-compress.c: In function ‘soc_compr_open’:
sound/soc/soc-compress.c:75:28: warning: ‘component’ is used uninitialized in this function [-Wuninitialized]
struct snd_soc_component *component, *save = NULL;
^~~~~~~~~
Simplest fix is to initialize it to avoid the warning.
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Rong Chen <rong.a.chen@intel.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/lkml/202004201540.vYPhhYMs%25lkp@intel.com
Link: https://lore.kernel.org/r/20200424005437.3941-1-rong.a.chen@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Previously CLOCKING2 is set as a volatile register, but cause
issue at suspend & resume, that some bits of CLOCKING2 is not
restored at resume, for example SYSCLK_SRC bits, then the output
clock is wrong.
The volatile property is caused by CLASSD_CLK_DIV bits,
which are controlled by the chip itself. But the datasheet
claims these are read only and protected by the security key,
and they are not read by the driver at all.
So it should be safe to change CLOCKING2 to be non-volatile.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/6d25d5b36d4b9aeb8655b5e947dad52214e34177.1587693523.git.shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
If there is a power GPIO provided we control it from DAPM context so there
is no problem with a sleeping GPIO, use the _cansleep() version of the API
to allow this.
Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20200422083550.50711-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
The recent batch of SOF changes failed to build on some x86
configurations including an allmodconfig, revert the commits:
e150ef4169 ASoC: SOF: Introduce extended manifest
3710914178 ASoC: SOF: ext_manifest: parse firmware version
7c024b948c ASoC: SOF: ext_manifest: parse compiler version
9e72f13ee5 ASoC: SOF: ext_manifest: parse windows
to fix this.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@kernel.org>
This contains a couple of fixes that are needed to properly reconfigure
the audio clocks on older Tegra devices.
-----BEGIN PGP SIGNATURE-----
iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAl6fYTwTHHRyZWRpbmdA
bnZpZGlhLmNvbQAKCRDdI6zXfz6zoXKqEACrHTSOY6ul9mCyjdcJnfLVOoU4iV76
OTC8u+3mGhwglU7SnSyJAFXHGVGkJL6VUptkpO6rA0qURisFh3L5ZoozioR1SHYW
yGvjGVW8tjvgBv9hXunWGfz0soTr+gB8V+WB5Wlw47Oifmu0oeB0BG0Nb68hfJL3
u2cUc+2FUZTnP9cangD0gaPF9zybjpxGZH74KCN7AVs/nWBZqnGA+Rw0EE5kEAeP
a4fd1KHQpmfFoOIv2HKqjQTpa3F+7R6AUpuvm0D+ipFNxV2b4Ka4lbKgbMbMiuUb
l3sFo017gV5DF1aUl/0Zz7YGDf8mOZnABuGuItLwo5/PQFO7mftFodBQuxjofkX1
DdRyzt3HNT0RCzu8CC2ZLi6e5ukSLJK9khR7kCcAL8eNHScvRGz5RO+h3s/1gmk9
+grVPIwDIZLqmm7a6Cgld8GBPfWmPYlDUcoUR751Wn2bxnwwk2lcWrA50txkznbl
yWokE9OHQ4EHtKJarpbN7mvW2SgGnyLkOESWLCk8J8bqSF0mKfIcK2SAUdWR1JHI
J3hp8oBgVgZHtoh5ZroENk/KVTiZK56+ECcMdfO7/m+jBV66bsxi1Cs7aKSSF9rI
3IZYg9BC3Y8uk8Z6u695R86HcVIN7eSANmTkWHldphfQDN3Vn9LFGkXTD1zdZliR
irt3V2BdadMIJg==
=XTzg
-----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
iQFHBAABCgAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl6f95oTHGJyb29uaWVA
a2VybmVsLm9yZwAKCRAk1otyXVSH0GkGB/0X/amUL/B6lXjZky3rjkLP9uewLZls
Q0NsGdhkpX/2ixnaWMJO3eRj1RFT59JEKmU91nBmwh93i+CJ6UzDrGOU7LURu6e/
tRG4KWiqDaHNsKTHUE8wBSfEAeny9FlxQcWmtngb1hQCfcprqheMLQRGB8pXNz3C
Cg28+FcEjXENFeNRxxVe5+Ld8odO7YhSnNj4NjwrVrpVuAfjtU9RumqOA0gZRj+i
vhg8C83mlmBZO1RmKmtHOaCqGVoNUz2wW6+lxyC6DO+v4SxgGP0pcrbrBG1m61Bg
gFmXV9SlWgQUf7khOp1EDW4TQ023zz0evXAxVlKtQeBwRn+aOYDenYy7
=Aeww
-----END PGP SIGNATURE-----
Merge tag 'tegra-for-5.7-asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into asoc-5.7
ASoC: tegra: Fixes for v5.7-rc3
This contains a couple of fixes that are needed to properly reconfigure
the audio clocks on older Tegra devices.
Recent fix for jack detection caused a regression on systems with HDA
audio codec but no HDMI/DP audio via i915 graphics, leading to a kernel
oops at device probe. On these systems, HDA bus instance lookup fails,
as the first ASoC runtime of the card is connected to a dummy codec
(as no HDMI codec is present).
Fixes: 3a24f135e6 ("ASoC: intel/skl/hda - set autosuspend timeout for hda codecs")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200420205431.13070-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Add new module driver for new ASRC in i.MX8MN, several commits
are added for new property fsl,asrc-format
Shengjiu Wang (7):
ASoC: fsl_asrc: rename asrc_priv to asrc
ASoC: dt-bindings: fsl_asrc: Add new property fsl,asrc-format
ASoC: fsl-asoc-card: Support new property fsl,asrc-format
ASoC: fsl_asrc: Support new property fsl,asrc-format
ASoC: fsl_asrc: Move common definition to fsl_asrc_common
ASoC: dt-bindings: fsl_easrc: Add document for EASRC
ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers
changes in v9
- use lowercase for dt example.
changes in v8
- change get_pair_priv_size to pair_priv_size variable
changes in v7
- updated according to Nicoin's comments.
- add get_pair_priv_size to replace PAIR_PRIVATE_SIZE
changes in v6
- updated according to Nicoin's and Rob's comments.
changes in v5
- Add new property fsl,asrc-format, rather than change fsl,asrc-width
to fsl,asrc-formt.
- code change for above change.
changes in v4
- Add several commit for changing DT binding asrc-width to asrc-format
- rename asrc_priv to asrc
changes in v3
- add new commit "ASoC: fsl_asrc: Change asrc_width to asrc_format"
- modify binding doc to yaml format
- remove fsl_easrc_dma.c, make fsl_asrc_dma.c useable for easrc.
changes in v2
- change i.MX815 to i.MX8MN
- Add changes in Kconfig and Makefile
.../devicetree/bindings/sound/fsl,asrc.txt | 4 +
.../devicetree/bindings/sound/fsl,easrc.yaml | 101 +
sound/soc/fsl/Kconfig | 11 +
sound/soc/fsl/Makefile | 2 +
sound/soc/fsl/fsl-asoc-card.c | 24 +-
sound/soc/fsl/fsl_asrc.c | 305 +--
sound/soc/fsl/fsl_asrc.h | 74 +-
sound/soc/fsl/fsl_asrc_common.h | 106 +
sound/soc/fsl/fsl_asrc_dma.c | 54 +-
sound/soc/fsl/fsl_easrc.c | 2114 +++++++++++++++++
sound/soc/fsl/fsl_easrc.h | 651 +++++
11 files changed, 3212 insertions(+), 234 deletions(-)
create mode 100644 Documentation/devicetree/bindings/sound/fsl,easrc.yaml
create mode 100644 sound/soc/fsl/fsl_asrc_common.h
create mode 100644 sound/soc/fsl/fsl_easrc.c
create mode 100644 sound/soc/fsl/fsl_easrc.h
--
2.21.0
Hi Mark
Current snd_soc_component_driver has compr_ops,
but it is created for ALSA, not for ALSA SoC.
This means it doesn't know the callback is for which component,
thus, each callback needs to get component via lookup function.
It is not good design, and will not work in the future,
because ASoC can have multipul same name component which
current lookup function can't handle.
This v2 patch-set adds new snd_compress_ops and call
callbacks with component.
v1 is here
Link: https://lore.kernel.org/alsa-devel/87blnqpuqp.wl-kuninori.morimoto.gx@renesas.com/
Kuninori Morimoto (8):
ASoC: soc-compress: add snd_compress_ops
ASoC: codec: wm_adsp: use snd_compress_ops
ASoC: uniphier: use snd_compress_ops
ASoC: qcom: q6sp6: use snd_compress_ops
ASoC: intel: atom: use snd_compress_ops
ASoC: sof: use snd_compress_ops
ASoC: sprd: use snd_compress_ops
ASoC: soc-compress: remove snd_compr_ops
include/sound/soc-component.h | 40 ++++++++-
sound/soc/codecs/cs47l15.c | 9 +-
sound/soc/codecs/cs47l24.c | 8 +-
sound/soc/codecs/cs47l35.c | 9 +-
sound/soc/codecs/cs47l85.c | 9 +-
sound/soc/codecs/cs47l90.c | 9 +-
sound/soc/codecs/cs47l92.c | 9 +-
sound/soc/codecs/wm5102.c | 9 +-
sound/soc/codecs/wm5110.c | 8 +-
sound/soc/codecs/wm_adsp.c | 18 ++--
sound/soc/codecs/wm_adsp.h | 18 ++--
.../intel/atom/sst-mfld-platform-compress.c | 43 +++++----
sound/soc/intel/atom/sst-mfld-platform-pcm.c | 2 +-
sound/soc/intel/atom/sst-mfld-platform.h | 2 +-
sound/soc/qcom/qdsp6/q6asm-dai.c | 51 ++++++-----
sound/soc/soc-compress.c | 89 ++++++++++---------
sound/soc/sof/compress.c | 7 +-
sound/soc/sof/compress.h | 7 +-
sound/soc/sof/pcm.c | 4 +-
sound/soc/sof/sof-priv.h | 2 +-
sound/soc/sprd/sprd-pcm-compress.c | 49 +++++-----
sound/soc/sprd/sprd-pcm-dma.c | 2 +-
sound/soc/sprd/sprd-pcm-dma.h | 2 +-
sound/soc/uniphier/aio-compress.c | 45 ++++++----
sound/soc/uniphier/aio-dma.c | 2 +-
sound/soc/uniphier/aio.h | 2 +-
26 files changed, 265 insertions(+), 190 deletions(-)
--
2.17.1
The ZL38060 is a "Connected Home Audio Processor" from Microsemi,
which consists of a Digital Signal Processor (DSP), several Digital
Audio Interfaces (DAIs), analog outputs, and a block of 14 GPIOs.
This driver supports only a tiny subset of the chip's functionality
and possible configurations:
- bypass mode (whole dsp block is bypassed)
- chip's I2S DAI routed directly to/from DACs and microphone
- chip's internal clock is driven by a 12 MHz external crystal
- chip's DAI connected to CPU is I2S, and bit + frame clock master
- chip must be strapped for "host boot": in this mode, firmware will
be provided by this driver.
Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com>
Link: https://lore.kernel.org/r/20200417221341.31428-2-TheSven73@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
snd_compr_ops couldn't care called component,
but now we can care it via snd_compress_ops.
All drivers switched to it.
This patch removes snd_compr_ops.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87lfmqvdig.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
We can use snd_compress_ops.
Let's switch to use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87mu76vdiv.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
We can use snd_compress_ops.
Let's switch to use it.
Upstream code doesn't have sof_compressed_ops.
This patch assume it is implemented at out-of-tree.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87o8rmvdj7.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
vWe can use snd_compress_ops.
Let's switch to use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87pnc2vdka.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
We can use snd_compress_ops.
Let's switch to use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87r1wivdkz.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
We can use snd_compress_ops.
Let's switch to use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87sggyvdld.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
We can use snd_compress_ops.
Let's switch to use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/87tv1evdlu.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Current snd_soc_component_driver has compr_ops, and each driver can
have callback via it. But, it is mainly created for ALSA, thus, it
doesn't have "component" as parameter.
Thus, each callback can't know it is called for which component.
Each callback currently is getting "component" by using
snd_soc_rtdcom_lookup() with driver name.
--- ALSA SoC ---
...
if (component->driver->compr_ops &&
component->driver->compr_ops->open)
=> return component->driver->compr_ops->open(stream);
...
--- driver ---
static int xxx_open(struct snd_compr_stream *stream)
{
struct snd_soc_pcm_runtime *rtd = stream->private_data;
=> struct snd_soc_component *component = snd_soc_rtdcom_lookup(..);
...
}
It works today, but, will not work in the future if we support multi
CPU/Codec/Platform, because 1 rtd might have multiple same driver
name component.
To solve this issue, each callback need to be called with component.
We already have many component driver callbacks.
This patch adds new snd_compress_ops, and call it with "component".
--- ALSA SoC ---
...
if (component->driver->compress_ops->open)
=> return component->driver->compress_ops->open(
component, substream);
~~~~~~~~~
...
--- driver ---
static int xxx_open(struct snd_soc_component *component,
struct snd_compr_stream *stream)
{
=> /* it don't need to use snd_soc_rtdcom_lookup() */
...
}
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87v9luvdmh.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
EASRC (Enhanced Asynchronous Sample Rate Converter) is a new IP module
found on i.MX8MN. It is different with old ASRC module.
The primary features for the EASRC are as follows:
- 4 Contexts - groups of channels with an independent time base
- Fully independent and concurrent context control
- Simultaneous processing of up to 32 audio channels
- Programmable filter charachteristics for each context
- 32, 24, 20, and 16-bit fixed point audio sample support
- 32-bit floating point audio sample support
- 8kHz to 384kHz sample rate
- 1/16 to 8x sample rate conversion ratio
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/260d7a9fbddf9fa90760d30095df60a4c25fd0a1.1587038908.git.shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
There is a new ASRC included in i.MX serial platform, there
are some common definition can be shared with each other.
So move the common definition to a separate header file.
And add fsl_asrc_pair_priv and fsl_asrc_priv for
the variable specific for the module, which can be used
internally.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/7106993928ea9e9720e6b42ec601871103155b1c.1587038908.git.shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
In order to align with new ESARC, we add new property fsl,asrc-format.
The fsl,asrc-format can replace the fsl,asrc-width, driver
can accept format from devicetree, don't need to convert it to
format through width.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/2be9664768f32982ba4f71e49749f7390096ac9f.1587038908.git.shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
In order to align with new ESARC, we add new property fsl,asrc-format.
The fsl,asrc-format can replace the fsl,asrc-width, driver
can accept format from devicetree, don't need to convert it to
format through width.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/02f53d5512b9acd3492e2acdd5e0ba3113f18009.1587038908.git.shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Tegra PMC clock clk_out_1 is dedicated for audio mclk from Tegra30
through Tegra210 and currently Tegra clock driver keeps the audio mclk
enabled.
With the move of PMC clocks from clock driver into pmc driver, audio
mclk enable from clock driver is removed and this should be taken care
of by the audio driver.
tegra_asoc_utils_init() calls tegra_asoc_utils_set_rate() and audio mclk
rate configuration is not needed during init and the rate is actually
set during the ->hw_params() callback.
So, this patch removes tegra_asoc_utils_set_rate() call and just leaves
the audio mclk enabled.
Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Tested-by: Dmitry Osipenko <digetx@gmail.com>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Tegra PMC clock clk_out_1 is dedicated for audio mclk from Tegra30
through Tegra210 and currently Tegra clock driver does the initial
parent configuration for audio mclk and keeps it enabled by default.
With the move of PMC clocks from clock driver into PMC driver, audio
clocks parent configuration can be specified through the device tree
using assigned-clock-parents property and audio mclk control should be
taken care of by the audio driver.
This patch has implementation for parent configuration when default
parent configuration through assigned-clock-parents property is not
specified in the device tree.
Tested-by: Dmitry Osipenko <digetx@gmail.com>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
tegra_asoc_utils uses clk_get() to get the clock and clk_put() to free
them explicitly.
This patch updates it to use device managed resource API devm_clk_get()
so the clock will be automatically released and freed when the device is
unbound and removes tegra_asoc_utils_fini() as its no longer needed.
Tested-by: Dmitry Osipenko <digetx@gmail.com>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
After suspend & resume, wm8960_hw_params may be called when
bias_level is not SND_SOC_BIAS_ON, then wm8960_configure_clocking
is not called. But if sample rate is changed at that time, then
the output clock rate will be not correct.
So judgement of bias_level is SND_SOC_BIAS_ON in wm8960_hw_params
is not necessary and it causes above issue.
Fixes: 3176bf2d7c ("ASoC: wm8960: update pll and clock setting function")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/1587468525-27514-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>