Peter Ujfalusi [Mon, 25 Apr 2022 22:11:27 +0000 (15:11 -0700)]
ASoC: SOF: mediatek: mt8195: Do not set the load_module ops
The used firmware loader (snd_sof_load_firmware_memcpy) can use the generic
module loading, which is by default uses the same implementation as the
snd_sof_parse_module_memcpy.
No need to set the callback for this platform.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220425221129.124615-9-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Mon, 25 Apr 2022 22:11:26 +0000 (15:11 -0700)]
ASoC: SOF: Intel: bdw/byt/pci-tng: Do not set the load_module ops
The used firmware loader (snd_sof_load_firmware_memcpy) can use the generic
module loading, which is by default uses the same implementation as the
snd_sof_parse_module_memcpy.
No need to set the callback for these platforms.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220425221129.124615-8-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Mon, 25 Apr 2022 22:11:25 +0000 (15:11 -0700)]
ASoC: SOF: imx: Do not set the load_module ops
The used firmware loader (snd_sof_load_firmware_memcpy) can use the generic
module loading, which is by default uses the same implementation as the
snd_sof_parse_module_memcpy.
No need to set the callback for iMX.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220425221129.124615-7-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Mon, 25 Apr 2022 22:11:24 +0000 (15:11 -0700)]
ASoC: SOF: amd: renoir: Do not set the load_module ops
The used firmware loader (snd_sof_load_firmware_memcpy) can use the generic
module loading, which is by default uses the same implementation as the
snd_sof_parse_module_memcpy.
No need to set the callback for this platform.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220425221129.124615-6-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Mon, 25 Apr 2022 22:11:23 +0000 (15:11 -0700)]
ASoC: SOF: loader: Switch to use the fw_loader ops
Since we have the fw_loader ops implementation for IPC3, we can start
using it and remove most of the IPC dependent code from the file.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220425221129.124615-5-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Mon, 25 Apr 2022 22:11:22 +0000 (15:11 -0700)]
ASoC: SOF: ipc: Add check for fw_loader ops
Add checks for the mandatory fw_loader ops.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220425221129.124615-4-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Mon, 25 Apr 2022 22:11:21 +0000 (15:11 -0700)]
ASoC: SOF: ipc3-loader: Implement firmware parsing and loading
Add the IPC3 dependent implementation of validating the firmware image,
parsing the ext manifest and to load modules via memcpy.
The code introduced by this commit is the IPC dependent code from the
loader.c, which is going to be removed later.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220425221129.124615-3-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Mon, 25 Apr 2022 22:11:20 +0000 (15:11 -0700)]
ASoC: SOF: Introduce IPC dependent ops for firmware handling, loading
The parsing and loading of firmware modules/components are IPC dependent
operations as the organization of the firmware depends on the IPC it is
supporting.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220425221129.124615-2-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Hans de Goede [Wed, 27 Apr 2022 13:49:18 +0000 (15:49 +0200)]
ASoC: Intel: bytcr_rt5640: Add quirk for the HP Pro Tablet 408
Add a quirk for the HP Pro Tablet 408, this BYTCR tablet has no CHAN
package in its ACPI tables and uses SSP0-AIF1 rather then SSP0-AIF2 which
is the default for BYTCR devices.
It also uses DMIC1 for the internal mic rather then the default IN3
and it uses JD2 rather then the default JD1 for jack-detect.
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=211485
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220427134918.527381-1-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Wed, 27 Apr 2022 22:01:24 +0000 (23:01 +0100)]
ASoC: sh: rz-ssi: Trivial fixes
Merge series from Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>:
This patch series aims to fix trivial issues found in rz-ssi driver.
Mark Brown [Wed, 27 Apr 2022 22:01:23 +0000 (23:01 +0100)]
ASoC: SOF: use pm_runtime_resume_and_get()
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
simplify code pattern as recommended by Mark Brown.
Lad Prabhakar [Tue, 26 Apr 2022 07:49:22 +0000 (08:49 +0100)]
ASoC: sh: rz-ssi: Release the DMA channels in rz_ssi_probe() error path
DMA channels requested by rz_ssi_dma_request() in rz_ssi_probe() were
never released in the error path apart from one place. This patch fixes
this issue by calling rz_ssi_release_dma_channels() in the error path.
Fixes:
26ac471c5354 ("ASoC: sh: rz-ssi: Add SSI DMAC support")
Reported-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20220426074922.13319-4-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Lad Prabhakar [Tue, 26 Apr 2022 07:49:21 +0000 (08:49 +0100)]
ASoC: sh: rz-ssi: Propagate error codes returned from platform_get_irq_byname()
Propagate error codes returned from platform_get_irq_byname() instead of
returning -ENODEV. platform_get_irq_byname() may return -EPROBE_DEFER, to
handle such cases propagate the error codes.
While at it drop the dev_err_probe() messages as platform_get_irq_byname()
already does this for us in case of error.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20220426074922.13319-3-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Lad Prabhakar [Tue, 26 Apr 2022 07:49:20 +0000 (08:49 +0100)]
ASoC: sh: rz-ssi: Drop SSIFSR_TDC and SSIFSR_RDC macros
The mask values of SSIFSR_TDC and SSIFSR_RDC macros are incorrect and
they are unused in the file so just drop them.
Reported-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20220426074922.13319-2-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Tinghan Shen [Wed, 27 Apr 2022 07:10:30 +0000 (15:10 +0800)]
ASoC: SOF: mediatek: Fix allyesconfig build error
ld: sound/soc/sof/mediatek/mt8186/mt8186-clk.o:(.opd+0x18): multiple
definition of `adsp_clock_on';
sound/soc/sof/mediatek/mt8195/mt8195-clk.o:(.opd+0x60): first defined
here
ld: sound/soc/sof/mediatek/mt8186/mt8186-clk.o: in function
`.adsp_clock_on':
ld: sound/soc/sof/mediatek/mt8186/mt8186-clk.o:(.opd+0x30): multiple
definition of `adsp_clock_off';
sound/soc/sof/mediatek/mt8195/mt8195-clk.o:(.opd+0x78): first defined
here
ld: sound/soc/sof/mediatek/mt8186/mt8186-clk.o: in function
`.adsp_clock_off':
ld: sound/soc/sof/mediatek/mt8186/mt8186-loader.o:(.opd+0x0): multiple
definition of `sof_hifixdsp_boot_sequence';
sound/soc/sof/mediatek/mt8195/mt8195-loader.o:(.opd+0x0): first defined
here
ld: sound/soc/sof/mediatek/mt8186/mt8186-loader.o: in function
`.sof_hifixdsp_boot_sequence':
ld: sound/soc/sof/mediatek/mt8186/mt8186-loader.o:(.opd+0x18): multiple
definition of `sof_hifixdsp_shutdown';
sound/soc/sof/mediatek/mt8195/mt8195-loader.o:(.opd+0x18): first defined
here
ld: sound/soc/sof/mediatek/mt8186/mt8186-loader.o: in function
`.sof_hifixdsp_shutdown':
Fixes:
570c14dc92d5 ("ASoC: SOF: mediatek: Add mt8186 sof fw loader and
dsp ops")
Fixes:
210b3ab932f7 ("ASoC: SOF: mediatek: Add mt8186 dsp clock support")
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
Link: https://lore.kernel.org/r/20220427071030.10172-1-tinghan.shen@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Tue, 26 Apr 2022 20:05:39 +0000 (22:05 +0200)]
ASoC: Intel: avs: Drop direct ACPI dependency
With previous patch this allows for building driver on architectures
without ACPI support present, when building with COMPILE_TEST enabled.
Fixes:
47a1886a610a ("ASoC: Intel: avs: Enable AVS driver only on x86 platforms")
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20220426200539.894010-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Tue, 26 Apr 2022 20:05:38 +0000 (22:05 +0200)]
ALSA: hda: intel-nhlt: Move structs out of #define block
As functions prototypes regerdless of CONFIG options as well as some
code depend on structures defined in sound/intel-nhlt.h header, move
them out of #define block. This allows to compile code depending on
mentioned header with "depends on ACPI || COMPILE_TEST" in Kconfig.
Fixes:
47a1886a610a ("ASoC: Intel: avs: Enable AVS driver only on x86 platforms")
Reported-by: kernel test robot <lkp@intel.com>
Suggested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20220426200539.894010-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
YC Hung [Tue, 26 Apr 2022 18:34:59 +0000 (13:34 -0500)]
ASoC: SOF: mediatek: mt8195 change ipc timeout as 1 second
The IPC message sending can take longer than the default 500ms during
system boot up due to the concurrent loading of different drivers.
Increase the IPC timeout to 1 second to avoid timeout errors due to
Linux load and scheduling.
Reviewed-by: Curtis Malainey <cujomalainey@chromium.org>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@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/20220426183459.102251-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Tue, 26 Apr 2022 18:36:31 +0000 (13:36 -0500)]
ASoC: SOF: bump SOF_ABI_MINOR
Commit
a0f84dfb3f6d9 ("ASoC: SOF: IPC: dai: Expand DAI_CONFIG IPC flags")
did not update the SOF_ABI_MINOR, bump to version 20 before new
changes are added.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20220426183631.102356-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Wed, 27 Apr 2022 11:51:59 +0000 (14:51 +0300)]
ASoC: SOF: Intel: Do not (wrongly) assume positive return value in IMR path
The cl_dsp_init() returns 0 on success or negative errno on error.
Replace the 'if (ret >= 0)' checks with correct 'if (!ret)` to check for
success.
Fixes:
2a68ff846164 ("ASoC: SOF: Intel: hda: Revisit IMR boot sequence")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220427115159.26177-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Tue, 26 Apr 2022 18:38:07 +0000 (13:38 -0500)]
ASoC: Intel: atom: use pm_runtime_resume_and_get()
Use pm_runtime_resume_and_get() to replace the pm_runtime_get_sync() and
pm_runtime_put_sync() pattern.
No functional changes.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220426183807.102442-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Tue, 26 Apr 2022 18:41:06 +0000 (13:41 -0500)]
ASoC: SOF: sof-client-ipc-msg-injector: use pm_runtime_resume_and_get()
Use pm_runtime_resume_and_get() to replace the pm_runtime_get_sync() and
pm_runtime_put_noidle() pattern.
No functional changes.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220426184106.102636-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Tue, 26 Apr 2022 18:41:04 +0000 (13:41 -0500)]
ASoC: SOF: debug: use pm_runtime_resume_and_get()
Use pm_runtime_resume_and_get() to replace the pm_runtime_get_sync() and
pm_runtime_put_noidle() pattern.
No functional changes.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220426184106.102636-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Tue, 26 Apr 2022 18:41:03 +0000 (13:41 -0500)]
ASoC: SOF: control: use pm_runtime_resume_and_get()
Use pm_runtime_resume_and_get() to replace the pm_runtime_get_sync() and
pm_runtime_put_noidle() pattern.
No functional changes.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220426184106.102636-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Uwe Kleine-König [Mon, 25 Apr 2022 19:30:23 +0000 (21:30 +0200)]
ASoC: pcm1789: Make pcm1789_common_exit() return void
This function returns zero unconditionally, so there isn't any benefit
of returning a value. Make it return void to be able to see at a glance
that the return value of pcm1789_i2c_remove() is always zero.
This patch is a preparation for making i2c remove callbacks return void.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20220425193023.61046-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivasa Rao Mandadapu [Tue, 19 Apr 2022 13:18:49 +0000 (18:48 +0530)]
ASoC: qcom: SC7280: Update machine driver startup, shutdown callbacks
Update machine driver startup, shutdown callback functions to avoid
sound card registration failure on other platforms.
Without this change, platforms with WCD codec is failing to register
sound card.
Fixes:
c5198db82d4c ("ASoC: qcom: Add driver support for ALC5682I-VS")
Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Link: https://lore.kernel.org/r/1650374329-7279-1-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ryan Lee [Mon, 25 Apr 2022 17:37:15 +0000 (10:37 -0700)]
ASoC: dt-bindings: max98396: add amplifier driver
This patch adds dt-bindings information for Analog Devices MAX98396
and MAX98397 Smart Amplifier.
Signed-off-by: Ryan Lee <ryans.lee@analog.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220425173715.1827706-1-ryan.lee.analog@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ryan Lee [Sat, 23 Apr 2022 02:15:58 +0000 (19:15 -0700)]
ASoC: max98396: add amplifier driver
This series of patches adds support for Analog Devices MAX98396
mono amplifier with IV sense. The device provides a PCM interface
for audio data and a standard I2C interface for control data
communication. This driver also supports MAX98397 which is
a variant of MAX98396 with wide input supply range.
Signed-off-by: Ryan Lee <ryan.lee.analog@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/20220423021558.1773598-1-ryan.lee.analog@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Uwe Kleine-König [Mon, 25 Apr 2022 19:32:06 +0000 (21:32 +0200)]
ASoC: tas6424: Return zero in remove callback
The only effect of returning an error code in an i2c remove callback
(compared to returning zero) is that the i2c core emits a generic
warning. The device is still removed.
So even if disabling the regulators fails it's sensible to return zero
to suppress the additional generic and little helpful error message.
This patch is a preparation for making i2c remove callbacks return void.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20220425193206.61710-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Mon, 25 Apr 2022 22:51:28 +0000 (23:51 +0100)]
ASoC: SOF: Intel: improve HDaudio DAI support
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
The SOF CI and daily tests exposed a number of issues with corner
cases on platforms using the HDaudio DAI, such as UpExtreme boards or
usual HDaudio+DMIC laptops.
This patchset provides improvements for pause_push/pause_release,
suspend-resume, mixing use cases and combinations of all three.
The initial patches provide a cleanup, the last patches improve the
state machine and DMA handling.
Mark Brown [Mon, 25 Apr 2022 17:34:41 +0000 (18:34 +0100)]
ASoC: SOF: Rework the firmware ready message handling
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:
The firmware ready (fw_ready) message is sent by the firmware to notify the host
that it has been booted up and caries additional information about it's
configuration.
All of this is IPC specific, the message itself is IPC version specific and the
information itself also.
Move the code to handle the fw_ready message under ipc3.c since the parsing and
interpretation is IPC specific.
A followup series is going to take care of the rest of the loader.c to make it
IPC agnostic.
Mark Brown [Mon, 25 Apr 2022 17:22:55 +0000 (18:22 +0100)]
ASoC: Add macros for signed TLV controls with callbacks
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:
This adds SOC_DOUBLE_R_S_EXT_TLV and SOC_SINGLE_S_EXT_TLV macros for
signed TLV controls that need custom get/put callbacks. These will be
needed by future Cirrus codec drivers, but are not particularly exotic
so could be useful for others.
Mark Brown [Mon, 25 Apr 2022 17:22:54 +0000 (18:22 +0100)]
ASoC: remaining i2c_match_id i2c probe changes
Merge series from Stephen Kitt <steve@sk2.org>:
This series covers all the remaining changes to migrate
sound/soc/codecs i2c probes to probe_new, where the const struct
i2c_client * argument is still used. Instead of relying on the
parameter passed in, i2c_match_id is used instead.
With this set of patches, all the sound/soc/codecs i2c probes use the
new probe definition.
Changes since v1: two missing files were added.
Stephen Kitt (7):
ASoC: ak*: use i2c_match_id and simple i2c probe
ASoC: alc56*: use i2c_match_id and simple i2c probe
ASoC: max980*: use i2c_match_id and simple i2c probe
ASoC: pcm186x: use i2c_match_id and simple i2c probe
ASoC: tas*: use i2c_match_id and simple i2c probe
ASoC: tlv320*: use i2c_match_id and simple i2c probe
ASoC: tpa6130: use i2c_match_id and simple i2c probe
sound/soc/codecs/ak4613.c | 10 +++++----
sound/soc/codecs/ak4642.c | 8 ++++---
sound/soc/codecs/alc5623.c | 24 +++++++++++----------
sound/soc/codecs/alc5632.c | 20 +++++++++--------
sound/soc/codecs/max98088.c | 21 +++++++++---------
sound/soc/codecs/max98090.c | 23 ++++++++++----------
sound/soc/codecs/max98095.c | 19 +++++++++--------
sound/soc/codecs/pcm186x-i2c.c | 24 ++++++++++-----------
sound/soc/codecs/tas2562.c | 25 +++++++++++-----------
sound/soc/codecs/tas571x.c | 11 ++++++----
sound/soc/codecs/tas5720.c | 21 +++++++++---------
sound/soc/codecs/tlv320adc3xxx.c | 21 +++++++++---------
sound/soc/codecs/tlv320aic31xx.c | 32 ++++++++++++++--------------
sound/soc/codecs/tlv320aic32x4-i2c.c | 11 ++++++----
sound/soc/codecs/tlv320aic3x-i2c.c | 25 +++++++++++-----------
sound/soc/codecs/tpa6130a2.c | 19 +++++++++--------
16 files changed, 168 insertions(+), 146 deletions(-)
base-commit:
5d763a740e5b24e4a2ca04317255e7e941876338
--
2.27.0
Mark Brown [Mon, 25 Apr 2022 17:22:52 +0000 (18:22 +0100)]
Add support of MediaTek mt8186 to SOF
Merge series from Tinghan Shen <tinghan.shen@mediatek.com>:
Add support of MediaTek mt8186 SoC DSP to SOF.
Tinghan Shen [Fri, 22 Apr 2022 05:56:59 +0000 (13:56 +0800)]
ASoC: SOF: mediatek: Add DSP system PM callback for mt8186
Add DSP system PM callback for suspend and resume
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Yaochun Hung <yc.hung@mediatek.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220422055659.8738-5-tinghan.shen@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Tinghan Shen [Fri, 22 Apr 2022 05:56:58 +0000 (13:56 +0800)]
ASoC: SOF: mediatek: Add mt8186 dsp clock support
Add adsp clock on/off support on mt8186 SoC.
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Yaochun Hung <yc.hung@mediatek.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220422055659.8738-4-tinghan.shen@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Tinghan Shen [Fri, 22 Apr 2022 05:56:57 +0000 (13:56 +0800)]
ASoC: SOF: mediatek: Add mt8186 sof fw loader and dsp ops
Add mt8186-loader module with ops callback to load and run firmware
on mt8186 SoC.
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Yaochun Hung <yc.hung@mediatek.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220422055659.8738-3-tinghan.shen@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Tinghan Shen [Fri, 22 Apr 2022 05:56:56 +0000 (13:56 +0800)]
ASoC: SOF: mediatek: Add mt8186 hardware support
Add support of SOF on Mediatek mt8186 SoC.
MT8186 has 2 Cortex A76 cores paired with 6 Cortex A55 cores.
It also has Cadence HiFi-5 DSP single core. The IPC communication
between AP and DSP is based on shared DRAM and mailbox interrupt.
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Yaochun Hung <yc.hung@mediatek.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220422055659.8738-2-tinghan.shen@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Minghao Chi [Thu, 14 Apr 2022 08:53:10 +0000 (08:53 +0000)]
ASoC: img-i2s-in: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
pm_runtime_put_noidle. This change is just to simplify the code, no
actual functional changes.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220414085310.2541546-1-chi.minghao@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Minghao Chi [Wed, 20 Apr 2022 03:02:46 +0000 (03:02 +0000)]
ASoC: img-parallel-out: using pm_runtime_resume_and_get
Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
pm_runtime_put_noidle. This change is just to simplify the code, no
actual functional changes.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220420030246.2575629-1-chi.minghao@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Judy Hsiao [Tue, 19 Apr 2022 06:29:52 +0000 (14:29 +0800)]
ASoC: qcom: Use MCLK as RT5682I-VS sysclk source
Both MCLK and BCLK can be the clock source of sysclk via PLL
according to its datasheet.
This patch sets MCLK as the clock source as we use MCLK in the
previous projects.
Fixes:
c5198db82d4c ("ASoC: qcom: Add driver support for ALC5682I-VS")
Signed-off-by: Judy Hsiao <judyhsiao@chromium.org>
Link: https://lore.kernel.org/r/20220419062952.356017-1-judyhsiao@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Haowen Bai [Thu, 21 Apr 2022 02:45:20 +0000 (10:45 +0800)]
ASoC: imx-hdmi: remove useless null check before call of_node_put()
No need to add null check before call of_node_put(), since the
implementation of of_node_put() has done it.
Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Link: https://lore.kernel.org/r/1650509120-25377-1-git-send-email-baihaowen@meizu.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Mon, 25 Apr 2022 09:16:46 +0000 (11:16 +0200)]
ASoC: Intel: avs: Depend on SND_INTEL_DSP_CONFIG
In order to enable NHLT support one must select SND_INTEL_DSP_CONFIG,
which will select SND_INTEL_NHLT. Otherwise the file containing NHLT
code doesn't get build leading to errors when linking.
Fixes:
274d79e51875 ("ASoC: Intel: avs: Configure modules according to their type")
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20220425091646.545216-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Amadeusz Sławiński [Mon, 25 Apr 2022 09:16:45 +0000 (11:16 +0200)]
ASoC: Intel: avs: Enable AVS driver only on x86 platforms
Only supported platform for AVS are x86 machines, so there is no reason
for it to be enabled on other architectures. Allow exception for compile
tests.
Fixes:
274d79e51875 ("ASoC: Intel: avs: Configure modules according to their type")
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20220425091646.545216-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Minghao Chi [Wed, 20 Apr 2022 03:04:39 +0000 (03:04 +0000)]
ASoC: img-spdif-out: using pm_runtime_resume_and_get to simplify the code
Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
pm_runtime_put_noidle. This change is just to simplify the code, no
actual functional changes.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220420030439.2575817-1-chi.minghao@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Minghao Chi [Tue, 19 Apr 2022 11:07:18 +0000 (11:07 +0000)]
ASoC: img-spdif-in: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
pm_runtime_put_noidle. This change is just to simplify the code, no
actual functional changes.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220419110718.2574674-1-chi.minghao@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Richard Fitzgerald [Mon, 25 Apr 2022 09:51:59 +0000 (10:51 +0100)]
firmware: cirrus: cs_dsp: Avoid padding bytes in cs_dsp_coeff_ctl
Change the order of members in struct cs_dsp_coeff_ctl to avoid
the compiler having to insert alignment padding bytes. On a x86_64
build this saves 16 bytes per control.
- Pointers are collected to the top of the struct (with the exception of
priv, as noted below), so that they are inherently aligned.
- The set and enable bitflags are placed together so they can be merged.
- priv is placed at the end of the struct - it is for use by the
client so it is helpful to make it stand out, and since the compiler
will always pad the struct size to an alignment multiple putting a
pointer last won't introduce any more padding.
- struct cs_dsp_alg_region is placed at the end, right before priv, for
the same reasoning as priv.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220425095159.3044527-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Biju Das [Sat, 23 Apr 2022 16:44:43 +0000 (17:44 +0100)]
ASoC: sh: Make SND_SOC_RZ depend on ARCH_RZG2L
The SSI block is identical on Renesas RZ/G2L, RZ/G2UL and RZ/V2L SoC's, so
instead of adding dependency for each SoC's add dependency on ARCH_RZG2L.
The ARCH_RZG2L config option is already selected by ARCH_R9A07G043,
ARCH_R9A07G044 and ARCH_R9A07G054.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20220423164443.146299-1-biju.das.jz@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Minghao Chi [Wed, 20 Apr 2022 03:04:02 +0000 (03:04 +0000)]
ASoC: fsl_asrc: using pm_runtime_resume_and_get to simplify the code
Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
pm_runtime_put_noidle. This change is just to simplify the code, no
actual functional changes.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Link: https://lore.kernel.org/r/20220420030402.2575755-1-chi.minghao@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Stephen Kitt [Fri, 15 Apr 2022 16:06:12 +0000 (18:06 +0200)]
ASoC: tlv320*: use i2c_match_id and simple i2c probe
As part of the ongoing i2c transition to the simple probe
("probe_new"), this patch uses i2c_match_id to retrieve the
driver_data for the probed device. The id parameter is thus no longer
necessary and the simple probe can be used instead.
In the context of an i2c probe, i2c_match_id with the module id table
and the probed client never returns null, so removing the null check
on the i2c_device_id pointer is safe.
The i2c id tables are moved up before the probe function, as
suggested by Wolfram Sang, except where the existing code already had
a declaration for the of_device_id table.
Signed-off-by: Stephen Kitt <steve@sk2.org>
Link: https://lore.kernel.org/r/20220415160613.148882-7-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Stephen Kitt [Fri, 15 Apr 2022 16:06:11 +0000 (18:06 +0200)]
ASoC: tas*: use i2c_match_id and simple i2c probe
As part of the ongoing i2c transition to the simple probe
("probe_new"), this patch uses i2c_match_id to retrieve the
driver_data for the probed device. The id parameter is thus no longer
necessary and the simple probe can be used instead.
The i2c id tables are moved up before the probe function, as
suggested by Wolfram Sang, except where the existing code already had
a declaration for the of_device_id table.
Signed-off-by: Stephen Kitt <steve@sk2.org>
Link: https://lore.kernel.org/r/20220415160613.148882-6-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Stephen Kitt [Fri, 15 Apr 2022 16:06:10 +0000 (18:06 +0200)]
ASoC: pcm186x: use i2c_match_id and simple i2c probe
As part of the ongoing i2c transition to the simple probe
("probe_new"), this patch uses i2c_match_id to retrieve the
driver_data for the probed device. The id parameter is thus no longer
necessary and the simple probe can be used instead.
The i2c id table is moved up before the probe function, as suggested
by Wolfram Sang.
Signed-off-by: Stephen Kitt <steve@sk2.org>
Link: https://lore.kernel.org/r/20220415160613.148882-5-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Stephen Kitt [Fri, 15 Apr 2022 16:06:09 +0000 (18:06 +0200)]
ASoC: max980*: use i2c_match_id and simple i2c probe
As part of the ongoing i2c transition to the simple probe
("probe_new"), this patch uses i2c_match_id to retrieve the
driver_data for the probed device. The id parameter is thus no longer
necessary and the simple probe can be used instead.
In the context of an i2c probe, i2c_match_id with the module id table
and the probed client never returns null, so removing the null check
on the i2c_device_id pointer is safe.
The i2c id tables are moved up before the probe function, as
suggested by Wolfram Sang.
Signed-off-by: Stephen Kitt <steve@sk2.org>
Link: https://lore.kernel.org/r/20220415160613.148882-4-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Stephen Kitt [Fri, 15 Apr 2022 16:06:08 +0000 (18:06 +0200)]
ASoC: alc56*: use i2c_match_id and simple i2c probe
As part of the ongoing i2c transition to the simple probe
("probe_new"), this patch uses i2c_match_id to retrieve the
driver_data for the probed device. The id parameter is thus no longer
necessary and the simple probe can be used instead.
The i2c id tables are moved up before the probe function, as
suggested by Wolfram Sang.
Signed-off-by: Stephen Kitt <steve@sk2.org>
Link: https://lore.kernel.org/r/20220415160613.148882-3-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Stephen Kitt [Fri, 15 Apr 2022 16:06:07 +0000 (18:06 +0200)]
ASoC: ak*: use i2c_match_id and simple i2c probe
As part of the ongoing i2c transition to the simple probe
("probe_new"), this patch uses i2c_match_id to retrieve the
driver_data for the probed device. The id parameter is thus no longer
necessary and the simple probe can be used instead.
Signed-off-by: Stephen Kitt <steve@sk2.org>
Link: https://lore.kernel.org/r/20220415160613.148882-2-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Thu, 21 Apr 2022 08:07:35 +0000 (11:07 +0300)]
ASoC: SOF: loader: Remove the old fw_ready related code
The fw_ready is handled internally to ipc3, we can remove the old code
from the loader.c along with the functions only used by the fw_ready()
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: Ajit Pandey <ajitkumar.pandey@amd.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20220421080735.31698-7-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Thu, 21 Apr 2022 08:07:34 +0000 (11:07 +0300)]
ASoC: SOF: Intel: Do not set fw_ready callback
The fw_ready is handled internally to ipc3 and the callback no longer in
use.
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: Ajit Pandey <ajitkumar.pandey@amd.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20220421080735.31698-6-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Thu, 21 Apr 2022 08:07:33 +0000 (11:07 +0300)]
ASoC: SOF: imx: Do not set fw_ready callback
The fw_ready is handled internally to ipc3 and the callback no longer in
use.
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: Ajit Pandey <ajitkumar.pandey@amd.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20220421080735.31698-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Thu, 21 Apr 2022 08:07:32 +0000 (11:07 +0300)]
ASoC: SOF: amd: Do not set fw_ready callback
The fw_ready is handled internally to ipc3 and the callback no longer in
use.
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: Ajit Pandey <ajitkumar.pandey@amd.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20220421080735.31698-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Thu, 21 Apr 2022 08:07:31 +0000 (11:07 +0300)]
ASoC: SOF: Do not check for the fw_ready callback
The fw_ready is handled internally to ipc3, the callback no longer in
use and it is going to be removed.
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: Ajit Pandey <ajitkumar.pandey@amd.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20220421080735.31698-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Thu, 21 Apr 2022 08:07:30 +0000 (11:07 +0300)]
ASoC: SOF: ipc3: Add local implementation for handling fw_ready message
The handling of fw_ready is IPC3 specific, move the needed code from the
loader.c to ipc3.c and stop using the sof_ops(sdev)->fw_ready() callback.
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: Ajit Pandey <ajitkumar.pandey@amd.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20220421080735.31698-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 21 Apr 2022 20:32:01 +0000 (15:32 -0500)]
ASoC: SOF: Intel: hda-dai: protect hw_params against successive calls
Once we've set-up the HDA stream and its format, we currently don't
support additional format changes. We already have a protection in the
.prepare case, but this needs to be added in the hw_params too.
In mixing use cases where two DPCM FEs are connected to the same BE,
if can happen that there are multiple calls to the BE hw_params when
the two FEs are configured simultaneously.
This could alternatively be fixed at the DPCM level but that's a more
intrusive change requiring infrastructure changes: this would need to
be paired with the definition of fixed hw_params at the mixer level.
Signed-off-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>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220421203201.1550328-15-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 21 Apr 2022 20:32:00 +0000 (15:32 -0500)]
ASoC: SOF: Intel: add helper for link DMA cleanups
We do the same operations from different places, add a helper to
enforce consistency and make the programming sequences clearer.
Signed-off-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>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220421203201.1550328-14-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 21 Apr 2022 20:31:59 +0000 (15:31 -0500)]
ASoC: SOF: Intel: hda-dai: reset dma_data and release stream
The sequences are missing a call to snd_soc_dai_set_dma_data() when
the stream is cleared, as well as a release of the stream, and tests
to avoid pointer dereferences.
This fixes an underflow issue in a corner case with two streams paused
before a suspend-resume cycle. After resume, the pause_release of the
last stream causes an underflow due to an invalid sequence.
This problem probably existed since the beginning and is only see with
prototypes of a 'deep-buffer' capability, which depends on additional
ASoC fixes, so there's is no Fixes: tag and no real requirement to
backport this patch.
BugLink: https://github.com/thesofproject/linux/issues/3151
Co-developed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220421203201.1550328-13-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 21 Apr 2022 20:31:58 +0000 (15:31 -0500)]
ASoC: SOF: Intel: hda-dai: improve suspend case
Add comments and re-align with the TRIGGER_SUSPEND case with an
additional call to hda_dai_hw_free_ipc() to free-up resources.
Signed-off-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>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220421203201.1550328-12-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 21 Apr 2022 20:31:57 +0000 (15:31 -0500)]
ASoC: SOF: Intel: hda-dai: move code to deal with hda dai/dailink suspend
The location of the code was not optimal and prevents us from using
helpers, let's move it to hda-dai.c.
No functionality change in this patch.
Signed-off-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>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220421203201.1550328-11-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 21 Apr 2022 20:31:56 +0000 (15:31 -0500)]
ASOC: SOF: Intel: hda-dai: add hda_dai_hw_free_ipc() helper
We do the same thing from different places, let's use a helper.
Signed-off-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>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220421203201.1550328-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 21 Apr 2022 20:31:55 +0000 (15:31 -0500)]
ASoC: SOF: sof-audio: flag errors on pipeline teardown
Before suspending, walk through all the widgets to make sure all
refcounts are zero. If not, the resume will not work and random errors
will be reported. Adding this paranoia check will help identify leaks
and broken sequences.
Signed-off-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>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220421203201.1550328-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 21 Apr 2022 20:31:54 +0000 (15:31 -0500)]
ASoC: SOF: Intel: hda-dai: regroup dai and link DMA operations
Just code move with no functionality change, to clearly separate out
the 'dai' operation from the link DMA ones.
Signed-off-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>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220421203201.1550328-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 21 Apr 2022 20:31:53 +0000 (15:31 -0500)]
ASoC: SOF: Intel: hda-dai: split link DMA and dai operations
The link DMA state management is handled completely on the host side,
while the DAI operations require an IPC. Split the first part in
dedicated helpers.
Signed-off-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>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220421203201.1550328-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 21 Apr 2022 20:31:52 +0000 (15:31 -0500)]
ASoC: SOF: Intel: hda-dai: use snd_soc_dai_get_widget() helper
Use helper instead of open-coding the same thing multiple times.
Signed-off-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>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220421203201.1550328-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 21 Apr 2022 20:31:51 +0000 (15:31 -0500)]
ASoC: SOF: Intel: hda-dai: simplify hda_dai_widget_update() prototype
the argument "struct sof_intel_hda_stream *hda_stream" is not used, remove.
Signed-off-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>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220421203201.1550328-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 21 Apr 2022 20:31:50 +0000 (15:31 -0500)]
ASOC: SOF: Intel: hda-dai: consistent naming for HDA DAI and HDA link DMA
The Intel documentation refers to the concepts of 'HDAudio host
DMA' (system memory <--> DSP) and 'HDaudio link DMA' (DSP <-->
peripherals). We currently use the prefix 'hda_link' to describe DAI
operations, which can be confused for dailink operations.
Since the topology tokens refer unambiguously to the 'HDA' dai, let's
drop the link prefix for dai-related ops/callbacks. Conversely let's
use 'hda_link_dma' for routines related to the DMA management. In a
follow-up patch we will introduce the 'hda_dai_link' prefix for dailink
ops/callbacks.
Signed-off-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>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220421203201.1550328-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Thu, 21 Apr 2022 20:31:49 +0000 (15:31 -0500)]
ASoC: SOF: Intel: Add IPC-specific dai ops for IPC3
The BE DAI driver ops involve operations that are IPC-specific. For ex:
for the HDA DAI, the trigger op involves sending the DAI_CONFIG IPC to
the DSP to stop the DMA for the stop/pause commands. This sequence is
different for IPC3 and IPC4. So, make the dai driver ops IPC-specific
and set the IPC3-specific ops during the ops_init() callback.
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220421203201.1550328-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Thu, 21 Apr 2022 20:31:48 +0000 (15:31 -0500)]
ASoC: SOF: remove incorrect clearing of prepared flag
When the system is suspended while a PCM is paused, it doesn't receive
the SUSPEND trigger. So, the SOF driver has to ensure that the PCM and
the widgets associated with the paused PCM are freed in the firmware
during suspend. This is handled in the
sof_tear_down_left_over_pipelines() call. But since the state of this
PCM is SUSPENDED, we end up clearing the prepared flag for the PCM
before freeing it. This results in IPC errors while freeing the widgets.
But because the widget use_counts are reset to 0 even though the IPC
fails, releasing the paused stream after resuming from suspend proceeds
normally.
Fix the IPC errors by removing the clearing of the prepared flag in
sof_set_hw_params_upon_resume(). In fact, we can remove the
sof_set_hw_params_upon_resume() and call
snd_sof_dsp_hw_params_upon_resume() directly. This will ensure that the
PCM is freed in the firmware before the IPC's for freeing the widgets
are sent.
BugLink: https://github.com/thesofproject/linux/issues/3543
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220421203201.1550328-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Richard Fitzgerald [Mon, 25 Apr 2022 12:50:12 +0000 (13:50 +0100)]
ASoC: soc.h: Add SOC_SINGLE_S_EXT_TLV macro
Add a SOC_SINGLE_S_EXT_TLV macro as a convenience wrapper
around SOC_DOUBLE_R_S_EXT_TLV for mono volume controls.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220425125012.3044919-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Simon Trimmer [Mon, 25 Apr 2022 12:50:11 +0000 (13:50 +0100)]
ASoC: soc.h: Introduce SOC_DOUBLE_R_S_EXT_TLV() macro
A straightforward extension of the SOC_DOUBLE_R_S_TLV() macro that
allows the get and put functions to be customised.
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220425125012.3044919-2-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Fri, 22 Apr 2022 23:16:32 +0000 (00:16 +0100)]
ASoC: SOF: pci: add quirks and PCI IDS
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
Add two PCI IDs and quirks for APL Chromebooks and Intel IPC4
selection for developers.
Pierre-Louis Bossart [Thu, 21 Apr 2022 16:25:05 +0000 (11:25 -0500)]
ASoC: soc-core: remove always-false path
cppcheck throws the following warning:
sound/soc/soc-core.c:2773:6: style: Condition '!num_widgets' is always
false [knownConditionTrueFalse]
if (!num_widgets) {
^
sound/soc/soc-core.c:2761:18: note: Assuming that condition
'num_widgets<0' is not redundant
if (num_widgets < 0) {
^
sound/soc/soc-core.c:2766:18: note: Assuming condition is false
if (num_widgets & 1) {
^
sound/soc/soc-core.c:2772:2: note: Compound assignment '/=', assigned
value is 0
num_widgets /= 2;
^
We should check upfront all error conditions.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220421162505.302132-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Thu, 21 Apr 2022 20:20:31 +0000 (15:20 -0500)]
ASoC: SOF: Intel: hda: Revisit IMR boot sequence
The sequence for IMR boot is essentially the same as normal boot with the
difference that instead of DMA from host the firmware is loaded from IMR.
Re-structure the code to use the existing sequence and also add fallback
handling in case the IMR boot fails.
Introduce a new flag to make the IMR boot support check simpler.
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220421202031.1548362-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 21 Apr 2022 20:19:46 +0000 (15:19 -0500)]
ASoC: SOF: Intel: hda: simplify NHLT handling
The existing code does an init/free for each piece of information
needed. We can instead initialize the NHLT table in the .probe() and
free it in the .remove() callback.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220421201946.1547041-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Thu, 21 Apr 2022 20:18:47 +0000 (15:18 -0500)]
ASoC: SOF: topology: Check w->sname validity once in sof_connect_dai_widget()
The 'w' (struct snd_soc_dapm_widget) is not changing within the function,
there is no reason to check the w->sname more than once as it is not
going to change.
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220421201847.1545686-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 21 Apr 2022 16:26:00 +0000 (11:26 -0500)]
ASoC: SOF: sof-audio: remove useless assignment
There is no need to assign spcm to NULL. Removing this assignment also
removes a false alarm reported by cppcheck.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220421162600.302230-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Gongjun Song [Thu, 21 Apr 2022 16:33:58 +0000 (11:33 -0500)]
ASoC: SOF: Intel: pci-tgl: add RPL-P support
Add PCI DID for Intel Raptor Lake P.
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Gongjun Song <gongjun.song@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220421163358.319489-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Muralidhar Reddy [Thu, 21 Apr 2022 16:33:57 +0000 (11:33 -0500)]
ASoC: SOF: Intel: pci-tgl: add ADL-PS support
Add PCI DID for Intel Alder Lake PS.
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Muralidhar Reddy <muralidhar.reddy@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220421163358.319489-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Rander Wang [Thu, 21 Apr 2022 16:33:56 +0000 (11:33 -0500)]
ASOC: SOF: pci: add ipc_type override for Intel IPC4 tests
Add a kernel module parameter for select the non-default IPC type.
This should only be used by developers with access to firmware and
topology files, typically Intel and partners.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220421163358.319489-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 21 Apr 2022 16:33:55 +0000 (11:33 -0500)]
ASoC: SOF: sof-pci-dev: don't use the community key on APL Chromebooks
As suggested by MrChromebox, the SOF driver can be used with the SOF
firmware binary signed with the production key. This patch adds an
additional check for the ApolloLake SoC before modifying the default
firmware path.
Note that ApolloLake Chromebooks officially ship with the Skylake
driver, so to use SOF the users have to explicitly opt-in with
'options intel-dspcfg dsp_driver=3'. There is no plan to change the
default selection.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220421163358.319489-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Thu, 21 Apr 2022 18:37:35 +0000 (19:37 +0100)]
ASoC: SOF: AMD updates
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
Small updates for the AMD SoF drivers.
Pierre-Louis Bossart [Thu, 21 Apr 2022 16:36:45 +0000 (11:36 -0500)]
ASoC: Intel: sof_ssp_amp: remove 'set-but-not-used' warning
Clang warning:
>> sound/soc/intel/boards/sof_ssp_amp.c:97:6: warning: variable 'i'
set but not used [-Wunused-but-set-variable]
int i = 0;
^
The device counter is not used when the quirk is not set, which static
analysis cannot know. Move its initialization before the loop to
remove this warning.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220421163645.319686-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ajit Kumar Pandey [Thu, 21 Apr 2022 16:58:20 +0000 (11:58 -0500)]
ASoC: SOF: amd: Use dedicated MBOX for ACP and PSP communication
We are currently using generic PSP Mailbox register for sending SHA
complete command to PSP but observe random arbitration issue during
PSP validation as MP0_C2PMSG_26_REG used by other kernel modules.
Use separate mailbox registers and doorbell mechanism to send SHA_DMA
complete command to PSP. This fixes such validation issues and added
flexibility for sending more ACP commands to PSP in future as new mbox
registers i.e MP0_C2PMSG_114_REG and MP0_C2PMSG_73_REG are dedicated
by PSP for ACP communications.
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220421165820.337207-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ajit Kumar Pandey [Thu, 21 Apr 2022 16:58:19 +0000 (11:58 -0500)]
ASoC: SOF: amd: Add psp_mbox_ready() and psp_send_cmd() callback
We need to ensure if PSP is mbox ready before and after sending cmd
to PSP over SMN interface. Add method to check MBOX_READY bit of PSP
with some delay over ACP_PSP_TIMEOUT_COUNTER. Replace psp_fw_validate
with new method psp_send_cmd() to send command via psp mailbox.
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220421165820.337207-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 21 Apr 2022 02:55:58 +0000 (02:55 +0000)]
ASoC: rsnd: care return value from rsnd_node_fixed_index()
Renesas Sound is very complex, and thus it needs to use
rsnd_node_fixed_index() to know enabled pin index.
It returns error if strange pin was selected,
but some codes didn't check it.
This patch 1) indicates error message, 2) check return
value.
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87pmlbgn5t.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 21 Apr 2022 02:56:17 +0000 (02:56 +0000)]
ASoC: audio-graph-card2: indicate "Experimental stage" warning only when successed
Because Sound Card needs many drivers to probe, current audio-graph-card2
will indicate "Experimental stage" at top of probe function even though
in case it gets -EPROBE_DEFER, thus it will be indicated many times.
This patch indicates it when probe was succeeded.
[ 1.601393] asoc-audio-graph-card2 sound: Audio Graph Card2 is still under Experimental stage
...
[ 1.721269] asoc-audio-graph-card2 sound: Audio Graph Card2 is still under Experimental stage
...
[ 1.755231] asoc-audio-graph-card2 sound: Audio Graph Card2 is still under Experimental stage
...
[ 1.907710] asoc-audio-graph-card2 sound: Audio Graph Card2 is still under Experimental stage
...
[ 1.933173] rcar_sound
ec500000.sound: probed
[ 1.948875] asoc-audio-graph-card2 sound: Audio Graph Card2 is still under Experimental stage
[ 1.959558] asoc-audio-graph-card2 sound: ak4613-hifi <-> rsnd-dai.0 mapping ok
[ 1.968119] asoc-audio-graph-card2 sound: i2s-hifi <-> rsnd-dai.1 mapping ok
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o80vgn5a.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Thu, 21 Apr 2022 02:55:27 +0000 (02:55 +0000)]
ASoC: rsnd: care default case on rsnd_ssiu_busif_err_status_clear()
commit
cfb7b8bf1e2d66 ("ASoC: rsnd: tidyup
rsnd_ssiu_busif_err_status_clear()") merged duplicate code, but it didn't
care about default case, and causes smatch warnings.
smatch warnings:
sound/soc/sh/rcar/ssiu.c:112 rsnd_ssiu_busif_err_status_clear() \
error: uninitialized symbol 'offset'.
sound/soc/sh/rcar/ssiu.c:114 rsnd_ssiu_busif_err_status_clear() \
error: uninitialized symbol 'shift'.
This patch cares it.
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87r15rgn6p.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Steve Lee [Wed, 20 Apr 2022 04:49:00 +0000 (13:49 +0900)]
ASoC: dt-bindings: max98390: add reset gpio bindings
This adds support for the reset gpio binding.
Signed-off-by: Steve Lee <steve.lee.analog@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220420044900.2989-2-steve.lee.analog@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Steve Lee [Wed, 20 Apr 2022 04:48:59 +0000 (13:48 +0900)]
ASoC: max98390: Add reset gpio control
Add reset gpio control to support RESET PIN connected to gpio.
Signed-off-by: Steve Lee <steve.lee.analog@gmail.com>
Acked-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20220420044900.2989-1-steve.lee.analog@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Minghao Chi [Wed, 20 Apr 2022 03:03:15 +0000 (03:03 +0000)]
ASoC: SOF: using pm_runtime_resume_and_get to simplify the code
Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
pm_runtime_put_noidle. This change is just to simplify the code, no
actual functional changes.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220420030315.2575691-1-chi.minghao@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Ajit Kumar Pandey [Wed, 20 Apr 2022 09:44:36 +0000 (15:14 +0530)]
ASoC: amd: acp: Add pm ops callback in machine driver
Add alsa snd_soc_pm_ops callback in ACP machine driver to support
suspend and resume operation of sound card components
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Link: https://lore.kernel.org/r/20220420094442.1352717-1-AjitKumar.Pandey@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Wed, 20 Apr 2022 13:22:08 +0000 (14:22 +0100)]
ASoC: soc-pcm: improve BE state transitions
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
With additional tests with the introduction of a 'deep-buffer' PCM
device mixed with the regular low-latency path, we came up with two
improvements in the BE state machine and transitions. The short
explanation is that the BE cannot directly use the trigger commands
provided by the FE, and a translation is needed to deal with paused
states.
Mark Brown [Wed, 20 Apr 2022 13:22:06 +0000 (14:22 +0100)]
ASoC: SOF: add INTEL_IPC4 plumbing
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
The INTEL_IPC4 protocol and firmware architecture will rely on
different sets of firmware binary and topology files. Some platforms
will only support INTEL_IPC4, some will support both INTEL_IPC4 and
SOF_IPC for development, and some will stay with the existing SOF_IPC.
This patchset adds new IPC definitions, and search paths for firmware
and topology files, along with means to override the default IPC type
and search paths for development. The firmware binary names are
aligned with those used by the Intel AVS driver to avoid duplicate
firmware installs, but the topology will have to differ due to driver
architecture differences.