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: boards: updates for 6.11 - part2

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

Minor additions and cleanups this time.

+63 -13
+2
sound/soc/intel/boards/Kconfig
··· 677 677 select SND_SOC_CS42L43_SDW 678 678 select MFD_CS42L43 679 679 select MFD_CS42L43_SDW 680 + select PINCTRL_CS42L43 681 + select SPI_CS42L43 680 682 select SND_SOC_CS35L56_SPI 681 683 select SND_SOC_CS35L56_SDW 682 684 select SND_SOC_DMIC
+43 -13
sound/soc/intel/boards/sof_maxim_common.c
··· 77 77 * According to the definition of 'DAI Sel Mux' mixer in max98373.c, rx mask 78 78 * should choose two channels from TDM slots, the LSB of rx mask is left channel 79 79 * and the other one is right channel. 80 - * 81 - * For tx mask, each codec requires two channels: one for V-sense and the other 82 - * one for I-sense. Must match the device property "maxim,vmon-slot-no" and 83 - * "maxim,imon-slot-no" in ACPI table. 84 80 */ 85 81 static const struct { 86 - unsigned int tx; 87 82 unsigned int rx; 88 83 } max_98373_tdm_mask[] = { 89 - {.tx = 0x03, .rx = 0x3}, 90 - {.tx = 0x0c, .rx = 0x3}, 84 + {.rx = 0x3}, 85 + {.rx = 0x3}, 91 86 }; 87 + 88 + /* 89 + * The tx mask indicates which channel(s) contains output IV-sense data and 90 + * others should set to Hi-Z. Here we get the channel number from codec's ACPI 91 + * device property "maxim,vmon-slot-no" and "maxim,imon-slot-no" to generate the 92 + * mask. Refer to the max98373_slot_config() function in max98373.c codec driver. 93 + */ 94 + static unsigned int max_98373_get_tx_mask(struct device *dev) 95 + { 96 + int vmon_slot; 97 + int imon_slot; 98 + 99 + if (device_property_read_u32(dev, "maxim,vmon-slot-no", &vmon_slot)) 100 + vmon_slot = 0; 101 + 102 + if (device_property_read_u32(dev, "maxim,imon-slot-no", &imon_slot)) 103 + imon_slot = 1; 104 + 105 + dev_dbg(dev, "vmon_slot %d imon_slot %d\n", vmon_slot, imon_slot); 106 + 107 + return (0x1 << vmon_slot) | (0x1 << imon_slot); 108 + } 92 109 93 110 static int max_98373_hw_params(struct snd_pcm_substream *substream, 94 111 struct snd_pcm_hw_params *params) ··· 115 98 struct snd_soc_dai *codec_dai; 116 99 int i; 117 100 int tdm_slots; 101 + unsigned int tx_mask; 102 + unsigned int tx_mask_used = 0x0; 118 103 int ret = 0; 119 104 120 105 for_each_rtd_codec_dais(rtd, i, codec_dai) { ··· 136 117 return -EINVAL; 137 118 } 138 119 120 + /* get the tx mask from ACPI device properties */ 121 + tx_mask = max_98373_get_tx_mask(codec_dai->dev); 122 + if (!tx_mask) 123 + return -EINVAL; 124 + 125 + if (tx_mask & tx_mask_used) { 126 + dev_err(codec_dai->dev, "invalid tx mask 0x%x, used 0x%x\n", 127 + tx_mask, tx_mask_used); 128 + return -EINVAL; 129 + } 130 + 131 + tx_mask_used |= tx_mask; 132 + 139 133 /* 140 134 * check if tdm slot number is too small for channel 141 135 * allocation 142 136 */ 143 - if (fls(max_98373_tdm_mask[i].tx) > tdm_slots) { 137 + if (fls(tx_mask) > tdm_slots) { 144 138 dev_err(codec_dai->dev, "slot mismatch, tx %d slots %d\n", 145 - fls(max_98373_tdm_mask[i].tx), tdm_slots); 139 + fls(tx_mask), tdm_slots); 146 140 return -EINVAL; 147 141 } 148 142 ··· 166 134 } 167 135 168 136 dev_dbg(codec_dai->dev, "set tdm slot: tx 0x%x rx 0x%x slots %d width %d\n", 169 - max_98373_tdm_mask[i].tx, 170 - max_98373_tdm_mask[i].rx, 137 + tx_mask, max_98373_tdm_mask[i].rx, 171 138 tdm_slots, params_width(params)); 172 139 173 - ret = snd_soc_dai_set_tdm_slot(codec_dai, 174 - max_98373_tdm_mask[i].tx, 140 + ret = snd_soc_dai_set_tdm_slot(codec_dai, tx_mask, 175 141 max_98373_tdm_mask[i].rx, 176 142 tdm_slots, 177 143 params_width(params));
+18
sound/soc/intel/boards/sof_sdw.c
··· 280 280 { 281 281 .callback = sof_sdw_quirk_cb, 282 282 .matches = { 283 + DMI_MATCH(DMI_BOARD_VENDOR, "Intel Corporation"), 284 + DMI_MATCH(DMI_PRODUCT_SKU, "0000000000070000"), 285 + }, 286 + .driver_data = (void *)(SOF_SDW_TGL_HDMI | 287 + RT711_JD2_100K), 288 + }, 289 + { 290 + .callback = sof_sdw_quirk_cb, 291 + .matches = { 283 292 DMI_MATCH(DMI_SYS_VENDOR, "Google"), 284 293 DMI_MATCH(DMI_PRODUCT_NAME, "Brya"), 285 294 }, ··· 405 396 }, 406 397 /* No Jack */ 407 398 .driver_data = (void *)SOF_SDW_TGL_HDMI, 399 + }, 400 + { 401 + .callback = sof_sdw_quirk_cb, 402 + .matches = { 403 + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), 404 + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0B8C"), 405 + }, 406 + .driver_data = (void *)(SOF_SDW_TGL_HDMI | 407 + RT711_JD2), 408 408 }, 409 409 { 410 410 .callback = sof_sdw_quirk_cb,