Commit graph

1089084 commits

Author SHA1 Message Date
Ranjani Sridharan
71cb8ad1a7
ASoC: SOF: Add header for IPC4 manifest
Add the header for the IPC4 manifest.

Co-developed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Rander Wang <rander.wang@intel.com>
Co-developed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220511171648.1622993-4-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-12 11:41:27 +01:00
Ranjani Sridharan
0af829041d
ASoC: SOF: Add IPC4 private header
Add a struct sof_ipc4_fw_data to hold the firmware module data and
manifest FW header offset.
The FW reports data about the modules supported by the base FW in its
manifest and the FW header offset is platform dependent information.

This structure will be allocated when the ops are initialized for each
platform and populated when the FW is loaded.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220511171648.1622993-3-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-12 11:41:26 +01:00
Ranjani Sridharan
e3105c0ccc
ASoC: SOF: Intel: HDA: Set IPC4-specific DSP ops for CaVS platforms
Add implementation of low level, platform dependent IPC4 message handling
and set the DSP ops for IPC4 for APL, CNL and TGL platforms.

Co-developed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220511171648.1622993-2-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-12 11:41:25 +01:00
Mark Brown
8b7a4075a5
ASOC: Fix the error handling code of the probe
Merge series from Zheyu Ma <zheyuma97@gmail.com>:

These drivers mishandle the regulator resource in the probe function,
failing to disable the regulator for probing failure.
2022-05-12 11:06:30 +01:00
Charles Keepax
de2427207d
ASoC: wm9090: Remove redundant endianness flag
The endianness flag is used on the CODEC side to specify an
ambivalence to endian, typically because it is lost over the hardware
link. This device has no DAI links and as such the flag would have
no effect, remove the redundant flag.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220510153843.1029540-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-11 17:42:15 +01:00
Charles Keepax
69b53a097d
ASoC: wm2000: Remove redundant endianness flag
The endianness flag is used on the CODEC side to specify an
ambivalence to endian, typically because it is lost over the hardware
link. This device has no DAI links and as such the flag would have
no effect, remove the redundant flag.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220510153843.1029540-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-11 17:42:14 +01:00
Miaoqian Lin
2be84f7378
ASoC: mxs-saif: Fix refcount leak in mxs_saif_probe
of_parse_phandle() returns a node pointer with refcount
incremented, we should use of_node_put() on it when done.

Fixes: 08641c7c74 ("ASoC: mxs: add device tree support for mxs-saif")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220511133725.39039-1-linmq006@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-11 17:42:13 +01:00
Zheyu Ma
1a9fa95447
ASoC: cs42l56: Fix the error handling of cs42l56_i2c_probe()
The driver should goto label 'err_enable' when failing at regmap_read().

Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220511015514.1777923-1-zheyuma97@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-11 17:42:12 +01:00
Miaoqian Lin
ed46731d8e
ASoC: imx-hdmi: Fix refcount leak in imx_hdmi_probe
of_find_device_by_node() takes reference, we should use put_device()
to release it. when devm_kzalloc() fails, it doesn't have a
put_device(), it will cause refcount leak.
Add missing put_device() to fix this.

Fixes: 6a5f850aa8 ("ASoC: fsl: Add imx-hdmi machine driver")
Fixes: f670b274f7 ("ASoC: imx-hdmi: add put_device() after of_find_device_by_node()")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220511052740.46903-1-linmq006@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-11 17:42:11 +01:00
Shengjiu Wang
7aded7003a
ASoC: fsl_ssi: Add support multi fifo script
With dual fifo enabled, the case that recording mono sound
in the background, playback mono sound twice in parallal,
at second time playback sound may distort, the possible
reason is using dual fifo to playback mono sound is not
recommended.

This patch is to provide a option to use multi fifo script,
which can be dynamically configured as one fifo or two fifo
mode.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1652183808-3745-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-11 17:42:10 +01:00
Miaoqian Lin
41cd312dfe
ASoC: fsl: Fix refcount leak in imx_sgtl5000_probe
of_find_i2c_device_by_node() takes a reference,
In error paths, we should call put_device() to drop
the reference to aviod refount leak.

