From: Mark Brown Date: Mon, 22 Apr 2024 00:55:47 +0000 (+0900) Subject: ASoC: Intel: avs: Switch to acpi-nhlt X-Git-Tag: v6.10-rc1~146^2~3^2~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3f36e78d7ba0ed3e8f518c62c4663650bf6cd6a;p=thirdparty%2Flinux.git ASoC: Intel: avs: Switch to acpi-nhlt Merge series from Cezary Rojewski : The change is based on rafael/acpi-nhlt [1] immutable branch which Rafael kindly prepared for me. Without the topmost changes to ACPI/NHLT, the patches present will fail to compile. Recent changes for the ACPI tree [2] refactored interfaces of the NHLT table. Currently we have two implementations - one found in acpi subsystem (unused) and one in sound/hda/. As NHLT is part of ACPI, idea is to make the former useful and then switch all users of existing sound/hda/intel-nhlt.c to this new interface over time and remove the duplicate afterward. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/?h=acpi-nhlt [2]: https://lore.kernel.org/linux-acpi/20240319083018.3159716-1-cezary.rojewski@intel.com/ --- d3f36e78d7ba0ed3e8f518c62c4663650bf6cd6a diff --cc sound/soc/intel/avs/core.c index a059bb6888d80,a61ce42b426cb..f56f9e19276ae --- a/sound/soc/intel/avs/core.c +++ b/sound/soc/intel/avs/core.c @@@ -215,9 -215,8 +216,7 @@@ static void avs_hda_probe_work(struct w if (ret < 0) return; - adev->nhlt = intel_nhlt_init(adev->dev); - if (!adev->nhlt) - dev_info(bus->dev, "platform has no NHLT\n"); + acpi_nhlt_get_gbl_table(); - avs_debugfs_init(adev); avs_register_all_boards(adev); @@@ -543,9 -547,8 +542,8 @@@ static void avs_pci_remove(struct pci_d avs_unregister_all_boards(adev); - if (adev->nhlt) - intel_nhlt_free(adev->nhlt); - avs_debugfs_exit(adev); + acpi_nhlt_put_gbl_table(); + avs_debugfs_exit(adev); if (avs_platattr_test(adev, CLDMA)) hda_cldma_free(&code_loader); diff --cc sound/soc/intel/avs/path.c index fa3fec339548c,531a086642be1..0a34d63e262eb --- a/sound/soc/intel/avs/path.c +++ b/sound/soc/intel/avs/path.c @@@ -143,12 -144,12 +144,12 @@@ static bool avs_dma_type_is_input(u32 d static int avs_copier_create(struct avs_dev *adev, struct avs_path_module *mod) { - struct nhlt_acpi_table *nhlt = adev->nhlt; struct avs_tplg_module *t = mod->template; struct avs_copier_cfg *cfg; - struct nhlt_specific_cfg *ep_blob; + struct acpi_nhlt_format_config *ep_blob; + struct acpi_nhlt_endpoint *ep; union avs_connector_node_id node_id = {0}; - size_t cfg_size, data_size = 0; + size_t cfg_size, data_size; void *data = NULL; u32 dma_type; int ret;