linux-block.git
9 months agoALSA: hda/realtek: Add quirk for Huawei MateBook 13 KLV-WX9
Ai Chao [Thu, 26 Sep 2024 06:02:52 +0000 (14:02 +0800)]
ALSA: hda/realtek: Add quirk for Huawei MateBook 13 KLV-WX9

The headset mic requires a fixup to be properly detected/used.

Signed-off-by: Ai Chao <aichao@kylinos.cn>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20240926060252.25630-1-aichao@kylinos.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 months agoALSA: usb-audio: Add delay quirk for VIVO USB-C HEADSET
Lianqin Hu [Wed, 25 Sep 2024 03:16:29 +0000 (03:16 +0000)]
ALSA: usb-audio: Add delay quirk for VIVO USB-C HEADSET

Audio control requests that sets sampling frequency sometimes fail on
this card. Adding delay between control messages eliminates that problem.

Signed-off-by: Lianqin Hu <hulianqin@vivo.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/TYUPR06MB62177E629E9DEF2401333BF7D2692@TYUPR06MB6217.apcprd06.prod.outlook.com
9 months agoALSA: Fix typos in comments across various files
Yu Jiaoliang [Tue, 24 Sep 2024 04:17:45 +0000 (12:17 +0800)]
ALSA: Fix typos in comments across various files

This patch fixes typos in comments within the ALSA subsystem.
These changes improve code readability without affecting
functionality.

Signed-off-by: Yu Jiaoliang <yujiaoliang@vivo.com>
Link: https://patch.msgid.link/20240924041749.3125507-1-yujiaoliang@vivo.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 months agoselftest: alsa: check if user has alsa installed
Abdul Rahim [Sun, 22 Sep 2024 22:58:18 +0000 (04:28 +0530)]
selftest: alsa: check if user has alsa installed

Currently, if alsa development package is not installed on the user's
system then the make command would print a `pagefull` of errors. In
particular one error message is repeated 3 times. This error is returned
by `pkg-config` and since it is not being handeled appropriately,
repeated calls to `pkg-config` prints the same message again.

This patch adds check for alsa package installation. If alsa is not
installed, a short and consize error is returned. Also, it does not
affect the compilation of other tests.

Signed-off-by: Abdul Rahim <abdul.rahim@myyahoo.com>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://patch.msgid.link/20240922225824.18918-1-abdul.rahim@myyahoo.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: Drop explicit initialization of struct i2c_device_id::driver_data to 0
Uwe Kleine-König [Fri, 20 Sep 2024 15:10:08 +0000 (17:10 +0200)]
ALSA: Drop explicit initialization of struct i2c_device_id::driver_data to 0

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@baylibre.com>
Link: https://patch.msgid.link/20240920151009.499188-2-u.kleine-koenig@baylibre.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: hda/tas2781: Add new quirk for Lenovo Y990 Laptop
Baojun Xu [Thu, 19 Sep 2024 07:57:43 +0000 (15:57 +0800)]
ALSA: hda/tas2781: Add new quirk for Lenovo Y990 Laptop

Add new vendor_id and subsystem_id in quirk for Lenovo Y990 Laptop.

Signed-off-by: Baojun Xu <baojun.xu@ti.com>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20240919075743.259-1-baojun.xu@ti.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: hda/realtek: fix mute/micmute LED for HP mt645 G8
Nikolai Afanasenkov [Mon, 16 Sep 2024 19:50:42 +0000 (13:50 -0600)]
ALSA: hda/realtek: fix mute/micmute LED for HP mt645 G8

The HP Elite mt645 G8 Mobile Thin Client uses an ALC236 codec
and needs the ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF quirk
to enable the mute and micmute LED functionality.

This patch adds the system ID of the HP Elite mt645 G8
to the `alc269_fixup_tbl` in `patch_realtek.c`
to enable the required quirk.

Cc: stable@vger.kernel.org
Signed-off-by: Nikolai Afanasenkov <nikolai.afanasenkov@hp.com>
Link: https://patch.msgid.link/20240916195042.4050-1-nikolai.afanasenkov@hp.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoMerge branch 'for-linus' into for-next
Takashi Iwai [Sat, 14 Sep 2024 08:16:12 +0000 (10:16 +0200)]
Merge branch 'for-linus' into for-next

Pull 6.11 fixes to 6.12-devel branch

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoMerge tag 'asoc-v6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Sat, 14 Sep 2024 07:09:59 +0000 (09:09 +0200)]
Merge tag 'asoc-v6.12' of https://git./linux/kernel/git/broonie/sound into for-next

ASoC: Updates for v6.12

This is a very large set of changes, almost all in drivers rather than
the core.  Even with the addition of several quite large drivers the
overall diffstat is negative thanks to the removal of some old Intel
board support which has been obsoleted by the AVS driver, helped a bit
by some factoring out into helpers (especially around the Soundwire
machine drivers for x86).

Highlights include:

 - More simplifications and cleanups throughout the subsystem from
   Morimoto-san.
 - Extensive cleanups and refactoring of the Soundwire drivers to make
   better use of helpers.
 - Removal of Intel machine support obsoleted by the AVS driver.
 - Lots of DT schema conversions.
 - Machine support for many AMD and Intel x86 platforms.
 - Support for AMD ACP 7.1, Mediatek MT6367 and MT8365, Realtek RTL1320
   SoundWire and rev C, and Texas Instruments TAS2563

10 months agoMerge tag 'asoc-fix-v6.11-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git...
Takashi Iwai [Sat, 14 Sep 2024 07:09:11 +0000 (09:09 +0200)]
Merge tag 'asoc-fix-v6.11-rc7' of https://git./linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.11

A few last minute fixes, plus an update for Pierre's contact details and
status.  It'd be good to get these into v6.11 (especially the
MAINTAINERS update) but it wouldn't be the end of the world if they
waited for the merge window, none of them are super remarkable and it's
just a question of timing that they're last minute.

10 months agoASoC: topology: Fix redundant logical jump
Tang Bin [Sun, 8 Sep 2024 14:02:59 +0000 (22:02 +0800)]
ASoC: topology: Fix redundant logical jump

In the function soc_tplg_dai_config, the logical jump
of 'goto err' is redundant, so remove it.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Link: https://patch.msgid.link/20240908140259.3859-1-tangbin@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: tas2781: Add Calibration Kcontrols for Chromebook
Shenghao Ding [Wed, 11 Sep 2024 23:27:37 +0000 (07:27 +0800)]
ASoC: tas2781: Add Calibration Kcontrols for Chromebook

Add calibration related kcontrol for speaker impedance calibration and
speaker leakage check for Chromebook.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20240911232739.1509-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoAMD SoundWire machine driver code refactor
Mark Brown [Fri, 13 Sep 2024 15:59:45 +0000 (16:59 +0100)]
AMD SoundWire machine driver code refactor

Merge series from Vijendar Mukunda <Vijendar.Mukunda@amd.com>:

This patch series moves common Soundwire endpoint parsing and dai
creation logic to common placeholder from Intel generic SoundWire
machine driver code to make it generic. AMD SoundWire machine driver
code is refactored to use these functions for SoundWire endpoint
parsing and dai creation logic.

Link: https://github.com/thesofproject/linux/pull/5171
10 months agoASoC: amd: acp: refactor SoundWire machine driver code
Vijendar Mukunda [Fri, 13 Sep 2024 09:06:31 +0000 (14:36 +0530)]
ASoC: amd: acp: refactor SoundWire machine driver code