Fixes: 81e8e49261 ("ASoC: fsl: add sgtl5000 clock support for imx-sgtl5000")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20220511065803.3957-1-linmq006@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-11 17:42:09 +01:00
Zheyu Ma
c1ce4ba502
ASoC: cs42l46: Fix the error handling of cs42l56_i2c_probe()
The driver should goto label 'err_enable' when failing at regmap_read().

Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Link: https://lore.kernel.org/r/20220510153251.1741210-2-zheyuma97@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-11 17:40:18 +01:00
Zheyu Ma
83d1b65d4c
ASoC: wm8903: Fix the error handling of wm8903_i2c_probe()
The driver should goto label 'err' when failing to request the irq.

Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220510153251.1741210-7-zheyuma97@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-11 17:40:17 +01:00
Zheyu Ma
68cacb5cf5
ASoC: tas6424: Fix the error handling of tas6424_i2c_probe()
After enabling the regulator, The driver should disable the regulator
when failing at probing.

Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Link: https://lore.kernel.org/r/20220510153251.1741210-6-zheyuma97@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-11 17:40:16 +01:00
Zheyu Ma
ef1878fd0c
ASoC: tas571x: Fix the error handling of tas571x_i2c_probe()
After enabling the regulator, The driver should disable the regulator
when failing at probing.

Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Link: https://lore.kernel.org/r/20220510153251.1741210-5-zheyuma97@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-11 17:40:15 +01:00
Zheyu Ma
7883c193d7
ASoC: rt5645: Fix the error handling of rt5645_i2c_probe()
After enabling the regulator, The driver should disable the regulator
when failing at probing.

Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Link: https://lore.kernel.org/r/20220510153251.1741210-4-zheyuma97@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-11 17:40:14 +01:00
Zheyu Ma
cf7250e95d
ASoC: cs35l36: Fix the error handling of cs35l36_i2c_probe()
The driver should goto label 'err' when failing at regmap_read().

Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220510153251.1741210-3-zheyuma97@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-11 17:40:13 +01:00
Mark Brown
71013db522
ASoC: Intel: boards: Chromebook configuration updates
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

Two minor changes to enable DMIC and capture for CS35L41, and one new
configuration for AlderLake hardware.
2022-05-11 17:38:15 +01:00
Shengjiu Wang
7b46eb1bf9
ASoC: dt-bindings: fsl,micfil: Add compatible string for imx8mp
Add compatible string for imx8mp, which has micfil module

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1652087663-1908-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-10 14:01:56 +01:00
Shengjiu Wang
cb05dac1bc
ASoC: fsl_micfil: Add support for i.MX8MPlus
On i.MX8Plus there are two updates for micfil module.

One is that the output format is S32_LE, only the 24 more
significative bits have information, the other bits are always
zero. Add 'formats' variable in soc data to distinguish the
format on different platform.
Another is that the fifo depth is 32 entries.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1652087663-1908-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-10 14:01:55 +01:00
YC Hung
2cb29da3f2
ASoC: SOF: ipc: introduce cont_update_posn in sof_ipc_stream_params struct
The host stream position is updated when no_stream_position is set as 0.
However current implementation updates host stream position only when
report data is larger than or equal to host period size which is decided
by the period size of host side. It maybe cause host stream position
update not in time. Therefore this patch introduces another field
"cont_update_posn", a boolean value aimed to update host stream position
continuously and based on period size of pipeline. It can get better
precise when need to update host stream position from firmware.

Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220509170425.54640-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-10 14:01:54 +01:00
Yang Yingliang
9d62ba9426
ASoC: samsung: spdif: remove unnecessary check of mem_res
The resource is checked in probe function, so there is
no need do this check in remove function.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220510124749.2663874-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-10 14:01:53 +01:00
Brent Lu
cebbefbd22
ASoC: Intel: sof_ssp_amp: enable capture stream from cs35l41
Enable capture stream of the cs35l41 dai link to support feedback
stream from amplifier.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220509170922.54868-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-10 14:01:51 +01:00
Brent Lu
d1c808765d
ASoC: Intel: sof_ssp_amp: fix no DMIC BE Link on Chromebooks
The SOF topology supports 2 BE Links(dmic01 and dmic16k) and each
link supports up to four DMICs. However, Chromebook does not implement
ACPI NHLT table so the mach->mach_params.dmic_num is always zero. We
add a quirk so machine driver knows it's running on a Chromebook and
need to create BE Links for DMIC.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220509170922.54868-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-10 14:01:50 +01:00
Vamshi Krishna
0b56ed197d
ASoC: Intel: sof_rt5682: Add support for adl_rt1019_rt5682s
This patch adds the driver data for two rt1019 speaker amplifiers on
SSP1 and rt5682s on SSP0 for ADL platform

