Commit graph

1121662 commits

Author SHA1 Message Date
Xiangsheng Hou
b9320f545e
dt-bindings: mediatek: Add axi clock in mt8173 dts example
For mt8173, it is needed to add the axi clock for dma mode.

Signed-off-by: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220725120204.10834-1-xiangsheng.hou@mediatek.com

Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-28 22:04:50 +01:00
Venkata Prasad Potturu
99a387c781
ASoC: amd: acp: Modify dai_id macros to be more generic
Change dai_id macros to make I2S instances in order.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://lore.kernel.org/r/20220826064250.3302260-1-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-28 22:04:03 +01:00
Mark Brown
c18b6c188c
ASoC: Cleanup deprecated regmap-irq functionality
Merge series from Aidan MacDonald <aidanmacdonald.0x0@gmail.com>:

Update two ASoC codec drivers to remove uses of regmap-irq type
registers, which have recently been deprecated by the "regmap-irq
cleanups and refactoring" series in linux-next.

Link: https://lore.kernel.org/lkml/20220623211420.918875-1-aidanmacdonald.0x0@gmail.com/
2022-08-28 21:58:57 +01:00
Aidan MacDonald
de3287f177
ASoC: wcd938x: Remove spurious type_base from irq chip
There is no reason to set type_base here: the chip doesn't set
num_type_regs and none of the IRQs have type information so it's
not possible for regmap-irq to configure IRQ types.

Type registers are also deprecated in regmap-irq, so any IRQ type
support in the future should be implemented using config registers
instead.

Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
Link: https://lore.kernel.org/r/20220721102558.25457-3-aidanmacdonald.0x0@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-28 20:20:10 +01:00
Aidan MacDonald
255a03bb1b
ASoC: wcd9335: Convert irq chip to config regs
Type registers in regmap-irq have been deprecated in favor of config
registers, which are more general. Chips using type_base can switch
over to a single config base register and a standard ->set_irq_type()
callback provided by regmap-irq, which uses the type info associated
with each 'struct regmap_irq' to update type registers in the same
way as the old code did.

Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
Link: https://lore.kernel.org/r/20220721102558.25457-2-aidanmacdonald.0x0@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-28 20:20:01 +01:00
Martin Povišer
aca86ec9a0
ASoC: tas2764: Export highpass filter setting
Expose a control for the setting of 'DC blocker' highpass filter in the
playback path of TAS2764.

Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220825140241.53963-6-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-25 18:00:00 +01:00
Martin Povišer
dae191fb95
ASoC: tas2764: Add IRQ handling
Add an IRQ handler which logs detected faults (but doesn't do anything
else).

Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220825140241.53963-5-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-25 17:59:59 +01:00
Martin Povišer
f5ad67f136
ASoC: tas2764: Fix mute/unmute
Because the PWR_CTRL field is modeled as the power state of the DAC
widget, and at the same time it is used to implement mute/unmute, we
need some additional book-keeping to have the right end result no matter
the sequence of calls. Without this fix, one permanently mutes an
ongoing stream by toggling the associated speaker pin control.