Refactor Soundwire machine driver code by using common SoundWire
endpoint parsing helper functions.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20240913090631.1834543-6-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: sdw_utils/intel: move soundwire endpoint parsing helper functions
Vijendar Mukunda [Fri, 13 Sep 2024 09:06:30 +0000 (14:36 +0530)]
ASoC: sdw_utils/intel: move soundwire endpoint parsing helper functions

Move SoundWire endpoint parsing helper functions to common place holder.
These functions will be used by other platform machine driver code.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20240913090631.1834543-5-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: sdw_util/intel: move soundwire endpoint and dai link structures
Vijendar Mukunda [Fri, 13 Sep 2024 09:06:29 +0000 (14:36 +0530)]
ASoC: sdw_util/intel: move soundwire endpoint and dai link structures

Move Soundwire endpoint and dai link structures from Intel generic machine
driver code to common place holder(soc_sdw_utils.h). These structures will
be used in other platform SoundWire machine driver code.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20240913090631.1834543-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel: sof_sdw: rename soundwire parsing helper functions
Vijendar Mukunda [Fri, 13 Sep 2024 09:06:28 +0000 (14:36 +0530)]
ASoC: intel: sof_sdw: rename soundwire parsing helper functions

Rename SoundWire parsing helper functions with 'asoc_sdw' tag
to make it generic.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20240913090631.1834543-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: intel: sof_sdw: rename soundwire endpoint and dailink structures
Vijendar Mukunda [Fri, 13 Sep 2024 09:06:27 +0000 (14:36 +0530)]
ASoC: intel: sof_sdw: rename soundwire endpoint and dailink structures

Rename SoundWire endpoint and dai link structures with asoc tag to make it
generic.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20240913090631.1834543-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: atmel: mchp-pdmc: Retain Non-Runtime Controls
Codrin Ciubotariu [Fri, 13 Sep 2024 12:06:22 +0000 (15:06 +0300)]
ASoC: atmel: mchp-pdmc: Retain Non-Runtime Controls

Avoid removing these controls, as doing so can cause issues if the stream
is initiated from another control. Ensure these controls remain intact when
the stream is started or finished. Instead of removing them, return an
-EBUSY error code to indicate that the controller is busy, especially when
the audio filter and the SINC filter are in use.

[andrei.simion@microchip.com: Reword the commit title and the commit
message. Replace spinlock and busy variable with atomic_t busy_stream.]

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Signed-off-by: Andrei Simion <andrei.simion@microchip.com>
Link: https://patch.msgid.link/20240913120621.79088-1-andrei.simion@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoALSA: hda/realtek: Add support for Galaxy Book2 Pro (NP950XEE)
Joshua Grisham [Fri, 13 Sep 2024 08:00:55 +0000 (10:00 +0200)]
ALSA: hda/realtek: Add support for Galaxy Book2 Pro (NP950XEE)

Adds support for GB2Pro Arc variant (NP950XEE) based on successful
test and information provided by Github user drewdrew0 [1].

[1]: https://github.com/thesofproject/linux/issues/4055#issuecomment-2346890020

Signed-off-by: Joshua Grisham <josh@joshuagrisham.com>
Link: https://patch.msgid.link/20240913080055.10807-1-josh@joshuagrisham.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoASoC: Intel: boards: updates for 6.12 - part 2
Mark Brown [Thu, 12 Sep 2024 18:59:49 +0000 (19:59 +0100)]
ASoC: Intel: boards: updates for 6.12 - part 2

Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>:

Cleanup from Brent Lu and add HDMI-In capture supports from Balamurugan C.

10 months agoASoC: mediatek: mt7986-afe-pcm: Remove redundant error message
Tang Bin [Thu, 12 Sep 2024 08:41:10 +0000 (16:41 +0800)]
ASoC: mediatek: mt7986-afe-pcm: Remove redundant error message

In the function mt7986_afe_pcm_dev_probe, when get irq
failed, the function platform_get_irq() logs an error
message, so remove redundant one here.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Link: https://patch.msgid.link/20240912084110.1854-1-tangbin@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoALSA: memalloc: Use proper DMA mapping API for x86 S/G buffer allocations
Takashi Iwai [Thu, 12 Sep 2024 15:52:25 +0000 (17:52 +0200)]
ALSA: memalloc: Use proper DMA mapping API for x86 S/G buffer allocations

The fallback S/G buffer allocation for x86 used the addresses deduced
from the page allocations blindly.  It broke the allocations on IOMMU
and made us to work around with a hackish DMA ops check.

For cleaning up those messes, this patch switches to the proper DMA
mapping API usages with the standard sg-table instead.

By introducing the sg-table, the address table isn't needed, but for
keeping the original allocation sizes for freeing, replace it with the
array keeping the number of pages.

The get_addr callback is changed to use the existing one for
non-contiguous buffers.  (Also it's the reason sg_table is put at the
beginning of struct snd_dma_sg_fallback.)

And finally, the hackish workaround that checks the DMA ops is
dropped now.

Link: https://patch.msgid.link/20240912155227.4078-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: memalloc: Use proper DMA mapping API for x86 WC buffer allocations
Takashi Iwai [Thu, 12 Sep 2024 15:52:24 +0000 (17:52 +0200)]
ALSA: memalloc: Use proper DMA mapping API for x86 WC buffer allocations

The x86 WC page allocation assumes incorrectly the DMA address
directly taken from the page.  Also it checks the DMA ops
inappropriately for switching to the own method.

This patch rewrites the stuff to use the proper DMA mapping API
instead.

Link: https://patch.msgid.link/20240912155227.4078-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: usb-audio: Add logitech Audio profile quirk
Joshua Pius [Thu, 12 Sep 2024 15:26:28 +0000 (15:26 +0000)]
ALSA: usb-audio: Add logitech Audio profile quirk

Specify shortnames for the following Logitech Devices: Rally bar, Rally
bar mini, Tap, MeetUp and Huddle.

Signed-off-by: Joshua Pius <joshuapius@chromium.org>
Link: https://patch.msgid.link/20240912152635.1859737-1-joshuapius@google.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoASoc: mediatek: mt8365: Remove unneeded assignment
Muhammad Usama Anjum [Wed, 11 Sep 2024 12:36:22 +0000 (17:36 +0500)]
ASoc: mediatek: mt8365: Remove unneeded assignment

The ret is being assigned, but not being used. Remove the assignment.
One of the reviewer mentioned that dev_warn should be replaced with
dev_info. Make this change as well.

Fixes: 1bf6dbd75f76 ("ASoc: mediatek: mt8365: Add a specific soundcard for EVK")
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20240911123629.125686-1-usama.anjum@collabora.com
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: ARL: Add entry for HDMI-In capture support to non-I2S codec boards.
Balamurugan C [Thu, 12 Sep 2024 12:03:08 +0000 (20:03 +0800)]
ASoC: Intel: ARL: Add entry for HDMI-In capture support to non-I2S codec boards.

Adding HDMI-In capture support for the ARL products which doesn't have
onboard I2S codec. But need to support HDMI-In capture via I2S and
audio playback through HDMI/DP monitor.

Signed-off-by: Balamurugan C <balamurugan.c@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20240912120308.134762-8-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: sof_rt5682: Add HDMI-In capture with rt5682 support for ARL.
Balamurugan C [Thu, 12 Sep 2024 12:03:07 +0000 (20:03 +0800)]
ASoC: Intel: sof_rt5682: Add HDMI-In capture with rt5682 support for ARL.

Added match table entry on arl machines to support HDMI-In capture
with rt5682 I2S audio codec. also added the respective quirk
configuration in rt5682 machine driver.