Reviewed-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Vamshi Krishna <vamshi.krishna.gopal@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220509170922.54868-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-10 14:01:49 +01:00
Zheyu Ma
e1c9f68aa2
ASoC: tlv320adcx140: Register a callback to disable the regulator_disable
The driver should register a callback that will deal with the disabling
when it fails to probe.

Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Link: https://lore.kernel.org/r/20220510053031.1685337-1-zheyuma97@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-10 12:31:32 +01:00
Pierre-Louis Bossart
5118da41c7
ASoC: codecs: rt715-sdca: remove useless assignment of ops
The ops are already part of the 'struct sdw_driver', it's unclear why
this was copied into the 'slave' structure - no other driver does so.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220509185729.59884-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-10 12:31:31 +01:00
Mark Brown
795dd8d3b8
Clean up usage of the endianness flag
Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>:

Before componentisation any part registered as a CODEC would have
automatically supported both little and big endian, ie. the core
would duplicate any supported LE or BE PCM format to support the other
endian as well. As componentisation removed the distinction between
CODEC drivers and platform drivers, a flag was added to specify
if this behaviour is required for a particular component. However,
as most systems tend to use little endian the absence of the flag
is rarely noticed. Also the naming of the flag "endianness" is a
little unobvious as to if it should be applied to a particular
component.

This series adds a comment to better explain the meaning of the
flag and then tidys up the usage of the flag. A couple of uses
of the flag are removed where is has been used inappropriately
on the CPU side of the DAI link, this is clearly not valid in the
cases it has been used, and I suspect never would be valid. Then
some redundant formats are removed, since they would be covered by
existing endianness flags. And finally a bunch of devices that are
missing the flag have it added.

It is worth noting that since componenisation there are now a couple
of cases where it is not entire clear to me that the flag should
be applied to all CODECs as it was before. In those cases I haven't
updated the driver to add the flag and they are outlined here:

1) Build into the AP CODECs, these are actual silicon inside the main
processor and they typically receive audio directly from an internal
bus. It is not obvious to me that these can happily ignore endian. On
the CODEC side these include: jz4725b.c, jz4760.c, jz4770.c,
rk3328_codec.c, lpass-va-macro.c, lpass-rx-macro.c, lpass-tx-macro.c,
lpass-wsa-macro.c. There are also some examples of this scattered
around the various platform support directories in sound/soc.

2) Devices behind non-audio buses, SPI just moves bits and doesn't
really define an endian for audio data on the bus. Thus it seems the
CODEC probably can care about the endian. The only devices that fall
into this group (mostly for AoV) are: rt5514-spi.c, rt5677-spi.c,
cros_ec_codec.c (only the AoV).

3) CODECs with no DAIs, these could specify the flag and plenty of
them do; CODECs from the initial conversion to componentisation. But
the flag makes no difference here since there is nothing for it to
apply to. This includes purely analogue CODECs: aw8738.c, ssm2305.c,
tpa6130a2.c, tda7419.c, max9759.c, max9768.c, max9877.c, lm4857.c,
simple-mux.c, simple-amplifier.c. And devices that only do jack
detection: ts3a227e.c, mt6359-accdet.c.

If there are any opinions on adding the flag to any of those three
groups they would be greatfully received. But I am leaning towards
leaving 1,2 without endianness flags since it feels inappropriate,
and removing the endian flag from devices in catagory 3 that already
have it. Assuming no one objects to that I will do a follow up
series for that.
2022-05-10 12:12:50 +01:00
Mark Brown
d491db14df
ASoC: SOF: sof-client: Update for different IPC versions
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

Hi,

The current IPC client infrastructure can only be used with IPC3.
This series carries updates for the core side of the client support to handle
IPC4 messages and updates the ipc message injector to be usable with IPC4.

The IPC flood test is only supported by SOF_IPC (IPC3), we are not going to
create the aux device for it at all if the firmware is using IPC4.

Regards,
Peter
---
Peter Ujfalusi (8):
  ASoC: SOF: sof-client: Add API to get the maximum IPC payload size
  ASoC: SOF: ipc-msg-injector: Query the maximum IPC payload size
  ASoC: SOF: sof-client-probes: Query the maximum IPC payload size
  ASoC: SOF: sof-client: Add API to get the ipc_type
  ASoC: SOF: sof-client: Add support IPC4 message sending
  ASoC: SOF: ipc-msg-injector: Separate the message sending
  ASoC: SOF: ipc-msg-injector: Add support for IPC4 messages
  ASoC: SOF: sof-client: IPC flood test can only work with SOF_IPC

 sound/soc/sof/sof-client-ipc-msg-injector.c | 181 ++++++++++++++++++--
 sound/soc/sof/sof-client-probes.c           |   5 +-
 sound/soc/sof/sof-client.c                  |  66 ++++++-
 sound/soc/sof/sof-client.h                  |   2 +
 4 files changed, 227 insertions(+), 27 deletions(-)