(This mirrors commit 1e5907bcb3 ("ASoC: tas2770: Fix handling of
mute/unmute") which was a fix to the tas2770 driver.)

Fixes: 827ed8a0fa ("ASoC: tas2764: Add the driver for the TAS2764")
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220825140241.53963-4-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-25 17:59:58 +01:00
Martin Povišer
09273f3883
ASoC: tas2764: Drop conflicting set_bias_level power setting
The driver is setting the PWR_CTRL field in both the set_bias_level
callback and on DAPM events of the DAC widget (and also in the
mute_stream method). Drop the set_bias_level callback altogether as the
power setting it does is in conflict with the other code paths.

(This mirrors commit c8a6ae3fe1c8 ("ASoC: tas2770: Drop conflicting
set_bias_level power setting") which was a fix to the tas2770 driver.)

Fixes: 827ed8a0fa ("ASoC: tas2764: Add the driver for the TAS2764")
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220825140241.53963-3-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-25 17:59:57 +01:00
Martin Povišer
23204d928a
ASoC: tas2764: Allow mono streams
The part is a mono speaker amp, but it can do downmix and switch between
left and right channel, so the right channel range is 1 to 2.

(This mirrors commit bf54d97a83 ("ASoC: tas2770: Allow mono streams")
which was a fix to the tas2770 driver.)

Fixes: 827ed8a0fa ("ASoC: tas2764: Add the driver for the TAS2764")
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220825140241.53963-2-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-25 17:59:56 +01:00
Kuninori Morimoto
6bbabd2880
ASoC: soc-pcm.c: call __soc_pcm_close() in soc_pcm_close()
commit b7898396f4 ("ASoC: soc-pcm: Fix and cleanup DPCM locking")
added __soc_pcm_close() for non-lock version of soc_pcm_close().
But soc_pcm_close() is not using it. It is no problem, but confusable.

	static int __soc_pcm_close(...)
	{
=>		return soc_pcm_clean(rtd, substream, 0);
	}

	static int soc_pcm_close(...)
	{
		...
		snd_soc_dpcm_mutex_lock(rtd);
=>		soc_pcm_clean(rtd, substream, 0);
		snd_soc_dpcm_mutex_unlock(rtd);
		return 0;
	}

This patch use it.

Fixes: b7898396f4 ("ASoC: soc-pcm: Fix and cleanup DPCM locking")
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87czctgg3w.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-25 17:58:30 +01:00
Mark Brown
cd3b9a0f20
ASoC platform driver for Apple MCA
Merge series from Martin Povišer <povik+lin@cutebit.org>:

sending what should be the final touches on Apple MCA driver. It most
likely goes without saying but please do not merge the DT additions
into the ASoC tree.
2022-08-25 16:24:42 +01:00
Yang Yingliang
4a34613b20
ASoC: sigmadsp: switch to use kmemdup_nul() helper
Use kmemdup_nul() helper instead of open-coding to
simplify the code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220825123525.1845695-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-25 14:17:33 +01:00
Martin Povišer
6ed462d1c1
ASoC: Add Apple MCA I2S transceiver bindings
Add binding schema for MCA I2S transceiver found on Apple M1 and other
chips.

Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220824160715.95779-2-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-25 13:51:36 +01:00
Martin Povišer
4065f0b25b
ASoC: apple: mca: Add locking
In DAI ops, accesses to the native cluster (of the DAI), and to data of
clusters related to it by a DPCM frontend-backend link, should have
been synchronized by the 'pcm_mutex' lock at ASoC level.

What is not covered are the 'port_driver' accesses on foreign clusters
to which the current cluster has no a priori relation, so fill in
locking for that. (This should only matter in bizarre configurations of
sharing one MCA peripheral between ASoC cards.)

Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220824160715.95779-5-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-25 13:51:35 +01:00
Martin Povišer
3df5d0d972
ASoC: apple: mca: Start new platform driver
Add ASoC platform driver for the MCA peripheral found on Apple M1 and
other chips.

Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220824160715.95779-4-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-25 13:51:34 +01:00
Mark Brown
fcc245c6f6
ASoC: SOF: mediatek: update SOF driver for mt8186
Merge series from Chunxu Li <chunxu.li@mediatek.com>:

In these patches, we update SOF driver for mt8186
2022-08-25 13:37:57 +01:00
Tommaso Merciai
671d119e75
ASoC: max98088: add support for noise gate reg
Add support for Noise Gate Threshold reg (ANTH reg 0x40 bit 4 to 7)

References:
 - https://datasheets.maximintegrated.com/en/ds/MAX98089.pdf, p75

Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
Link: https://lore.kernel.org/r/20220825101714.81580-1-tommaso.merciai@amarulasolutions.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-25 12:29:33 +01:00
Zhu Ning
4bac47a7b2
ASoC: codecs: add suspend and resume for ES8316
The registers may be lost after suspend due to powerdown.
regcache_sync solves this issue.

Signed-off-by: Zhu Ning <zhuning@everest-semi.com>
Link: https://lore.kernel.org/r/20220825014952.1038508-1-zhuning0077@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-25 12:29:32 +01:00
Chunxu Li
059846071f
ASoC: SOF: mediatek: Use generic implementation for .ipc_msg_data field
Use generic sof_ipc_msg_data instead of specific implementation as
they do the same things

Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220825065411.31279-4-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-25 12:29:30 +01:00
Chunxu Li
82e93430e0
ASoC: SOF: mediatek: add snd_sof_dsp_ops callbacks for pcm and mail box
Use generic IPC stream and mailbox ops for mt8186

Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220825065411.31279-3-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-25 12:29:29 +01:00
Chunxu Li
f3b75e9b56
ASoC: SOF: mediatek: Add dai driver for mt8186
Add dsp ops callback to register AFE DL1/DL2/UL1/UL2 SOF dai's with ALSA

Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220825065411.31279-2-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-25 12:29:28 +01:00
Mark Brown
906aaf3891
ASoC: mediatek: dt-bindings: modify machine
Merge series from Chunxu Li <chunxu.li@mediatek.com>:

Add SOF related field.
1. Add a property "mediatek,adsp", Only when adsp phandle could be retrieved,
 from DTS, the SOF related part of machine driver is executed.
2. Add a property "mediatek,dai-link" to support dai-links could be specified
 from DTS
2022-08-24 17:23:44 +01:00
chunxu.li
1173107d7c
ASoC: mediatek: dt-bindings: modify machine bindings for SOF
Add SOF related field.
1. Add a property "mediatek,adsp", Only when adsp phandle could be
retrieved, from DTS, the SOF related part of machine driver is executed.
2. Add a property "mediatek,dai-link" to support dai-links could be
specified from DTS

Signed-off-by: chunxu.li <chunxu.li@mediatek.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220824122319.23918-3-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-24 13:53:06 +01:00
chunxu.li
0db49765ee
ASoC: mediatek: dt-bindings: modify machine bindings for SOF
Add SOF related field.
1. Add a property "mediatek,adsp", Only when adsp phandle could be
retrieved, from DTS, the SOF related part of machine driver is executed.
2. Add a property "mediatek,dai-link" to support dai-links could be
specified from DTS

Signed-off-by: chunxu.li <chunxu.li@mediatek.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220824122319.23918-2-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-24 13:53:05 +01:00
Yang Yingliang
adc641f1db
ASoC: SOF: imx8ulp: add missing of_node_put() in imx8ulp_probe()
After using 'res_node' returned by of_parse_phandle(), of_node_put()
need be called to decrease the refcount.

Fixes: fb5319af6a ("ASoC: SOF: imx: Add i.MX8ULP HW support")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220824013234.375738-2-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-24 12:21:28 +01:00
Nathan Chancellor
7d3ac70d82
ASoC: codes: src4xxx: Avoid clang -Wsometimes-uninitialized in src4xxx_hw_params()
Clang warns:

  sound/soc/codecs/src4xxx.c:280:3: error: variable 'd' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
                  default:
                  ^~~~~~~
  sound/soc/codecs/src4xxx.c:298:59: note: uninitialized use occurs here
                  ret = regmap_write(src4xxx->regmap, SRC4XXX_RCV_PLL_11, d);
                                                                          ^
  sound/soc/codecs/src4xxx.c:223:20: note: initialize the variable 'd' to silence this warning
          int val, pj, jd, d;
                            ^
                            = 0
  sound/soc/codecs/src4xxx.c:280:3: error: variable 'jd' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
                  default:
                  ^~~~~~~
  sound/soc/codecs/src4xxx.c:293:59: note: uninitialized use occurs here
                  ret = regmap_write(src4xxx->regmap, SRC4XXX_RCV_PLL_10, jd);
                                                                          ^~
  sound/soc/codecs/src4xxx.c:223:17: note: initialize the variable 'jd' to silence this warning
          int val, pj, jd, d;
                        ^
                          = 0
  sound/soc/codecs/src4xxx.c:280:3: error: variable 'pj' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
                  default:
                  ^~~~~~~
  sound/soc/codecs/src4xxx.c:288:59: note: uninitialized use occurs here
                  ret = regmap_write(src4xxx->regmap, SRC4XXX_RCV_PLL_0F, pj);
                                                                          ^~
  sound/soc/codecs/src4xxx.c:223:13: note: initialize the variable 'pj' to silence this warning
          int val, pj, jd, d;
                    ^
                      = 0
  3 errors generated.

The datasheet does not have any default values for these regmap values
so pick some arbitrary values and print to the user that this is the
case to silence the warnings.

Link: https://github.com/ClangBuiltLinux/linux/issues/1691
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: "Sudip Mukherjee (Codethink)" <sudipm.mukherjee@gmail.com>
Suggested-by: Matt Flax <flatmax@flatmax.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Matt Flax <flatmax@flatmax.com>
Link: https://lore.kernel.org/r/20220823151939.2493697-1-nathan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 22:54:30 +01:00
Peter Ujfalusi
3b99852f4c
ASoC: SOF: Intel: hda: Skip IMR boot after a firmware crash or boot failure
To make sure that we start from a clean state next time when the DSP is
powered up after a firmware crash or boot failure we must skip the IMR
booting attempt.

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>
Link: https://lore.kernel.org/r/20220823124359.24865-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 19:52:41 +01:00
Rob Herring
9e10a1ded6
ASoC: dt-bindings: Add missing (unevaluated|additional)Properties on child nodes
In order to ensure only documented properties are present, node schemas
must have unevaluatedProperties or additionalProperties set to false
(typically).

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220823145649.3118479-8-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 19:52:40 +01:00
Peter Ujfalusi
a337c20127
ASoC: SOF: ipc4-loader: Verify ext manifest magic number
Firmware image must start with an extended manifest. Add a check to make
sure that the image does contain it.

The magic number (the first u32 of a firmware image if manifest is present)
for an IPC4 image must be 0x31454124 (ASCI "$AE1").

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220823124219.927-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 19:52:38 +01:00
Pierre-Louis Bossart
1332d2078a
ASoC: SOF: imx: imx8ulp: declare ops structure as static
Sparse warning:

sound/soc/sof/imx/imx8ulp.c:416:24: error: symbol 'sof_imx8ulp_ops'
was not declared. Should it be static?

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220823154027.762889-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 19:52:37 +01:00
Shengjiu Wang
837b40293d
ASoC: fsl_sai: Update slots number according to bclk_ratio
The bclk_ratio is set by .set_bclk_ratio API.
bclk_ratio = slots * slot_width
So if slots is not set by .set_tdm_slot, then it can be calculated
by bclk_ratio.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1659681926-13493-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 19:52:36 +01:00
Mark Brown
d4a9fd8292
ASoC: SOF: Intel: hda: Correct Firmware State Register use
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

Hi,

The FSR (Firmware State Register) holds the ROM state information, it does not
contain error information.
The FSR itself is a bit more complicated as well as the state depends on the
module currently in use.

The error code from ROM or the status code from the firmware is located at the
next register.

Fix the handling of the FSR in order to provide usable and human readable (in
most cases) report on the status and error.

Regards,
Peter
---
Peter Ujfalusi (3):
  ASoC: SOF: Intel: hda: Correct the ROM/FW state reporting code
  ASoC: SOF: Intel: hda-loader: Use the FSR state definitions during
    bootup
  ASoC: SOF: Intel: hda: Drop no longer used ROM state definitions

 sound/soc/sof/intel/hda-loader.c |  10 +--
 sound/soc/sof/intel/hda.c        | 147 ++++++++++++++++++++++++++-----
 sound/soc/sof/intel/hda.h        |  69 +++++++++++++--
 3 files changed, 194 insertions(+), 32 deletions(-)

--
2.37.0
2022-08-23 19:48:41 +01:00
Mark Brown
78f0ecf3c3
Introduce sof_of_machine_select
Merge series from Chunxu Li <chunxu.li@mediatek.com>:

In these patches, we introduce function sof_of_machine_select for SOF
2022-08-23 19:48:39 +01:00
Chunxu Li
2dec9e09e9
ASoC: SOF: mediatek: Add sof_mt8186_machs for mt8186
Add .of_machines field sof_mt8186_machs for mt8186

Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220805070449.6611-3-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 18:22:43 +01:00
Chunxu Li
6ace85b983
ASoC: SOF: Introduce function sof_of_machine_select
From current design in sof_machine_check and snd_sof_new_platform_drv,
the SOF can only support ACPI type machine.

1. In sof_machine_check if there is no ACPI machine exist, the function
will return -ENODEV directly, that's we don't expected if we do not
base on ACPI machine.

2. In snd_sof_new_platform_drv the component driver need a driver name
to do ignore_machine, currently the driver name is obtained from
machine->drv_name, and the type of machine is snd_soc_acpi_mach.

So we add a new function named sof_of_machine_select that we can pass
sof_machine_check and obtain info required by snd_sof_new_platform_drv.

Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220805070449.6611-2-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 18:22:29 +01:00
Peter Ujfalusi
8613753a68
ASoC: SOF: Intel: hda: Drop no longer used ROM state definitions
All code have been switched to use the new FSR defines and macros for
ROM/FW state tracking.
The old definitions can be dropped now.

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: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220712125734.30512-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 14:10:02 +01:00
Peter Ujfalusi
43a03d2470
ASoC: SOF: Intel: hda-loader: Use the FSR state definitions during bootup
Switch to use the newly added FSR (Firmware State Register) definitions
for DSP state handling and targeting.

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: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220712125734.30512-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 14:10:01 +01:00
Shengjiu Wang
8863057540
ASoC: fsl_sai: Add support multi fifo sdma script
With disabling combine mode, the multiple successive
FIFO registers or non successive FIFO registers of SAI module
can work with the sdma multi fifo script.

This patch is to configure the necessary information to
the SDMA engine driver for support multi fifo script.

'words_per_fifo' is the channels for each dataline
'n_fifos_src' and 'n_fifos_dst' are the fifo number
'stride_fifos_src' and 'stride_fifos_dst' are the stride
between enable FIFOs
'maxburst' is the multiply of datalines

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1661218573-2154-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 13:04:53 +01:00
Daniel Baluta
d45f552a1e
ASoC: SOF: compress: Remove dai_posn variable
dai_posn is set but never used. Initial intention was
to use dai_posn to shorthen one code line but it looks fine
without it too.

Fixes: c1a731c713 ("ASoC: SOF: compress: Add support for computing timestamps")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20220822174937.254873-1-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 13:04:52 +01:00
ye xingchen
62bd431bac
ASoC: atmel_ssc_dai: Remove the unneeded result variable
Return the value from asoc_ssc_init() directly instead of storing it
in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/20220823075335.209072-1-ye.xingchen@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 13:04:51 +01:00
chunxu.li
e8ee449bd7
ASoC: mediatek: mt8186: rename sound card name
The field 'topology_shortname' in 'snd_soc_card' is defined as char[32],
Current card name will be truncated when SOF is enabled, so rename the
sound card name.

Signed-off-by: chunxu.li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220823090735.12176-1-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23 13:04:50 +01:00
Jonathan Cameron
94f0727483
ASoC: samsung: Use iio_get_channel_type() accessor.
struct iio_chan_spec is meant to be opaque to IIO consumer drivers
which should only use the interfaces in linux/iio/consumer.h.
Use the provided accessor function to find get the type of the
channel instead of directly reading it form the structure.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Link: https://lore.kernel.org/r/20220821160914.2207116-1-jic23@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-22 14:07:22 +01:00
Kuninori Morimoto
4d45d944e8
ASoC: soc-pcm.c: summarize related settings at soc_new_pcm()
soc_new_pcm() sets pcm->no_device_suspend, but it sets other pcm->xxx
at the same function with different timing.
pcm->no_device_suspend setup timing has no effect. This patch tidyup it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87bksdgflq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-22 14:07:21 +01:00
Mark Brown
a59bf85191
ASoC: mediatek: support SOF for mt8186
Merge series from Chunxu Li <chunxu.li@mediatek.com>:

In these patches, we add SOF support for mt8186 which have HiFi5 DSP
inside.
2022-08-19 23:46:57 +01:00
Dan Carpenter
a74ec0bf5b
ASoC: amd: acp: remove unnecessary NULL checks
The list iterator can never be NULL.  Delete the bogus NULL checks.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/Yv8ePUuBfzaRu6xV@kili
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-19 13:20:00 +01:00
Martin Povišer
ceff365a29
ASoC: Change handling of unimplemented set_bclk_ratio
If a 'set_bclk_ratio' call is attempted on a DAI not implementing the
method, make it an -ENOSUPP error instead of -EINVAL. Assume the DAI can
still be okay with the ratio, just does not care to register a handler.

No current in-tree users of snd_soc_dai_set_bclk_ratio seem to inspect
the return value, but -ENOSUPP disables an error print from within the
common soc_dai_ret return filter. With the new behavior a machine
driver can do a blanket 'set_bclk_ratio' on all DAIs on a bus, some of
which may care about the ratio, some of which may not.

Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220818165336.76403-1-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-19 13:19:59 +01:00
Yang Yingliang
fd8ec75207
ASoC: amd: acp: add a label to make error path more clean
Move platform_device_unregister() to a new label to make code more clean.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220819073758.1273160-3-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-19 13:19:58 +01:00
Yang Yingliang
f89a8c5bb3
ASoC: amd: acp: switch to use dev_err_probe()
Use dev_err_probe() to simplify code and print error code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220819073758.1273160-2-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-19 13:19:57 +01:00
Yang Yingliang
6a4ce20fd7
ASoC: amd: acp: add missing platform_device_unregister() in acp_pci_probe()
Add missing platform_device_unregister() in error path in acp_pci_probe().

Fixes: c49f5e74a1 ("ASoC: amd: acp: Add error handling cases")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220819073758.1273160-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-19 13:19:56 +01:00