Signed-off-by: Balamurugan C <balamurugan.c@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20240912120308.134762-7-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: SOF: Intel: hda: remove common_hdmi_codec_drv
Brent Lu [Thu, 12 Sep 2024 12:03:06 +0000 (20:03 +0800)]
ASoC: SOF: Intel: hda: remove common_hdmi_codec_drv

Do not set common_hdmi_codec_drv in SOF platform driver since no
machine driver needs it. Remove member variable common_hdmi_codec_drv
from snd_soc_acpi_mach_params structure.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20240912120308.134762-6-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: sof_pcm512x: do not check common_hdmi_codec_drv
Brent Lu [Thu, 12 Sep 2024 12:03:05 +0000 (20:03 +0800)]
ASoC: Intel: sof_pcm512x: do not check common_hdmi_codec_drv

The variable common_hdmi_codec_drv is always true on SOF platform so
we could remove the reference in machine driver.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20240912120308.134762-5-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: ehl_rt5660: do not check common_hdmi_codec_drv
Brent Lu [Thu, 12 Sep 2024 12:03:04 +0000 (20:03 +0800)]
ASoC: Intel: ehl_rt5660: do not check common_hdmi_codec_drv

The variable common_hdmi_codec_drv is always true on SOF platform so
we could remove the reference in machine driver.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20240912120308.134762-4-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: skl_hda_dsp_generic: use common module for DAI links
Brent Lu [Thu, 12 Sep 2024 12:03:03 +0000 (20:03 +0800)]
ASoC: Intel: skl_hda_dsp_generic: use common module for DAI links

Use intel_board module to create DAI link array for Intel iDisp HDMI,
HDA external codec, DMIC01, DMIC16K, and BT audio offload DAI BE links.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20240912120308.134762-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: board_helpers: support HDA link initialization
Brent Lu [Thu, 12 Sep 2024 12:03:02 +0000 (20:03 +0800)]
ASoC: Intel: board_helpers: support HDA link initialization

Add a helper function for machine drivers to initialize HDA external
codec DAI link.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20240912120308.134762-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Improvements for mchp-pdmc
Mark Brown [Thu, 12 Sep 2024 11:11:38 +0000 (12:11 +0100)]
ASoC: Improvements for mchp-pdmc

Merge series from Andrei Simion <andrei.simion@microchip.com>:

This patch set is intended to enhance the functionality and maintainability
of the mchp-pdmc driver:

 - Enhances performance by refining maxburst logic.
 - Introduces a name for better identification and management.

10 months agoALSA: ump: Use %*ph to print small buffer
Andy Shevchenko [Wed, 11 Sep 2024 19:50:39 +0000 (22:50 +0300)]
ALSA: ump: Use %*ph to print small buffer

Use %*ph format to print small buffer as hex string.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20240911195039.2885979-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoASoC: meson: axg-card: fix 'use-after-free'
Arseniy Krasnov [Wed, 11 Sep 2024 14:24:25 +0000 (17:24 +0300)]
ASoC: meson: axg-card: fix 'use-after-free'

Buffer 'card->dai_link' is reallocated in 'meson_card_reallocate_links()',
so move 'pad' pointer initialization after this function when memory is
already reallocated.

Kasan bug report:

==================================================================
BUG: KASAN: slab-use-after-free in axg_card_add_link+0x76c/0x9bc
Read of size 8 at addr ffff000000e8b260 by task modprobe/356

CPU: 0 PID: 356 Comm: modprobe Tainted: G O 6.9.12-sdkernel #1
Call trace:
 dump_backtrace+0x94/0xec
 show_stack+0x18/0x24
 dump_stack_lvl+0x78/0x90
 print_report+0xfc/0x5c0
 kasan_report+0xb8/0xfc
 __asan_load8+0x9c/0xb8
 axg_card_add_link+0x76c/0x9bc [snd_soc_meson_axg_sound_card]
 meson_card_probe+0x344/0x3b8 [snd_soc_meson_card_utils]
 platform_probe+0x8c/0xf4
 really_probe+0x110/0x39c
 __driver_probe_device+0xb8/0x18c
 driver_probe_device+0x108/0x1d8
 __driver_attach+0xd0/0x25c
 bus_for_each_dev+0xe0/0x154
 driver_attach+0x34/0x44
 bus_add_driver+0x134/0x294
 driver_register+0xa8/0x1e8
 __platform_driver_register+0x44/0x54
 axg_card_pdrv_init+0x20/0x1000 [snd_soc_meson_axg_sound_card]
 do_one_initcall+0xdc/0x25c
 do_init_module+0x10c/0x334
 load_module+0x24c4/0x26cc
 init_module_from_file+0xd4/0x128
 __arm64_sys_finit_module+0x1f4/0x41c
 invoke_syscall+0x60/0x188
 el0_svc_common.constprop.0+0x78/0x13c
 do_el0_svc+0x30/0x40
 el0_svc+0x38/0x78
 el0t_64_sync_handler+0x100/0x12c
 el0t_64_sync+0x190/0x194

Fixes: 7864a79f37b5 ("ASoC: meson: add axg sound card support")
Cc: Stable@vger.kernel.org
Signed-off-by: Arseniy Krasnov <avkrasnov@salutedevices.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://patch.msgid.link/20240911142425.598631-1-avkrasnov@salutedevices.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: dt-bindings: microchip,sama7g5-spdifrx: Add common DAI reference
Andrei Simion [Tue, 10 Sep 2024 08:22:03 +0000 (11:22 +0300)]
ASoC: dt-bindings: microchip,sama7g5-spdifrx: Add common DAI reference

Update the spdifrx yaml file to reference the dai-common.yaml schema,
enabling the use of the 'sound-name-prefix' property

Signed-off-by: Andrei Simion <andrei.simion@microchip.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20240910082202.45972-1-andrei.simion@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: dt-bindings: renesas,rsnd: add post-init-providers property
Kuninori Morimoto [Mon, 9 Sep 2024 23:13:47 +0000 (23:13 +0000)]
ASoC: dt-bindings: renesas,rsnd: add post-init-providers property

At least if rsnd is using DPCM connection on Audio-Graph-Card2,
fw_devlink might doesn't have enough information to break the cycle
(Same problem might occur with Multi-CPU/Codec or Codec2Codec).
In such case, rsnd driver will not be probed.
Add post-init-providers support to break the link cycle.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/87wmjkifob.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoAdd support for primary mi2s on SM8250
Mark Brown [Wed, 11 Sep 2024 14:53:59 +0000 (15:53 +0100)]
Add support for primary mi2s on SM8250

Merge series from Jens Reidel <adrian@travitia.xyz>:

This patch adds support for the primary mi2s interface on devices using SM8250
audio drivers. Tested on SM7150 (xiaomi-davinci). SM7150 sound is close to
SM8250 and we intend to use it as a fallback in the future.

To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Liam Girdwood <lgirdwood@gmail.com>
To: Mark Brown <broonie@kernel.org>
To: Jaroslav Kysela <perex@perex.cz>
To: Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-sound@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux@mainlining.org
Jens Reidel (1):
  ASoC: qcom: sm8250: enable primary mi2s

 sound/soc/qcom/sm8250.c | 8 ++++++++
 1 file changed, 8 insertions(+)

--
2.46.0

10 months agoASoC: atmel: mchp-pdmc: Add snd_soc_dai_driver name
Codrin Ciubotariu [Wed, 11 Sep 2024 12:29:08 +0000 (15:29 +0300)]
ASoC: atmel: mchp-pdmc: Add snd_soc_dai_driver name