--
2.36.0
2022-05-09 22:12:23 +01:00
Nícolas F. R. A. Prado
d94d148695
ASoC: dt-bindings: mediatek: mt8192: Drop i2s-share properties
This reverts commit e056cf4341 ("ASoC: dt-bindings: mediatek: mt8192: Add
i2s-share properties") which was merged while the property name and
definition were still being discussed. Revert the commit for now and a
follow up commit will re-add the property after it is further discussed
and reviewed.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20220509185625.580811-1-nfraprado@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-09 20:01:07 +01:00
Peter Ujfalusi
e813526e55
ASoC: SOF: trace: The dtrace is only available with SOF_IPC
Currently the dtrace only supported with SOF_IPC.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@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/20220506130229.23354-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-09 19:46:39 +01:00
Mark Brown
29f4078f77
ASoC: sam9g20_wm8731: Use dev_err_probe() for snd_soc_register_card()
Log the error code when snd_soc_regster_card() fails, but fold in the
silencing of deferred probe errors.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Link: https://lore.kernel.org/r/20220506130349.451452-1-broonie@kernel.org
2022-05-09 19:46:35 +01:00
YueHaibing
0e63a2be56
ASoC: mediatek: mt8195: Fix build warning without CONFIG_OF
sound/soc/mediatek/mt8195/mt8195-mt6359.c:1639:32: warning: ‘mt8195_mt6359_max98390_rt5682_card’ defined but not used [-Wunused-variable]
 1639 | static struct mt8195_card_data mt8195_mt6359_max98390_rt5682_card = {
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt8195/mt8195-mt6359.c:1634:32: warning: ‘mt8195_mt6359_rt1011_rt5682_card’ defined but not used [-Wunused-variable]
 1634 | static struct mt8195_card_data mt8195_mt6359_rt1011_rt5682_card = {
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/mediatek/mt8195/mt8195-mt6359.c:1629:32: warning: ‘mt8195_mt6359_rt1019_rt5682_card’ defined but not used [-Wunused-variable]
 1629 | static struct mt8195_card_data mt8195_mt6359_rt1019_rt5682_card = {
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Since all users of this driver do need CONFIG_OF anyway, there is no
need to save a few bytes on kernel builds while CONFIG_OF disabled, so
just remove the #ifdef to fix this warning.

Fixes: 86a6b9c9df ("ASoC: mediatek: mt8195: add machine support for max98390 and rt5682")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20220509120918.9000-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-09 19:04:37 +01:00
Lukasz Majewski
3a3610aaa9
ASoC: wm8940: add devicetree support
This adds devicetree support to the wm8940 codec driver.
With a DT-based kernel, there is no board-specific setting
to select the driver so allow it to be manually chosen.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220509121055.31103-1-lukma@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-09 19:04:36 +01:00
Lukasz Majewski
29e87c4f62
doc: dts: Add device tree information regarding wm8940 codec
This commit provides documentation entry for wm8940 codec.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220509121313.31216-1-lukma@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-09 19:04:35 +01:00
Peter Ujfalusi
5889ccdd09
ASoC: SOF: sof-client: IPC flood test can only work with SOF_IPC
Currently the ipc flood test is only supported with SOF_IPC.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@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/20220506132647.18690-9-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-09 18:18:03 +01:00
Peter Ujfalusi
066c67624d
ASoC: SOF: ipc-msg-injector: Add support for IPC4 messages
The IPC message representation of an IPC4 differs from the IPC3 version
significantly.

The message for IPC4 should be written to the debugfs file in this form:
0-7 IPC4 header (2x u32)
8-  additional payload, if any

The reply is given back in the same form.

The message size limitation is the same as with the IPC3, only messages
which can fit to the mailbox can be injected (and received).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220506132647.18690-8-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-09 18:18:02 +01:00
Peter Ujfalusi
a9aa3381e4
ASoC: SOF: ipc-msg-injector: Separate the message sending
Move out the code for sending the IPC message into a separate helper
function in preparation for support for handling IPC4 communication.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220506132647.18690-7-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-09 18:18:00 +01:00
Peter Ujfalusi
100c937431
ASoC: SOF: sof-client: Add support IPC4 message sending
In order to be able to send an IPC4 message, the
sof_client_ipc_tx_message() needs to parse the tx message differently to
extract the size.

The IPC notification registration is done by providing the notification
type and the whole message is passed to the client when a match is found.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220506132647.18690-6-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-09 18:17:59 +01:00
Peter Ujfalusi
cdf8233d2c
ASoC: SOF: sof-client: Add API to get the ipc_type
Provide a way for the client drivers to query the ipc_type used by the
firmware.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220506132647.18690-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-09 18:17:58 +01:00
Peter Ujfalusi
a1e5bbc8ea
ASoC: SOF: sof-client-probes: Query the maximum IPC payload size
Instead of using the SOF_IPC_MSG_MAX_SIZE as the maximum payload size for
and IPC message, use the provided API to query it.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220506132647.18690-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-09 18:17:57 +01:00
Peter Ujfalusi
ef368c3347
ASoC: SOF: ipc-msg-injector: Query the maximum IPC payload size
Instead of using the SOF_IPC_MSG_MAX_SIZE as the maximum payload size for
and IPC message, use the provided API to query it.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220506132647.18690-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-09 18:17:56 +01:00
Peter Ujfalusi
a669ec5f4b
ASoC: SOF: sof-client: Add API to get the maximum IPC payload size
Provide a way for the client drivers to query the maximum payload size of
an IPC message.
Currently clients do not have access to this information and they can only
use the SOF_IPC_MSG_MAX_SIZE defined value.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220506132647.18690-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-09 18:17:55 +01:00
Mark Brown
17770e66a7
Add missing dt-binding properties for audio components on mt8192-asurada
Merge series from Nícolas F. R. A. Prado <nfraprado@collabora.com>:

These patches add properties that were missing on the dt-bindings of the
audio components used by mt8192-asurada. Namely the i2s-share
properties for the sound platform and the #sound-dai-cells on the
rt1015p and rt5682 codecs when they're referenced by the machine sound
node.

Nícolas F. R. A. Prado (3):
  ASoC: dt-bindings: mediatek: mt8192: Add i2s-share properties
  ASoC: dt-bindings: rt1015p: Add #sound-dai-cells
  ASoC: dt-bindings: rt5682: Add #sound-dai-cells

 Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml  | 5 +++++
 Documentation/devicetree/bindings/sound/realtek,rt1015p.yaml | 3 +++
 Documentation/devicetree/bindings/sound/rt5682.txt           | 2 ++
 3 files changed, 10 insertions(+)

--
2.36.0
2022-05-09 18:16:54 +01:00
Minghao Chi
5cb3bdd6bd
ASoC: pcm186x: simplify the return expression of pcm186x_power_off()
Simplify the return expression.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220505022102.54650-1-chi.minghao@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-09 12:48:43 +01:00
Minghao Chi
74eaa8126f
ASoC: mediatek: simplify the return expression of mtk_dai_pcm_prepare()
Simplify the return expression.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220505021808.54337-1-chi.minghao@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-09 12:48:42 +01:00
Minghao Chi
ef1258a782
ASoC: uniphier: simplify the return expression of uniphier_aio_compr_set_params()
Simplify the return expression.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220505021733.54275-1-chi.minghao@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-09 12:48:41 +01:00
Nícolas F. R. A. Prado
0adccaf1ea
ASoC: dt-bindings: rt5682: Add #sound-dai-cells
The rt5682 codec can be pointed to through a sound-dai property to be
used as part of a machine sound driver. dtc expects #sound-dai-cells to
be defined in the codec's node in those cases, so add it in the
dt-binding and set it to 0.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20220429203039.2207848-4-nfraprado@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-09 12:47:00 +01:00
Nícolas F. R. A. Prado
2f45536587
ASoC: dt-bindings: rt1015p: Add #sound-dai-cells
The rt1015p codec can be pointed to through a sound-dai property to be
used as part of a machine sound driver. dtc expects #sound-dai-cells to
be defined in the codec's node in those cases, so add it in the
dt-binding and set it to 0.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20220429203039.2207848-3-nfraprado@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-09 12:46:59 +01:00
Nícolas F. R. A. Prado
e056cf4341
ASoC: dt-bindings: mediatek: mt8192: Add i2s-share properties
The Mediatek AFE PCM controller for MT8192 allows sharing of an I2S bus
between two busses. Add a pattern for these properties in the
dt-binding.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20220429203039.2207848-2-nfraprado@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-09 12:46:58 +01:00