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: Merge up fixes

For the benefit of CI.

+114 -45
+33
MAINTAINERS
··· 21063 21063 F: Documentation/devicetree/bindings/sound/davinci-mcasp-audio.yaml 21064 21064 F: sound/soc/ti/ 21065 21065 21066 + TEXAS INSTRUMENTS AUDIO (ASoC/HDA) DRIVERS 21067 + M: Shenghao Ding <shenghao-ding@ti.com> 21068 + M: Kevin Lu <kevin-lu@ti.com> 21069 + M: Baojun Xu <x1077012@ti.com> 21070 + L: alsa-devel@alsa-project.org (moderated for non-subscribers) 21071 + S: Maintained 21072 + F: Documentation/devicetree/bindings/sound/tas2552.txt 21073 + F: Documentation/devicetree/bindings/sound/tas2562.yaml 21074 + F: Documentation/devicetree/bindings/sound/tas2770.yaml 21075 + F: Documentation/devicetree/bindings/sound/tas27xx.yaml 21076 + F: Documentation/devicetree/bindings/sound/ti,pcm1681.txt 21077 + F: Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml 21078 + F: Documentation/devicetree/bindings/sound/ti,tlv320*.yaml 21079 + F: Documentation/devicetree/bindings/sound/tlv320adcx140.yaml 21080 + F: Documentation/devicetree/bindings/sound/tlv320aic31xx.txt 21081 + F: Documentation/devicetree/bindings/sound/tpa6130a2.txt 21082 + F: include/sound/tas2*.h 21083 + F: include/sound/tlv320*.h 21084 + F: include/sound/tpa6130a2-plat.h 21085 + F: sound/pci/hda/tas2781_hda_i2c.c 21086 + F: sound/soc/codecs/pcm1681.c 21087 + F: sound/soc/codecs/pcm1789*.* 21088 + F: sound/soc/codecs/pcm179x*.* 21089 + F: sound/soc/codecs/pcm186x*.* 21090 + F: sound/soc/codecs/pcm3008.* 21091 + F: sound/soc/codecs/pcm3060*.* 21092 + F: sound/soc/codecs/pcm3168a*.* 21093 + F: sound/soc/codecs/pcm5102a.c 21094 + F: sound/soc/codecs/pcm512x*.* 21095 + F: sound/soc/codecs/tas2*.* 21096 + F: sound/soc/codecs/tlv320*.* 21097 + F: sound/soc/codecs/tpa6130a2.* 21098 + 21066 21099 TEXAS INSTRUMENTS DMA DRIVERS 21067 21100 M: Peter Ujfalusi <peter.ujfalusi@gmail.com> 21068 21101 L: dmaengine@vger.kernel.org
+9
sound/soc/codecs/cs35l56-i2c.c
··· 62 62 }; 63 63 MODULE_DEVICE_TABLE(i2c, cs35l56_id_i2c); 64 64 65 + #ifdef CONFIG_ACPI 66 + static const struct acpi_device_id cs35l56_asoc_acpi_match[] = { 67 + { "CSC355C", 0 }, 68 + {}, 69 + }; 70 + MODULE_DEVICE_TABLE(acpi, cs35l56_asoc_acpi_match); 71 + #endif 72 + 65 73 static struct i2c_driver cs35l56_i2c_driver = { 66 74 .driver = { 67 75 .name = "cs35l56", 68 76 .pm = &cs35l56_pm_ops_i2c_spi, 77 + .acpi_match_table = ACPI_PTR(cs35l56_asoc_acpi_match), 69 78 }, 70 79 .id_table = cs35l56_id_i2c, 71 80 .probe = cs35l56_i2c_probe,
+9
sound/soc/codecs/cs35l56-spi.c
··· 59 59 }; 60 60 MODULE_DEVICE_TABLE(spi, cs35l56_id_spi); 61 61 62 + #ifdef CONFIG_ACPI 63 + static const struct acpi_device_id cs35l56_asoc_acpi_match[] = { 64 + { "CSC355C", 0 }, 65 + {}, 66 + }; 67 + MODULE_DEVICE_TABLE(acpi, cs35l56_asoc_acpi_match); 68 + #endif 69 + 62 70 static struct spi_driver cs35l56_spi_driver = { 63 71 .driver = { 64 72 .name = "cs35l56", 65 73 .pm = &cs35l56_pm_ops_i2c_spi, 74 + .acpi_match_table = ACPI_PTR(cs35l56_asoc_acpi_match), 66 75 }, 67 76 .id_table = cs35l56_id_spi, 68 77 .probe = cs35l56_spi_probe,
+12 -19
sound/soc/codecs/cs35l56.c
··· 5 5 // Copyright (C) 2023 Cirrus Logic, Inc. and 6 6 // Cirrus Logic International Semiconductor Ltd. 7 7 8 - #include <linux/acpi.h> 9 8 #include <linux/completion.h> 10 9 #include <linux/debugfs.h> 11 10 #include <linux/delay.h> ··· 1028 1029 return 0; 1029 1030 } 1030 1031 1031 - static int cs35l56_acpi_get_name(struct cs35l56_private *cs35l56) 1032 + static int cs35l56_get_firmware_uid(struct cs35l56_private *cs35l56) 1032 1033 { 1033 - acpi_handle handle = ACPI_HANDLE(cs35l56->base.dev); 1034 - const char *sub; 1034 + struct device *dev = cs35l56->base.dev; 1035 + const char *prop; 1036 + int ret; 1035 1037 1036 - /* If there is no ACPI_HANDLE, there is no ACPI for this system, return 0 */ 1037 - if (!handle) 1038 + ret = device_property_read_string(dev, "cirrus,firmware-uid", &prop); 1039 + /* If bad sw node property, return 0 and fallback to legacy firmware path */ 1040 + if (ret < 0) 1038 1041 return 0; 1039 1042 1040 - sub = acpi_get_subsystem_id(handle); 1041 - if (IS_ERR(sub)) { 1042 - /* If bad ACPI, return 0 and fallback to legacy firmware path, otherwise fail */ 1043 - if (PTR_ERR(sub) == -ENODATA) 1044 - return 0; 1045 - else 1046 - return PTR_ERR(sub); 1047 - } 1043 + cs35l56->dsp.system_name = devm_kstrdup(dev, prop, GFP_KERNEL); 1044 + if (cs35l56->dsp.system_name == NULL) 1045 + return -ENOMEM; 1048 1046 1049 - cs35l56->dsp.system_name = sub; 1050 - dev_dbg(cs35l56->base.dev, "Subsystem ID: %s\n", cs35l56->dsp.system_name); 1047 + dev_dbg(dev, "Firmware UID: %s\n", cs35l56->dsp.system_name); 1051 1048 1052 1049 return 0; 1053 1050 } ··· 1090 1095 gpiod_set_value_cansleep(cs35l56->base.reset_gpio, 1); 1091 1096 } 1092 1097 1093 - ret = cs35l56_acpi_get_name(cs35l56); 1098 + ret = cs35l56_get_firmware_uid(cs35l56); 1094 1099 if (ret != 0) 1095 1100 goto err; 1096 1101 ··· 1211 1216 pm_runtime_disable(cs35l56->base.dev); 1212 1217 1213 1218 regcache_cache_only(cs35l56->base.regmap, true); 1214 - 1215 - kfree(cs35l56->dsp.system_name); 1216 1219 1217 1220 gpiod_set_value_cansleep(cs35l56->base.reset_gpio, 0); 1218 1221 regulator_bulk_disable(ARRAY_SIZE(cs35l56->supplies), cs35l56->supplies);
+12 -1
sound/soc/codecs/rt1308-sdw.c
··· 52 52 case 0x300a: 53 53 case 0xc000: 54 54 case 0xc710: 55 + case 0xcf01: 55 56 case 0xc860 ... 0xc863: 56 57 case 0xc870 ... 0xc873: 57 58 return true; ··· 214 213 { 215 214 struct rt1308_sdw_priv *rt1308 = dev_get_drvdata(dev); 216 215 int ret = 0; 217 - unsigned int tmp; 216 + unsigned int tmp, hibernation_flag; 218 217 219 218 if (rt1308->hw_init) 220 219 return 0; ··· 231 230 pm_runtime_set_active(&slave->dev); 232 231 233 232 pm_runtime_get_noresume(&slave->dev); 233 + 234 + regmap_read(rt1308->regmap, 0xcf01, &hibernation_flag); 235 + if ((hibernation_flag != 0x00) && rt1308->first_hw_init) 236 + goto _preset_ready_; 234 237 235 238 /* sw reset */ 236 239 regmap_write(rt1308->regmap, RT1308_SDW_RESET, 0); ··· 276 271 regmap_write(rt1308->regmap, 0xc100, 0xd7); 277 272 regmap_write(rt1308->regmap, 0xc101, 0xd7); 278 273 274 + /* apply BQ params */ 275 + rt1308_apply_bq_params(rt1308); 276 + 277 + regmap_write(rt1308->regmap, 0xcf01, 0x01); 278 + 279 + _preset_ready_: 279 280 if (rt1308->first_hw_init) { 280 281 regcache_cache_bypass(rt1308->regmap, false); 281 282 regcache_mark_dirty(rt1308->regmap);
+10 -9
sound/soc/codecs/tas2781-comlib.c
··· 57 57 58 58 if (client->addr != tasdev->dev_addr) { 59 59 client->addr = tasdev->dev_addr; 60 - if (tasdev->cur_book == book) { 61 - ret = regmap_write(map, 62 - TASDEVICE_PAGE_SELECT, 0); 63 - if (ret < 0) { 64 - dev_err(tas_priv->dev, "%s, E=%d\n", 65 - __func__, ret); 66 - goto out; 67 - } 60 + /* All tas2781s share the same regmap, clear the page 61 + * inside regmap once switching to another tas2781. 62 + * Register 0 at any pages and any books inside tas2781 63 + * is the same one for page-switching. 64 + */ 65 + ret = regmap_write(map, TASDEVICE_PAGE_SELECT, 0); 66 + if (ret < 0) { 67 + dev_err(tas_priv->dev, "%s, E=%d\n", 68 + __func__, ret); 69 + goto out; 68 70 } 69 - goto out; 70 71 } 71 72 72 73 if (tasdev->cur_book != book) {
+26 -16
sound/soc/meson/axg-tdm-formatter.c
··· 30 30 struct axg_tdm_stream *ts, 31 31 unsigned int offset) 32 32 { 33 - unsigned int val, ch = ts->channels; 34 - unsigned long mask; 35 - int i, j; 33 + unsigned int ch = ts->channels; 34 + u32 val[AXG_TDM_NUM_LANES]; 35 + int i, j, k; 36 + 37 + /* 38 + * We need to mimick the slot distribution used by the HW to keep the 39 + * channel placement consistent regardless of the number of channel 40 + * in the stream. This is why the odd algorithm below is used. 41 + */ 42 + memset(val, 0, sizeof(*val) * AXG_TDM_NUM_LANES); 36 43 37 44 /* 38 45 * Distribute the channels of the stream over the available slots 39 - * of each TDM lane 46 + * of each TDM lane. We need to go over the 32 slots ... 40 47 */ 41 - for (i = 0; i < AXG_TDM_NUM_LANES; i++) { 42 - val = 0; 43 - mask = ts->mask[i]; 44 - 45 - for (j = find_first_bit(&mask, 32); 46 - (j < 32) && ch; 47 - j = find_next_bit(&mask, 32, j + 1)) { 48 - val |= 1 << j; 49 - ch -= 1; 48 + for (i = 0; (i < 32) && ch; i += 2) { 49 + /* ... of all the lanes ... */ 50 + for (j = 0; j < AXG_TDM_NUM_LANES; j++) { 51 + /* ... then distribute the channels in pairs */ 52 + for (k = 0; k < 2; k++) { 53 + if ((BIT(i + k) & ts->mask[j]) && ch) { 54 + val[j] |= BIT(i + k); 55 + ch -= 1; 56 + } 57 + } 50 58 } 51 - 52 - regmap_write(map, offset, val); 53 - offset += regmap_get_reg_stride(map); 54 59 } 55 60 56 61 /* ··· 66 61 if (WARN_ON(ch != 0)) { 67 62 pr_err("channel mask error\n"); 68 63 return -EINVAL; 64 + } 65 + 66 + for (i = 0; i < AXG_TDM_NUM_LANES; i++) { 67 + regmap_write(map, offset, val[i]); 68 + offset += regmap_get_reg_stride(map); 69 69 } 70 70 71 71 return 0;
+3
sound/soc/sof/ipc4-pcm.c
··· 709 709 struct snd_sof_pcm *spcm; 710 710 711 711 spcm = snd_sof_find_spcm_dai(component, rtd); 712 + if (!spcm) 713 + return -EINVAL; 714 + 712 715 time_info = spcm->stream[substream->stream].private; 713 716 /* delay calculation is not supported by current fw_reg ABI */ 714 717 if (!time_info)