Set snd_soc_dai_driver name to improve controller's display of the DAI
name.

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Signed-off-by: Andrei Simion <andrei.simion@microchip.com>
Link: https://patch.msgid.link/20240911122909.133399-3-andrei.simion@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: atmel: mchp-pdmc: Improve maxburst calculation for better performance
Codrin Ciubotariu [Wed, 11 Sep 2024 12:29:07 +0000 (15:29 +0300)]
ASoC: atmel: mchp-pdmc: Improve maxburst calculation for better performance

Improve the DMA descriptor calculation by dividing the period size by the
product of sample size and DMA chunk size, rather than just DMA chunk size.
Ensure that all DMA descriptors start from a well-aligned address to
improve the reliability and efficiency of DMA operations and avoid
potential issues related to misaligned descriptors.

[andrei.simion@microchip.com: Adjust the commit title. Reword the commit
message. Add MACROS for each DMA size chunk supported by mchp-pdmc.
Add DMA_BURST_ALIGNED preprocesor function to check the alignment of the
DMA burst.]

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Signed-off-by: Andrei Simion <andrei.simion@microchip.com>
Link: https://patch.msgid.link/20240911122909.133399-2-andrei.simion@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoALSA: pcm: Fix breakage of PCM rates used for topology
Takashi Iwai [Wed, 11 Sep 2024 13:57:52 +0000 (15:57 +0200)]
ALSA: pcm: Fix breakage of PCM rates used for topology

It turned out that the topology ABI takes the standard PCM rate bits
as is, and it means that the recent change of the PCM rate bits would
lead to the inconsistent rate values used for topology.

This patch reverts the original PCM rate bit definitions while adding
the new rates to the extended bits instead.  This needed the change of
snd_pcm_known_rates, too.  And this also required to fix the handling
in snd_pcm_hw_limit_rates() that blindly assumed that the list is
sorted while it became unsorted now.

Fixes: 090624b7dc83 ("ALSA: pcm: add more sample rate definitions")
Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Closes: https://lore.kernel.org/1ab3efaa-863c-4dd0-8f81-b50fd9775fad@linux.intel.com
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Tested-by: Jerome Brunet <jbrunet@baylibre.com>
Tested-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20240911135756.24434-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoASoC: mediatek: mt8365: check validity before usage of i2s_data
Muhammad Usama Anjum [Wed, 11 Sep 2024 11:13:07 +0000 (16:13 +0500)]
ASoC: mediatek: mt8365: check validity before usage of i2s_data

There may be a case where i2s_data may not get initialized by the for
loop which will cause the kernel crash. Initialize the i2s_data to NULL
and abort execute if it isn't found.

Fixes: 402bbb13a195 ("ASoC: mediatek: mt8365: Add I2S DAI support")
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20240911111317.4072349-1-usama.anjum@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: avoid possible garbage value in peb2466_reg_read()
Su Hui [Wed, 11 Sep 2024 11:54:50 +0000 (19:54 +0800)]
ASoC: codecs: avoid possible garbage value in peb2466_reg_read()

Clang static checker (scan-build) warning:
sound/soc/codecs/peb2466.c:232:8:
Assigned value is garbage or undefined [core.uninitialized.Assign]
  232 |                 *val = tmp;
      |                      ^ ~~~

When peb2466_read_byte() fails, 'tmp' will have a garbage value.
Add a judgemnet to avoid this problem.

Fixes: 227f609c7c0e ("ASoC: codecs: Add support for the Infineon PEB2466 codec")
Signed-off-by: Su Hui <suhui@nfschina.com>
Link: https://patch.msgid.link/20240911115448.277828-1-suhui@nfschina.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: remove MODULE_ALIAS for sof based generic machine driver
Vijendar Mukunda [Wed, 11 Sep 2024 09:35:54 +0000 (15:05 +0530)]
ASoC: amd: acp: remove MODULE_ALIAS for sof based generic machine driver

As module device table added for AMD sof based generic machine driver,
MODULE_ALIAS is not required. Remove MODULE_ALIAS for AMD sof based
generic machine driver.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20240911093554.2076872-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: remove MODULE_ALIAS for legacy machine driver
Vijendar Mukunda [Wed, 11 Sep 2024 09:35:53 +0000 (15:05 +0530)]
ASoC: amd: acp: remove MODULE_ALIAS for legacy machine driver

As module device table added for AMD legacy machine driver, MODULE_ALIAS
is not required. Remove MODULE_ALIAS for AMD legacy machine driver.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20240911093554.2076872-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoALSA: memalloc: Drop Xen PV workaround again
Takashi Iwai [Tue, 10 Sep 2024 11:30:59 +0000 (13:30 +0200)]
ALSA: memalloc: Drop Xen PV workaround again

Since recently in the commit e469e2045f1b ("ALSA: memalloc: Let IOMMU
handle S/G primarily"), the SG buffer allocation code was modified to
use the standard DMA code primarily and the fallback is applied only
limitedly.  This made the Xen PV specific workarounds we took in the
commit 53466ebdec61 ("ALSA: memalloc: Workaround for Xen PV") rather
superfluous.

It was a hackish workaround for the regression at that time, and it
seems that it's causing another issues (reportedly memory
corruptions).  So it's better to clean it up, after all.

Link: https://lore.kernel.org/20240906184209.25423-1-ariadne@ariadne.space
Cc: Ariadne Conill <ariadne@ariadne.space>
Link: https://patch.msgid.link/20240910113100.32542-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: hda: Add a new CM9825 standard driver
Leo Tsai [Tue, 10 Sep 2024 06:55:42 +0000 (14:55 +0800)]
ALSA: hda: Add a new CM9825 standard driver

The CM9825 is a High Definition Audio Codec.
There are 2 independent stereo outputs, one of the stereo
outputs is cap-less with HP AMP, and the other is line out to
connect the active speaker. The inputs can be Line-in and MIC-in.

Signed-off-by: Leo Tsai <antivirus621@gmail.com>
Link: https://patch.msgid.link/20240910065542.6534-1-antivirus621@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoASoC: tlv320aic31xx: Fix typos
Andrew Kreimer [Tue, 10 Sep 2024 21:12:41 +0000 (00:12 +0300)]
ASoC: tlv320aic31xx: Fix typos

Fix typos in comments.

Reported-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Kreimer <algonell@gmail.com>
Link: https://patch.msgid.link/20240910211302.8909-1-algonell@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: meson: Remove unused declartion in header file
Zhang Zekun [Tue, 10 Sep 2024 12:23:30 +0000 (20:23 +0800)]
ASoC: meson: Remove unused declartion in header file

The declaration of aiu_fifo_hw_free() has been removed since
commit e05cde84eabc ("ASoC: meson: Use managed DMA buffer allocation").
Let's remove the unused declaration.

Fixes: e05cde84eabc ("ASoC: meson: Use managed DMA buffer allocation")
Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://patch.msgid.link/20240910122330.70684-1-zhangzekun11@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoMAINTAINERS: update Pierre Bossart's email and role
Pierre-Louis Bossart [Tue, 10 Sep 2024 14:30:21 +0000 (22:30 +0800)]
MAINTAINERS: update Pierre Bossart's email and role

Update to permanent address and Reviewer role.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20240910143021.261261-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: qcom: sm8250: enable primary mi2s
Jens Reidel [Mon, 26 Aug 2024 13:49:20 +0000 (15:49 +0200)]
ASoC: qcom: sm8250: enable primary mi2s

When using primary mi2s on sm8250-compatible SoCs, the correct clock
needs to get enabled to be able to use the mi2s interface.

