Dr. David Alan Gilbert [Sun, 11 May 2025 17:29:57 +0000 (18:29 +0100)]
ALSA: msnd: Remove midi code
Nothing calls snd_msndmidi_new()
thus nothing sets chip->msndmidi_mpu
The call to snd_msndmidi_input_read is gated on that being set,
so snd_msndmidi_input_read() won't be called either.
This is probably a missing call to snd_msndmidi_new(), but since
this is ancient code, it's probably best to remove it (especially
since I don't have the hardware to test it).
Peter Ujfalusi [Thu, 8 May 2025 18:14:46 +0000 (21:14 +0300)]
ALSA: hda: intel-nhlt: Print errors in intel_nhlt_ssp_device_type()
Do not fail silently when the intel_nhlt_ssp_device_type() fails as it can
be for two reasons:
The NHLT table is missing or the SSP instance is missing from the table.
Dr. David Alan Gilbert [Thu, 8 May 2025 00:02:25 +0000 (01:02 +0100)]
ALSA: gus: Remove deadcode
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.
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.
The last use of snd_seq_queue_client_leave_cells() was removed in 2018
by
commit 85d59b57be59 ("ALSA: seq: Remove superfluous
snd_seq_queue_client_leave_cells() call")
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")
ALSA: hda/tas2781: Remove tas2781_spi_fwlib.c and leverage 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.
Richard Fitzgerald [Mon, 28 Apr 2025 09:41:26 +0000 (10:41 +0100)]
ALSA: hda/cs35l56: Remove dependency on COMPILE_TEST
Change the Kconfig dependency on ACPI || COMPILE_TEST to only depend on
ACPI.
The alternate dependency on COMPILE_TEST was a fudge to enable building
KUnit tests for modules that are selected by the CS35L56 driver but don't
depend on ACPI. This was based on a misunderstanding that KUNIT_ALL_TESTS
meant "all tests". Actually KUNIT_ALL_TESTS only means "tests for modules
that have satisfied dependencies" so it shouldn't be overriding
dependencies.
ALSA: korg1212: Replace the pending stop check code with sync_stop PCM ops
The korg1212 driver has an overly complex code with the timer API to
check the pending stop operation and to sync at the prepare stage.
This very same thing can be achieved more simply by the PCM sync_stop
ops without timer, and this patch implements it.
Along with the rewrite to sync_stop ops, the flag
dsp_stop_is_processed is replaced with dsp_stop_processing to indicate
the stop operation is pending, not to indicate it's finished. In that
way, wait_for_event() can be used more straightforwardly.
The cs35l56_hda driver now doesn't use hda_cs_dsp_ctl at all. The
cs35l41_hda driver only uses the small array of firmware names and the
function to read a control value. All other functions and data in
hda_cs_dsp_ctl are unused. There is no need to keep a separate module
for such a small amount of data and code that is only used by one driver,
so remove the whole module.
Philipp Stanner [Wed, 23 Apr 2025 07:53:46 +0000 (09:53 +0200)]
ALSA: maestro3: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:45 +0000 (09:53 +0200)]
ALSA: ali5451: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:44 +0000 (09:53 +0200)]
ALSA: ca0106: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:43 +0000 (09:53 +0200)]
ALSA: cs46xx: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:42 +0000 (09:53 +0200)]
ALSA: cs5535: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:41 +0000 (09:53 +0200)]
ALSA: echoaudio: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:40 +0000 (09:53 +0200)]
ALSA: emu10k1: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:39 +0000 (09:53 +0200)]
ALSA: ice: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:38 +0000 (09:53 +0200)]
ALSA: nm256: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:37 +0000 (09:53 +0200)]
ALSA: riptide: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:36 +0000 (09:53 +0200)]
ALSA: ymfpci: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:35 +0000 (09:53 +0200)]
ALSA: rme9652: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:34 +0000 (09:53 +0200)]
ALSA: trident: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
In addition, the request function's name parameter should describe the
driver, not the device.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:33 +0000 (09:53 +0200)]
ALSA: vx222: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Pass the driver's name as the name parameter of
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:32 +0000 (09:53 +0200)]
ALSA: lx6464es: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:31 +0000 (09:53 +0200)]
ALSA: oxygen: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:30 +0000 (09:53 +0200)]
ALSA: als: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:29 +0000 (09:53 +0200)]
ALSA: azt3328: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:28 +0000 (09:53 +0200)]
ALSA: es19x8: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:27 +0000 (09:53 +0200)]
ALSA: fm801: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:26 +0000 (09:53 +0200)]
ALSA: intel8x: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:25 +0000 (09:53 +0200)]
ALSA: sis7019: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:24 +0000 (09:53 +0200)]
ALSA: via82: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:23 +0000 (09:53 +0200)]
ALSA: cmipci: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:22 +0000 (09:53 +0200)]
ALSA: ens1370: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:21 +0000 (09:53 +0200)]
ALSA: rme32: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:20 +0000 (09:53 +0200)]
ALSA: rme96: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
Philipp Stanner [Wed, 23 Apr 2025 07:53:19 +0000 (09:53 +0200)]
ALSA: sonicvibes: Use pure devres PCI
pci_request_regions() is a hybrid function which becomes managed if
pcim_enable_device() was called before. This hybrid nature is deprecated
and should not be used anymore.
Replace pci_request_regions() with the always-managed function
pcim_request_all_regions().
František Kučera [Mon, 21 Apr 2025 15:59:53 +0000 (17:59 +0200)]
ALSA: usb-audio: Add Pioneer DJ DJM-V10 support
Pioneer DJ DJM-V10 is a high end mixer that acts like a USB sound card.
The MIDI controller part is standard but the PCM part is "vendor specific".
Input and output is enabled by this patch:
- 12 channels (6 stereo) in each direction
- 44 100 / 48 000 / 96 000 Hz
- S24_3LE
Capture channels can be configured through alsamixer.
Playback channels are fixed and controlled by hardware knobs on the mixer.
ALSA: pcm: Make snd_pcm_lib_malloc_pages() debug message say "allocate"
snd_pcm_lib_malloc_pages() is commonly used for allocating buffers during
the hw_params callback, whereas preallocating buffers goes through
preallocate_pcm_pages().
Having the same terminology in the failure debug messages in both
misleads developers.
Change the debug message in snd_pcm_lib_malloc_pages() to use the
term "allocate" to match its intended use.
ALSA: hda/tas2781: Create a common header for both spi and i2c tas2781 hda driver
Move the common macro definition of kcontrols into a common header for code
cleanup, and create a common header to store the common declaration for
both spi and i2c hda driver.
Richard Fitzgerald [Tue, 15 Apr 2025 10:54:14 +0000 (11:54 +0100)]
ALSA: hda/cirrus_scodec_test: Modernize creation of dummy devices
Replace the old direct use of platform_device APIs with newer KUnit APIs
and the faux bus.
The dummy codec driver device doesn't need to be a platform device.
It can be a faux bus device.
The dummy GPIO driver still must be a platform_device so that a
software_node can be added to it before it probes. But use the new
KUnit-managed APIs to create the platform_device and platform_driver.
These will cleanup automatically when a test completes or fails.
Also use KUnit resource cleanup to destroy the faux bus driver and the GPIO
software node instead of doing this "manually" in test exit() functions.
Merge tag 'asoc-fix-v6.15-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.15
A set of small fixes, quirks and device ID additions that came in since
-rc1, none of them super stand out. There's also a change to Srini's
email address in MAINTAINERS.
Richard Fitzgerald [Thu, 10 Apr 2025 13:21:29 +0000 (14:21 +0100)]
firmware: cs_dsp: test_bin_error: Fix uninitialized data used as fw version
Call cs_dsp_mock_xm_header_get_fw_version() to get the firmware version
from the dummy XM header data in cs_dsp_bin_err_test_common_init().
Make the same change to cs_dsp_bin_test_common_init() and remove the
cs_dsp_mock_xm_header_get_fw_version_from_regmap() function.
The code in cs_dsp_test_bin.c was correctly calling
cs_dsp_mock_xm_header_get_fw_version_from_regmap() to fetch the fw version
from a dummy header it wrote to XM registers. However in
cs_dsp_test_bin_error.c the test doesn't stuff a dummy header into XM, it
populates it the normal way using a wmfw file. It should have called
cs_dsp_mock_xm_header_get_fw_version() to get the data from its blob
buffer, but was calling cs_dsp_mock_xm_header_get_fw_version_from_regmap().
As nothing had been written to the registers this returned the value of
uninitialized data.
The only other use of cs_dsp_mock_xm_header_get_fw_version_from_regmap()
was cs_dsp_test_bin.c, but it doesn't need to use it. It already has a
blob buffer containing the dummy XM header so it can use
cs_dsp_mock_xm_header_get_fw_version() to read from that.
ASoC: fsl: fsl_qmc_audio: Reset audio data pointers on TRIGGER_START event
On SNDRV_PCM_TRIGGER_START event, audio data pointers are not reset.
This leads to wrong data buffer usage when multiple TRIGGER_START are
received and ends to incorrect buffer usage between the user-space and
the driver. Indeed, the driver can read data that are not already set by
the user-space or the user-space and the driver are writing and reading
the same area.
Fix that resetting data pointers on each SNDRV_PCM_TRIGGER_START events.
Charles Keepax [Wed, 9 Apr 2025 12:07:17 +0000 (13:07 +0100)]
ASoC: cs42l43: Reset clamp override on jack removal
Some of the manually selected jack configurations will disable the
headphone clamp override. Restore this on jack removal, such that
the state is consistent for a new insert.
Kailang Yang [Wed, 9 Apr 2025 07:09:08 +0000 (15:09 +0800)]
ALSA: hda/realtek - Fixed ASUS platform headset Mic issue
ASUS platform Headset Mic was disable by default.
Assigned verb table for Mic pin will enable it.
Fixes: 7ab61d0a9a35 ("ALSA: hda/realtek: Add support for ASUS B3405 and B3605 Laptops using CS35L41 HDA") Fixes: c86dd79a7c33 ("ALSA: hda/realtek: Add support for ASUS B5405 and B5605 Laptops using CS35L41 HDA") Signed-off-by: Kailang Yang <kailang@realtek.com> Link: https://lore.kernel.org/0fe3421a6850461fb0b7012cb28ef71d@realtek.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Depend on SND_HDA_CIRRUS_SCODEC and GPIOLIB instead of selecting them.
KUNIT_ALL_TESTS should only build tests that have satisfied dependencies
and test components that are already being built. It must not cause
other stuff to be added to the build.
ASoC: hdmi-codec: use RTD ID instead of DAI ID for ELD entry
commit 0ecd24a6d8b2 ("ASoC: hdmi-codec: dump ELD through procfs") adds
"eld#%d" entry for sound proc. It is using DAI ID. But it is possible to
have duplicate DAI ID on same Sound Card. In such case, we will get below
error. To avoid duplicate entry name, use RTD ID instead of DAI ID.
ASoC: Intel: avs: Constrain path based on BE capabilities
For i2s and DMIC copiers constraint stream capabilities based on
available NHLT configuration. This allows topology to provide generic
configuration that handles more hardware, while filtering unavailable
ones at runtime.
Henry Martin [Wed, 2 Apr 2025 14:14:11 +0000 (22:14 +0800)]
ASoC: Intel: avs: Fix null-ptr-deref in avs_component_probe()
devm_kasprintf() returns NULL when memory allocation fails. Currently,
avs_component_probe() does not check for this case, which results in a
NULL pointer dereference.
Fixes: 739c031110da ("ASoC: Intel: avs: Provide support for fallback topology") Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Ethan Carter Edwards <ethan@ethancedwards.com> Signed-off-by: Henry Martin <bsdhenrymartin@gmail.com> Link: https://patch.msgid.link/20250402141411.44972-1-bsdhenrymartin@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Shengjiu Wang [Wed, 19 Mar 2025 03:35:04 +0000 (11:35 +0800)]
ASoC: fsl_asrc_dma: get codec or cpu dai from backend
With audio graph card, original cpu dai is changed to codec device in
backend, so if cpu dai is dummy device in backend, get the codec dai
device, which is the real hardware device connected.
Case values introduced in commit 5f78e1fb7a3e ("ASoC: qcom: Add driver support for audioreach solution")
cause out of bounds access in arrays of sc7280 driver data (e.g. in case
of RX_CODEC_DMA_RX_0 in sc7280_snd_hw_params()).
Redefine LPASS_MAX_PORTS to consider the maximum possible port id for
q6dsp as sc7280 driver utilizes some of those values.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 77d0ffef793d ("ASoC: qcom: Add macro for lpass DAI id's max limit") Cc: stable@vger.kernel.org # v6.0+ Suggested-by: Mikhail Kobuk <m.kobuk@ispras.ru> Suggested-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Evgeny Pimenov <pimenoveu12@gmail.com> Link: https://patch.msgid.link/20250401204058.32261-1-pimenoveu12@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Brady Norander [Sun, 30 Mar 2025 13:08:54 +0000 (09:08 -0400)]
ASoC: dwc: always enable/disable i2s irqs
Commit a42e988 ("ASoC: dwc: add DMA handshake control") changed the
behavior of the driver to not enable or disable i2s irqs if using DMA. This
breaks platforms such as AMD ACP. Audio playback appears to work but no
audio can be heard. Revert to the old behavior by always enabling and
disabling i2s irqs while keeping DMA handshake control.
ASoC: codecs:lpass-wsa-macro: Fix logic of enabling vi channels
Existing code only configures one of WSA_MACRO_TX0 or WSA_MACRO_TX1
paths eventhough we enable both of them. Fix this bug by adding proper
checks and rearranging some of the common code to able to allow setting
both TX0 and TX1 paths
Without this patch only one channel gets enabled in VI path instead of 2
channels. End result would be 1 channel recording instead of 2.
Fixes: 2c4066e5d428 ("ASoC: codecs: lpass-wsa-macro: add dapm widgets and route") Cc: stable@vger.kernel.org Co-developed-by: Manikantan R <quic_manrav@quicinc.com> Signed-off-by: Manikantan R <quic_manrav@quicinc.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://patch.msgid.link/20250403160209.21613-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>