Alsa-devel
Threads by month
- ----- 2025 -----
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
May 2025
- 28 participants
- 109 discussions
alsa-project/alsa-lib issue #456 was opened from shanekirk:
The config function snd_config_imul always produces a zero result. This is because it delegates to snd_func_iops() to perform the iterative multiplication, which always initializes its result value to zero. Then it iteratively multiplies-assigns result against each integer in the params array, which _always_ produces zero.
This breaks any configuration that leans on "@func imul".
This can be demonstrated using this snippet of configuration...
```
test_fn
{
@func imul
integers [2 4 6]
}
```
...or this source code...
```
int main(int argc, char **argv)
{
snd_config_t *pConfig = NULL;
snd_config_top(&pConfig);
/**
* Setting up...
* test_fn
* {
* @func imul
* integers [2 4 6]
* }
*/
snd_config_t *pFnCS = NULL;
snd_config_make_compound(&pFnCS, "test_fn", 0);
snd_config_add(pConfig, pFnCS);
snd_config_t *pFn = NULL;
snd_config_imake_string(&pFn, "@func", "imul");
snd_config_add(pFnCS, pFn);
snd_config_t *pFnParams = NULL;
snd_config_make_compound(&pFnParams, "integers", 0);
snd_config_add(pFnCS, pFnParams);
snd_config_t *pFnInt = NULL;
snd_config_imake_integer(&pFnInt, "0", 2);
snd_config_add(pFnParams, pFnInt);
snd_config_imake_integer(&pFnInt, "1", 4);
snd_config_add(pFnParams, pFnInt);
snd_config_imake_integer(&pFnInt, "2", 6);
snd_config_add(pFnParams, pFnInt);
/**
* Evaluating...
*/
snd_config_evaluate(pFnCS, pConfig, NULL, NULL);
assert(snd_config_get_type(pFnCS) == SND_CONFIG_TYPE_INTEGER);
long result = 0;
snd_config_get_integer(pFnCS, &result);
assert(result == 48); // ** FAILS because result is always zero! **
snd_config_delete(pConfig);
return 0;
}
```
Note: If you replace "imul" above with "iadd" in either example, you'll get the result from iadd that you'd expect.
Issue URL : https://github.com/alsa-project/alsa-lib/issues/456
Repository URL: https://github.com/alsa-project/alsa-lib
1
0
The following changes since commit a5806cd506af5a7c19bcd596e4708b5c464bfd21:
Linux 6.15-rc7 (2025-05-18 13:57:29 -0700)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git tags/asoc-v6.16
for you to fetch changes up to 7ce3bf76c3adfbfcfa712d5090428f67c97db201:
Add Tegra264 support in AHUB drivers (2025-05-22 14:38:05 +0100)
----------------------------------------------------------------
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.
----------------------------------------------------------------
Amadeusz Sławiński (27):
ASoC: Intel: avs: Add boards definitions for FCL platform
ASoC: Intel: avs: boards: Add Kconfig option for obsolete card names
ASoC: Intel: avs: Use topology information for endpoint numbers
ASoC: Intel: avs: boards: Change da7219 card name
ASoC: Intel: avs: boards: Change DMIC card name
ASoC: Intel: avs: boards: Change es8336 card name
ASoC: Intel: avs: boards: Change hdaudio card name
ASoC: Intel: avs: boards: Change sspX-loopback card name
ASoC: Intel: avs: boards: Change max98357a card name
ASoC: Intel: avs: boards: Change max98373 card name
ASoC: Intel: avs: boards: Change max98927 card name
ASoC: Intel: avs: boards: Change nau8825 card name
ASoC: Intel: avs: boards: Change pcm3168a card name
ASoC: Intel: avs: boards: Change probe card name
ASoC: Intel: avs: boards: Change rt274 card name
ASoC: Intel: avs: boards: Change rt286 card name
ASoC: Intel: avs: boards: Change rt298 card name
ASoC: Intel: avs: boards: Change rt5514 card name
ASoC: Intel: avs: boards: Change rt5663 card name
ASoC: Intel: avs: boards: Change rt5682 card name
ASoC: Intel: avs: boards: Change ssm4567 card name
ASoC: Intel: avs: Rename AVS_CHANNELS_MAX define
ASoC: Intel: avs: Allow to specify custom configurations with i2s_test
ASoC: Intel: avs: Assign unique ID to platform devices
ASoC: Intel: avs: Iterate over correct number of TDMs
ASoC: Intel: avs: Support 16 TDMs in dynamic assignment
ASoC: Intel: avs: Fix NULL pointer dereference
André Apitzsch (1):
ASoC: wm8998: Add Kconfig prompt
Bard Liao (14):
ASoC: SOF: topology: allocate string for tuples
ASoC: SOF: topology: don't convert error code
ASoC: soc-acpi: add get_function_tplg_files ops
ASoC: SOF: topology: load multiple topologies
ASoC: Intel: add sof_sdw_get_tplg_files ops
ASoC: Intel: soc-acpi-intel-lnl-match: set get_function_tplg_files ops
ASoC: Intel: soc-acpi-intel-arl-match: set get_function_tplg_files ops
ASoC: Intel: soc-acpi-intel-ptl-match: add get_function_tplg_files ops
ASoC: Intel: soc-acpi-intel-mtl-match: add get_function_tplg_files ops
ASoC: sdw_utils: split asoc_sdw_get_codec_name
ASoC: soc_sdw_utils: skip the endpoint that doesn't present
ASoC: SOF: add disable_function_topology flag
ASoC: SOF: set disable_function_topology if override_tplg_filename is set
ASoC: SOF: add disable_function_topology module parameter
Bartosz Golaszewski (12):
ASoC: soc-ac97: use new GPIO line value setter callbacks
ASoC: ti: davinci-mcasp:: use new GPIO line value setter callbacks
ASoC: codecs: wm8962: use new GPIO line value setter callbacks
ASoC: codecs: wm5100: use new GPIO line value setter callbacks
ASoC: codecs: rt5677: use new GPIO line value setter callbacks
ASoC: codecs: wm8996: use new GPIO line value setter callbacks
ASoC: codecs: tlv320adc3xxx: use new GPIO line value setter callbacks
ASoC: codecs: idt821034: use new GPIO line value setter callbacks
ASoC: codecs: peb2466: use new GPIO line value setter callbacks
ASoC: codecs: wm8903: use new GPIO line value setter callbacks
ASoC: codecs: zl38060: use new GPIO line value setter callbacks
ALSA: hda: cirrus_scodec_test: use new GPIO line value setter callbacks
Brady Norander (1):
ASoC: amd: use new ACP dev names for DAI links
Cezary Rojewski (14):
ASoC: core: Complete support for card rebinding
ASoC: Intel: avs: Permit deferred card registration
ALSA: hda: Allow to fetch hlink by ID
ASoC: Intel: avs: Ignore Vendor-space manipulation for ACE
ASoC: Intel: avs: Read HW capabilities when possible
ASoC: Intel: avs: Relocate DSP status registers
ASoC: Intel: avs: PTL-based platforms support
ASoC: Intel: avs: PCM operations for LNL-based platforms
ASoC: Intel: avs: Dynamically assign ops for non-HDAudio DAIs
ASoC: Intel: avs: Conditionally add DMA config when creating Copier
ALSA: hda: Select avs-driver by default on FCL
lib/string_helpers: Introduce parse_int_array()
ALSA: hda: Allow for 16 channels configuration
ASoC: Intel: avs: Allow for 16 channels configuration
Chancel Liu (2):
ASoC: fsl_rpmsg: Configure CPU DAI for card that sits on rpmsg-micfil-channel
ASoC: fsl_rpmsg: Allocate a smaller buffer size for capture stream
Charles Keepax (9):
ASoC: sdw_utils: Remove num_platforms from simple DAI helper
ASoC: Intel: sof_sdw: Avoid NULL check fail when re-probing
ASoC: SDCA: Fix minor typo
ASoC: SDCA: Remove regmap module macros
ASoC: SDCA: Move allocation of PDE delays array
ASoC: dapm: Add component level pin switches
ASoC: SDCA: Create DAPM widgets and routes from DisCo
ASoC: SDCA: Create ALSA controls from DisCo
ASoC: SDCA: Create DAI drivers from DisCo
Chen Ni (8):
ASoC: sun8i-codec: Remove unnecessary NULL check before clk_prepare_enable/clk_disable_unprepare
ASoC: sta32x: Remove unnecessary NULL check before clk_disable_unprepare()
ASoC: tas2781-fmwlib: Remove unnecessary NULL check before release_firmware()
ASoC: pcm6240: Remove unnecessary NULL check before release_firmware()
ASoC: wm_adsp: Remove unnecessary NULL check before release_firmware()
ASoC: tas2781-i2c: Remove unnecessary NULL check before release_firmware()
ASoC: ak4458: Remove useless return variable
ASoC: fsl_rpmsg: Remove useless return variable
Chen-Yu Tsai (4):
ASoC: mediatek: mt8183-afe-pcm: Shorten memif_data table using macros
ASoC: mediatek: mt8183-afe-pcm: Shorten irq_data table using macros
ASoC: mediatek: mt8183-afe-pcm: shorten mt8183_is_volatile_reg()
ASoC: soc-utils: Check string pointer validity in snd_soc_dlc_is_dummy()
ChiYuan Huang (5):
ASoC: dt-bindings: Add bindings for Richtek rt9123
ASoC: codecs: Add support for Richtek rt9123
ASoC: dt-bindings: Add bindings for Richtek rt9123p
ASoC: codecs: Add support for Richtek rt9123p
ASoC: codecs: rt9123: Fix sparse cast warning
Colin Ian King (3):
ASoC: cs48l32: Fix spelling mistake "exceeeds" -> "exceeds"
ASoC: rt712-sdca: remove redundant else path of if statement
ASoC: rt712-sdca: remove redundant else path of if statement
Cristian Ciocaltea (1):
ASoC: amd: acp: Drop superfluous assignment in acp_sof_probe()
Daniel Baluta (1):
ASoC: SOF: imx8m: Use reset controller API to control the DSP
Dr. David Alan Gilbert (2):
ASoC: codecs: Remove unused rt566[58]_sel_asrc_clk_src
ASoC: Intel: atom: Remove unused functions
Hector Martin (3):
ASoC: tas2770: Power cycle amp on ISENSE/VSENSE change
ASoC: tas2770: Support setting the PDM TX slot
ASoC: tas2764: Enable main IRQs
Helen Koike (1):
ASoC: Intel: Remove unused SND_SOC_INTEL_DA7219_MAX98357A_GENERIC
I Hsin Cheng (1):
ASoC: intel/sdw_utils: Assign initial value in asoc_sdw_rt_amp_spk_rtd_init()
James Calligeros (2):
ASoC: tas2770: expose die temp to hwmon
ASoC: tas2764: expose die temp to hwmon
Johan Hovold (2):
ASoC: codecs: wcd938x: fix mux error handling
ASoC: codecs: wcd938x: drop unnecessary mux flag assignment
Julien Massot (6):
ASoC: mediatek: mt8195: Move rt5682 specific dapm routes
ASoC: mediatek: mt8195: Set ETDM1/2 IN/OUT to COMP_DUMMY()
ASoC: mediatek: mt8195: Add mt8195-mt6359 card
ASoC: dt-bindings: mt8195: add compatible mt8195_mt6359
ASoC: dt-bindings: mt8195: add missing audio routing and link-name
ASoC: SOF: topology: Fix null pointer dereference
Kees Cook (1):
ASoC: SOF: ipc4-pcm: Adjust pipeline_list->pipelines allocation type
Keguang Zhang (4):
ASoC: dt-bindings: Add Loongson-1 AC97 Controller
ASoC: dt-bindings: Add Realtek ALC203 Codec
ASoC: loongson: Add Loongson-1 AC97 Driver
ASoC: ac97: Add DT support
Konrad Dybcio (1):
ASoC: q6apm-lpass-dais: Print APM port id in decimal on enable error
Krzysztof Kozlowski (4):
ASoC: dt-bindings: maxim,max98925: Fix include placement in DTS example
ASoC: codecs: wsa88xx/wcd938x: Drop kerneldoc marker from inner comment
ASoC: codecs: tas2764: Fix Wvoid-pointer-to-enum-cast warning
ASoC: dt-bindings: mediatek: Simplify mediatek,clk-provider
Kuninori Morimoto (18):
ASoC: rsnd: use snd_pcm_direction_name()
ASoC: simple-card-utils: fixup dlc->xxx handling for error case
spi: sh-msiof: use dev in sh_msiof_spi_probe()
spi: sh-msiof: ignore driver probing if it was MSIOF Sound
ASoC: fsl: don't set link->platform if not needed
dt-bindings: renesas,sh-msiof: Add MSIOF I2S Sound support
ASoC: renesas: rsnd: allow to use ADG as standalone
ASoC: renesas: rsnd: care BRGA/BRGB select in rsnd_adg_clk_enable()
ASoC: renesas: rsnd: enable to use "adg" clock
ASoC: renesas: add MSIOF sound support
ASoC: soc-utils: add snd_soc_dlc_is_dummy()
ASoC: mediatek: mt8188: use snd_soc_dlc_is_dummy()
ASoC: mediatek: mt8195: use snd_soc_dlc_is_dummy()
ASoC: soc.h: remove snd_soc_disconnect_sync()
ASoC: soc.h: remove unnecessary definitions
ASoC: soc-core: merge snd_soc_unregister_component() and snd_soc_unregister_component_by_driver()
ASoC: dt-bindings: audio-graph-card2: add missing mic-det-gpios
ASoC: dt-bindings: audio-graph-card2: reference audio-graph routing property
Mac Chiang (2):
ASoC: Intel: soc-acpi-intel-lnl/ptl-match: Simplify variable name
ASoC: Intel: soc-acpi-intel-ptl-match: Add rt713_vb_l3_rt1320_l3 support
Mark Brown (34):
ASoC: Intel: avs: Update machine board card names
ASoC: Intel: avs: Add support for FCL platform
ASoC: Intel: avs: 16 channels support
ASoC: codec: wcd93xx: Convert to GPIO descriptors
ASoC: fsl_sai: add several improvements
ASoC: wcd938x: enable t14s audio headset
ASoC: tas27{64,70}: improve support for Apple codec
ASoC: Add Richtek rt9123 and rt9123p support
ASoC: convert GPIO chips to using new value setters
Add support for Loongson-1 AC97
ASoC: skip the endpoint that doesn't present and
ASoC: Add codec driver for Cirrus Logic CS48L32 DSP
ASoC: mt8195: Add support for MT8395 Radxa NIO 12L
Add RK3576 SAI Audio Controller Support
ASoC: Merge up fixes
ASoC: codecs: wcd938x: fix mux error handling
ASoC: codec: tpa6130a2: Convert to GPIO descriptors
ASoC: add Renesas MSIOF sound driver
ASoC: codec: twl4030: Convert to GPIO descriptors
ASoC: soc-utils: add snd_soc_dlc_is_dummy()
ASoC: SOF: amd: add soundwire IO support for ACP7.0 &
AsoC: Phase out hybrid PCI devres
ASoC: codec: cs42l[56,73,52]: Convert to GPIO
Minor bug fix and tidy up for sof_sdw
ASoC: SOF: add disable_function_topology flag and
Add support for CS35L63 Smart Amplifier
ASoC: Intel: soc-acpi-intel-lnl/ptl-match: Add
ASoC: codecs: add support for ES8389
cs35l56: Log tuning unique identifiers during firmware
ASoC: mediatek: mt8183-afe-pcm: Shorten source code
Add sound card support for QCS9100 and QCS9075
ASoC: Add Intel machine driver support for CS35L63
Add DAPM/ASoC helpers to create SDCA drivers
Add Tegra264 support in AHUB drivers
Martin Blumenstingl (2):
ASoC: hdmi-codec: wire up the .prepare callback also for SPDIF DAI ops
ASoC: meson: meson-card-utils: use of_property_present() for DT parsing
Martin Povišer (3):
ASoC: tas2764: Reinit cache on part reset
ASoC: tas2764: Raise regmap range maximum
ASoC: tas2764: Apply Apple quirks
Michael Sikora (1):
ASoC: adau7118: Allow dsp_a mode
Mohammad Rafi Shaik (2):
ASoC: dt-bindings: qcom,sm8250: Add QCS9100 and QCS9075 sound card
ASoC: qcom: sc8280xp: Add sound card support for QCS9100 and QCS9075
Nathan Chancellor (1):
ASoC: cs48l32: Use modern PM_OPS
Naveen Manohar (2):
ASoC: Intel: soc-acpi-intel-ptl-match: Sort ACPI link/machine tables
ASoC: Intel: sof_sdw: Add support for wclrvp & ocelot in WCL platform
Nicolas Frattaroli (3):
ASoC: test-component: add set_tdm_slot stub implementation
ASoC: dt-bindings: add schema for rockchip SAI controllers
ASoC: rockchip: add Serial Audio Interface (SAI) driver
Nishanth Menon (1):
ASoC: tlv320aic3x: Use dev_err_probe
Peng Fan (19):
ASoC: codec: wcd939x: Convert to GPIO descriptors
ASoC: codec: wcd938x: Convert to GPIO descriptors
ASoC: codec: wcd9335: Convert to GPIO descriptors
ASoC: codec: ak5386: Convert to GPIO descriptors
ASoC: codec: tpa6130a2: Sort headers alphabetically
ASoC: codec: tpa6130a2: Remove tpa6130a2_platform_data
ASoC: codec: tpa6130a2: Convert to GPIO descriptors
ASoC: codec: twl4030: Sort headers alphabetically
ASoC: codec: twl4030: Convert to GPIO descriptors
ASoC: codec: sma1307: Remove including of_gpio.h
ASoC: codec: cs42l56: Sort headers alphabetically
ASoC: codec: cs42l56: Drop cs42l56.h
ASoC: codec: cs42l56: Convert to GPIO descriptors
ASoC: codec: cs42l73: Sort headers alphabetically
ASoC: codec: cs42l73: Drop cs42l73.h
ASoC: codec: cs42l73: Convert to GPIO descriptors
ASoC: codec: cs42l52: Sort headers alphabetically
ASoC: codec: cs42l52: Drop cs42l52.h
ASoC: codec: cs42l52: Convert to GPIO descriptors
Philipp Stanner (5):
ASoC: loongson: Replace deprecated PCI functions
ASoC: sof: Use pure devres PCI
ASoC: intel: avs: Use pure devres PCI
ASoC: intel: atom: Use pure devres PCI
ASoC: intel: atom: Return -ENOMEM if pcim_iomap() fails
Richard Fitzgerald (10):
ASoC: wm_adsp: Use vmemdup_user() instead of open-coding
ASoC: dt-bindings: Add Cirrus Logic CS48L32 audio DSP
ASoC: cs48l32: Add driver for Cirrus Logic CS48L32 audio DSP
ASoC: cs-amp-lib-test: Use flex_array_size()
ASoC: cs-amp-lib-test: Use faux bus instead of creating a dummy platform device
firmware: cs_dsp: Add some sanity-checking to test harness
MAINTAINERS: ASoC: Simplify references to Cirrus Logic include files
ASoC: wm_adsp: Don't use no_free_ptr() when passing to PTR_ERR()
ASoC: Intel: soc-acpi-intel-mtl-match: Add match for CDB35L63-CB2
ASoC: wm_adsp: Make cirrus_dir const
Sheetal (11):
dt-bindings: ASoC: admaif: Add missing properties
dt-bindings: ASoC: Document Tegra264 APE support
ASoC: tegra: CIF: Add Tegra264 support
ASoC: tegra: ADMAIF: Add Tegra264 support
ASoC: tegra: ASRC: Update ARAM address
ASoC: tegra: Update PLL rate for Tegra264
ASoC: tegra: I2S: Add Tegra264 support
ASoC: tegra: AMX: Add Tegra264 support
ASoC: tegra: ADX: Add Tegra264 support
ASoC: tegra: AHUB: Add Tegra264 support
ASoC: tegra: Tegra264 support in isomgr_bw
Shenghao Ding (2):
ASoC: tas2781: Add a debugfs node for acoustic tuning
ASoC: tas2781: Header file cleanup and Move the macro definitions to fwlib
Shengjiu Wang (7):
ASoC: fsl_sai: allow to set mclk rate with zero clk_id
ASoC: fsl_sai: add xlate_tdm_slot_mask() callback
ASoC: fsl_sai: separate 'is_dsp_mode' for tx and rx
ASoC: fsl_sai: separate set_tdm_slot() for tx and rx
ASoC: dt-bindings: fsl,mqs: Reference common DAI properties
ASoC: dt-bindings: fsl,mqs: Document audio graph port
ASoC: fsl_xcvr: update platform driver name
Shuming Fan (3):
ASoC: rt722: fix pop noise at the beginning of headphone playback
ASoC: rt722: fix pop noise at the beginning of DMIC recording
ASoC: rt722: make regmap cache-only in probe
Simon Trimmer (2):
ASoC: cs35l56: Log tuning unique identifiers during firmware load
ALSA: hda: cs35l56: Log tuning unique identifiers during firmware load
Srinivas Kandagatla (3):
ASoC: codecs: wcd-mbhc: cleanup swap_gnd_mic api
ASoC: dt-bindings: wcd93xx: add bindings for audio mux controlling hp
ASoC: codecs: wcd938x: add mux control support for hp audio mux
Stefan Binding (6):
ASoC: cs35l56: Add Index based on ACPI HID or SDW ID to select regmap config
ASoC: cs35l56: Add struct to index firmware registers
ASoC: cs35l56: Add Mute, Volume and Posture registers to firmware register list
ASoC: cs35l56: Add initial support for CS35L63 for I2C and SoundWire
ASoC: cs35l56: Read Silicon ID from DIE_STS registers for CS35L63
ASoC: intel: sof_sdw: Add support for CS35L63 into machine driver
Talhah Peerbhai (1):
ASoC: amd: yc: Add quirk for Lenovo Yoga Pro 7 14ASP9
Thorsten Blum (6):
ASoC: codecs: rt5677: Use secs_to_jiffies() instead of msecs_to_jiffies()
ASoC: cs-amp-lib: Replace offsetof() with struct_size()
ASoC: cs-amp-lib: Annotate struct cirrus_amp_efi_data with __counted_by()
ASoC: starfive: Use max() to simplify code in jh7110_tdm_syncdiv()
ASoC: codecs: Use min() to simplify aw_dev_dsp_update_container()
ASoC: Intel: avs: Fix kcalloc() sizes
Vijendar Mukunda (12):
ASoC: SOF: amd: remove else condition in resume sequence
ASoC: SOF: amd: add missing acp descriptor field
ASoC: SOF: amd: add ACP7.1 platform support
ASoC: SOF: amd: update soundwire specific acp descriptor fields
ASoC: SOF: amd: enable ACP_PME_EN register for ACP7.0 & ACP7.1 platforms
ASoC: SOF: amd: refactor acp reset sequence
ASoC: SOF: amd: enable soundwire host wake irq mask
ASoC: SOF: amd: add soundwire wake irq handling
ASoC: SOF: amd: add build support for soundwire
ASoC: amd: amd_sdw: Fix unlikely uninitialized variable use in create_sdw_dailinks()
ASoC: amd: sof_amd_sdw: Fix unlikely uninitialized variable use in create_sdw_dailinks()
ASoC: amd: sof_amd_sdw: add logic to get cpu_pin_id for ACP7.0/ACP7.1 platforms
Yuanjun Gong (1):
ASoC: tegra210_ahub: Add check to of_device_get_match_data()
Zhang Enpei (1):
ASoC: stm: stm32_sai: Use dev_err_probe()
Zhang Yi (2):
ASoC: codecs: add support for ES8389
ASoC: dt-bindings: Add Everest ES8389 audio CODEC
.../bindings/bus/nvidia,tegra210-aconnect.yaml | 1 +
.../bindings/sound/audio-graph-card2.yaml | 8 +-
.../devicetree/bindings/sound/cirrus,cs48l32.yaml | 195 +
.../devicetree/bindings/sound/everest,es8389.yaml | 50 +
.../devicetree/bindings/sound/fsl,mqs.yaml | 10 +-
.../bindings/sound/loongson,ls1b-ac97.yaml | 68 +
.../devicetree/bindings/sound/maxim,max98925.yaml | 2 +-
.../bindings/sound/mediatek,mt8188-mt6359.yaml | 7 +-
.../sound/mt8186-mt6366-da7219-max98357.yaml | 7 +-
.../devicetree/bindings/sound/mt8195-mt6359.yaml | 4 +
.../sound/nvidia,tegra-audio-graph-card.yaml | 1 +
.../bindings/sound/nvidia,tegra186-asrc.yaml | 4 +-
.../bindings/sound/nvidia,tegra186-dspk.yaml | 1 +
.../bindings/sound/nvidia,tegra210-admaif.yaml | 17 +
.../bindings/sound/nvidia,tegra210-adx.yaml | 4 +-
.../bindings/sound/nvidia,tegra210-ahub.yaml | 1 +
.../bindings/sound/nvidia,tegra210-amx.yaml | 6 +-
.../bindings/sound/nvidia,tegra210-dmic.yaml | 1 +
.../bindings/sound/nvidia,tegra210-i2s.yaml | 4 +-
.../bindings/sound/nvidia,tegra210-mbdrc.yaml | 1 +
.../bindings/sound/nvidia,tegra210-mixer.yaml | 1 +
.../bindings/sound/nvidia,tegra210-mvc.yaml | 1 +
.../bindings/sound/nvidia,tegra210-ope.yaml | 1 +
.../bindings/sound/nvidia,tegra210-peq.yaml | 1 +
.../bindings/sound/nvidia,tegra210-sfc.yaml | 1 +
.../devicetree/bindings/sound/qcom,sm8250.yaml | 2 +
.../devicetree/bindings/sound/qcom,wcd938x.yaml | 6 +
.../devicetree/bindings/sound/realtek,alc203.yaml | 36 +
.../devicetree/bindings/sound/richtek,rt9123.yaml | 56 +
.../devicetree/bindings/sound/richtek,rt9123p.yaml | 48 +
.../bindings/sound/rockchip,rk3576-sai.yaml | 144 +
.../devicetree/bindings/spi/renesas,sh-msiof.yaml | 43 +-
MAINTAINERS | 17 +-
drivers/firmware/cirrus/test/cs_dsp_mock_bin.c | 3 +
.../firmware/cirrus/test/cs_dsp_mock_mem_maps.c | 15 +-
drivers/firmware/cirrus/test/cs_dsp_mock_wmfw.c | 4 +
drivers/spi/spi-sh-msiof.c | 42 +-
include/dt-bindings/sound/cs48l32.h | 20 +
include/linux/pci_ids.h | 1 +
include/linux/string_helpers.h | 1 +
include/sound/cs-amp-lib.h | 2 +-
include/sound/cs35l56.h | 29 +
include/sound/cs42l52.h | 29 -
include/sound/cs42l56.h | 45 -
include/sound/cs42l73.h | 19 -
include/sound/cs48l32.h | 47 +
include/sound/cs48l32_registers.h | 530 +++
include/sound/hdaudio_ext.h | 6 +
include/sound/sdca_asoc.h | 42 +
include/sound/sdca_function.h | 71 +-
include/sound/soc-acpi.h | 13 +
include/sound/soc-dapm.h | 4 +
include/sound/soc.h | 15 +-
include/sound/soc_sdw_utils.h | 5 +-
include/sound/sof.h | 1 +
include/sound/tas2781.h | 30 +-
include/sound/tpa6130a2-plat.h | 17 -
lib/string_helpers.c | 39 +-
sound/hda/ext/hdac_ext_controller.c | 19 +
sound/hda/hdac_device.c | 2 +-
sound/hda/intel-dsp-config.c | 4 +
sound/pci/hda/cirrus_scodec_test.c | 7 +-
sound/pci/hda/cs35l56_hda.c | 24 +-
sound/pci/hda/cs35l56_hda_i2c.c | 3 +
sound/pci/hda/cs35l56_hda_spi.c | 3 +
sound/soc/amd/acp-da7219-max98357a.c | 8 +-
sound/soc/amd/acp-es8336.c | 4 +-
sound/soc/amd/acp-rt5645.c | 6 +-
sound/soc/amd/acp/acp-sdw-legacy-mach.c | 4 +-
sound/soc/amd/acp/acp-sdw-sof-mach.c | 10 +-
sound/soc/amd/acp/acp-sof-mach.c | 2 +-
sound/soc/amd/yc/acp6x-mach.c | 9 +-
sound/soc/codecs/Kconfig | 33 +-
sound/soc/codecs/Makefile | 10 +-
sound/soc/codecs/ac97.c | 10 +
sound/soc/codecs/adau7118.c | 6 +
sound/soc/codecs/ak4458.c | 10 +-
sound/soc/codecs/ak5386.c | 28 +-
sound/soc/codecs/aw88166.c | 7 +-
sound/soc/codecs/aw88395/aw88395_device.c | 7 +-
sound/soc/codecs/aw88399.c | 7 +-
sound/soc/codecs/cs-amp-lib-test.c | 70 +-
sound/soc/codecs/cs-amp-lib.c | 3 +-
sound/soc/codecs/cs35l56-i2c.c | 23 +-
sound/soc/codecs/cs35l56-sdw.c | 91 +-
sound/soc/codecs/cs35l56-shared.c | 257 +-
sound/soc/codecs/cs35l56-spi.c | 3 +
sound/soc/codecs/cs35l56.c | 48 +-
sound/soc/codecs/cs35l56.h | 1 +
sound/soc/codecs/cs42l52.c | 112 +-
sound/soc/codecs/cs42l56.c | 90 +-
sound/soc/codecs/cs42l73.c | 70 +-
sound/soc/codecs/cs48l32-tables.c | 540 +++
sound/soc/codecs/cs48l32.c | 4073 ++++++++++++++++++++
sound/soc/codecs/cs48l32.h | 403 ++
sound/soc/codecs/es8389.c | 962 +++++
sound/soc/codecs/es8389.h | 140 +
sound/soc/codecs/hdmi-codec.c | 1 +
sound/soc/codecs/idt821034.c | 17 +-
sound/soc/codecs/pcm6240.c | 3 +-
sound/soc/codecs/peb2466.c | 15 +-
sound/soc/codecs/rt5665.c | 96 -
sound/soc/codecs/rt5665.h | 3 -
sound/soc/codecs/rt5668.c | 43 -
sound/soc/codecs/rt5668.h | 3 -
sound/soc/codecs/rt5677-spi.c | 4 +-
sound/soc/codecs/rt5677.c | 7 +-
sound/soc/codecs/rt712-sdca-dmic.c | 8 +-
sound/soc/codecs/rt712-sdca.c | 8 +-
sound/soc/codecs/rt722-sdca-sdw.c | 20 +
sound/soc/codecs/rt722-sdca-sdw.h | 1 +
sound/soc/codecs/rt722-sdca.c | 322 +-
sound/soc/codecs/rt722-sdca.h | 6 +
sound/soc/codecs/rt9123.c | 503 +++
sound/soc/codecs/rt9123p.c | 171 +
sound/soc/codecs/sma1307.c | 1 -
sound/soc/codecs/sta32x.c | 6 +-
sound/soc/codecs/tas2764-quirks.h | 180 +
sound/soc/codecs/tas2764.c | 139 +-
sound/soc/codecs/tas2764.h | 3 +
sound/soc/codecs/tas2770.c | 151 +-
sound/soc/codecs/tas2770.h | 6 +
sound/soc/codecs/tas2781-fmwlib.c | 8 +-
sound/soc/codecs/tas2781-i2c.c | 157 +-
sound/soc/codecs/tlv320adc3xxx.c | 8 +-
sound/soc/codecs/tlv320aic3x.c | 6 +-
sound/soc/codecs/tpa6130a2.c | 54 +-
sound/soc/codecs/twl4030.c | 79 +-
sound/soc/codecs/wcd-mbhc-v2.c | 2 +-
sound/soc/codecs/wcd-mbhc-v2.h | 2 +-
sound/soc/codecs/wcd9335.c | 15 +-
sound/soc/codecs/wcd937x.c | 2 +-
sound/soc/codecs/wcd938x-sdw.c | 2 +-
sound/soc/codecs/wcd938x.c | 69 +-
sound/soc/codecs/wcd939x.c | 18 +-
sound/soc/codecs/wm5100.c | 10 +-
sound/soc/codecs/wm8903.c | 12 +-
sound/soc/codecs/wm8962.c | 11 +-
sound/soc/codecs/wm8996.c | 10 +-
sound/soc/codecs/wm_adsp.c | 28 +-
sound/soc/codecs/wsa883x.c | 2 +-
sound/soc/codecs/wsa884x.c | 2 +-
sound/soc/codecs/zl38060.c | 12 +-
sound/soc/fsl/fsl_rpmsg.c | 28 +-
sound/soc/fsl/fsl_rpmsg.h | 2 +-
sound/soc/fsl/fsl_sai.c | 90 +-
sound/soc/fsl/fsl_sai.h | 6 +-
sound/soc/fsl/fsl_xcvr.c | 2 +-
sound/soc/fsl/imx-card.c | 7 +-
sound/soc/fsl/imx-pcm-rpmsg.c | 21 +-
sound/soc/generic/simple-card-utils.c | 23 +-
sound/soc/generic/test-component.c | 11 +
sound/soc/intel/atom/sst/sst.h | 6 -
sound/soc/intel/atom/sst/sst_drv_interface.c | 24 -
sound/soc/intel/atom/sst/sst_pci.c | 59 +-
sound/soc/intel/atom/sst/sst_pvt.c | 33 -
sound/soc/intel/avs/Makefile | 6 +-
sound/soc/intel/avs/avs.h | 13 +-
sound/soc/intel/avs/board_selection.c | 181 +-
sound/soc/intel/avs/boards/Kconfig | 8 +
sound/soc/intel/avs/boards/da7219.c | 11 +-
sound/soc/intel/avs/boards/dmic.c | 12 +-
sound/soc/intel/avs/boards/es8336.c | 11 +-
sound/soc/intel/avs/boards/hdaudio.c | 25 +-
sound/soc/intel/avs/boards/i2s_test.c | 15 +-
sound/soc/intel/avs/boards/max98357a.c | 11 +-
sound/soc/intel/avs/boards/max98373.c | 11 +-
sound/soc/intel/avs/boards/max98927.c | 11 +-
sound/soc/intel/avs/boards/nau8825.c | 11 +-
sound/soc/intel/avs/boards/pcm3168a.c | 16 +-
sound/soc/intel/avs/boards/probe.c | 5 +-
sound/soc/intel/avs/boards/rt274.c | 11 +-
sound/soc/intel/avs/boards/rt286.c | 11 +-
sound/soc/intel/avs/boards/rt298.c | 11 +-
sound/soc/intel/avs/boards/rt5514.c | 11 +-
sound/soc/intel/avs/boards/rt5663.c | 11 +-
sound/soc/intel/avs/boards/rt5682.c | 11 +-
sound/soc/intel/avs/boards/ssm4567.c | 11 +-
sound/soc/intel/avs/core.c | 68 +-
sound/soc/intel/avs/dsp.c | 2 -
sound/soc/intel/avs/lnl.c | 27 +
sound/soc/intel/avs/loader.c | 11 +-
sound/soc/intel/avs/messages.h | 34 +-
sound/soc/intel/avs/mtl.c | 200 +
sound/soc/intel/avs/path.c | 59 +-
sound/soc/intel/avs/pcm.c | 156 +-
sound/soc/intel/avs/probes.c | 2 +-
sound/soc/intel/avs/ptl.c | 98 +
sound/soc/intel/avs/registers.h | 40 +-
sound/soc/intel/avs/topology.c | 4 +-
sound/soc/intel/avs/topology.h | 2 +-
sound/soc/intel/avs/utils.h | 16 +-
sound/soc/intel/boards/Kconfig | 8 -
sound/soc/intel/boards/sof_sdw.c | 48 +-
sound/soc/intel/common/Makefile | 2 +-
sound/soc/intel/common/soc-acpi-intel-arl-match.c | 9 +
sound/soc/intel/common/soc-acpi-intel-lnl-match.c | 15 +-
sound/soc/intel/common/soc-acpi-intel-mtl-match.c | 49 +-
sound/soc/intel/common/soc-acpi-intel-ptl-match.c | 124 +-
sound/soc/intel/common/sof-function-topology-lib.c | 135 +
sound/soc/intel/common/sof-function-topology-lib.h | 15 +
sound/soc/loongson/Kconfig | 10 +
sound/soc/loongson/Makefile | 2 +
sound/soc/loongson/loongson1_ac97.c | 398 ++
sound/soc/loongson/loongson_i2s_pci.c | 13 +-
sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 571 +--
sound/soc/mediatek/mt8188/mt8188-mt6359.c | 6 +-
sound/soc/mediatek/mt8195/mt8195-mt6359.c | 45 +-
sound/soc/meson/meson-card-utils.c | 2 +-
sound/soc/qcom/qdsp6/q6apm-lpass-dais.c | 2 +-
sound/soc/qcom/sc8280xp.c | 2 +
sound/soc/renesas/Kconfig | 7 +
sound/soc/renesas/rcar/Makefile | 3 +
sound/soc/renesas/rcar/adg.c | 32 +-
sound/soc/renesas/rcar/core.c | 9 +-
sound/soc/renesas/rcar/msiof.c | 566 +++
sound/soc/rockchip/Kconfig | 10 +
sound/soc/rockchip/Makefile | 2 +
sound/soc/rockchip/rockchip_sai.c | 1555 ++++++++
sound/soc/rockchip/rockchip_sai.h | 251 ++
sound/soc/sdca/Makefile | 2 +-
sound/soc/sdca/sdca_asoc.c | 1311 +++++++
sound/soc/sdca/sdca_functions.c | 10 +-
sound/soc/sdca/sdca_regmap.c | 3 -
sound/soc/sdw_utils/soc_sdw_rt_amp.c | 2 +-
sound/soc/sdw_utils/soc_sdw_utils.c | 202 +-
sound/soc/soc-ac97.c | 15 +-
sound/soc/soc-core.c | 130 +-
sound/soc/soc-dapm.c | 84 +-
sound/soc/soc-devres.c | 7 +
sound/soc/soc-utils.c | 13 +
sound/soc/sof/amd/Kconfig | 7 +-
sound/soc/sof/amd/acp-dsp-offset.h | 10 +
sound/soc/sof/amd/acp.c | 133 +-
sound/soc/sof/amd/acp.h | 7 +
sound/soc/sof/amd/pci-acp70.c | 10 +-
sound/soc/sof/core.c | 10 +-
sound/soc/sof/imx/imx8.c | 24 +-
sound/soc/sof/ipc4-pcm.c | 3 +-
sound/soc/sof/sof-pci-dev.c | 16 +-
sound/soc/sof/topology.c | 97 +-
sound/soc/starfive/jh7110_tdm.c | 13 +-
sound/soc/stm/stm32_sai.c | 18 +-
sound/soc/sunxi/sun8i-codec.c | 13 +-
sound/soc/tegra/tegra186_asrc.c | 18 +-
sound/soc/tegra/tegra186_asrc.h | 12 +-
sound/soc/tegra/tegra210_admaif.c | 223 +-
sound/soc/tegra/tegra210_admaif.h | 78 +
sound/soc/tegra/tegra210_adx.c | 229 +-
sound/soc/tegra/tegra210_adx.h | 36 +-
sound/soc/tegra/tegra210_ahub.c | 850 +++-
sound/soc/tegra/tegra210_ahub.h | 52 +-
sound/soc/tegra/tegra210_amx.c | 229 +-
sound/soc/tegra/tegra210_amx.h | 34 +-
sound/soc/tegra/tegra210_i2s.c | 231 +-
sound/soc/tegra/tegra210_i2s.h | 51 +-
sound/soc/tegra/tegra_audio_graph_card.c | 14 +-
sound/soc/tegra/tegra_cif.h | 30 +-
sound/soc/tegra/tegra_isomgr_bw.c | 7 +-
sound/soc/ti/davinci-mcasp.c | 8 +-
260 files changed, 18490 insertions(+), 2212 deletions(-)
create mode 100644 Documentation/devicetree/bindings/sound/cirrus,cs48l32.yaml
create mode 100644 Documentation/devicetree/bindings/sound/everest,es8389.yaml
create mode 100644 Documentation/devicetree/bindings/sound/loongson,ls1b-ac97.yaml
create mode 100644 Documentation/devicetree/bindings/sound/realtek,alc203.yaml
create mode 100644 Documentation/devicetree/bindings/sound/richtek,rt9123.yaml
create mode 100644 Documentation/devicetree/bindings/sound/richtek,rt9123p.yaml
create mode 100644 Documentation/devicetree/bindings/sound/rockchip,rk3576-sai.yaml
create mode 100644 include/dt-bindings/sound/cs48l32.h
delete mode 100644 include/sound/cs42l52.h
delete mode 100644 include/sound/cs42l56.h
delete mode 100644 include/sound/cs42l73.h
create mode 100644 include/sound/cs48l32.h
create mode 100644 include/sound/cs48l32_registers.h
create mode 100644 include/sound/sdca_asoc.h
delete mode 100644 include/sound/tpa6130a2-plat.h
create mode 100644 sound/soc/codecs/cs48l32-tables.c
create mode 100644 sound/soc/codecs/cs48l32.c
create mode 100644 sound/soc/codecs/cs48l32.h
create mode 100644 sound/soc/codecs/es8389.c
create mode 100644 sound/soc/codecs/es8389.h
create mode 100644 sound/soc/codecs/rt9123.c
create mode 100644 sound/soc/codecs/rt9123p.c
create mode 100644 sound/soc/codecs/tas2764-quirks.h
create mode 100644 sound/soc/intel/avs/lnl.c
create mode 100644 sound/soc/intel/avs/mtl.c
create mode 100644 sound/soc/intel/avs/ptl.c
create mode 100644 sound/soc/intel/common/sof-function-topology-lib.c
create mode 100644 sound/soc/intel/common/sof-function-topology-lib.h
create mode 100644 sound/soc/loongson/loongson1_ac97.c
create mode 100644 sound/soc/renesas/rcar/msiof.c
create mode 100644 sound/soc/rockchip/rockchip_sai.c
create mode 100644 sound/soc/rockchip/rockchip_sai.h
create mode 100644 sound/soc/sdca/sdca_asoc.c
2
1
The following changes since commit 92a09c47464d040866cf2b4cd052bc60555185fb:
Linux 6.15-rc5 (2025-05-04 13:55:04 -0700)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git tags/asoc-fix-v6.15-rc7
for you to fetch changes up to 688abe2860fd9c644705b9e11cb9649eb891b879:
ASoC: qcom: sdm845: Add error handling in sdm845_slim_snd_hw_params() (2025-05-20 10:24:59 +0100)
----------------------------------------------------------------
ASoC: Fixes for v6.15
A couple more small fixes for v6.15, both of which could also easily
wait until the merge window.
----------------------------------------------------------------
Arnd Bergmann (1):
ASoC: mediatek: mt8188-mt6359: select CONFIG_SND_SOC_MT6359_ACCDET
Kai Vehmanen (1):
ASoc: SOF: topology: connect DAI to a single DAI link
Martin Povišer (1):
ASoC: apple: mca: Constrain channels according to TDM mask
Nícolas F. R. A. Prado (1):
ASoC: mediatek: mt8188-mt6359: Depend on MT6359_ACCDET set or disabled
Peter Ujfalusi (3):
ASoC: SOF: ipc4-control: Use SOF_CTRL_CMD_BINARY as numid for bytes_ext
ASoC: SOF: ipc4-pcm: Delay reporting is only supported for playback direction
ASoC: SOF: Intel: hda-bus: Use PIO mode on ACE2+ platforms
Tavian Barnes (1):
ASoC: SOF: Intel: hda: Fix UAF when reloading module
Wentao Liang (1):
ASoC: qcom: sdm845: Add error handling in sdm845_slim_snd_hw_params()
sound/soc/apple/mca.c | 23 +++++++++++++++++++++++
sound/soc/mediatek/Kconfig | 1 +
sound/soc/qcom/sdm845.c | 4 ++++
sound/soc/sof/intel/hda-bus.c | 2 +-
sound/soc/sof/intel/hda.c | 16 +++++++++++++++-
sound/soc/sof/ipc4-control.c | 11 ++++++++++-
sound/soc/sof/ipc4-pcm.c | 3 ++-
sound/soc/sof/topology.c | 18 ++++++++++++++----
8 files changed, 70 insertions(+), 8 deletions(-)
2
1
The following changes since commit 92a09c47464d040866cf2b4cd052bc60555185fb:
Linux 6.15-rc5 (2025-05-04 13:55:04 -0700)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git tags/asoc-fix-v6.15-rc6
for you to fetch changes up to 7dd7f39fce0022b386ef1ea5ffef92ecc7dfc6af:
ASoC: SOF: Intel: hda: Fix UAF when reloading module (2025-05-14 16:34:48 +0200)
----------------------------------------------------------------
ASoC: Fixes for v6.15
A collection of driver specific fixes that built up over the past few
weeks, plus one core patch which fixes handling of topology files where
some DAI names are substrings of others.
----------------------------------------------------------------
Arnd Bergmann (1):
ASoC: mediatek: mt8188-mt6359: select CONFIG_SND_SOC_MT6359_ACCDET
Kai Vehmanen (1):
ASoc: SOF: topology: connect DAI to a single DAI link
Nícolas F. R. A. Prado (1):
ASoC: mediatek: mt8188-mt6359: Depend on MT6359_ACCDET set or disabled
Peter Ujfalusi (3):
ASoC: SOF: ipc4-control: Use SOF_CTRL_CMD_BINARY as numid for bytes_ext
ASoC: SOF: ipc4-pcm: Delay reporting is only supported for playback direction
ASoC: SOF: Intel: hda-bus: Use PIO mode on ACE2+ platforms
Tavian Barnes (1):
ASoC: SOF: Intel: hda: Fix UAF when reloading module
sound/soc/mediatek/Kconfig | 1 +
sound/soc/sof/intel/hda-bus.c | 2 +-
sound/soc/sof/intel/hda.c | 16 +++++++++++++++-
sound/soc/sof/ipc4-control.c | 11 ++++++++++-
sound/soc/sof/ipc4-pcm.c | 3 ++-
sound/soc/sof/topology.c | 18 ++++++++++++++----
6 files changed, 43 insertions(+), 8 deletions(-)
1
0
alsa-project/alsa-tools issue #37 was opened from krl:
When looking to package parts of alsa-tools for guix, i noticed that there is no license information on the repo.
Can these projects be assumed to be under GPLv2, as is the case with alsa-utils?
Issue URL : https://github.com/alsa-project/alsa-tools/issues/37
Repository URL: https://github.com/alsa-project/alsa-tools
1
0