Signed-off-by: Jens Reidel <adrian@travitia.xyz>
Tested-by: Danila Tikhonov <danila@jiaxyga.com> # sm7325-nothing-spacewar
Link: https://patch.msgid.link/20240826134920.55148-2-adrian@travitia.xyz
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: loongson: Add the correct judgement return
Tang Bin [Tue, 10 Sep 2024 02:11:04 +0000 (10:11 +0800)]
ASoC: loongson: Add the correct judgement return

Use the function dev_err_probe can simplify code, but
the error return should not be deleted, that is
unreasonable, thus fix it.

Fixes: 3d2528d6c021 ("ASoC: loongson: Simplify with dev_err_probe()")
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Link: https://patch.msgid.link/20240910021104.3400-1-tangbin@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: soc-ac97: Fix the incorrect description
Tang Bin [Tue, 10 Sep 2024 01:33:03 +0000 (09:33 +0800)]
ASoC: soc-ac97: Fix the incorrect description

In the function snd_soc_alloc_ac97_component &
snd_soc_new_ac97_component, the error return is
ERR_PTR, so fix the incorrect description.

Fixes: 47e039413cac ("ASoC: Add support for allocating AC'97 device before registering it")
Fixes: 7361fbeaeaab ("ASoC: ac97: Add support for resetting device before registration")
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Link: https://patch.msgid.link/20240910013303.2044-1-tangbin@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoALSA: memalloc: Move snd_malloc_ops definition into memalloc.c again
Takashi Iwai [Tue, 10 Sep 2024 11:31:41 +0000 (13:31 +0200)]
ALSA: memalloc: Move snd_malloc_ops definition into memalloc.c again

The definition of struct snd_malloc_ops was moved out to
memalloc_local.h since there was another code for S/G buffer
allocation referring to the struct.  But since the code change to use
non-contiguous allocators, it's solely referred in memalloc.c, hence
it makes little sense to have a separate header file.

Let's move it back to memalloc.c.

Link: https://patch.msgid.link/20240910113141.32618-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: hda/realtek: Refactor and simplify Samsung Galaxy Book init
Joshua Grisham [Mon, 9 Sep 2024 19:30:00 +0000 (21:30 +0200)]
ALSA: hda/realtek: Refactor and simplify Samsung Galaxy Book init

I have done a lot of analysis for these type of devices and collaborated
quite a bit with Nick Weihs (author of the first patch submitted for this
including adding samsung_helper.c). More information can be found in the
issue on Github [1] including additional rationale and testing.

The existing implementation includes a large number of equalizer coef
values that are not necessary to actually init and enable the speaker
amps, as well as create a somewhat worse sound profile. Users have
reported "muffled" or "muddy" sound; more information about this including
my analysis of the differences can be found in the linked Github issue.

This patch refactors the "v2" version of ALC298_FIXUP_SAMSUNG_AMP to a much
simpler implementation which removes the new samsung_helper.c, reuses more
of the existing patch_realtek.c, and sends significantly fewer unnecessary
coef values (including removing all of these EQ-specific coef values).

A pcm_playback_hook is used to dynamically enable and disable the speaker
amps only when there will be audio playback; this is to match the behavior
of how the driver for these devices is working in Windows, and is
suspected but not yet tested or confirmed to help with power consumption.

Support for models with 2 speaker amps vs 4 speaker amps is controlled by
a specific quirk name for both types. A new int num_speaker_amps has been
added to alc_spec so that the hooks can know how many speaker amps to
enable or disable. This design was chosen to limit the number of places
that subsystem ids will need to be maintained: like this, they can be
maintained only once in the quirk table and there will not be another
separate list of subsystem ids to maintain elsewhere in the code.

Also updated the quirk name from ALC298_FIXUP_SAMSUNG_AMP2 to
ALC298_FIXUP_SAMSUNG_AMP_V2_.. as this is not a quirk for "Amp #2" on
ALC298 but is instead a different version of how to handle it.

More devices have been added (see Github issue for testing confirmation),
as well as a small cleanup to existing names.

[1]: https://github.com/thesofproject/linux/issues/4055#issuecomment-2323411911

Signed-off-by: Joshua Grisham <josh@joshuagrisham.com>
Link: https://patch.msgid.link/20240909193000.838815-1-josh@joshuagrisham.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: hda/realtek: Enable mic on Vaio VJFH52
Edson Juliano Drosdeck [Mon, 9 Sep 2024 16:27:51 +0000 (13:27 -0300)]
ALSA: hda/realtek: Enable mic on Vaio VJFH52

Vaio VJFH52 is equipped with ACL256, and needs a
fix to make the internal mic and headphone mic to work.
Also must to limits the internal microphone boost.

Signed-off-by: Edson Juliano Drosdeck <edson.drosdeck@gmail.com>
Link: https://patch.msgid.link/20240909162751.4790-1-edson.drosdeck@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoMerge branch 'for-linus' into for-next
Takashi Iwai [Tue, 10 Sep 2024 08:27:43 +0000 (10:27 +0200)]
Merge branch 'for-linus' into for-next

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoASoC: mt8365: Fix -Werror builds
Mark Brown [Mon, 9 Sep 2024 21:02:08 +0000 (22:02 +0100)]
ASoC: mt8365: Fix -Werror builds

Merge series from Mark Brown <broonie@kernel.org>:

Nathan reported that the newly added mt8365 drivers were causing a
number of warnings which break -Werror builds, these were only visible
on arm64 since the drivers did not have COMPILE_TEST enabled.  Fix this
and some other minor stuff I noticed while doing so.

10 months agoASoC: loongson: Simplify code formatting
Mark Brown [Mon, 9 Sep 2024 21:02:01 +0000 (22:02 +0100)]
ASoC: loongson: Simplify code formatting

Merge series from Binbin Zhou <zhoubinbin@loongson.cn>:

This patchset attempts to improve code readability by simplifying code
formatting.
No functional changes.

10 months agoASoC: Switch back to struct platform_driver::remove()
Uwe Kleine-König [Mon, 9 Sep 2024 15:12:30 +0000 (17:12 +0200)]
ASoC: Switch back to struct platform_driver::remove()

After commit 0edb555a65d1 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.

Convert all drivers below sound/soc to use .remove(), with the eventual
goal to drop struct platform_driver::remove_new(). As .remove() and
.remove_new() have the same prototypes, conversion is done by just
changing the structure member name in the driver initializer.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20240909151230.909818-2-u.kleine-koenig@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: atmel: mchp-i2s-mcc: Remove interface name from stream_name
Codrin Ciubotariu [Mon, 9 Sep 2024 08:35:29 +0000 (11:35 +0300)]
ASoC: atmel: mchp-i2s-mcc: Remove interface name from stream_name

Remove the interface name from the stream_name. The interface name (and the
index of the interface) can be set in DT using the sound-name-prefix string
property.

[andrei.simion@microchip: Adjust the commit title]

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Signed-off-by: Andrei Simion <andrei.simion@microchip.com>
Link: https://patch.msgid.link/20240909083530.14695-2-andrei.simion@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: codecs: fix the right check and simplify code
Tang Bin [Sun, 8 Sep 2024 13:46:04 +0000 (21:46 +0800)]
ASoC: codecs: fix the right check and simplify code

In the file drivers/base/platform.c, the return description of
platform_get_irq is 'non-zero IRQ number on success, negative
error number on failure.', so the check is wrong, fix it. And
when get irq failed, the function platform_get_irq logs an error
message.

