- 06 May, 2024 2 commits
-
-
Krzysztof Kozlowski authored
Do not open-code snd_soc_substream_to_rtd(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240430-asoc-snd-substream-clean-v1-2-6f8a8902b479@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
Do not open-code snd_soc_substream_to_rtd(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240430-asoc-snd-substream-clean-v1-1-6f8a8902b479@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 03 May, 2024 1 commit
-
-
Uwe Kleine-König authored
These drivers don't use the driver_data member of struct i2c_device_id, so don't explicitly initialize this member. This prepares putting driver_data in an anonymous union which requires either no initialization or named designators. But it's also a nice cleanup on its own. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20240502074722.1103986-2-u.kleine-koenig@pengutronix.deSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 02 May, 2024 1 commit
-
-
Krzysztof Kozlowski authored
A common pattern in sound drivers is getting 'struct snd_soc_pcm_runtime' from 'struct snd_pcm_substream' opaque pointer private_data field with snd_soc_substream_to_rtd(). However 'private_data' appears in several other structures as well, including 'struct snd_compr_stream'. The field might not hold the same type for every structure, although seems the case at least for 'struct snd_compr_stream', so code can easily make a mistake by using macro for wrong structure passed as argument. Switch from macro to inline function, so such mistake will be build-time detectable. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240501175127.34301-1-krzysztof.kozlowski@linaro.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 30 Apr, 2024 8 commits
-
-
Mark Brown authored
Merge series from Luca Ceresoli <luca.ceresoli@bootlin.com>: This series applies various improvements to the DAPM documentation: a rewrite of a few sections for clarity, style improvements and typo fixes. Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> --- Changes in v2: - avoid wrapping in patch 3 as suggested by Alex - Link to v1: https://lore.kernel.org/r/20240416-dapm-docs-v1-0-a818d2819bf6@bootlin.com --- Luca Ceresoli (12): ASoC: doc: dapm: fix typos ASoC: doc: dapm: fix struct name ASoC: doc: dapm: minor rewording ASoC: doc: dapm: remove dash after colon ASoC: doc: dapm: clarify it's an internal API ASoC: doc: dapm: replace "map" with "graph" ASoC: doc: dapm: extend initial descrption ASoC: doc: dapm: describe how widgets and routes are registered ASoC: doc: dapm: fix and improve section "Registering DAPM controls" ASoC: doc: dapm: improve section "Codec/DSP Widget Interconnections" ASoC: doc: dapm: update section "DAPM Widget Events" ASoC: doc: dapm: update event types Documentation/sound/soc/dapm-graph.svg | 375 +++++++++++++++++++++++++++++++++ Documentation/sound/soc/dapm.rst | 174 ++++++++++----- 2 files changed, 492 insertions(+), 57 deletions(-) --- base-commit: c942a0cd change-id: 20240315-dapm-docs-79bd51f267db Best regards, -- Luca Ceresoli <luca.ceresoli@bootlin.com>
-
Mark Brown authored
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: Last batch of cleanups from Brent Lu, with Chromebooks now supported with fewer modular machine drivers.
-
Mark Brown authored
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>: A set of changes that aims to improve readability of cohesiveness of the pcm code for the avs-driver. Start off with a change that synchronizes DAI open/close - DAIs are started up in ascending order yet their shutdown does not follow the scheme - it is done in the ascending order too, rather than desceding one. This patch is a dependency for the next one in line. To align the HDAudio DAI startup/shutdown with the non-HDAudio equivalents, relocate the code from component to DAI. The reason above is a dependency stems from codec driver requirements - HDAudio code found in sound/pci/hda/ expects substream->runtime->private_data to point to a valid stream (HOST) pointer. With the hard part done, the follow up changes update the existing code to reduce it is complexity - removal of duplicates, renaming of ambiguous functions and adding new fields to DAI-data object so that the number of local variables and casts is reduced.
-
Mark Brown authored
Merge series from Krzysztof Kozlowski <krzk@kernel.org>: The core code does not modify the 'struct snd_sof_dsp_ops' passed via pointer in various places, so this can be made pointer to const in few places. This in turn allows few drivers to have the local (usually static) 'struct snd_sof_dsp_ops' as const which increased code safety, as it is now part of rodata. Not all drivers can be made safer that way. Intel and AMD rely on customizing that 'struct snd_sof_dsp_ops' before passing to SOF, so they won't benefit. They don't lose anything., either.
-
Mark Brown authored
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: Fixes when fw_lib_prefix is not set, updated error messages, improved dmesg logs to SoundWire configurations not supported by ACPI tables/topology and support for IEC61937 passthrough.
-
Mark Brown authored
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: This patchset corrects a couple of mistakes corrected, improves snd_soc_card allocation. The new functionality is mostly for SoundWire platforms, with new SKUs for Dell and Acer, and support for the Cirrus Logic bridge/sidecar amplifier topology.
-
Joao Schim authored
The AllWinner H6 and later SoCs that sport a DMIC block contain a set of registers to control the gain (left + right) of each of the four supported channels. Add ASoC controls for changing each of the stereo channel gains using alsamixer and alike Signed-off-by: Joao Schim <joao@schimsalabim.eu> Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com> Link: https://lore.kernel.org/r/20240429194920.1596257-1-joao@schimsalabim.euSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mohammad Shehar Yaar Tausif authored
Convert NVIDIA Tegra30 I2S binding to DT schema and add "clock-names" property used by multiple tegra i2s blocks in arch/arm64/boot/dts/nvidia/tegra132.dtsi. This is not a required property by the binding. Signed-off-by: Mohammad Shehar Yaar Tausif <sheharyaar48@gmail.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20240426170322.36273-1-sheharyaar48@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 29 Apr, 2024 28 commits
-
-
Krzysztof Kozlowski authored
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made const for increased code safety. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-14-e553fe67ae82@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made const for increased code safety. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-13-e553fe67ae82@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made const for increased code safety. Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-12-e553fe67ae82@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made const for increased code safety. Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-11-e553fe67ae82@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made const for increased code safety. Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-10-e553fe67ae82@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made const for increased code safety. Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-9-e553fe67ae82@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made const for increased code safety. Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-8-e553fe67ae82@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made const for increased code safety. Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-7-e553fe67ae82@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made const for increased code safety. Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-6-e553fe67ae82@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made const for increased code safety. Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-5-e553fe67ae82@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
The core code does not modify the 'struct snd_sof_dsp_ops', stored in 'struct sof_dev_desc'. Make the pointer to 'struct snd_sof_dsp_ops' const to annotate this, make code a bit safer and allow individual drivers to also define this structure as const. Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-4-e553fe67ae82@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
Constify the pointer to 'struct snd_sof_dsp_ops' to annotate that functioon does not modify pointed data. Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-3-e553fe67ae82@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
Constify the pointer to 'struct snd_sof_dsp_ops' to annotate that functioon does not modify pointed data. Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-2-e553fe67ae82@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Krzysztof Kozlowski authored
Constify the pointer to 'struct snd_sof_dsp_ops' to annotate that functioon does not modify pointed data. Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-1-e553fe67ae82@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Peter Ujfalusi authored
If a PCM is set to use ChainDMA then add it to the card->components string after a marker of iec61937-pcm:, for example on current HDA platforms where HDMI is set to use ChainDMA: iec61937-pcm:5,4,3 (the order of the PCM ids can differ) UCM is expected to parse and use this property to allow applications to use bytestream passthrough in a standard way. 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/20240426153902.39560-6-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
Most of the SoundWire support issues come from bad ACPI information, or configuration reported by ACPI that are not supported by the SOF driver/topology. The users see a "No SoundWire machine driver found" message without any details, and the fallback to HDaudio w/ HDMI is used. We can reduce our support load with a clear dev_info() log that will give us a clear hint on the mismatch and why a machine driver/topology were not found. Example log on a MTL device: [ 13.158599] sof-audio-pci-intel-mtl 0000:00:1f.3: No SoundWire machine driver found for the ACPI-reported configuration: [ 13.158603] sof-audio-pci-intel-mtl 0000:00:1f.3: link 0 mfg_id 0x025d part_id 0x0713 version 0x3 [ 13.158606] sof-audio-pci-intel-mtl 0000:00:1f.3: link 1 mfg_id 0x025d part_id 0x1316 version 0x3 [ 13.158608] sof-audio-pci-intel-mtl 0000:00:1f.3: link 2 mfg_id 0x025d part_id 0x1316 version 0x3 In parallel, we will also provide an update to `alsa-info` to log all SoundWire peripherals found in ACPI tables. Signed-off-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/20240426153902.39560-5-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
Simplify code to return when no links are enabled. No functional change, just code cleanup before updates. Signed-off-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/20240426153902.39560-4-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Yong Zhi authored
In sof_widget_ready() function, the shift field of struct snd_soc_tplg_dapm_widget is incorrectly used to print widget id in dev_err(scomp->dev, "error: failed to add widget id %d ..", this patch removes the useless tw->shift from the error output. Reviewed-by: Ranjani Sridharan <ranjani.sridharan@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://lore.kernel.org/r/20240426153902.39560-3-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Peter Ujfalusi authored
The firmware libraries are not supported by IPC3, the fw_lib_path is not a valid parameter and it is always NULL. Do not create the debugfs file for IPC3 at all as it is not applicable. With IPC4 some vendors/platforms might not support loadable libraries and the fw_lib_prefix is left to NULL to indicate this. Handle such case with allocating "Not supported" string. Reviewed-by: Marc Herbert <marc.herbert@intel.com> Fixes: 17f40412 ("ASoC: SOF: debug: show firmware/topology prefix/names") 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/20240426153902.39560-2-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mark Brown authored
Some new SOF changes depend on the fixes there.
-
Maciej Strozek authored
The cs42l43 has both a SPI master and an I2S interface, these can be used to populate 2 cs35l56 amplifiers as sidecar devices along side the cs42l43. Giving a system that looks like: +-----+ +---------+ <- SPI -> +---------+ | CPU | <- SDW -> | CS42L43 | | CS35L56 | +-----+ +---------+ <- I2S -> +---------+ Add a quirk to specify this feature is present and use it to add codec to codec DAI link to connect the amplifiers into the sound card, add appropriate widgets, and setup clocking on the amplifiers. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20240426152123.36284-13-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Charles Keepax authored
Add support for systems that have additional non-SoundWire devices (sidecars) connected to one of the SoundWire devices in the system. This is done through the addition of two callbacks, one used at endpoint parsing time that will return the number of devices and DAI links to be added, and another called later as the DAI links are created that will populate those devices into the appropriate arrays. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20240426152123.36284-12-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Charles Keepax authored
Move the population of the codec_conf array from endpoint parsing time to link creation time. This is slightly cleaner as the population is done whilst the DAI links are also being populated, putting all population together. However, primarily this facilitates allowing additional non-SoundWire devices to be easily added into the array in future feature additions. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20240426152123.36284-11-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
Two independent GitHub PRs let to the addition of one quirk after it was removed.. Fixes: b10cb955 ("ASoC: Intel: sof_sdw: add quirk for Dell SKU 0C0F") Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20240426152123.36284-10-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Bard Liao authored
UCM parse amp with Regex " cfg-amp:([0-9]+)". The "ASoC: Intel: sof_sdw: remove FOUR_SPEAKER quirks" patch removed "cfg-spk:%d " from components which removed the necessary space as well and cause UCM can't parse the amp number properly. Fixes: 744866d2 ("ASoC: Intel: sof_sdw: remove FOUR_SPEAKER quirks") 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://lore.kernel.org/r/20240426152123.36284-9-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Pierre-Louis Bossart authored
UCM can load a board-specific file based on the card long_name. Remove the constant "Intel Soundwire SOF" long_name so that the ASoC core can set the long_name based on DMI information. 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> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20240426152123.36284-8-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Peter Ujfalusi authored
The static card_sof_sdw struct is modified during runtime and in case the module is not removed, but the card is, then the next time the card is created the card_sof_sdw will contain information from the previous card which might lead to hard to debug issues, side effects. Move the snd_soc_card into mc_private and use that to make sure that the card is initialized correctly. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@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/20240426152123.36284-7-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Mac Chiang authored
This patch adds support for corresponding codecs on LNL hardware configuration: SDW0: RT714 DMIC SDW1: RT1318 Left Speaker SDW2: RT1318 Right Speaker Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Mac Chiang <mac.chiang@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20240426152123.36284-6-pierre-louis.bossart@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-