Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: Intel: machine driver updates

Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

Several updates for RPL/MTL/LNL, and one fix for SoundWire TGL device.

+197 -6
+2
include/sound/soc-acpi-intel-match.h
··· 31 31 extern struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[]; 32 32 extern struct snd_soc_acpi_mach snd_soc_acpi_intel_rpl_machines[]; 33 33 extern struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[]; 34 + extern struct snd_soc_acpi_mach snd_soc_acpi_intel_lnl_machines[]; 34 35 35 36 extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_sdw_machines[]; 36 37 extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cfl_sdw_machines[]; ··· 41 40 extern struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[]; 42 41 extern struct snd_soc_acpi_mach snd_soc_acpi_intel_rpl_sdw_machines[]; 43 42 extern struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[]; 43 + extern struct snd_soc_acpi_mach snd_soc_acpi_intel_lnl_sdw_machines[]; 44 44 45 45 /* 46 46 * generic table used for HDA codec-based platforms, possibly with
+10
sound/soc/intel/boards/sof_nau8825.c
··· 674 674 SOF_BT_OFFLOAD_SSP(2) | 675 675 SOF_SSP_BT_OFFLOAD_PRESENT), 676 676 }, 677 + { 678 + .name = "rpl_max98373_8825", 679 + .driver_data = (kernel_ulong_t)(SOF_NAU8825_SSP_CODEC(0) | 680 + SOF_SPEAKER_AMP_PRESENT | 681 + SOF_MAX98373_SPEAKER_AMP_PRESENT | 682 + SOF_NAU8825_SSP_AMP(1) | 683 + SOF_NAU8825_NUM_HDMIDEV(4) | 684 + SOF_BT_OFFLOAD_SSP(2) | 685 + SOF_SSP_BT_OFFLOAD_PRESENT), 686 + }, 677 687 { } 678 688 }; 679 689 MODULE_DEVICE_TABLE(platform, board_ids);
+43 -6
sound/soc/intel/boards/sof_sdw.c
··· 192 192 RT711_JD1), 193 193 }, 194 194 { 195 + /* 196 + * this entry covers HP Spectre x360 where the DMI information 197 + * changed somehow 198 + */ 199 + .callback = sof_sdw_quirk_cb, 200 + .matches = { 201 + DMI_MATCH(DMI_SYS_VENDOR, "HP"), 202 + DMI_MATCH(DMI_BOARD_NAME, "8709"), 203 + }, 204 + .driver_data = (void *)(SOF_SDW_TGL_HDMI | 205 + SOF_SDW_PCH_DMIC | 206 + RT711_JD1), 207 + }, 208 + { 195 209 /* NUC15 'Bishop County' LAPBC510 and LAPBC710 skews */ 196 210 .callback = sof_sdw_quirk_cb, 197 211 .matches = { ··· 427 413 .matches = { 428 414 DMI_MATCH(DMI_PRODUCT_FAMILY, "Intel_mtlrvp"), 429 415 }, 430 - .driver_data = (void *)(RT711_JD1 | SOF_SDW_TGL_HDMI), 416 + .driver_data = (void *)(RT711_JD1), 417 + }, 418 + { 419 + .callback = sof_sdw_quirk_cb, 420 + .matches = { 421 + DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"), 422 + DMI_MATCH(DMI_PRODUCT_NAME, "Meteor Lake Client Platform"), 423 + }, 424 + .driver_data = (void *)(RT711_JD2_100K), 425 + }, 426 + /* LunarLake devices */ 427 + { 428 + .callback = sof_sdw_quirk_cb, 429 + .matches = { 430 + DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"), 431 + DMI_MATCH(DMI_PRODUCT_NAME, "Lunar Lake Client Platform"), 432 + }, 433 + .driver_data = (void *)(RT711_JD2_100K), 431 434 }, 432 435 {} 433 436 }; ··· 933 902 static int set_codec_init_func(struct snd_soc_card *card, 934 903 const struct snd_soc_acpi_link_adr *link, 935 904 struct snd_soc_dai_link *dai_links, 936 - bool playback, int group_id) 905 + bool playback, int group_id, int adr_index) 937 906 { 938 - int i; 907 + int i = adr_index; 939 908 940 909 do { 941 910 /* 942 911 * Initialize the codec. If codec is part of an aggregated 943 912 * group (group_id>0), initialize all codecs belonging to 944 913 * same group. 914 + * The first link should start with link->adr_d[adr_index] 915 + * because that is the device that we want to initialize and 916 + * we should end immediately if it is not aggregated (group_id=0) 945 917 */ 946 - for (i = 0; i < link->num_adr; i++) { 918 + for ( ; i < link->num_adr; i++) { 947 919 int codec_index; 948 920 949 921 codec_index = find_codec_info_part(link->adr_d[i].adr); ··· 962 928 dai_links, 963 929 &codec_info_list[codec_index], 964 930 playback); 931 + if (!group_id) 932 + return 0; 965 933 } 934 + i = 0; 966 935 link++; 967 - } while (link->mask && group_id); 936 + } while (link->mask); 968 937 969 938 return 0; 970 939 } ··· 1217 1180 dai_links[*link_index].nonatomic = true; 1218 1181 1219 1182 ret = set_codec_init_func(card, link, dai_links + (*link_index)++, 1220 - playback, group_id); 1183 + playback, group_id, adr_index); 1221 1184 if (ret < 0) { 1222 1185 dev_err(dev, "failed to init codec %d", codec_index); 1223 1186 return ret;
+1
sound/soc/intel/common/Makefile
··· 10 10 soc-acpi-intel-tgl-match.o soc-acpi-intel-ehl-match.o \ 11 11 soc-acpi-intel-jsl-match.o soc-acpi-intel-adl-match.o \ 12 12 soc-acpi-intel-rpl-match.o soc-acpi-intel-mtl-match.o \ 13 + soc-acpi-intel-lnl-match.o \ 13 14 soc-acpi-intel-hda-match.o \ 14 15 soc-acpi-intel-sdw-mockup-match.o 15 16
+72
sound/soc/intel/common/soc-acpi-intel-lnl-match.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + /* 3 + * soc-acpi-intel-lnl-match.c - tables and support for LNL ACPI enumeration. 4 + * 5 + * Copyright (c) 2023, Intel Corporation. All rights reserved. 6 + * 7 + */ 8 + 9 + #include <sound/soc-acpi.h> 10 + #include <sound/soc-acpi-intel-match.h> 11 + #include "soc-acpi-intel-sdw-mockup-match.h" 12 + 13 + struct snd_soc_acpi_mach snd_soc_acpi_intel_lnl_machines[] = { 14 + {}, 15 + }; 16 + EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_lnl_machines); 17 + 18 + static const struct snd_soc_acpi_endpoint single_endpoint = { 19 + .num = 0, 20 + .aggregated = 0, 21 + .group_position = 0, 22 + .group_id = 0, 23 + }; 24 + 25 + static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr[] = { 26 + { 27 + .adr = 0x000030025D071101ull, 28 + .num_endpoints = 1, 29 + .endpoints = &single_endpoint, 30 + .name_prefix = "rt711" 31 + } 32 + }; 33 + 34 + static const struct snd_soc_acpi_link_adr lnl_rvp[] = { 35 + { 36 + .mask = BIT(0), 37 + .num_adr = ARRAY_SIZE(rt711_sdca_0_adr), 38 + .adr_d = rt711_sdca_0_adr, 39 + }, 40 + {} 41 + }; 42 + 43 + /* this table is used when there is no I2S codec present */ 44 + struct snd_soc_acpi_mach snd_soc_acpi_intel_lnl_sdw_machines[] = { 45 + /* mockup tests need to be first */ 46 + { 47 + .link_mask = GENMASK(3, 0), 48 + .links = sdw_mockup_headset_2amps_mic, 49 + .drv_name = "sof_sdw", 50 + .sof_tplg_filename = "sof-lnl-rt711-rt1308-rt715.tplg", 51 + }, 52 + { 53 + .link_mask = BIT(0) | BIT(1) | BIT(3), 54 + .links = sdw_mockup_headset_1amp_mic, 55 + .drv_name = "sof_sdw", 56 + .sof_tplg_filename = "sof-lnl-rt711-rt1308-mono-rt715.tplg", 57 + }, 58 + { 59 + .link_mask = GENMASK(2, 0), 60 + .links = sdw_mockup_mic_headset_1amp, 61 + .drv_name = "sof_sdw", 62 + .sof_tplg_filename = "sof-lnl-rt715-rt711-rt1308-mono.tplg", 63 + }, 64 + { 65 + .link_mask = BIT(0), 66 + .links = lnl_rvp, 67 + .drv_name = "sof_sdw", 68 + .sof_tplg_filename = "sof-lnl-rt711.tplg", 69 + }, 70 + {}, 71 + }; 72 + EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_lnl_sdw_machines);
+57
sound/soc/intel/common/soc-acpi-intel-mtl-match.c
··· 98 98 } 99 99 }; 100 100 101 + static const struct snd_soc_acpi_adr_device rt1316_2_group1_adr[] = { 102 + { 103 + .adr = 0x000230025D131601ull, 104 + .num_endpoints = 1, 105 + .endpoints = &spk_l_endpoint, 106 + .name_prefix = "rt1316-1" 107 + } 108 + }; 109 + 110 + static const struct snd_soc_acpi_adr_device rt1316_3_group1_adr[] = { 111 + { 112 + .adr = 0x000331025D131601ull, 113 + .num_endpoints = 1, 114 + .endpoints = &spk_r_endpoint, 115 + .name_prefix = "rt1316-2" 116 + } 117 + }; 118 + 119 + static const struct snd_soc_acpi_adr_device rt714_1_adr[] = { 120 + { 121 + .adr = 0x000130025D071401ull, 122 + .num_endpoints = 1, 123 + .endpoints = &single_endpoint, 124 + .name_prefix = "rt714" 125 + } 126 + }; 127 + 101 128 static const struct snd_soc_acpi_link_adr rt5682_link2_max98373_link0[] = { 102 129 /* Expected order: jack -> amp */ 103 130 { ··· 149 122 {} 150 123 }; 151 124 125 + static const struct snd_soc_acpi_link_adr mtl_3_in_1_sdca[] = { 126 + { 127 + .mask = BIT(0), 128 + .num_adr = ARRAY_SIZE(rt711_sdca_0_adr), 129 + .adr_d = rt711_sdca_0_adr, 130 + }, 131 + { 132 + .mask = BIT(2), 133 + .num_adr = ARRAY_SIZE(rt1316_2_group1_adr), 134 + .adr_d = rt1316_2_group1_adr, 135 + }, 136 + { 137 + .mask = BIT(3), 138 + .num_adr = ARRAY_SIZE(rt1316_3_group1_adr), 139 + .adr_d = rt1316_3_group1_adr, 140 + }, 141 + { 142 + .mask = BIT(1), 143 + .num_adr = ARRAY_SIZE(rt714_1_adr), 144 + .adr_d = rt714_1_adr, 145 + }, 146 + {} 147 + }; 148 + 152 149 /* this table is used when there is no I2S codec present */ 153 150 struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[] = { 154 151 /* mockup tests need to be first */ ··· 193 142 .links = sdw_mockup_mic_headset_1amp, 194 143 .drv_name = "sof_sdw", 195 144 .sof_tplg_filename = "sof-mtl-rt715-rt711-rt1308-mono.tplg", 145 + }, 146 + { 147 + .link_mask = GENMASK(3, 0), 148 + .links = mtl_3_in_1_sdca, 149 + .drv_name = "sof_sdw", 150 + .sof_tplg_filename = "sof-mtl-rt711-l0-rt1316-l23-rt714-l1.tplg", 196 151 }, 197 152 { 198 153 .link_mask = BIT(0),
+12
sound/soc/intel/common/soc-acpi-intel-rpl-match.c
··· 303 303 .codecs = {"MX98360A"}, 304 304 }; 305 305 306 + static const struct snd_soc_acpi_codecs rpl_max98373_amp = { 307 + .num_codecs = 1, 308 + .codecs = {"MX98373"} 309 + }; 310 + 306 311 struct snd_soc_acpi_mach snd_soc_acpi_intel_rpl_machines[] = { 307 312 { 308 313 .comp_ids = &rpl_rt5682_hp, ··· 315 310 .machine_quirk = snd_soc_acpi_codec_list, 316 311 .quirk_data = &rpl_max98360a_amp, 317 312 .sof_tplg_filename = "sof-rpl-max98360a-rt5682.tplg", 313 + }, 314 + { 315 + .id = "10508825", 316 + .drv_name = "rpl_max98373_8825", 317 + .machine_quirk = snd_soc_acpi_codec_list, 318 + .quirk_data = &rpl_max98373_amp, 319 + .sof_tplg_filename = "sof-rpl-max98373-nau8825.tplg", 318 320 }, 319 321 {}, 320 322 };