Fixes: 5e2404493f9f ("ASoC: codecs: add MT6357 support")
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Link: https://patch.msgid.link/20240908134604.3652-1-tangbin@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: mt8365: Allow build coverage
Mark Brown [Sat, 7 Sep 2024 00:53:32 +0000 (01:53 +0100)]
ASoC: mt8365: Allow build coverage

There is no build time dependency on anything specific to ARCH_MEDIATEK so
enable COMPILE_TEST builds.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Tested-by: Nathan Chancellor <nathan@kernel.org> # build
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://patch.msgid.link/20240907-asoc-fix-mt8365-build-v1-7-7ad0bac20161@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: mt8365: Remove unused DMIC IIR coefficient configuration
Mark Brown [Sat, 7 Sep 2024 00:53:31 +0000 (01:53 +0100)]
ASoC: mt8365: Remove unused DMIC IIR coefficient configuration

Nothing ever calls mt8365_dai_load_dmic_iirc_coeff_table() so the compiler
warns about an unused static function. While it seems likely that something
should be calling the function I don't know what and this is breaking
-Werror builds like allmodconfig so let's just remove it. It can be added
again along with the user.

Reported-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Nathan Chancellor <nathan@kernel.org> # build
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://patch.msgid.link/20240907-asoc-fix-mt8365-build-v1-6-7ad0bac20161@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: mt8365: Remove unused variables
Mark Brown [Sat, 7 Sep 2024 00:53:30 +0000 (01:53 +0100)]
ASoC: mt8365: Remove unused variables

Silence compiler warnings by removing unused variables.

Reported-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Nathan Chancellor <nathan@kernel.org> # build
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://patch.msgid.link/20240907-asoc-fix-mt8365-build-v1-5-7ad0bac20161@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: mt8365: Make non-exported functions static
Mark Brown [Sat, 7 Sep 2024 00:53:29 +0000 (01:53 +0100)]
ASoC: mt8365: Make non-exported functions static

The compilers warn if functions without a prototype are not static so add
appropriate static declarations.

Reported-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Nathan Chancellor <nathan@kernel.org> # build
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://patch.msgid.link/20240907-asoc-fix-mt8365-build-v1-4-7ad0bac20161@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: mt8365: Remove unused prototype for mt8365_afe_clk_group_48k()
Mark Brown [Sat, 7 Sep 2024 00:53:28 +0000 (01:53 +0100)]
ASoC: mt8365: Remove unused prototype for mt8365_afe_clk_group_48k()

The function is not used outside of the file it is defined and the
equivalent function for 44.1kHz is not prototyped so remove the prototype
for this function.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Tested-by: Nathan Chancellor <nathan@kernel.org> # build
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://patch.msgid.link/20240907-asoc-fix-mt8365-build-v1-3-7ad0bac20161@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: mt8365: Remove spurious unsigned long casts
Mark Brown [Sat, 7 Sep 2024 00:53:27 +0000 (01:53 +0100)]
ASoC: mt8365: Remove spurious unsigned long casts

The regmap APIs take unsigned ints not unsigned longs so casting their
arguments to unsigned longs is not a good choice, the constants being
cast here are all unsigned ints anyway.

Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Nathan Chancellor <nathan@kernel.org> # build
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://patch.msgid.link/20240907-asoc-fix-mt8365-build-v1-2-7ad0bac20161@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: mt8365: Open code BIT() to avoid spurious warnings
Mark Brown [Sat, 7 Sep 2024 00:53:26 +0000 (01:53 +0100)]
ASoC: mt8365: Open code BIT() to avoid spurious warnings

The mt8365 driver uses bits.h to define bitfields but BIT() uses unsigned
long constants so does not play well with being bitwise negated and
converted to an unsigned int, the compiler complains about width reduction
on a number of architectures. Just open code the shifting to avoid the
issue.

