- 02 Apr, 2024 29 commits
-
-
Mark Brown authored
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: Small changes with 3 cppcheck fixes and the firmware version now visible with debugfs instead of only via dmesg logs.
-
Mark Brown authored
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: This patchset contains important updates for SoundWire support. We initially implemented support for multiple amplifiers on different links using a single HDaudio DMA transfer. To align with the other OS, the 'aggregation' is now supported by the firmware. This change in directions has kernel impacts, since we now have multiple HDaudio DMAs to program and start, but since there are no platforms released so far there's no end-user impact. In addition, the behavior in case of xruns is improved by clearing the PCM states and better handling of the hw_free case. Note that the hw_free support will compile but will only be functional with the companion patch "soundwire: intel: add intel_free_stream() back" already applied in the SoundWire tree.
-
Mark Brown authored
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>: The first two patches change snd_soc_card_get_kcontrol() to use the core snd_ctl_find_id_mixer() functionality instead of open-coding its own list walk. The last patch adds a KUnit test for this, which was tested on the original and modified code.
-
Shengjiu Wang authored
Convert the fsl-asoc-card binding to YAML. When testing dtbs_check, found below compatible strings are not listed in document: fsl,imx-sgtl5000 fsl,imx53-cpuvo-sgtl5000 fsl,imx51-babbage-sgtl5000 fsl,imx53-m53evk-sgtl5000 fsl,imx53-qsb-sgtl5000 fsl,imx53-voipac-sgtl5000 fsl,imx6-armadeus-sgtl5000 fsl,imx6-rex-sgtl5000 fsl,imx6-sabreauto-cs42888 fsl,imx6-wandboard-sgtl5000 fsl,imx6dl-nit6xlite-sgtl5000 fsl,imx6q-ba16-sgtl5000 fsl,imx6q-nitrogen6_max-sgtl5000 fsl,imx6q-nitrogen6_som2-sgtl5000 fsl,imx6q-nitrogen6x-sgtl5000 fsl,imx6q-sabrelite-sgtl5000 fsl,imx6q-sabresd-wm8962 fsl,imx6q-udoo-ac97 fsl,imx6q-ventana-sgtl5000 fsl,imx6sl-evk-wm8962 fsl,imx6sx-sdb-mqs fsl,imx6sx-sdb-wm8962 fsl,imx7d-evk-wm8960 karo,tx53-audio-sgtl5000 tq,imx53-mba53-sgtl5000 So add them in yaml file to pass the test. Also correct the 'dai-format' to 'format' in document. For 'audio-routing', the items are not listed. Because this fsl-asoc-card is generic driver, which supports several codecs, if list all the items, there will be a long list. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://msgid.link/r/1711976056-19884-3-git-send-email-shengjiu.wang@nxp.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Ranjani Sridharan authored
The node_id for multi-gateway ALH DAI's get overwritten with the group_id during the DAI copier's ipc_prepare op. So, save the ALH dai_index during the BE DAI hw_params in the dai_index field of struct ipc4_copier and use that to set the device ID in the configuration blob. This will avoid errors during copier init after an xrun. Note that the dai_index is typically set in topology for DMIC/SSP, but it's not used for ALH. Reclaiming this dai_index field to store the node_id does not generate a conflict with topology-defined values. Reviewed-by: Rander Wang <rander.wang@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://msgid.link/r/20240402151828.175002-18-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
With the delayed stops, the xrun handling is problematic: the applications expects everything to be reset but the firmware and DMA are still in a PAUSED state. This patch makes sure the prepare while pending_stop is set is special-cased. Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> 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> Link: https://msgid.link/r/20240402151828.175002-17-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
Add a state variable to keep track of delayed stops, in case pcm_ops->platform_stop_during_hw_free is set. This patch should be iso-functionality, possibly removing no-op cases. The main purpose of this new state variable is to prepare a follow-up patch to reset all PCM and DMAs in case of stop/prepare xrun sequences. Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240402151828.175002-16-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
The same sequence is used twice, use common helper. Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240402151828.175002-15-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
For some reason the existing code stops on the first error, which potentially leaves the DMA and widgets in a weird state. Change to free-up all resources even in case of errors. Also add a more consistent error handling and logs, with the first error code returned to the caller. Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240402151828.175002-14-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Ranjani Sridharan authored
When an xrun happens, the BE DAI hw_params doesn't get invoked before the stream restarts with a prepare. In this case, clearing the node ID when the DAI widget is freed and unprepared will result in an error when it is re-initialized. In order to avoid this, move the code to clear the node ID to the BE DAI hw_free op to keep it balanced with the BE DAI hw_params. Reviewed-by: Rander Wang <rander.wang@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://msgid.link/r/20240402151828.175002-13-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
To allow using widget_to_sdev() in other files, move it as static inline in shared header file. Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240402151828.175002-12-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
The node_id value needs to be handled specifically for ALH. Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240402151828.175002-11-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
Add intel_alh_id to set the expected gateway node_id in a follow-up patch. Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240402151828.175002-10-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
We've already defined the value for dai_index, let's use it instead of open-coding the same thing. No functionality change. Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240402151828.175002-9-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
We need to be able to set the dai config differently for SoundWire. Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240402151828.175002-8-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Bard Liao authored
sof_ipc4_dma_config_tlv{} is required for ACE2.x. The patch follow the convention to set the dma_stream_channel_map.mapping device as "link_id << 8 | pdi_id". And the mapping in sof_ipc4_alh_configuration_blob{} should be the same as dma_stream_channel_map.mapping in sof_ipc4_dma_config{}. The purposes of device id is to map DMA tlv. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240402151828.175002-7-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Bard Liao authored
We always use the lowest N channels of stream. So, set ch_mask to GENMASK(params_channels(params) - 1, 0). Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240402151828.175002-6-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Bard Liao authored
Each stream needs a dma_config_tlv. We will handle multi dma_config_tlv in the follow up commits. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240402151828.175002-5-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Bard Liao authored
This reverts commit f8ba62ac. The SoundWire aggregated solution was to use one DMA on multiple links. But, the solution changed to use one DMA for each link. It means that we should assign HDaudio stream_tag for each cpu_dai. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240402151828.175002-4-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Bard Liao authored
This reverts commit 699e146d. Don't reset device_count as we will use the multi-gateway firmware configuration. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240402151828.175002-3-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
The existing code derives the channel map used to program the HDaudio link DMA from the hw_params, but that is not quite right in the case of aggregation. The code in soc-pcm.c splits the hw_params depending on the codec_ch_map, and we need to reconstruct the channel-map to insert the data in the right places. This issue is seen only on amplifier feedback capture where the data from the second amplifier was replaced by that of the first amplifier. Note that the loop iterator of the macro for_each_rtd_cpu_dais() is reused in a following loop. This is different to all existing usages of that macro, hence the use of a boolean flag to avoid an access to an uninitialized variable. Fixes: 2960ee5c ("ASoC: SOF: Intel: hda-dai: add helpers for SoundWire callbacks") Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240402151828.175002-2-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
Cppcheck reports this: sound/soc/sof/ipc4-topology.c:569:23: style: Local variable 'sdev' shadows outer variable [shadowVariable] struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp); ^ sound/soc/sof/ipc4-topology.c:512:22: note: Shadowed declaration struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp); ^ sound/soc/sof/ipc4-topology.c:569:23: note: Shadow variable struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(scomp); ^ Remove shadowed variable. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://msgid.link/r/20240402145959.172619-5-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
Somehow instance_id and id were mixed. Align on instance_id for consistency. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://msgid.link/r/20240402145959.172619-4-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
cppcheck reports this issue: sound/soc/sof/amd/acp-loader.c:299:6: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] ret = request_firmware(&adata->fw_dbin, fw_filename, sdev->dev); ^ sound/soc/sof/amd/acp-loader.c:289:6: note: ret is assigned ret = snd_sof_dsp_block_write(sdev, SOF_FW_BLK_TYPE_IRAM, 0, ^ sound/soc/sof/amd/acp-loader.c:299:6: note: ret is overwritten ret = request_firmware(&adata->fw_dbin, fw_filename, sdev->dev); ^ This behavior is probably unintentional, there's no reason to return an error for the DRAM but not the IRAM. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://msgid.link/r/20240402145959.172619-3-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Yong Zhi authored
To check loaded FW version: $ hexdump -C /sys/kernel/debug/sof/fw_version 00000000 02 00 07 00 63 00 01 00 00 00 00 00 00 00 00 00 |....c...........| Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Yong Zhi <yong.zhi@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240402145959.172619-2-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Seven Lee authored
This patch is modified nau8325_dac_oversampl_enum enumerated. Use SOC_VALUE_ENUM instead to hide empty (presumably invalid) options. Signed-off-by: Seven Lee <wtli@nuvoton.com> Link: https://msgid.link/r/20240401104753.3432507-1-wtli@nuvoton.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Richard Fitzgerald authored
Add a new snd-soc-card KUnit test with a simple test case for snd_soc_card_get_kcontrol() and snd_soc_card_get_kcontrol_locked(). Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://msgid.link/r/20240401100210.61277-4-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Richard Fitzgerald authored
Use the snd_ctl_find_id_mixer[_locked]() wrapper in snd_soc_card_get_kcontrol[_locked]() instead of open-coding a custom list walk of the card controls list. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://msgid.link/r/20240401100210.61277-3-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Richard Fitzgerald authored
Adds wrapper function snd_ctl_find_id_mixer_locked(). This is identical to snd_ctl_find_id_mixer() except that it can be called from code that is already holding controls_rwsem. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://msgid.link/r/20240401100210.61277-2-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 29 Mar, 2024 4 commits
-
-
Mark Brown authored
Merge series from Seven Lee <wtli@nuvoton.com>: Add a driver for the Nuvoton NAU88325.
-
Mark Brown authored
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: This last part is the continuation of Brent Lu's cleanups. Multiple quirks have been removed to use "default" configurations and ACPI-based detection of codecs and selection of topology files. This cleanup has been done in multiple steps/phases since Fall 2023, thanks Brent for this contribution!
-
Mark Brown authored
Merge series from Frank Li <Frank.Li@nxp.com>: Update binding doc to avoid warning.
-
Mark Brown authored
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>: Core for several drivers already sets the driver.owner, so driver does not need to. Simplify the drivers.
-
- 28 Mar, 2024 7 commits
-
-
Aleksandr Mishin authored
In kirkwood_dma_hw_params() mv_mbus_dram_info() returns NULL if CONFIG_PLAT_ORION macro is not defined. Fix this bug by adding NULL check. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: bb6a40fc ("ASoC: kirkwood: Fix reference to PCM buffer address") Signed-off-by: Aleksandr Mishin <amishin@t-argos.ru> Link: https://msgid.link/r/20240328173337.21406-1-amishin@t-argos.ruSigned-off-by: Mark Brown <broonie@kernel.org>
-
Frank Li authored
Some sai only connect one direction dma (rx/tx) in SOC. For example: imx8qxp sai5 only connect tx dma channel. So allow only one "rx" or "tx" for dma-names. Remove description under dmas because no user use index to get dma channel. All user use 'dma-names' to get correct dma channel. dma-names already in 'required' list. Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://msgid.link/r/20240328-asrc_8qxp-v8-3-801cd6bb5be2@nxp.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Frank Li authored
fsl,imx8qxp-spdif and fsl,imx8qm-spdif have 2 interrupts. Other platforms have 1 interrupt. Increase max interrupt number to 2 and add restriction for platforms except i.MX8QXP and i.MX8QM. Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://msgid.link/r/20240328-asrc_8qxp-v8-2-801cd6bb5be2@nxp.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Frank Li authored
Add power-domains property for asrc and spdif since fsl,imx8qm-asrc/spdif and fsl,imx8qxp-asrc/spdif require 'power-domains'. Set 'power-domains' as required property for compatible string fsl,imx8qm-asrc/spdif and fsl,imx8qxp-asrc/spdif. Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://msgid.link/r/20240328-asrc_8qxp-v8-1-801cd6bb5be2@nxp.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Seven Lee authored
The driver is for amplifiers NAU8325 of Nuvoton Technology Corporation. The NAU8325 is a stereo high efficiency filter-free Class-D audio amplifier, which is capable of driving a 4ohm load with up to 3W output power. Signed-off-by: Seven Lee <wtli@nuvoton.com> Link: https://msgid.link/r/20240327075755.3410381-3-wtli@nuvoton.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Seven Lee authored
Add a DT schema for describing nau8325 audio amplifiers. The key features are as follows: - Low SPK_VDD Quiescent Current - Gain Setting with 2-wire interface - Powerful Stereo Class-D Amplifier - Low Output Noise - Low Current Shutdown Mode - Click-and Pop Suppression More resources : https://www.nuvoton.com/products/smart-home-audio/audio-amplifiers/class-d-series/nau8325yg/Signed-off-by: Seven Lee <wtli@nuvoton.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://msgid.link/r/20240327075755.3410381-2-wtli@nuvoton.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Brent Lu authored
Add the board config mtl_cs42l42_def to cs42l42 machine driver for all mtl boards using default SSP port allocation (headphone codec on SSP2, speaker amplifiers on SSP0, and BT offload on SSP1). Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240327162408.63953-19-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-