summaryrefslogtreecommitdiff
path: root/include/sound
AgeCommit message (Collapse)Author
2025-05-22Merge branch 'for-linus' into for-nextTakashi Iwai
Sync with the pending 6.15 fixes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-22Merge tag 'asoc-v6.16' of ↵Takashi Iwai
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v6.16 The changes in this release are quite large, mainly in drivers rather than the core. This is partly due to cleanups that touch a lot of drivers and partly due to several relatively large new drivers. - Support for automatically enumerating DAIs from standards conforming SoundWire SDCA devices, further work is required for these to be useful in an actual card. - Conversion of quite a few drivers to newer GPIO APIs. - More helpers and cleanups from Mormimoto-san. - Support for a wider range of AVS platforms. - Support for AMD ACP 7.x platforms, Cirrus Logic CS35L63 and CS48L32, Everest Semiconductor ES8389, Longsoon-1 AC'97 controllers, nVidia Tegra264, Richtek ALC203 and RT9123 and Rockchip SAI controllers.
2025-05-22ALSA: core: fix up bus match const issues.Greg Kroah-Hartman
In commit d69d80484598 ("driver core: have match() callback in struct bus_type take a const *"), the match bus callback was changed to have the driver be a const pointer. Unfortunately that const attribute was thrown away when container_of() is called, which is not correct and was not caught by the compiler due to how container_of() is implemented. Fix this up by correctly preserving the const attribute of the driver passed to the bus match function which requires the hdac_driver match function to also take a const pointer for the driver structure. Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Fixes: d69d80484598 ("driver core: have match() callback in struct bus_type take a const *") Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patch.msgid.link/2025052204-hyphen-thermal-3e72@gregkh Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-22ALSA: hda/tas2781: Move and unified the calibrated-data getting function for ↵Shenghao Ding
SPI and I2C into the tas2781_hda lib Calibration data getting function for SPI and I2C HDA drivers are almost same, which read the calibration data from UEFI. To put them into tas2781_hda lib for code cleanup is more reasonable than to still keep them in the codec driver. For tas2781 codec driver, there're two different sources for calibrated data, one is from bin file, generated in factory test, requested and read in codec driver side; the other is from user space during device bootup. Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Link: https://patch.msgid.link/20250522014347.1163-1-shenghao-ding@ti.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-21Add DAPM/ASoC helpers to create SDCA driversMark Brown
Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>: Add helper functions to add DAPM widgets, routes, ALSA controls, and DAI drivers, these will be used to create SDCA function device drivers. This series should provide most of the core functionality needed to get a device registered and have a working DAPM graph within the device. There are some features that still need additional work, these are marked with FIXMEs in the code. The two main things are SDCA Clock Muxes (not used in our devices and needs some ASoC core work), and better support for more complex SDCA volume control definitions (our parts have fairly simple volumes, and SDCA has a large amount of flexibility in how the volume control is specified). The next steps in the process are to add helpers for the DAI ops themselves, some IRQ handling, and firmware download. And finally we should be able to actually add the SDCA class driver itself.
2025-05-20ASoC: SDCA: Create DAI drivers from DisCoCharles Keepax
Use the previously parsed DisCo information from ACPI to create the DAI drivers required to connect an SDCA Function into an ASoC soundcard. Create DAI driver structures and populate the supported sample rates and sample widths into them based on the Input/Output Terminal and any attach Clock Source entities. More complex relationships with channels etc. will be added later as constraints as part of the DAI startup. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Link: https://patch.msgid.link/20250516131011.221310-8-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-20ASoC: SDCA: Create ALSA controls from DisCoCharles Keepax
Use the previously parsed DisCo information from ACPI to create the ALSA controls required by an SDCA Function. This maps all User and Application level SDCA Controls to ALSA controls. Typically controls marked with those access levels are just volumes and mutes. SDCA defines volume controls as an integer in 1/256ths of a dB and then provides a mechanism to specify what values are valid (range templates). Currently only a simple case of a single linear volume range with a power of 2 step size is supported. This allows the code to expose the volume control using a simple shift. This will need expanded in the future, to support more complex ranges and probably also some additional control types but this should be sufficient to for a first pass. For non-dataport terminal widgets also add a pin switch to allow that endpoint to be turned on/off. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Link: https://patch.msgid.link/20250516131011.221310-7-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-20ASoC: SDCA: Create DAPM widgets and routes from DisCoCharles Keepax
Use the previously parsed DisCo information from ACPI to create DAPM widgets and routes representing a SDCA Function. For the most part SDCA maps well to the DAPM abstractions. The primary point of interest is the SDCA Power Domain Entities (PDEs), which actually control the power status of the device. Whilst these PDEs are the primary widgets the other parts of the SDCA graph are added to maintain a consistency with the hardware abstract, and allow routing to take effect. As for the PDEs themselves the code currently only handle PS0 and PS3 (basically on and off), the two intermediate power states are not commonly used and don't map well to ASoC/DAPM. Other minor points of slightly complexity include, the Group Entities (GEs) these set the value of several other controls, typically Selector Units (SUs) for enabling a cetain jack configuration. Multiple SUs being controlled by a GE are easily modelled creating a single control and sharing it among the controlled muxes. SDCA also has a slight habit of having fully connected paths, relying more on activating the PDEs to enable functionality. This doesn't map quite so perfectly to DAPM which considers the path a reason to power the PDE. Whilst in the current specification Mixer Units are defined as fixed-function, in DAPM we create a virtual control for each input (which defaults to connected). This allows paths to be connected/disconnected, providing a more ASoC style approach to managing the power. PIN_SWITCHs will also be added for non-dataport terminal entities in a later patch along with the other ALSA controls, providing greater flexibility in power management. A top level helper sdca_asoc_populate_component() is exported that counts and allocates everything, however, the intermediate counting and population functions are also exported. This will allow end drivers to do allocation and add custom handling, which is probably fairly likely for the early SDCA devices. Clock muxes are currently not fully supported, so some future work will also be required there. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Link: https://patch.msgid.link/20250516131011.221310-6-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-20ASoC: dapm: Add component level pin switchesCharles Keepax
The core currently supports pin switches for source/sink widgets, but only at the card level. SDCA components specify the fabric at the level of the individual components, to support this add helpers to allow component level pin switches. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Link: https://patch.msgid.link/20250516131011.221310-5-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-20ASoC: SDCA: Fix minor typoCharles Keepax
Fix minor typo SDAC -> SDCA. Fixes: 42b144cb6a2d ("ASoC: SDCA: Add SDCA Control parsing") Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Link: https://patch.msgid.link/20250516131011.221310-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-20Add sound card support for QCS9100 and QCS9075Mark Brown
Merge series from Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>: This patchset adds support for sound card on Qualcomm QCS9100 and QCS9075 boards.
2025-05-19ASoC: tas2781: Header file cleanup and Move the macro definitions to fwlibShenghao Ding
Drop the I2C in one comment, for these registers are also used in SPI driver; Move the macro definition of TASDEVICE_CMD_XXX from tas2781.h to tas2781_fmwlib.c, because the macros are only referenced in only fwlib. Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Link: https://patch.msgid.link/20250518132451.707-1-shenghao-ding@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-16ALSA: pcm: Fix race of buffer access at PCM OSS layerTakashi Iwai
The PCM OSS layer tries to clear the buffer with the silence data at initialization (or reconfiguration) of a stream with the explicit call of snd_pcm_format_set_silence() with runtime->dma_area. But this may lead to a UAF because the accessed runtime->dma_area might be freed concurrently, as it's performed outside the PCM ops. For avoiding it, move the code into the PCM core and perform it inside the buffer access lock, so that it won't be changed during the operation. Reported-by: syzbot+32d4647f551007595173@syzkaller.appspotmail.com Closes: https://lore.kernel.org/68164d8e.050a0220.11da1b.0019.GAE@google.com Cc: <stable@vger.kernel.org> Link: https://patch.msgid.link/20250516080817.20068-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-16Merge branch 'for-linus' into for-nextTakashi Iwai
Back-merge of 6.15 devel branch for further development of HD-audio stuff. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-15cs35l56: Log tuning unique identifiers during firmwareMark Brown
Merge series from Simon Trimmer <simont@opensource.cirrus.com>: These two patches introduce a log message when provisioning the cs35l56 family of devices that uniquely identifies the firmware tuning.
2025-05-14ASoC: cs35l56: Log tuning unique identifiers during firmware loadSimon Trimmer
The cs35l56 smart amplifier has some informational firmware controls that are populated by a tuning bin file to unique values - logging these during firmware load identifies the specific configuration being used on that device instance. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Link: https://patch.msgid.link/47762a5f1ce2b178ad863c6698296aea09b72e10.1747142267.git.simont@opensource.cirrus.com Acked-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-12ASoC: soc-core: merge snd_soc_unregister_component() and ↵Kuninori Morimoto
snd_soc_unregister_component_by_driver() We have below 2 functions, but these are very similar (A) snd_soc_unregister_component_by_driver() (B) snd_soc_unregister_component() (A) void snd_soc_unregister_component_by_driver(...) { ... (a) mutex_lock(&client_mutex); ^ (X) component = snd_soc_lookup_component_nolocked(dev, component_driver->name); | if (!component) ^^^^^^^^^^^^^^^^^^^^^^ | goto out; (b) | snd_soc_del_component_unlocked(component); v out: (c) mutex_unlock(&client_mutex); } (B) void snd_soc_unregister_component_by_driver(...) { (a) mutex_lock(&client_mutex); ^ while (1) { | (X) struct snd_soc_component *component = snd_soc_lookup_component_nolocked(dev, NULL); | ^^^^ (b) if (!component) | break; | | snd_soc_del_component_unlocked(component); v } (c) mutex_unlock(&client_mutex); } Both are calling lock (a), find component and remove it (b), and unlock (c). The big diff is whether use driver name for lookup() or not (X). Merge these into snd_soc_unregister_component_by_driver() (B), and snd_soc_unregister_component_by_driver() (A) can be macro. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87h61qy2vn.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-11ALSA: ump: Fix a typo of snd_ump_stream_msg_device_infoTakashi Iwai
s/devince/device/ It's used only internally, so no any behavior changes. Fixes: 37e0e14128e0 ("ALSA: ump: Support UMP Endpoint and Function Block parsing") Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patch.msgid.link/20250511141147.10246-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-11ALSA: wavefront: remove snd_wavefront_xxx()Kuninori Morimoto
There is no snd_wavefront_xxx() implementation, and no one is using it. Let's remove it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87msbmpqls.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-11ALSA: isa/gus: remove snd_gf1_lfo_xxx()Kuninori Morimoto
There is no snd_gf1_lfo_xxx() implementation, and no one is using it. Let's remove it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87o6w2pqm8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-09ASoC: soc.h: remove unnecessary definitionsKuninori Morimoto
We don't need these definitions. Remove it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87ldr6pqlh.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-09ASoC: soc.h: remove snd_soc_disconnect_sync()Kuninori Morimoto
There is no snd_soc_disconnect_sync() implementation, and no one is using it. Let's remove it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87jz6qpql7.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-08ALSA: gus: Remove deadcodeDr. David Alan Gilbert
snd_gus_use_dec(), snd_gus_use_inc() and snd_gf1_print_voice_registers() last uses were removed in 2007 by commit e5723b41abe5 ("[ALSA] Remove sequencer instrument layer") Remove them. While there, remove big #if 0 blocks next to the code being deleted. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Link: https://patch.msgid.link/20250508000225.195766-1-linux@treblig.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-08ALSA: hda: Remove unused snd_hdac_stream_get_spbmaxfifoDr. David Alan Gilbert
snd_hdac_stream_get_spbmaxfifo() was originally added in 2015 in commit ee8bc4df1b5a ("ALSA: hdac: Add support to enable SPIB for hdac ext stream") when it was originally called snd_hdac_ext_stream_set_spbmaxfifo, it was renamed snd_hdac_ext_stream_get_spbmaxfifo shortly after and was finally renamed to snd_hdac_stream_get_spbmaxfifo in 2022. But it was never used. Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Link: https://patch.msgid.link/20250505011037.340592-1-linux@treblig.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-07ASoC: tas2781: Add a debugfs node for acoustic tuningShenghao Ding
"Acoustic Tuning" debugfs node is a bridge to the acoustic tuning tool which can tune the chips' acoustic effect. Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Link: https://patch.msgid.link/20250507094616.210-1-shenghao-ding@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-07Add support for CS35L63 Smart AmplifierMark Brown
Merge series from Stefan Binding <sbinding@opensource.cirrus.com>: CS35L63 is a Mono Class-D PC Smart Amplifier, with Speaker Protection and Audio Enhancement Algorithms. CS35L63 uses a similar control interface to CS35L56 so support for it can be added into the CS35L56 driver. CS35L63 only has SoundWire and I2C control interfaces.
2025-05-07ASoC: SOF: add disable_function_topology flag andMark Brown
Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>: SOF will load the function topologies by default. However, user may want to use the monolithic topology. Add a flag amd a module parameter to allow user specify the topology or not using function topologies.
2025-05-07Minor bug fix and tidy up for sof_sdwMark Brown
Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>: Fix a small bug that can cause the sof_sdw machine driver to fail probe after the first time it has probed. Also do some minor tidy up on the handling of the platform_component of the dai links.
2025-05-07ASoC: codec: cs42l[56,73,52]: Convert to GPIOMark Brown
Merge series from "Peng Fan (OSS)" <peng.fan@oss.nxp.com>: This patchset is separate from [1], and not merging changes in one patch. So separate changes into three patches for each chip. - sort headers - Drop legacy platform support - Convert to GPIO descriptors of_gpio.h is deprecated, update the driver to use GPIO descriptors. - Use devm_gpiod_get_optional to get GPIO descriptor with default polarity GPIOD_OUT_LOW, set consumer name. - Use gpiod_set_value_cansleep to configure output value. I not have platforms to test, just do the patches with my best efforts, and make build pass. [1] https://lore.kernel.org/all/20250408-asoc-gpio-v1-0-c0db9d3fd6e9@nxp.com/
2025-05-06ASoC: codec: cs42l52: Drop cs42l52.hPeng Fan
There is no in-tree user of "include/sound/cs42l52.h", so move 'struct cs42l52_platform_data ' to cs42l52.c and remove the header file. And platform data is mostly for legacy platforms that create devices non using device tree. So drop cs42l52.h to prepare using GPIOD API. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20250506-csl42x-v3-8-e9496db544c4@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-06ASoC: codec: cs42l73: Drop cs42l73.hPeng Fan
There is no in-tree user of "include/sound/cs42l56.h", so move 'struct cs42l73_platform_data ' to cs42l73.c and remove the header file. And platform data is mostly for legacy platforms that create devices non using device tree. So drop cs42l73.h to prepare using GPIOD API. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20250506-csl42x-v3-5-e9496db544c4@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-06ASoC: codec: cs42l56: Drop cs42l56.hPeng Fan
There is no in-tree user of "include/sound/cs42l56.h", so move 'struct cs42l56_platform_data' to cs42l56.c and remove the header file. And platform data is mostly for platforms that create devices non using device tree. CS42L56 is a discontinued product, there is less possibility that new users will use legacy method to create devices. So drop cs42l56.h to prepare using GPIOD API. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20250506-csl42x-v3-2-e9496db544c4@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-06ASoC: SOF: add disable_function_topology flagBard Liao
SOF driver will load required function topologies dynamically. However, we prefer using the monolithic topology. Add a flag to allow user not using the function topologies. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://patch.msgid.link/20250506113311.45487-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-06ASoC: cs35l56: Read Silicon ID from DIE_STS registers for CS35L63Stefan Binding
On CS35L63 the DIE_STS registers are populated by the Firmware from OTP, so the driver can read these registers directly, rather than obtaining them from OTP. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250407151842.143393-6-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-06ASoC: cs35l56: Add initial support for CS35L63 for I2C and SoundWireStefan Binding
CS35L63 uses a similar control interface to CS35L56 so support for it can be added into the CS35L56 driver. New regmap configs have been added to support CS35L63. CS35L63 only has SoundWire and I2C control interfaces. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250407151842.143393-5-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-06ASoC: cs35l56: Add Mute, Volume and Posture registers to firmware register listStefan Binding
Registers to set Mute, Volume and Posture are inside firmware, which means they should be added to the list of registers set inside firmware, in case they vary across Device or Revision. These three registers are also used for controls, so additional handling is required to be able to obtain and set the register inside ALSA controls. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250407151842.143393-4-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-06ASoC: cs35l56: Add struct to index firmware registersStefan Binding
Firmware based registers may be different addresses across different device ids and revision ids. Create a structure to store and access these addresses. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250407151842.143393-3-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-06AsoC: Phase out hybrid PCI devresMark Brown
Merge series from Philipp Stanner <phasta@kernel.org>: A year ago we spent quite some work trying to get PCI into better shape. Some pci_ functions can be sometimes managed with devres, which is obviously bad. We want to provide an obvious API, where pci_ functions are never, and pcim_ functions are always managed. Thus, everyone enabling his device with pcim_enable_device() must be ported to pcim_ functions. Porting all users will later enable us to significantly simplify parts of the PCI subsystem. See here [1] for details. This patch series does that for sound. Feel free to squash the commits as you see fit. P. [1] https://elixir.bootlin.com/linux/v6.14-rc4/source/drivers/pci/devres.c#L18
2025-05-06ASoC: sdw_utils: Remove num_platforms from simple DAI helperCharles Keepax
There is no point in passing num_platforms into asoc_sdw_init_simple_dai_link(). Firstly, as a single pointer for the component name is passed in only a single string can be passed and secondly if it is a complex DAI with multiple platforms it would make more sense to use asoc_sdw_init_dai_link(). Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250505141409.2614010-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-05ALSA: core: Remove unused snd_jack_set_parentDr. David Alan Gilbert
snd_jack_set_parent() was added as part of 2008's commit e76d8ceaaff9 ("ALSA: Add jack reporting API") but hasn't been used. Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250502235219.1000429-6-linux@treblig.org
2025-05-05ALSA: core: Remove unused snd_device_get_stateDr. David Alan Gilbert
snd_device_get_state() last use was removed in 2022 by commit 7e1afce5866e ("ALSA: usb-audio: Inform the delayed registration more properly") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250502235219.1000429-5-linux@treblig.org
2025-05-05ALSA: pcm: Remove unused snd_dmaengine_pcm_open_request_chanDr. David Alan Gilbert
snd_dmaengine_pcm_open_request_chan() last use was removed in 2022's commit b401d1fd8053 ("ASoC: pxa: remove unused board support") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250502235219.1000429-3-linux@treblig.org
2025-05-05ALSA: pcm: Remove unused snd_pcm_rate_range_to_bitsDr. David Alan Gilbert
The last use of snd_pcm_rate_range_to_bits() was removed in 2016 by commit b6b6e4d670c9 ("ASoC: topology: Fix setting of stream rates, rate_min and rate_max") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250502235219.1000429-2-linux@treblig.org
2025-05-03ASoC: soc-utils: add snd_soc_dlc_is_dummy()Mark Brown
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: We are using dummy component/dlc, but didn't have its check funciton. This patch adds it.
2025-05-02ASoC: soc-utils: add snd_soc_dlc_is_dummy()Kuninori Morimoto
We have snd_soc_xxx_is_dummy() functions, but not for dlc. Let's add it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87cydc8vup.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-01Merge tag 'asoc-fix-v6.15-rc4' of ↵Takashi Iwai
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.15 A moderately large batch of fixes for v6.15, many driver specific including cleanups for the enabling of the Cirrus KUnit tests and a fix for a nasty crash on resume on AMD systems. We also have one core fix, for an ordering issue between DAPM and DPCM which could leave things incorrectly unpowered.
2025-05-01ASoC: intel/sdw_utils: Add volume limit to cs35l56 speakersStefan Binding
The volume control for cs35l56 speakers has a maximum gain of +12 dB. However, for many use cases, this can cause distorted audio, depending various factors, such as other signal-processing elements in the chain, for example if the audio passes through a gain control before reaching the amp or the signal path has been tuned for a particular maximum gain in the amp. In the case of systems which use the soc_sdw_* driver, audio will likely be distorted in all cases above 0 dB, therefore add a volume limit of 400, which is 0 dB maximum volume inside this driver. The volume limit should be applied to both soundwire and soundwire bridge configurations. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://patch.msgid.link/20250430103134.24579-3-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-30ALSA: hda/tas2781: Remove tas2781_spi_fwlib.c and leverage ↵Shenghao Ding
SND_SOC_TAS2781_FMWLIB Most codes in tas2781_spi_fwlib.c are same as tas2781-fmwlib.c, mainly for firmware parsing, only differece is the register reading, bit update and book switching in i2c and spi. The main purpose of this patch is for code cleaup and arrange the shared part for i2c and spi. Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/20250429111055.567-1-shenghao-ding@ti.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-04-29ALSA: ump: Fix buffer overflow at UMP SysEx message conversionTakashi Iwai
The conversion function from MIDI 1.0 to UMP packet contains an internal buffer to keep the incoming MIDI bytes, and its size is 4, as it was supposed to be the max size for a MIDI1 UMP packet data. However, the implementation overlooked that SysEx is handled in a different format, and it can be up to 6 bytes, as found in do_convert_to_ump(). It leads eventually to a buffer overflow, and may corrupt the memory when a longer SysEx message is received. The fix is simply to extend the buffer size to 6 to fit with the SysEx UMP message. Fixes: 0b5288f5fe63 ("ALSA: ump: Add legacy raw MIDI support") Reported-by: Argusee <vr@darknavy.com> Link: https://patch.msgid.link/20250429124845.25128-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-04-24ASoC: codec: tpa6130a2: Remove tpa6130a2_platform_dataPeng Fan
There is no in-tree user to create the device using platform data 'struct tpa6130a2_platform_data', so drop the dead code. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20250414-asoc-tpa6130a2-v1-2-5f4052e656a0@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>