[PATCH v1] ALSA: hda/tas2781: Move and unified the calibrated-data getting function for SPI and I2C into the tas2781_hda lib.
by Shenghao Ding 22 May '25
by Shenghao Ding 22 May '25
22 May '25
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(a)ti.com>
---
v1:
- Correct the comment in tas2781.h.
- Move enum device_catlog_id {...} from tas2781.h into tas2781_hda.h.
- Move (*save_calibration)() and (*apply_calibration)() from tas2781.h
into tas2781_hda.h.
- Move the declaration of tas2781_save_calibration into tas2781_hda.h.
- Define tasdev_fct_efi_guid[] and put all the supported devices into
the tas2781_hda.c.
- Optimize and cleanup tas2563_save_calibration.
- Move the definition of TASDEVICE_CMD_XXX from tas2781.h to
tas2781_fmwlib.c
- Drop tas2781_save_calibration() in tas2781-comlib.c.
- Move the implementation of tasdevice_remove to tas2781-comlib.c
---
include/sound/tas2781.h | 10 --
sound/pci/hda/tas2781_hda.c | 179 ++++++++++++++++++++++
sound/pci/hda/tas2781_hda.h | 12 ++
sound/pci/hda/tas2781_hda_i2c.c | 245 ++++++++++--------------------
sound/pci/hda/tas2781_hda_spi.c | 167 +-------------------
sound/soc/codecs/tas2781-comlib.c | 15 --
6 files changed, 272 insertions(+), 356 deletions(-)
diff --git a/include/sound/tas2781.h b/include/sound/tas2781.h
index 9dc178a7486a..40cd3bd079b5 100644
--- a/include/sound/tas2781.h
+++ b/include/sound/tas2781.h
@@ -116,11 +116,6 @@ enum dspbin_type {
TASDEV_BETA,
};
-enum device_catlog_id {
- LENOVO = 0,
- OTHERS
-};
-
struct bulk_reg_val {
int reg;
unsigned char val[4];
@@ -190,7 +185,6 @@ struct tasdevice_priv {
struct regmap *regmap;
struct device *dev;
- enum device_catlog_id catlog_id;
unsigned char cal_binaryname[TASDEVICE_MAX_CHANNELS][64];
unsigned char crc8_lkp_tbl[CRC8_TABLE_SIZE];
unsigned char coef_binaryname[64];
@@ -241,8 +235,6 @@ struct tasdevice_priv {
int (*dev_bulk_read)(struct tasdevice_priv *tas_priv,
unsigned short chn, unsigned int reg, unsigned char *p_data,
unsigned int n_length);
- int (*save_calibration)(struct tasdevice_priv *tas_priv);
- void (*apply_calibration)(struct tasdevice_priv *tas_priv);
};
int tasdevice_dev_read(struct tasdevice_priv *tas_priv,
@@ -256,6 +248,4 @@ int tasdevice_dev_bulk_write(
struct tasdevice_priv *tas_priv, unsigned short chn,
unsigned int reg, unsigned char *p_data, unsigned int n_length);
void tasdevice_remove(struct tasdevice_priv *tas_priv);
-int tasdevice_save_calibration(struct tasdevice_priv *tas_priv);
-void tasdevice_apply_calibration(struct tasdevice_priv *tas_priv);
#endif /* __TAS2781_H__ */
diff --git a/sound/pci/hda/tas2781_hda.c b/sound/pci/hda/tas2781_hda.c
index 9d8e0d938d5a..5f1d4b3e9688 100644
--- a/sound/pci/hda/tas2781_hda.c
+++ b/sound/pci/hda/tas2781_hda.c
@@ -18,6 +18,185 @@
#include "tas2781_hda.h"
+const efi_guid_t tasdev_fct_efi_guid[] = {
+ /* DELL */
+ EFI_GUID(0xcc92382d, 0x6337, 0x41cb, 0xa8, 0x8b, 0x8e, 0xce, 0x74,
+ 0x91, 0xea, 0x9f),
+ /* HP */
+ EFI_GUID(0x02f9af02, 0x7734, 0x4233, 0xb4, 0x3d, 0x93, 0xfe, 0x5a,
+ 0xa3, 0x5d, 0xb3),
+ /* LENOVO & OTHERS */
+ EFI_GUID(0x1f52d2a1, 0xbb3a, 0x457d, 0xbc, 0x09, 0x43, 0xa3, 0xf4,
+ 0x31, 0x0a, 0x92),
+};
+EXPORT_SYMBOL_NS_GPL(tasdev_fct_efi_guid, "SND_HDA_SCODEC_TAS2781");
+
+static void tas2781_apply_calib(struct tasdevice_priv *p)
+{
+ struct calidata *cali_data = &p->cali_data;
+ struct cali_reg *r = &cali_data->cali_reg_array;
+ unsigned char *data = cali_data->data;
+ unsigned int *tmp_val = (unsigned int *)data;
+ unsigned int cali_reg[TASDEV_CALIB_N] = {
+ TASDEVICE_REG(0, 0x17, 0x74),
+ TASDEVICE_REG(0, 0x18, 0x0c),
+ TASDEVICE_REG(0, 0x18, 0x14),
+ TASDEVICE_REG(0, 0x13, 0x70),
+ TASDEVICE_REG(0, 0x18, 0x7c),
+ };
+ unsigned int crc, oft;
+ unsigned char *buf;
+ int i, j, k, l;
+
+ if (tmp_val[0] == 2781) {
+ /*
+ * New features were added in calibrated Data V3:
+ * 1. Added calibration registers address define in
+ * a node, marked as Device id == 0x80.
+ * New features were added in calibrated Data V2:
+ * 1. Added some the fields to store the link_id and
+ * uniqie_id for multi-link solutions
+ * 2. Support flexible number of devices instead of
+ * fixed one in V1.
+ * Layout of calibrated data V2 in UEFI(total 256 bytes):
+ * ChipID (2781, 4 bytes)
+ * Data-Group-Sum (4 bytes)
+ * TimeStamp of Calibration (4 bytes)
+ * for (i = 0; i < Data-Group-Sum; i++) {
+ * if (Data type != 0x80) (4 bytes)
+ * Calibrated Data of Device #i (20 bytes)
+ * else
+ * Calibration registers address (5*4 = 20 bytes)
+ * # V2: No reg addr in data grp section.
+ * # V3: Normally the last grp is the reg addr.
+ * }
+ * CRC (4 bytes)
+ * Reserved (the rest)
+ */
+ crc = crc32(~0, data, (3 + tmp_val[1] * 6) * 4) ^ ~0;
+
+ if (crc != tmp_val[3 + tmp_val[1] * 6]) {
+ cali_data->total_sz = 0;
+ dev_err(p->dev, "%s: CRC error\n", __func__);
+ return;
+ }
+
+ for (j = 0, k = 0; j < tmp_val[1]; j++) {
+ oft = j * 6 + 3;
+ if (tmp_val[oft] == TASDEV_UEFI_CALI_REG_ADDR_FLG) {
+ for (i = 0; i < TASDEV_CALIB_N; i++) {
+ buf = &data[(oft + i + 1) * 4];
+ cali_reg[i] = TASDEVICE_REG(buf[1],
+ buf[2], buf[3]);
+ }
+ } else {
+ l = j * (cali_data->cali_dat_sz_per_dev + 1);
+ if (k >= p->ndev || l > oft * 4) {
+ dev_err(p->dev, "%s: dev sum error\n",
+ __func__);
+ cali_data->total_sz = 0;
+ return;
+ }
+
+ data[l] = k;
+ for (i = 0; i < TASDEV_CALIB_N * 4; i++)
+ data[l + i] = data[4 * oft + i];
+ k++;
+ }
+ }
+ } else {
+ /*
+ * Calibration data is in V1 format.
+ * struct cali_data {
+ * char cali_data[20];
+ * }
+ *
+ * struct {
+ * struct cali_data cali_data[4];
+ * int TimeStamp of Calibration (4 bytes)
+ * int CRC (4 bytes)
+ * } ueft;
+ */
+ crc = crc32(~0, data, 84) ^ ~0;
+ if (crc != tmp_val[21]) {
+ cali_data->total_sz = 0;
+ dev_err(p->dev, "%s: V1 CRC error\n", __func__);
+ return;
+ }
+
+ for (j = p->ndev - 1; j >= 0; j--) {
+ l = j * (cali_data->cali_dat_sz_per_dev + 1);
+ for (i = TASDEV_CALIB_N * 4; i > 0 ; i--)
+ data[l + i] = data[p->index * 5 + i];
+ data[l+i] = j;
+ }
+ }
+
+ if (p->dspbin_typ == TASDEV_BASIC) {
+ r->r0_reg = cali_reg[0];
+ r->invr0_reg = cali_reg[1];
+ r->r0_low_reg = cali_reg[2];
+ r->pow_reg = cali_reg[3];
+ r->tlimit_reg = cali_reg[4];
+ }
+
+ p->is_user_space_calidata = true;
+ cali_data->total_sz = p->ndev * (cali_data->cali_dat_sz_per_dev + 1);
+}
+
+/*
+ * Update the calibration data, including speaker impedance, f0, etc,
+ * into algo. Calibrate data is done by manufacturer in the factory.
+ * The data is used by Algo for calculating the speaker temperature,
+ * speaker membrane excursion and f0 in real time during playback.
+ * Calibration data format in EFI is V2, since 2024.
+ */
+int tas2781_save_calibration(struct tas2781_hda *hda)
+{
+ /*
+ * GUID was used for data access in BIOS, it was provided by board
+ * manufactory.
+ */
+ efi_guid_t efi_guid = tasdev_fct_efi_guid[LENOVO];
+ static efi_char16_t efi_name[] = TASDEVICE_CALIBRATION_DATA_NAME;
+ struct tasdevice_priv *p = hda->priv;
+ struct calidata *cali_data = &p->cali_data;
+ unsigned long total_sz = 0;
+ unsigned int attr, size;
+ unsigned char *data;
+ efi_status_t status;
+
+ if (hda->catlog_id < LENOVO)
+ efi_guid = tasdev_fct_efi_guid[hda->catlog_id];
+
+ cali_data->cali_dat_sz_per_dev = 20;
+ size = p->ndev * (cali_data->cali_dat_sz_per_dev + 1);
+ /* Get real size of UEFI variable */
+ status = efi.get_variable(efi_name, &efi_guid, &attr, &total_sz, NULL);
+ cali_data->total_sz = total_sz > size ? total_sz : size;
+ if (status == EFI_BUFFER_TOO_SMALL) {
+ /* Allocate data buffer of data_size bytes */
+ data = p->cali_data.data = devm_kzalloc(p->dev,
+ p->cali_data.total_sz, GFP_KERNEL);
+ if (!data) {
+ p->cali_data.total_sz = 0;
+ return -ENOMEM;
+ }
+ /* Get variable contents into buffer */
+ status = efi.get_variable(efi_name, &efi_guid, &attr,
+ &p->cali_data.total_sz, data);
+ }
+ if (status != EFI_SUCCESS) {
+ p->cali_data.total_sz = 0;
+ return status;
+ }
+
+ tas2781_apply_calib(p);
+
+ return 0;
+}
+EXPORT_SYMBOL_NS_GPL(tas2781_save_calibration, "SND_HDA_SCODEC_TAS2781");
+
void tas2781_hda_remove(struct device *dev,
const struct component_ops *ops)
{
diff --git a/sound/pci/hda/tas2781_hda.h b/sound/pci/hda/tas2781_hda.h
index 95229083ce6a..575a701c8dfb 100644
--- a/sound/pci/hda/tas2781_hda.h
+++ b/sound/pci/hda/tas2781_hda.h
@@ -9,6 +9,8 @@
#include <sound/asound.h>
+/* Flag of calibration registers address. */
+#define TASDEV_UEFI_CALI_REG_ADDR_FLG BIT(7)
#define TASDEVICE_CALIBRATION_DATA_NAME L"CALI_DATA"
#define TASDEV_CALIB_N 5
@@ -44,6 +46,13 @@
.private_value = xdata, \
}
+enum device_catlog_id {
+ DELL = 0,
+ HP,
+ LENOVO,
+ OTHERS
+};
+
struct tas2781_hda {
struct device *dev;
struct tasdevice_priv *priv;
@@ -54,6 +63,9 @@ struct tas2781_hda {
void *hda_priv;
};
+extern const efi_guid_t tasdev_fct_efi_guid[];
+
+int tas2781_save_calibration(struct tas2781_hda *p);
void tas2781_hda_remove(struct device *dev,
const struct component_ops *ops);
int tasdevice_info_profile(struct snd_kcontrol *kctl,
diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c
index 0e51b07dbd05..d91eed9f7804 100644
--- a/sound/pci/hda/tas2781_hda_i2c.c
+++ b/sound/pci/hda/tas2781_hda_i2c.c
@@ -33,26 +33,21 @@
#include "hda_generic.h"
#include "tas2781_hda.h"
-#define TASDEVICE_SPEAKER_CALIBRATION_SIZE 20
-
-#define TAS2563_MAX_CHANNELS 4
-
-#define TAS2563_CAL_POWER TASDEVICE_REG(0, 0x0d, 0x3c)
-#define TAS2563_CAL_R0 TASDEVICE_REG(0, 0x0f, 0x34)
-#define TAS2563_CAL_INVR0 TASDEVICE_REG(0, 0x0f, 0x40)
-#define TAS2563_CAL_R0_LOW TASDEVICE_REG(0, 0x0f, 0x48)
-#define TAS2563_CAL_TLIM TASDEVICE_REG(0, 0x10, 0x14)
-#define TAS2563_CAL_DATA_SIZE 4
-#define TAS2563_CAL_CH_SIZE 20
-#define TAS2563_CAL_ARRAY_SIZE 80
-
-static unsigned int cal_regs[TASDEV_CALIB_N] = {
- TAS2563_CAL_POWER, TAS2563_CAL_R0, TAS2563_CAL_INVR0,
- TAS2563_CAL_R0_LOW, TAS2563_CAL_TLIM,
-};
+#define TAS2563_CAL_VAR_NAME_MAX 16
+#define TAS2563_CAL_ARRAY_SIZE 80
+#define TAS2563_CAL_DATA_SIZE 4
+#define TAS2563_MAX_CHANNELS 4
+#define TAS2563_CAL_CH_SIZE 20
+
+#define TAS2563_CAL_R0_LOW TASDEVICE_REG(0, 0x0f, 0x48)
+#define TAS2563_CAL_POWER TASDEVICE_REG(0, 0x0d, 0x3c)
+#define TAS2563_CAL_INVR0 TASDEVICE_REG(0, 0x0f, 0x40)
+#define TAS2563_CAL_TLIM TASDEVICE_REG(0, 0x10, 0x14)
+#define TAS2563_CAL_R0 TASDEVICE_REG(0, 0x0f, 0x34)
struct tas2781_hda_i2c_priv {
struct snd_kcontrol *snd_ctls[2];
+ int (*save_calibration)(struct tas2781_hda *h);
};
static int tas2781_get_i2c_res(struct acpi_resource *ares, void *data)
@@ -283,157 +278,89 @@ static const struct snd_kcontrol_new tas2781_dsp_conf_ctrl = {
.put = tasdevice_config_put,
};
-static void tas2563_apply_calib(struct tasdevice_priv *tas_priv)
+static int tas2563_save_calibration(struct tas2781_hda *h)
{
- int offset = 0;
- __be32 data;
- int ret;
-
- for (int i = 0; i < tas_priv->ndev; i++) {
- for (int j = 0; j < TASDEV_CALIB_N; ++j) {
- data = cpu_to_be32(
- *(uint32_t *)&tas_priv->cali_data.data[offset]);
- ret = tasdevice_dev_bulk_write(tas_priv, i, cal_regs[j],
- (unsigned char *)&data, TAS2563_CAL_DATA_SIZE);
- if (ret)
- dev_err(tas_priv->dev,
- "Error writing calib regs\n");
- offset += TAS2563_CAL_DATA_SIZE;
- }
- }
-}
-
-static int tas2563_save_calibration(struct tasdevice_priv *tas_priv)
-{
- static efi_guid_t efi_guid = EFI_GUID(0x1f52d2a1, 0xbb3a, 0x457d, 0xbc,
- 0x09, 0x43, 0xa3, 0xf4, 0x31, 0x0a, 0x92);
-
- static efi_char16_t *efi_vars[TAS2563_MAX_CHANNELS][TASDEV_CALIB_N] = {
- { L"Power_1", L"R0_1", L"InvR0_1", L"R0_Low_1", L"TLim_1" },
- { L"Power_2", L"R0_2", L"InvR0_2", L"R0_Low_2", L"TLim_2" },
- { L"Power_3", L"R0_3", L"InvR0_3", L"R0_Low_3", L"TLim_3" },
- { L"Power_4", L"R0_4", L"InvR0_4", L"R0_Low_4", L"TLim_4" },
+ efi_guid_t efi_guid = tasdev_fct_efi_guid[LENOVO];
+ char *vars[TASDEV_CALIB_N] = {
+ "R0_%d", "InvR0_%d", "R0_Low_%d", "Power_%d", "TLim_%d"
};
-
+ efi_char16_t efi_name[TAS2563_CAL_VAR_NAME_MAX];
unsigned long max_size = TAS2563_CAL_DATA_SIZE;
+ unsigned char var8[TAS2563_CAL_VAR_NAME_MAX];
+ struct tasdevice_priv *p = h->hda_priv;
+ struct calidata *cd = &p->cali_data;
+ struct cali_reg *r = &cd->cali_reg_array;
unsigned int offset = 0;
+ unsigned char *data;
efi_status_t status;
unsigned int attr;
+ int ret, i, j, k;
+
+ cd->cali_dat_sz_per_dev = TAS2563_CAL_DATA_SIZE * TASDEV_CALIB_N;
- tas_priv->cali_data.data = devm_kzalloc(tas_priv->dev,
- TAS2563_CAL_ARRAY_SIZE, GFP_KERNEL);
- if (!tas_priv->cali_data.data)
+ /* extra byte for each device is the device number */
+ cd->total_sz = (cd->cali_dat_sz_per_dev + 1) * p->ndev;
+ data = cd->data = devm_kzalloc(p->dev, cd->total_sz,
+ GFP_KERNEL);
+ if (!data)
return -ENOMEM;
- for (int i = 0; i < tas_priv->ndev; ++i) {
- for (int j = 0; j < TASDEV_CALIB_N; ++j) {
- status = efi.get_variable(efi_vars[i][j],
+ for (i = 0; i < p->ndev; ++i) {
+ data[offset] = i;
+ offset++;
+ for (j = 0; j < TASDEV_CALIB_N; ++j) {
+ ret = snprintf(var8, sizeof(var8), vars[j], i);
+
+ if (ret < 0 || ret >= sizeof(var8) - 1) {
+ dev_err(p->dev, "%s: Read %s failed\n",
+ __func__, var8);
+ return -EINVAL;
+ }
+ /*
+ * Our variable names are ASCII by construction, but
+ * EFI names are wide chars. Convert and zero-pad.
+ */
+ memset(efi_name, 0, sizeof(efi_name));
+ for (k = 0; k < sizeof(var8) && var8[k]; k++)
+ efi_name[k] = var8[k];
+ status = efi.get_variable(efi_name,
&efi_guid, &attr, &max_size,
- &tas_priv->cali_data.data[offset]);
+ &data[offset]);
if (status != EFI_SUCCESS ||
max_size != TAS2563_CAL_DATA_SIZE) {
- dev_warn(tas_priv->dev,
- "Calibration data read failed %ld\n", status);
+ dev_warn(p->dev,
+ "Dev %d: Caldat[%d] read failed %ld\n",
+ i, j, status);
return -EINVAL;
}
offset += TAS2563_CAL_DATA_SIZE;
}
}
- tas_priv->cali_data.total_sz = offset;
- tasdevice_apply_calibration(tas_priv);
-
- return 0;
-}
-
-static void tas2781_apply_calib(struct tasdevice_priv *tas_priv)
-{
- struct calidata *cali_data = &tas_priv->cali_data;
- struct cali_reg *r = &cali_data->cali_reg_array;
- unsigned int cali_reg[TASDEV_CALIB_N] = {
- TASDEVICE_REG(0, 0x17, 0x74),
- TASDEVICE_REG(0, 0x18, 0x0c),
- TASDEVICE_REG(0, 0x18, 0x14),
- TASDEVICE_REG(0, 0x13, 0x70),
- TASDEVICE_REG(0, 0x18, 0x7c),
- };
- int i, j, rc;
- int oft = 0;
- __be32 data;
-
- if (tas_priv->dspbin_typ != TASDEV_BASIC) {
- cali_reg[0] = r->r0_reg;
- cali_reg[1] = r->invr0_reg;
- cali_reg[2] = r->r0_low_reg;
- cali_reg[3] = r->pow_reg;
- cali_reg[4] = r->tlimit_reg;
- }
-
- for (i = 0; i < tas_priv->ndev; i++) {
- for (j = 0; j < TASDEV_CALIB_N; j++) {
- data = cpu_to_be32(
- *(uint32_t *)&tas_priv->cali_data.data[oft]);
- rc = tasdevice_dev_bulk_write(tas_priv, i,
- cali_reg[j], (unsigned char *)&data, 4);
- if (rc < 0)
- dev_err(tas_priv->dev,
- "chn %d calib %d bulk_wr err = %d\n",
- i, j, rc);
- oft += 4;
- }
- }
-}
-
-/* Update the calibration data, including speaker impedance, f0, etc, into algo.
- * Calibrate data is done by manufacturer in the factory. These data are used
- * by Algo for calculating the speaker temperature, speaker membrane excursion
- * and f0 in real time during playback.
- */
-static int tas2781_save_calibration(struct tasdevice_priv *tas_priv)
-{
- efi_guid_t efi_guid = EFI_GUID(0x02f9af02, 0x7734, 0x4233, 0xb4, 0x3d,
- 0x93, 0xfe, 0x5a, 0xa3, 0x5d, 0xb3);
- static efi_char16_t efi_name[] = TASDEVICE_CALIBRATION_DATA_NAME;
- unsigned int attr, crc;
- unsigned int *tmp_val;
- efi_status_t status;
-
- /* Lenovo devices */
- if (tas_priv->catlog_id == LENOVO)
- efi_guid = EFI_GUID(0x1f52d2a1, 0xbb3a, 0x457d, 0xbc, 0x09,
- 0x43, 0xa3, 0xf4, 0x31, 0x0a, 0x92);
-
- tas_priv->cali_data.total_sz = 0;
- /* Get real size of UEFI variable */
- status = efi.get_variable(efi_name, &efi_guid, &attr,
- &tas_priv->cali_data.total_sz, tas_priv->cali_data.data);
- if (status == EFI_BUFFER_TOO_SMALL) {
- /* Allocate data buffer of data_size bytes */
- tas_priv->cali_data.data = devm_kzalloc(tas_priv->dev,
- tas_priv->cali_data.total_sz, GFP_KERNEL);
- if (!tas_priv->cali_data.data)
- return -ENOMEM;
- /* Get variable contents into buffer */
- status = efi.get_variable(efi_name, &efi_guid, &attr,
- &tas_priv->cali_data.total_sz,
- tas_priv->cali_data.data);
- }
- if (status != EFI_SUCCESS)
+ if (cd->total_sz != offset) {
+ dev_err(p->dev, "%s: tot_size(%lu) and offset(%u) dismatch\n",
+ __func__, cd->total_sz, offset);
return -EINVAL;
+ }
- tmp_val = (unsigned int *)tas_priv->cali_data.data;
-
- crc = crc32(~0, tas_priv->cali_data.data, 84) ^ ~0;
- dev_dbg(tas_priv->dev, "cali crc 0x%08x PK tmp_val 0x%08x\n",
- crc, tmp_val[21]);
-
- if (crc == tmp_val[21]) {
- time64_t seconds = tmp_val[20];
+ r->r0_reg = TAS2563_CAL_R0;
+ r->invr0_reg = TAS2563_CAL_INVR0;
+ r->r0_low_reg = TAS2563_CAL_R0_LOW;
+ r->pow_reg = TAS2563_CAL_POWER;
+ r->tlimit_reg = TAS2563_CAL_TLIM;
- dev_dbg(tas_priv->dev, "%ptTsr\n", &seconds);
- tasdevice_apply_calibration(tas_priv);
- } else
- tas_priv->cali_data.total_sz = 0;
+ /*
+ * TAS2781_FMWLIB supports two solutions of calibrated data. One is
+ * from the driver itself: driver reads the calibrated files directly
+ * during probe; The other from user space: during init of audio hal,
+ * the audio hal will pass the calibrated data via kcontrol interface.
+ * Driver will store this data in "struct calidata" for use. For hda
+ * device, calibrated data are usunally saved into UEFI. So Hda side
+ * codec driver use the mixture of these two solutions, driver reads
+ * the data from UEFI, then store this data in "struct calidata" for
+ * use.
+ */
+ p->is_user_space_calidata = true;
return 0;
}
@@ -548,7 +475,7 @@ static void tasdev_fw_ready(const struct firmware *fmw, void *context)
/* If calibrated data occurs error, dsp will still works with default
* calibrated data inside algo.
*/
- tasdevice_save_calibration(tas_priv);
+ hda_priv->save_calibration(tas_hda);
tasdevice_tuning_switch(tas_hda->priv, 0);
tas_hda->priv->playback_started = true;
@@ -581,11 +508,11 @@ static int tas2781_hda_bind(struct device *dev, struct device *master,
subid = codec->core.subsystem_id >> 16;
switch (subid) {
- case 0x17aa:
- tas_hda->priv->catlog_id = LENOVO;
+ case 0x1028:
+ tas_hda->catlog_id = DELL;
break;
default:
- tas_hda->priv->catlog_id = OTHERS;
+ tas_hda->catlog_id = LENOVO;
break;
}
@@ -658,13 +585,11 @@ static int tas2781_hda_i2c_probe(struct i2c_client *clt)
if (strstr(dev_name(&clt->dev), "TIAS2781")) {
device_name = "TIAS2781";
- tas_hda->priv->save_calibration = tas2781_save_calibration;
- tas_hda->priv->apply_calibration = tas2781_apply_calib;
+ hda_priv->save_calibration = tas2781_save_calibration;
tas_hda->priv->global_addr = TAS2781_GLOBAL_ADDR;
} else if (strstr(dev_name(&clt->dev), "INT8866")) {
device_name = "INT8866";
- tas_hda->priv->save_calibration = tas2563_save_calibration;
- tas_hda->priv->apply_calibration = tas2563_apply_calib;
+ hda_priv->save_calibration = tas2563_save_calibration;
tas_hda->priv->global_addr = TAS2563_GLOBAL_ADDR;
} else
return -ENODEV;
@@ -735,11 +660,6 @@ static int tas2781_runtime_resume(struct device *dev)
tasdevice_prmg_load(tas_hda->priv, tas_hda->priv->cur_prog);
- /* If calibrated data occurs error, dsp will still works with default
- * calibrated data inside algo.
- */
- tasdevice_apply_calibration(tas_hda->priv);
-
mutex_unlock(&tas_hda->priv->codec_lock);
return 0;
@@ -783,11 +703,6 @@ static int tas2781_system_resume(struct device *dev)
tasdevice_reset(tas_hda->priv);
tasdevice_prmg_load(tas_hda->priv, tas_hda->priv->cur_prog);
- /* If calibrated data occurs error, dsp will still work with default
- * calibrated data inside algo.
- */
- tasdevice_apply_calibration(tas_hda->priv);
-
if (tas_hda->priv->playback_started)
tasdevice_tuning_switch(tas_hda->priv, 0);
diff --git a/sound/pci/hda/tas2781_hda_spi.c b/sound/pci/hda/tas2781_hda_spi.c
index e0f8603c4854..5c03e9d2283a 100644
--- a/sound/pci/hda/tas2781_hda_spi.c
+++ b/sound/pci/hda/tas2781_hda_spi.c
@@ -526,169 +526,6 @@ static struct snd_kcontrol_new tas2781_dsp_ctls[] = {
},
};
-static void tas2781_apply_calib(struct tasdevice_priv *tas_priv)
-{
- struct calidata *cali_data = &tas_priv->cali_data;
- struct cali_reg *r = &cali_data->cali_reg_array;
- unsigned char *data = cali_data->data;
- unsigned int *tmp_val = (unsigned int *)data;
- unsigned int cali_reg[TASDEV_CALIB_N] = {
- TASDEVICE_REG(0, 0x17, 0x74),
- TASDEVICE_REG(0, 0x18, 0x0c),
- TASDEVICE_REG(0, 0x18, 0x14),
- TASDEVICE_REG(0, 0x13, 0x70),
- TASDEVICE_REG(0, 0x18, 0x7c),
- };
- unsigned int crc, oft;
- unsigned char *buf;
- int i, j, k, l;
-
- if (tmp_val[0] == 2781) {
- /*
- * New features were added in calibrated Data V3:
- * 1. Added calibration registers address define in
- * a node, marked as Device id == 0x80.
- * New features were added in calibrated Data V2:
- * 1. Added some the fields to store the link_id and
- * uniqie_id for multi-link solutions
- * 2. Support flexible number of devices instead of
- * fixed one in V1.
- * Layout of calibrated data V2 in UEFI(total 256 bytes):
- * ChipID (2781, 4 bytes)
- * Data-Group-Sum (4 bytes)
- * TimeStamp of Calibration (4 bytes)
- * for (i = 0; i < Data-Group-Sum; i++) {
- * if (Data type != 0x80) (4 bytes)
- * Calibrated Data of Device #i (20 bytes)
- * else
- * Calibration registers address (5*4 = 20 bytes)
- * # V2: No reg addr in data grp section.
- * # V3: Normally the last grp is the reg addr.
- * }
- * CRC (4 bytes)
- * Reserved (the rest)
- */
- crc = crc32(~0, data, (3 + tmp_val[1] * 6) * 4) ^ ~0;
-
- if (crc != tmp_val[3 + tmp_val[1] * 6]) {
- cali_data->total_sz = 0;
- dev_err(tas_priv->dev, "%s: CRC error\n", __func__);
- return;
- }
-
- for (j = 0, k = 0; j < tmp_val[1]; j++) {
- oft = j * 6 + 3;
- if (tmp_val[oft] == TASDEV_UEFI_CALI_REG_ADDR_FLG) {
- for (i = 0; i < TASDEV_CALIB_N; i++) {
- buf = &data[(oft + i + 1) * 4];
- cali_reg[i] = TASDEVICE_REG(buf[1],
- buf[2], buf[3]);
- }
- } else {
- l = j * (cali_data->cali_dat_sz_per_dev + 1);
- if (k >= tas_priv->ndev || l > oft * 4) {
- dev_err(tas_priv->dev,
- "%s: dev sum error\n",
- __func__);
- cali_data->total_sz = 0;
- return;
- }
-
- data[l] = k;
- for (i = 0; i < TASDEV_CALIB_N * 4; i++)
- data[l + i] = data[4 * oft + i];
- k++;
- }
- }
- } else {
- /*
- * Calibration data is in V1 format.
- * struct cali_data {
- * char cali_data[20];
- * }
- *
- * struct {
- * struct cali_data cali_data[4];
- * int TimeStamp of Calibration (4 bytes)
- * int CRC (4 bytes)
- * } ueft;
- */
- crc = crc32(~0, data, 84) ^ ~0;
- if (crc != tmp_val[21]) {
- cali_data->total_sz = 0;
- dev_err(tas_priv->dev, "%s: V1 CRC error\n", __func__);
- return;
- }
-
- for (j = tas_priv->ndev - 1; j >= 0; j--) {
- l = j * (cali_data->cali_dat_sz_per_dev + 1);
- for (i = TASDEV_CALIB_N * 4; i > 0 ; i--)
- data[l + i] = data[tas_priv->index * 5 + i];
- data[l+i] = j;
- }
- }
-
- if (tas_priv->dspbin_typ == TASDEV_BASIC) {
- r->r0_reg = cali_reg[0];
- r->invr0_reg = cali_reg[1];
- r->r0_low_reg = cali_reg[2];
- r->pow_reg = cali_reg[3];
- r->tlimit_reg = cali_reg[4];
- }
-
- tas_priv->is_user_space_calidata = true;
- cali_data->total_sz =
- tas_priv->ndev * (cali_data->cali_dat_sz_per_dev + 1);
-}
-
-/*
- * Update the calibration data, including speaker impedance, f0, etc,
- * into algo. Calibrate data is done by manufacturer in the factory.
- * These data are used by Algo for calculating the speaker temperature,
- * speaker membrane excursion and f0 in real time during playback.
- * Calibration data format in EFI is V2, since 2024.
- */
-static int tas2781_save_calibration(struct tasdevice_priv *tas_priv)
-{
- /*
- * GUID was used for data access in BIOS, it was provided by board
- * manufactory, like HP: "{02f9af02-7734-4233-b43d-93fe5aa35db3}"
- */
- efi_guid_t efi_guid =
- EFI_GUID(0x02f9af02, 0x7734, 0x4233,
- 0xb4, 0x3d, 0x93, 0xfe, 0x5a, 0xa3, 0x5d, 0xb3);
- static efi_char16_t efi_name[] = TASDEVICE_CALIBRATION_DATA_NAME;
- struct calidata *cali_data = &tas_priv->cali_data;
- unsigned long total_sz = 0;
- unsigned int attr, size;
- efi_status_t status;
- unsigned char *data;
-
- cali_data->cali_dat_sz_per_dev = 20;
- size = tas_priv->ndev * (cali_data->cali_dat_sz_per_dev + 1);
- status = efi.get_variable(efi_name, &efi_guid, &attr, &total_sz, NULL);
- cali_data->total_sz = total_sz > size ? total_sz : size;
- if (status == EFI_BUFFER_TOO_SMALL) {
- /* Allocate data buffer of data_size bytes */
- data = tas_priv->cali_data.data = devm_kzalloc(tas_priv->dev,
- tas_priv->cali_data.total_sz, GFP_KERNEL);
- if (!data) {
- tas_priv->cali_data.total_sz = 0;
- return -ENOMEM;
- }
- /* Get variable contents into buffer */
- status = efi.get_variable(efi_name, &efi_guid, &attr,
- &tas_priv->cali_data.total_sz, data);
- }
- if (status != EFI_SUCCESS) {
- tas_priv->cali_data.total_sz = 0;
- return status;
- }
-
- tas_priv->apply_calibration(tas_priv);
- return 0;
-}
-
static void tas2781_hda_remove_controls(struct tas2781_hda *tas_hda)
{
struct hda_codec *codec = tas_hda->priv->codec;
@@ -858,7 +695,7 @@ static void tasdev_fw_ready(const struct firmware *fmw, void *context)
* If calibrated data occurs error, dsp will still works with default
* calibrated data inside algo.
*/
- tas2781_save_calibration(tas_priv);
+ tas2781_save_calibration(tas_hda);
out:
release_firmware(fmw);
pm_runtime_mark_last_busy(tas_hda->priv->dev);
@@ -961,8 +798,6 @@ static int tas2781_hda_spi_probe(struct spi_device *spi)
}
if (strstr(dev_name(&spi->dev), "TXNW2781")) {
device_name = "TXNW2781";
- tas_priv->save_calibration = tas2781_save_calibration;
- tas_priv->apply_calibration = tas2781_apply_calib;
} else {
dev_err(tas_priv->dev, "Unmatched spi dev %s\n",
dev_name(&spi->dev));
diff --git a/sound/soc/codecs/tas2781-comlib.c b/sound/soc/codecs/tas2781-comlib.c
index 076c1d955972..4cec9f8a00af 100644
--- a/sound/soc/codecs/tas2781-comlib.c
+++ b/sound/soc/codecs/tas2781-comlib.c
@@ -130,21 +130,6 @@ int tasdevice_dev_bulk_write(
}
EXPORT_SYMBOL_GPL(tasdevice_dev_bulk_write);
-int tasdevice_save_calibration(struct tasdevice_priv *tas_priv)
-{
- if (tas_priv->save_calibration)
- return tas_priv->save_calibration(tas_priv);
- return -EINVAL;
-}
-EXPORT_SYMBOL_GPL(tasdevice_save_calibration);
-
-void tasdevice_apply_calibration(struct tasdevice_priv *tas_priv)
-{
- if (tas_priv->apply_calibration && tas_priv->cali_data.total_sz)
- tas_priv->apply_calibration(tas_priv);
-}
-EXPORT_SYMBOL_GPL(tasdevice_apply_calibration);
-
static void tasdev_dsp_prog_blk_remove(struct tasdevice_prog *prog)
{
struct tasdevice_data *tas_dt;
--
2.43.0
2
1
The new snd_hda_acpi driver in Linux exposes the existing Azalia
interface to non-PCI devices advertised over ACPI. Add an alias
to the existing HDA-Intel configuration file so that devices using
this driver can be discovered properly.
Signed-off-by: Daniel Dadap <ddadap(a)nvidia.com>
---
src/conf/cards/aliases.conf | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
index a54824ae..e2d59aa7 100644
--- a/src/conf/cards/aliases.conf
+++ b/src/conf/cards/aliases.conf
@@ -57,6 +57,7 @@ CMI8786 cards.CMI8788
CMI8787 cards.CMI8788
pistachio cards.pistachio-card
VC4-HDMI cards.vc4-hdmi
+hda-acpi cards.HDA-Intel
<confdir:ctl/default.conf>
<confdir:pcm/default.conf>
--
2.39.5
2
2

21 May '25
Some systems expose HD-Audio controllers via objects in the ACPI tables
which encapsulate the controller's interrupt and the base address for the
HDA registers in an ACPI _CRS object, for example, as listed in this ACPI
table dump excerpt:
Device (HDA0)
{
Name (_HID, "NVDA2014") // _HID: Hardware ID
...
Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
{
Memory32Fixed (ReadWrite,
0x36078000, // Address Base
0x00008000, // Address Length
)
Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, )
{
0x0000021E,
}
})
}
Add support for HDA controllers discovered through ACPI, including support
for some platforms which expose such HDA controllers on NVIDIA SoCs. This
is done with a new driver which uses existing infrastructure for extracting
resource information from _CRS objects and plumbs the parsed resource
information through to the existing HDA infrastructure to enable HD-Audio
functionality on such devices.
Although this driver is in the sound/pci/hda/ directory, it targets devices
which are not actually enumerated on the PCI bus. This is because it depends
upon the Intel "Azalia" infrastructure which has traditionally been used for
PCI-based devices.
Signed-off-by: Daniel Dadap <ddadap(a)nvidia.com>
---
sound/pci/hda/Kconfig | 11 ++
sound/pci/hda/Makefile | 2 +
sound/pci/hda/hda_acpi.c | 316 +++++++++++++++++++++++++++++++++++++++
3 files changed, 329 insertions(+)
create mode 100644 sound/pci/hda/hda_acpi.c
diff --git a/sound/pci/hda/Kconfig b/sound/pci/hda/Kconfig
index 9c427270ff4f..436dfd182a09 100644
--- a/sound/pci/hda/Kconfig
+++ b/sound/pci/hda/Kconfig
@@ -42,6 +42,17 @@ config SND_HDA_TEGRA
To compile this driver as a module, choose M here: the module
will be called snd-hda-tegra.
+config SND_HDA_ACPI
+ tristate "HD Audio ACPI"
+ depends on ACPI
+ select SND_HDA
+ help
+ Say Y here to include support for Azalia-compatible HDA controllers
+ which are advertised via ACPI objects.
+
+ To compile this driver as a module, choose M here: the module
+ will be called snd-hda-acpi.
+
if SND_HDA
config SND_HDA_HWDEP
diff --git a/sound/pci/hda/Makefile b/sound/pci/hda/Makefile
index 210c406dfbc5..7a7c16d705dd 100644
--- a/sound/pci/hda/Makefile
+++ b/sound/pci/hda/Makefile
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
snd-hda-intel-y := hda_intel.o
snd-hda-tegra-y := hda_tegra.o
+snd-hda-acpi-y := hda_acpi.o
snd-hda-codec-y := hda_bind.o hda_codec.o hda_jack.o hda_auto_parser.o hda_sysfs.o
snd-hda-codec-y += hda_controller.o
@@ -80,3 +81,4 @@ obj-$(CONFIG_SND_HDA_SCODEC_TAS2781_SPI) += snd-hda-scodec-tas2781-spi.o
# when built in kernel
obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-intel.o
obj-$(CONFIG_SND_HDA_TEGRA) += snd-hda-tegra.o
+obj-$(CONFIG_SND_HDA_ACPI) += snd-hda-acpi.o
diff --git a/sound/pci/hda/hda_acpi.c b/sound/pci/hda/hda_acpi.c
new file mode 100644
index 000000000000..736eac59eaa0
--- /dev/null
+++ b/sound/pci/hda/hda_acpi.c
@@ -0,0 +1,316 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * ALSA driver for ACPI-based HDA Controllers.
+ */
+
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/acpi.h>
+
+#include <sound/hda_codec.h>
+
+#include "hda_controller.h"
+
+struct hda_acpi {
+ struct azx azx;
+ struct snd_card *card;
+ struct platform_device *pdev;
+ void __iomem *regs;
+ struct work_struct probe_work;
+ const struct hda_data *data;
+};
+
+/**
+ * struct hda_data - Optional device-specific data
+ * @short_name: Used for the ALSA card name; defaults to KBUILD_MODNAME
+ * @long_name: Used for longer description; defaults to short_name
+ * @flags: Passed to &azx->driver_caps
+ *
+ * A pointer to a record of this type may be stored in the
+ * &acpi_device_id->driver_data field of an ACPI match table entry in order to
+ * customize the naming and behavior of a particular device. All fields are
+ * optional and sensible defaults will be selected in their absence.
+ */
+struct hda_data {
+ const char *short_name;
+ const char *long_name;
+ unsigned long flags;
+};
+
+static int hda_acpi_dev_disconnect(struct snd_device *device)
+{
+ struct azx *chip = device->device_data;
+
+ chip->bus.shutdown = 1;
+ return 0;
+}
+
+static int hda_acpi_dev_free(struct snd_device *device)
+{
+ struct azx *azx = device->device_data;
+ struct hda_acpi *hda = container_of(azx, struct hda_acpi, azx);
+
+ cancel_work_sync(&hda->probe_work);
+ if (azx_bus(azx)->chip_init) {
+ azx_stop_all_streams(azx);
+ azx_stop_chip(azx);
+ }
+
+ azx_free_stream_pages(azx);
+ azx_free_streams(azx);
+ snd_hdac_bus_exit(azx_bus(azx));
+
+ return 0;
+}
+
+static int hda_acpi_init(struct hda_acpi *hda)
+{
+ struct hdac_bus *bus = azx_bus(&hda->azx);
+ struct snd_card *card = hda->azx.card;
+ struct device *dev = &hda->pdev->dev;
+ struct azx *azx = &hda->azx;
+ struct resource *res;
+ unsigned short gcap;
+ const char *sname, *lname;
+ int err, irq;
+
+ /* The base address for the HDA registers and the interrupt are wrapped
+ * in an ACPI _CRS object which can be parsed by platform_get_irq() and
+ * devm_platform_get_and_ioremap_resource() */
+
+ irq = platform_get_irq(hda->pdev, 0);
+ if (irq < 0)
+ return irq;
+
+ hda->regs = devm_platform_get_and_ioremap_resource(hda->pdev, 0, &res);
+ if (IS_ERR(hda->regs))
+ return PTR_ERR(hda->regs);
+
+ bus->remap_addr = hda->regs;
+ bus->addr = res->start;
+
+ err = devm_request_irq(dev, irq, azx_interrupt,
+ IRQF_SHARED, KBUILD_MODNAME, azx);
+ if (err) {
+ dev_err(dev, "unable to request IRQ %d, disabling device\n", irq);
+ return err;
+ }
+ bus->irq = irq;
+ bus->dma_stop_delay = 100;
+ card->sync_irq = bus->irq;
+
+ gcap = azx_readw(azx, GCAP);
+ dev_dbg(dev, "chipset global capabilities = 0x%x\n", gcap);
+
+ azx->align_buffer_size = 1;
+
+ azx->capture_streams = (gcap >> 8) & 0x0f;
+ azx->playback_streams = (gcap >> 12) & 0x0f;
+
+ azx->capture_index_offset = 0;
+ azx->playback_index_offset = azx->capture_streams;
+ azx->num_streams = azx->playback_streams + azx->capture_streams;
+
+ err = azx_init_streams(azx);
+ if (err < 0) {
+ dev_err(dev, "failed to initialize streams: %d\n", err);
+ return err;
+ }
+
+ err = azx_alloc_stream_pages(azx);
+ if (err < 0) {
+ dev_err(dev, "failed to allocate stream pages: %d\n", err);
+ return err;
+ }
+
+ azx_init_chip(azx, 1);
+
+ if (!bus->codec_mask) {
+ dev_err(dev, "no codecs found!\n");
+ return -ENODEV;
+ }
+
+ strscpy(card->driver, "hda-acpi", sizeof(card->driver));
+
+ sname = hda->data->short_name ? hda->data->short_name : KBUILD_MODNAME;
+
+ if (strlen(sname) > sizeof(card->shortname))
+ dev_info(dev, "truncating shortname for card %s\n", sname);
+ strscpy(card->shortname, sname, sizeof(card->shortname));
+
+ lname = hda->data->long_name ? hda->data->long_name : sname;
+
+ snprintf(card->longname, sizeof(card->longname),
+ "%s at 0x%lx irq %i", lname, bus->addr, bus->irq);
+
+ return 0;
+}
+
+static void hda_acpi_probe_work(struct work_struct *work)
+{
+ struct hda_acpi *hda = container_of(work, struct hda_acpi, probe_work);
+ struct azx *chip = &hda->azx;
+ int err;
+
+ err = hda_acpi_init(hda);
+ if (err < 0)
+ return;
+
+ err = azx_probe_codecs(chip, 8);
+ if (err < 0)
+ return;
+
+ err = azx_codec_configure(chip);
+ if (err < 0)
+ return;
+
+ err = snd_card_register(chip->card);
+ if (err < 0)
+ return;
+
+ chip->running = 1;
+}
+
+static int hda_acpi_create(struct hda_acpi *hda)
+{
+ static const struct snd_device_ops ops = {
+ .dev_disconnect = hda_acpi_dev_disconnect,
+ .dev_free = hda_acpi_dev_free,
+ };
+ static const struct hda_controller_ops null_ops;
+ struct azx *azx = &hda->azx;
+ int err;
+
+ mutex_init(&azx->open_mutex);
+ azx->card = hda->card;
+ INIT_LIST_HEAD(&azx->pcm_list);
+
+ azx->ops = &null_ops;
+ azx->driver_caps = hda->data->flags;
+ azx->driver_type = hda->data->flags & 0xff;
+ azx->codec_probe_mask = -1;
+
+ err = azx_bus_init(azx, NULL);
+ if (err < 0)
+ return err;
+
+ err = snd_device_new(hda->card, SNDRV_DEV_LOWLEVEL, &hda->azx, &ops);
+ if (err < 0) {
+ dev_err(&hda->pdev->dev, "Error creating device\n");
+ return err;
+ }
+
+ return 0;
+}
+
+static int hda_acpi_probe(struct platform_device *pdev)
+{
+ struct hda_acpi *hda;
+ int err;
+
+ hda = devm_kzalloc(&pdev->dev, sizeof(*hda), GFP_KERNEL);
+ if (!hda)
+ return -ENOMEM;
+
+ hda->pdev = pdev;
+ hda->data = acpi_device_get_match_data(&pdev->dev);
+
+ err = snd_card_new(&pdev->dev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
+ THIS_MODULE, 0, &hda->card);
+ if (err < 0) {
+ dev_err(&pdev->dev, "Error creating card!\n");
+ return err;
+ }
+
+ INIT_WORK(&hda->probe_work, hda_acpi_probe_work);
+
+ err = hda_acpi_create(hda);
+ if (err < 0)
+ goto out_free;
+ hda->card->private_data = &hda->azx;
+
+ dev_set_drvdata(&pdev->dev, hda->card);
+
+ schedule_work(&hda->probe_work);
+
+ return 0;
+
+out_free:
+ snd_card_free(hda->card);
+ return err;
+}
+
+static void hda_acpi_remove(struct platform_device *pdev)
+{
+ snd_card_free(dev_get_drvdata(&pdev->dev));
+}
+
+static void hda_acpi_shutdown(struct platform_device *pdev)
+{
+ struct snd_card *card = dev_get_drvdata(&pdev->dev);
+ struct azx *chip;
+
+ if (!card)
+ return;
+ chip = card->private_data;
+ if (chip && chip->running)
+ azx_stop_chip(chip);
+}
+
+static int __maybe_unused hda_acpi_suspend(struct device *dev)
+{
+ struct snd_card *card = dev_get_drvdata(dev);
+ int rc;
+
+ rc = pm_runtime_force_suspend(dev);
+ if (rc < 0)
+ return rc;
+ snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
+
+ return 0;
+}
+
+static int __maybe_unused hda_acpi_resume(struct device *dev)
+{
+ struct snd_card *card = dev_get_drvdata(dev);
+ int rc;
+
+ rc = pm_runtime_force_resume(dev);
+ if (rc < 0)
+ return rc;
+ snd_power_change_state(card, SNDRV_CTL_POWER_D0);
+
+ return 0;
+}
+
+static const struct dev_pm_ops hda_acpi_pm = {
+ SET_SYSTEM_SLEEP_PM_OPS(hda_acpi_suspend, hda_acpi_resume)
+};
+
+struct hda_data nvidia_hda_data = {
+ .short_name = "NVIDIA",
+ .long_name = "NVIDIA HDA Controller",
+ .flags = AZX_DCAPS_CORBRP_SELF_CLEAR,
+};
+
+static const struct acpi_device_id hda_acpi_match[] = {
+ { .id = "NVDA2014", .driver_data = (uintptr_t) &nvidia_hda_data },
+ { .id = "NVDA2015", .driver_data = (uintptr_t) &nvidia_hda_data },
+ {},
+};
+MODULE_DEVICE_TABLE(acpi, hda_acpi_match);
+
+static struct platform_driver hda_acpi_platform_driver = {
+ .driver = {
+ .name = KBUILD_MODNAME,
+ .pm = &hda_acpi_pm,
+ .acpi_match_table = hda_acpi_match,
+ },
+ .probe = hda_acpi_probe,
+ .remove = hda_acpi_remove,
+ .shutdown = hda_acpi_shutdown,
+};
+module_platform_driver(hda_acpi_platform_driver);
+
+MODULE_DESCRIPTION("Driver for ACPI-based HDA Controllers");
+MODULE_LICENSE("GPL v2");
--
2.39.5
2
14

Behringer UMC404HD volume low, "cannot load mixer controls: No such file or directory", and erroneously remapped channels
by GitHub issues - opened 21 May '25
by GitHub issues - opened 21 May '25
21 May '25
alsa-project/alsa-ucm-conf issue #564 was opened from mikelpr:
alright so this is a weird one: I've got a fedora install and two openSUSE installs, one older but dist upgraded to today and a newer one, also dist upgraded to today, and the fedora is updated too.
now, on the fedora install and the newer openSUSE install the volume on my UMC404HD does not reach what is 100% on the older suse install and on Windows. it's more like 50%. I've tried using alsamixer but it fails when selecting the soundcard with `cannot load mixer controls: No such file or directory`. possibly noteworthy is that I share home dir on the suse installs so it's not user config. I also did a diff on /etc between both installs and could find nothing that seemed out of the ordinary.
also, at some point an update was pushed that remapped channels from FL FR RL RR to Line A and Line B, two channels each, and on the Direct profile to FL FC FR LFE. I've got no strong opinions on the Line A/B split on the default profile but definitely FL FC FR LFE is wrong for this card.
please lmk what data to gather
Issue URL : https://github.com/alsa-project/alsa-ucm-conf/issues/564
Repository URL: https://github.com/alsa-project/alsa-ucm-conf
1
0

Re: [Bug 220109] Audio disappears on HP 15-fc000 after warm boot again (ALC256 code path)
by Ruslan Nikolaev 20 May '25
by Ruslan Nikolaev 20 May '25
20 May '25
Kailiang,
I added alsa-info outputs to https://bugzilla.kernel.org/show_bug.cgi?id=220109 (see attachments for both the regression and reverted changes) by following your instructions.
Please let me know if there is any other information you need.
Thanks,
Ruslan
On Tuesday, May 13, 2025 at 02:30:17 AM EDT, <bugzilla-daemon(a)kernel.org> wrote:
https://bugzilla.kernel.org/show_bug.cgi?id=220109
Kailiang Yang (kailang(a)realtek.com) changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kailang(a)realtek.com
--- Comment #3 from Kailiang Yang (kailang(a)realtek.com) ---
Could you run alsa-info.sh to dump codec info?
Please do ==> echo 1 > /sys/module/snd_hda_codec/parameters/dump_coef
before do alsa-info.sh.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are on the CC list for the bug.
You reported the bug.
1
1