Generated with s/BIT(/(1U << /

Reported-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Tested-by: Nathan Chancellor <nathan@kernel.org> # build
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://patch.msgid.link/20240907-asoc-fix-mt8365-build-v1-1-7ad0bac20161@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: loongson: Factor out loongson i2s enable clock functions
Binbin Zhou [Mon, 9 Sep 2024 07:19:55 +0000 (15:19 +0800)]
ASoC: loongson: Factor out loongson i2s enable clock functions

There are a few i2s clock enable operations in loongson_i2s_set_fmt(),
convert them to simple helper functions called
loongson_i2s_enable_mclk() and loongson_i2s_enable_bclk().

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://patch.msgid.link/d6f6c818b0ecee87277f704b6a801cbbf5e712ce.1725844530.git.zhoubinbin@loongson.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: loongson: Factor out loongson_card_acpi_find_device() function
Binbin Zhou [Mon, 9 Sep 2024 07:19:37 +0000 (15:19 +0800)]
ASoC: loongson: Factor out loongson_card_acpi_find_device() function

The operations for reading the cpu and codec nodes in
loongson_card_parse_acpi() are similar, so we convert them into a simple
helper function called loongson_card_acpi_find_device().

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://patch.msgid.link/3b7da05e5fd4326e7944aa749bf06dd44e964f6c.1725844530.git.zhoubinbin@loongson.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: loongson: Replace if with ternary operator
Binbin Zhou [Mon, 9 Sep 2024 07:19:36 +0000 (15:19 +0800)]
ASoC: loongson: Replace if with ternary operator

Replace an if statement with a ternary operator, making the code a tiny
bit shorter.

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://patch.msgid.link/94ec2ac178610f50af4815ef5b719695915bba31.1725844530.git.zhoubinbin@loongson.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: loongson: Simplify if statment in loongson_card_hw_params()
Binbin Zhou [Mon, 9 Sep 2024 07:19:34 +0000 (15:19 +0800)]
ASoC: loongson: Simplify if statment in loongson_card_hw_params()

Deal with illegal conditions first and put the normal process code
outside the if condition to improve code readability.

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://patch.msgid.link/98b71f9643970f11bc500c01599c7aeb77ff2a58.1725844530.git.zhoubinbin@loongson.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: loongson: Simplify with dev_err_probe()
Binbin Zhou [Mon, 9 Sep 2024 07:19:07 +0000 (15:19 +0800)]
ASoC: loongson: Simplify with dev_err_probe()

Error handling in probe() can be a bit simpler with dev_err_probe().

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://patch.msgid.link/07855aa6c290ec826d63e68b898e7f4afac5e30d.1725844530.git.zhoubinbin@loongson.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: loongson: Simplify probe() with local dev variable
Binbin Zhou [Mon, 9 Sep 2024 07:19:06 +0000 (15:19 +0800)]
ASoC: loongson: Simplify probe() with local dev variable

Simplify the probe() function by using local 'dev' instead of
&pdev->dev.

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://patch.msgid.link/1984a20930da515e2a478b02159f83c02498f6be.1725844530.git.zhoubinbin@loongson.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: loongson: Use BIT() macro
Binbin Zhou [Mon, 9 Sep 2024 07:19:05 +0000 (15:19 +0800)]
ASoC: loongson: Use BIT() macro

Where applicable, use BIT() macro instead of shift operation to improve
readability.

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://patch.msgid.link/ccca555c96f18c0ecf5f1544c82945ba651d105f.1725844530.git.zhoubinbin@loongson.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoALSA: hda: Use non-SG allocation for the communication buffers
Takashi Iwai [Mon, 9 Sep 2024 13:47:43 +0000 (15:47 +0200)]
ALSA: hda: Use non-SG allocation for the communication buffers

The azx_bus->dma_type is referred only for allocating the
communication buffers like CORB/RIRB, and the allocation size is
small.  Hence it doesn't have to be S/G buffer allocation, which is an
obvious overkill.  Use the standard SNDRV_DMA_TYPE_DEV_WC instead.

This was changed to SNDRV_DMA_TYPE_DEV_WC_SG in the commit
37137ec26c2c ("ALSA: hda: Once again fix regression of page
allocations with IOMMU") as a workaround for IOMMU-backed
allocations.  But this is no longer needed since the allocation with
SNDRV_DMA_TYPE_DEV_WC itself was fixed in the commit 9c27301342a5
("ALSA: memalloc: Use DMA API for x86 WC page allocations, too").

So this patch reverts the previous workaround in this piece of code.

Link: https://patch.msgid.link/20240909134744.25426-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoASoC: mediatek: mt8365: remove unused mt8365_i2s_hd_str
Arnd Bergmann [Sat, 7 Sep 2024 20:00:38 +0000 (20:00 +0000)]
ASoC: mediatek: mt8365: remove unused mt8365_i2s_hd_str

The mt8365_i2s_enum and mt8365_i2s_hd_str variables are not
used anywhere, but cause a warning when building with C=1
or when enabling -Wunused-const-variable:

sound/soc/mediatek/mt8365/mt8365-dai-i2s.c:781:27: error: 'mt8365_i2s_hd_str' defined but not used [-Werror=unused-const-variable=]
  781 | static const char * const mt8365_i2s_hd_str[] = {
      |                           ^~~~~~~~~~~~~~~~~

Remove these for the moment, they can be added back if a
user comes up.

Fixes: 402bbb13a195 ("ASoC: mediatek: mt8365: Add I2S DAI support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://patch.msgid.link/20240907200053.3027553-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: mediatek: mt8365: include linux/bitfield.h
Arnd Bergmann [Sun, 8 Sep 2024 22:17:34 +0000 (22:17 +0000)]
ASoC: mediatek: mt8365: include linux/bitfield.h

On x86, the header is not already included implicitly,
breaking compile-testing:

In file included from sound/soc/mediatek/mt8365/mt8365-afe-common.h:19,
                 from sound/soc/mediatek/mt8365/mt8365-afe-pcm.c:18:
sound/soc/mediatek/mt8365/mt8365-afe-pcm.c: In function 'mt8365_afe_cm2_mux_conn':
sound/soc/mediatek/mt8365/mt8365-reg.h:952:41: error: implicit declaration of function 'FIELD_PREP' [-Wimplicit-function-declaration]
  952 | #define CM2_AFE_CM2_CONN_CFG1(x)        FIELD_PREP(CM2_AFE_CM2_CONN_CFG1_MASK, (x))
      |                                         ^~~~~~~~~~

Included it ahead of the field definitions.

Fixes: 38c7c9ddc740 ("ASoC: mediatek: mt8365: Add common header")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://patch.msgid.link/20240908221754.2210857-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: tlv320aic31xx: Add support for loading filter coefficients
Romain Gantois [Fri, 6 Sep 2024 12:20:58 +0000 (14:20 +0200)]
ASoC: tlv320aic31xx: Add support for loading filter coefficients

The TLV320DAC3100 Audio DAC has 25 built-in digital audio processing blocks
(PRBs). Each of these PRBs has a static filter structure with programmable
coefficients. Once a PRB is selected for use by the DAC, its filter
coefficients can be configured via a dedicated set of registers.

Define a new optional firmware which can be loaded by the TLV320DAC driver.
This firmware describes a full set of filter coefficients for all blocks
used by the various PRBs.

The firmware's binary format is heavily inspired by the one used in the
peb2466 driver. It includes a version marker to allow for potential
evolutions of the format.

Note that adaptive filtering is not supported i.e. filter coefficients are
loaded once before power-on and then cannot be changed while the DAC is
powered. This is why only page A coefficients are modified. Page B
coefficients are only used for adaptive filtering.

Signed-off-by: Romain Gantois <romain.gantois@bootlin.com>
Link: https://patch.msgid.link/20240906-tlv320-filter-v1-1-6955f53ff435@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: tas2781: fix to save the dsp bin file name into the correct array in case name_...
Shenghao Ding [Sat, 7 Sep 2024 00:15:36 +0000 (08:15 +0800)]
ASoC: tas2781: fix to save the dsp bin file name into the correct array in case name_prefix is not NULL

fix to save the dsp bin file name into the correct array, coef_binaryname,
instead of rca_binaryname, in case name_prefix is not NULL.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20240907001540.944-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoALSA: rme9652: remove unused parameter in macro
He Lugang [Sat, 7 Sep 2024 14:28:54 +0000 (22:28 +0800)]
ALSA: rme9652: remove unused parameter in macro

Parameter xindex is not used in macro HDSPM_TCO_LTC_FRAMES and
HDSPM_TCO_VIDEO_INPUT_FORMAT,so just remove it to simplify the code.

Signed-off-by: He Lugang <helugang@uniontech.com>
Link: https://patch.msgid.link/F53E9F10DA24705D+20240907142854.17627-1-helugang@uniontech.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: IEC958 definition for consumer status channel update
Jerome Brunet [Fri, 6 Sep 2024 09:34:16 +0000 (11:34 +0200)]
ALSA: IEC958 definition for consumer status channel update

Add 128kHz, 352.4kHz, 384kHz and 705.6kHz.
These definitions have been found working on eARC using a Murideo
Seven Generator.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://patch.msgid.link/20240906093422.2976550-1-jbrunet@baylibre.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoALSA: hda: Allow the default preallocation for x86 again
Takashi Iwai [Sat, 7 Sep 2024 08:40:47 +0000 (10:40 +0200)]
ALSA: hda: Allow the default preallocation for x86 again

Since there are a few corner cases where the S/G buffer allocation
isn't performed (e.g. depending on IOMMU implementations), it'd be
better to allow the default buffer preallocation size for x86, too.

The default for x86 is still kept to 0, as it should work in most
cases.

Link: https://patch.msgid.link/20240907084129.28802-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 months agoASoC: codecs: Use devm_clk_get_enabled() helpers
ying zuxin [Fri, 6 Sep 2024 08:48:31 +0000 (16:48 +0800)]
ASoC: codecs: Use devm_clk_get_enabled() helpers

The devm_clk_get_enabled() helpers:
    - call devm_clk_get()
    - call clk_prepare_enable() and register what is needed in order to
     call clk_disable_unprepare() when needed, as a managed resource.

This simplifies the code and avoids the calls to clk_disable_unprepare().

Signed-off-by: ying zuxin <11154159@vivo.com>
Link: https://patch.msgid.link/20240906084841.19248-1-yingzuxin@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: makes rtd->initialized bit field
Kuninori Morimoto [Thu, 5 Sep 2024 05:14:29 +0000 (05:14 +0000)]
ASoC: makes rtd->initialized bit field

rtd->initialized is used to know whether soc_init_pcm_runtime()
was correctly fined, and used to call snd_soc_link_exit().
We don't need to have it as bool, let's make it bit-field same as
other flags.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Cc: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/87o752k7gq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: amd: acp: Return in-case of error
Muhammad Usama Anjum [Fri, 6 Sep 2024 10:37:24 +0000 (15:37 +0500)]
ASoC: amd: acp: Return in-case of error

Return when error occurs instead of proceeding to for loop which will
use val uninitialized.

Fixes: f6f7d25b1103 ("ASoC: amd: acp: Add pte configuration for ACP7.0 platform")
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Link: https://patch.msgid.link/20240906103727.222749-1-usama.anjum@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: loongson: remove redundant variable assignments
Tang Bin [Fri, 6 Sep 2024 10:05:23 +0000 (18:05 +0800)]
ASoC: loongson: remove redundant variable assignments

In the function loongson_asoc_card_probe, it is simpler
to return the value of function devm_snd_soc_register_card
directly.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Link: https://patch.msgid.link/20240906100523.2142-1-tangbin@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: soc-acpi-intel-mtl-match: add missing empty item
Bard Liao [Fri, 6 Sep 2024 06:02:24 +0000 (06:02 +0000)]
ASoC: Intel: soc-acpi-intel-mtl-match: add missing empty item

There is no links_num in struct snd_soc_acpi_mach {}, and we test
!link->num_adr as a condition to end the loop in hda_sdw_machine_select().
So an empty item in struct snd_soc_acpi_link_adr array is required.

Fixes: f77ae7fcdc4763 ("ASoC: Intel: soc-acpi-intel-mtl-match: add cs42l43 only support")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20240906060224.2241212-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: Intel: soc-acpi-intel-lnl-match: add missing empty item
Bard Liao [Fri, 6 Sep 2024 06:02:23 +0000 (06:02 +0000)]
ASoC: Intel: soc-acpi-intel-lnl-match: add missing empty item

There is no links_num in struct snd_soc_acpi_mach {}, and we test
!link->num_adr as a condition to end the loop in hda_sdw_machine_select().
So an empty item in struct snd_soc_acpi_link_adr array is required.

Fixes: dd3bd9dc4708 ("ASoC: Intel: soc-acpi-intel-lnl-match: add cs42l43 only support")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20240906060224.2241212-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoASoC: spdif: extend supported rates to 768kHz
Jerome Brunet [Thu, 5 Sep 2024 14:13:04 +0000 (16:13 +0200)]
ASoC: spdif: extend supported rates to 768kHz

IEC958-3 defines sampling rate up to 768 kHz.
Such rates maybe used with high bandwidth IEC958 links, such as eARC.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: David Rhodes <drhodes@opensource.cirrus.com>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20240905-alsa-12-24-128-v1-13-8371948d3921@baylibre.com
10 months agoASoC: cs35l34: drop useless rate contraint
Jerome Brunet [Thu, 5 Sep 2024 14:13:03 +0000 (16:13 +0200)]
ASoC: cs35l34: drop useless rate contraint

The cs35l34 adds a useless rate constraint on startup.
It does not set SNDRV_PCM_RATE_KNOT and the rates set are already a subset
of the ones provided in the constraint list, so it is a no-op.

>From the rest of the code, it is likely HW supports more than the 32, 44.1
and 48kHz listed in CS35L34_RATES but there is no way to know for sure
without proper documentation.

Keep the driver as it is for now and just drop the useless constraint.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: David Rhodes <drhodes@opensource.cirrus.com>
Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20240905-alsa-12-24-128-v1-12-8371948d3921@baylibre.com
10 months agoASoC: sunxi: sun4i-codec: drop SNDRV_PCM_RATE_KNOT
Jerome Brunet [Thu, 5 Sep 2024 14:13:02 +0000 (16:13 +0200)]
ASoC: sunxi: sun4i-codec: drop SNDRV_PCM_RATE_KNOT

The custom rate constraint lists was necessary to support 12kHz and 24kHz.
These rates are now available through SNDRV_PCM_RATE_12000 and
SNDRV_PCM_RATE_24000.

Use them and drop the custom rate constraint rule.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: David Rhodes <drhodes@opensource.cirrus.com>
Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20240905-alsa-12-24-128-v1-11-8371948d3921@baylibre.com
10 months agoASoC: qcom: q6asm-dai: drop SNDRV_PCM_RATE_KNOT
Jerome Brunet [Thu, 5 Sep 2024 14:13:01 +0000 (16:13 +0200)]
ASoC: qcom: q6asm-dai: drop SNDRV_PCM_RATE_KNOT

The custom rate constraint list was necessary to support 12kHz and 24kHz.
These rates are now available through SNDRV_PCM_RATE_12000 and
SNDRV_PCM_RATE_24000.

Use them and drop the custom rate constraint rule.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: David Rhodes <drhodes@opensource.cirrus.com>
Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20240905-alsa-12-24-128-v1-10-8371948d3921@baylibre.com
10 months agoASoC: Intel: avs: drop SNDRV_PCM_RATE_KNOT
Jerome Brunet [Thu, 5 Sep 2024 14:13:00 +0000 (16:13 +0200)]
ASoC: Intel: avs: drop SNDRV_PCM_RATE_KNOT

The custom rate constraint list was necessary to support 12kHz, 24kHz and
128kHz. These rates are now available through SNDRV_PCM_RATE_12000,
SNDRV_PCM_RATE_24000 and SNDRV_PCM_RATE_128000.

Use them and drop the custom rate constraint rule.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: David Rhodes <drhodes@opensource.cirrus.com>
Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20240905-alsa-12-24-128-v1-9-8371948d3921@baylibre.com
10 months agoASoC: cs53l30: drop SNDRV_PCM_RATE_KNOT
Jerome Brunet [Thu, 5 Sep 2024 14:12:59 +0000 (16:12 +0200)]
ASoC: cs53l30: drop SNDRV_PCM_RATE_KNOT

The custom rate constraint list was necessary to support 12kHz and 24kHz.
These rates are now available through SNDRV_PCM_RATE_12000 and
SNDRV_PCM_RATE_24000.

Use them and drop the custom rate constraint rule.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: David Rhodes <drhodes@opensource.cirrus.com>
Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20240905-alsa-12-24-128-v1-8-8371948d3921@baylibre.com
10 months agoASoC: cs35l41: drop SNDRV_PCM_RATE_KNOT
Jerome Brunet [Thu, 5 Sep 2024 14:12:58 +0000 (16:12 +0200)]
ASoC: cs35l41: drop SNDRV_PCM_RATE_KNOT

The custom rate constraint list was necessary to support 12kHz and 24kHz.
These rates are now available through SNDRV_PCM_RATE_12000 and
SNDRV_PCM_RATE_24000.

Use them and drop the custom rate constraint rule.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: David Rhodes <drhodes@opensource.cirrus.com>
Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20240905-alsa-12-24-128-v1-7-8371948d3921@baylibre.com
10 months agoASoC: cs35l36: drop SNDRV_PCM_RATE_KNOT
Jerome Brunet [Thu, 5 Sep 2024 14:12:57 +0000 (16:12 +0200)]
ASoC: cs35l36: drop SNDRV_PCM_RATE_KNOT

The custom rate constraint list was necessary to support 12kHz and 24kHz.
These rates are now available through SNDRV_PCM_RATE_12000 and
SNDRV_PCM_RATE_24000.

Use them and drop the custom rate constraint rule.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: David Rhodes <drhodes@opensource.cirrus.com>
Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20240905-alsa-12-24-128-v1-6-8371948d3921@baylibre.com
10 months agoALSA: hdspm: drop SNDRV_PCM_RATE_KNOT
Jerome Brunet [Thu, 5 Sep 2024 14:12:56 +0000 (16:12 +0200)]
ALSA: hdspm: drop SNDRV_PCM_RATE_KNOT

The custom rate constraint list was necessary to support 128kHz.
This rate is now available through SNDRV_PCM_RATE_128000.

Use it and drop the custom rate constraint rule.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: David Rhodes <drhodes@opensource.cirrus.com>
Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20240905-alsa-12-24-128-v1-5-8371948d3921@baylibre.com