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.

Merge tag 'sound-6.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"A collection of small fixes again. The only change in the core is
about the handling of ALSA compress-offload ioctl numbers for avoiding
potential abusing the API (if any).

Other than that, all changes are device-specific small fixes and
quirks, which should be safe to apply"

* tag 'sound-6.16-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ASoC: amd: yc: Add DMI quirk for HP Laptop 17 cp-2033dx
ASoC: Intel: soc-acpi: add support for HP Omen14 ARL
ASoC: amd: yc: Add DMI entries to support HP 15-fb1xxx
ALSA: hda/realtek: Add quirk for ASUS ROG Strix G712LWS
ALSA: hda/cs35l56: Workaround bad dev-index on Lenovo Yoga Book 9i GenX
ALSA: hda/realtek: Support mute LED for Yoga with ALC287
ASoC: Intel: fix SND_SOC_SOF dependencies
ASoC: rt5660: Fix the dmic data source from GPIO2
ALSA: hda/realtek - Fix mute LED for HP Victus 16-r0xxx
ALSA: compress_offload: tighten ioctl command number checks
ASoC: Intel: avs: Fix NULL ptr deref on rmmod
ASoC: amd: yc: add DMI quirk for ASUS M6501RM

+172 -58
+24 -24
sound/core/compress_offload.c
··· 1269 1269 stream = &data->stream; 1270 1270 1271 1271 guard(mutex)(&stream->device->lock); 1272 - switch (_IOC_NR(cmd)) { 1273 - case _IOC_NR(SNDRV_COMPRESS_IOCTL_VERSION): 1272 + switch (cmd) { 1273 + case SNDRV_COMPRESS_IOCTL_VERSION: 1274 1274 return put_user(SNDRV_COMPRESS_VERSION, 1275 1275 (int __user *)arg) ? -EFAULT : 0; 1276 - case _IOC_NR(SNDRV_COMPRESS_GET_CAPS): 1276 + case SNDRV_COMPRESS_GET_CAPS: 1277 1277 return snd_compr_get_caps(stream, arg); 1278 1278 #ifndef COMPR_CODEC_CAPS_OVERFLOW 1279 - case _IOC_NR(SNDRV_COMPRESS_GET_CODEC_CAPS): 1279 + case SNDRV_COMPRESS_GET_CODEC_CAPS: 1280 1280 return snd_compr_get_codec_caps(stream, arg); 1281 1281 #endif 1282 - case _IOC_NR(SNDRV_COMPRESS_SET_PARAMS): 1282 + case SNDRV_COMPRESS_SET_PARAMS: 1283 1283 return snd_compr_set_params(stream, arg); 1284 - case _IOC_NR(SNDRV_COMPRESS_GET_PARAMS): 1284 + case SNDRV_COMPRESS_GET_PARAMS: 1285 1285 return snd_compr_get_params(stream, arg); 1286 - case _IOC_NR(SNDRV_COMPRESS_SET_METADATA): 1286 + case SNDRV_COMPRESS_SET_METADATA: 1287 1287 return snd_compr_set_metadata(stream, arg); 1288 - case _IOC_NR(SNDRV_COMPRESS_GET_METADATA): 1288 + case SNDRV_COMPRESS_GET_METADATA: 1289 1289 return snd_compr_get_metadata(stream, arg); 1290 1290 } 1291 1291 1292 1292 if (stream->direction == SND_COMPRESS_ACCEL) { 1293 1293 #if IS_ENABLED(CONFIG_SND_COMPRESS_ACCEL) 1294 - switch (_IOC_NR(cmd)) { 1295 - case _IOC_NR(SNDRV_COMPRESS_TASK_CREATE): 1294 + switch (cmd) { 1295 + case SNDRV_COMPRESS_TASK_CREATE: 1296 1296 return snd_compr_task_create(stream, arg); 1297 - case _IOC_NR(SNDRV_COMPRESS_TASK_FREE): 1297 + case SNDRV_COMPRESS_TASK_FREE: 1298 1298 return snd_compr_task_seq(stream, arg, snd_compr_task_free_one); 1299 - case _IOC_NR(SNDRV_COMPRESS_TASK_START): 1299 + case SNDRV_COMPRESS_TASK_START: 1300 1300 return snd_compr_task_start_ioctl(stream, arg); 1301 - case _IOC_NR(SNDRV_COMPRESS_TASK_STOP): 1301 + case SNDRV_COMPRESS_TASK_STOP: 1302 1302 return snd_compr_task_seq(stream, arg, snd_compr_task_stop_one); 1303 - case _IOC_NR(SNDRV_COMPRESS_TASK_STATUS): 1303 + case SNDRV_COMPRESS_TASK_STATUS: 1304 1304 return snd_compr_task_status_ioctl(stream, arg); 1305 1305 } 1306 1306 #endif 1307 1307 return -ENOTTY; 1308 1308 } 1309 1309 1310 - switch (_IOC_NR(cmd)) { 1311 - case _IOC_NR(SNDRV_COMPRESS_TSTAMP): 1310 + switch (cmd) { 1311 + case SNDRV_COMPRESS_TSTAMP: 1312 1312 return snd_compr_tstamp(stream, arg); 1313 - case _IOC_NR(SNDRV_COMPRESS_AVAIL): 1313 + case SNDRV_COMPRESS_AVAIL: 1314 1314 return snd_compr_ioctl_avail(stream, arg); 1315 - case _IOC_NR(SNDRV_COMPRESS_PAUSE): 1315 + case SNDRV_COMPRESS_PAUSE: 1316 1316 return snd_compr_pause(stream); 1317 - case _IOC_NR(SNDRV_COMPRESS_RESUME): 1317 + case SNDRV_COMPRESS_RESUME: 1318 1318 return snd_compr_resume(stream); 1319 - case _IOC_NR(SNDRV_COMPRESS_START): 1319 + case SNDRV_COMPRESS_START: 1320 1320 return snd_compr_start(stream); 1321 - case _IOC_NR(SNDRV_COMPRESS_STOP): 1321 + case SNDRV_COMPRESS_STOP: 1322 1322 return snd_compr_stop(stream); 1323 - case _IOC_NR(SNDRV_COMPRESS_DRAIN): 1323 + case SNDRV_COMPRESS_DRAIN: 1324 1324 return snd_compr_drain(stream); 1325 - case _IOC_NR(SNDRV_COMPRESS_PARTIAL_DRAIN): 1325 + case SNDRV_COMPRESS_PARTIAL_DRAIN: 1326 1326 return snd_compr_partial_drain(stream); 1327 - case _IOC_NR(SNDRV_COMPRESS_NEXT_TRACK): 1327 + case SNDRV_COMPRESS_NEXT_TRACK: 1328 1328 return snd_compr_next_track(stream); 1329 1329 } 1330 1330
+84 -30
sound/pci/hda/cs35l56_hda.c
··· 873 873 return 0; 874 874 } 875 875 876 + static int cs35l56_hda_fixup_yoga9(struct cs35l56_hda *cs35l56, int *bus_addr) 877 + { 878 + /* The cirrus,dev-index property has the wrong values */ 879 + switch (*bus_addr) { 880 + case 0x30: 881 + cs35l56->index = 1; 882 + return 0; 883 + case 0x31: 884 + cs35l56->index = 0; 885 + return 0; 886 + default: 887 + /* There is a pseudo-address for broadcast to both amps - ignore it */ 888 + dev_dbg(cs35l56->base.dev, "Ignoring I2C address %#x\n", *bus_addr); 889 + return 0; 890 + } 891 + } 892 + 893 + static const struct { 894 + const char *sub; 895 + int (*fixup_fn)(struct cs35l56_hda *cs35l56, int *bus_addr); 896 + } cs35l56_hda_fixups[] = { 897 + { 898 + .sub = "17AA390B", /* Lenovo Yoga Book 9i GenX */ 899 + .fixup_fn = cs35l56_hda_fixup_yoga9, 900 + }, 901 + }; 902 + 903 + static int cs35l56_hda_apply_platform_fixups(struct cs35l56_hda *cs35l56, const char *sub, 904 + int *bus_addr) 905 + { 906 + int i; 907 + 908 + if (IS_ERR(sub)) 909 + return 0; 910 + 911 + for (i = 0; i < ARRAY_SIZE(cs35l56_hda_fixups); i++) { 912 + if (strcasecmp(cs35l56_hda_fixups[i].sub, sub) == 0) { 913 + dev_dbg(cs35l56->base.dev, "Applying fixup for %s\n", 914 + cs35l56_hda_fixups[i].sub); 915 + return (cs35l56_hda_fixups[i].fixup_fn)(cs35l56, bus_addr); 916 + } 917 + } 918 + 919 + return 0; 920 + } 921 + 876 922 static int cs35l56_hda_read_acpi(struct cs35l56_hda *cs35l56, int hid, int id) 877 923 { 878 924 u32 values[HDA_MAX_COMPONENTS]; ··· 943 897 ACPI_COMPANION_SET(cs35l56->base.dev, adev); 944 898 } 945 899 946 - property = "cirrus,dev-index"; 947 - ret = device_property_count_u32(cs35l56->base.dev, property); 948 - if (ret <= 0) 949 - goto err; 950 - 951 - if (ret > ARRAY_SIZE(values)) { 952 - ret = -EINVAL; 953 - goto err; 954 - } 955 - nval = ret; 956 - 957 - ret = device_property_read_u32_array(cs35l56->base.dev, property, values, nval); 958 - if (ret) 959 - goto err; 960 - 900 + /* Initialize things that could be overwritten by a fixup */ 961 901 cs35l56->index = -1; 962 - for (i = 0; i < nval; i++) { 963 - if (values[i] == id) { 964 - cs35l56->index = i; 965 - break; 966 - } 967 - } 968 - /* 969 - * It's not an error for the ID to be missing: for I2C there can be 970 - * an alias address that is not a real device. So reject silently. 971 - */ 972 - if (cs35l56->index == -1) { 973 - dev_dbg(cs35l56->base.dev, "No index found in %s\n", property); 974 - ret = -ENODEV; 975 - goto err; 976 - } 977 902 978 903 sub = acpi_get_subsystem_id(ACPI_HANDLE(cs35l56->base.dev)); 904 + ret = cs35l56_hda_apply_platform_fixups(cs35l56, sub, &id); 905 + if (ret) 906 + return ret; 907 + 908 + if (cs35l56->index == -1) { 909 + property = "cirrus,dev-index"; 910 + ret = device_property_count_u32(cs35l56->base.dev, property); 911 + if (ret <= 0) 912 + goto err; 913 + 914 + if (ret > ARRAY_SIZE(values)) { 915 + ret = -EINVAL; 916 + goto err; 917 + } 918 + nval = ret; 919 + 920 + ret = device_property_read_u32_array(cs35l56->base.dev, property, values, nval); 921 + if (ret) 922 + goto err; 923 + 924 + for (i = 0; i < nval; i++) { 925 + if (values[i] == id) { 926 + cs35l56->index = i; 927 + break; 928 + } 929 + } 930 + 931 + /* 932 + * It's not an error for the ID to be missing: for I2C there can be 933 + * an alias address that is not a real device. So reject silently. 934 + */ 935 + if (cs35l56->index == -1) { 936 + dev_dbg(cs35l56->base.dev, "No index found in %s\n", property); 937 + ret = -ENODEV; 938 + goto err; 939 + } 940 + } 979 941 980 942 if (IS_ERR(sub)) { 981 943 dev_info(cs35l56->base.dev,
+5
sound/pci/hda/patch_realtek.c
··· 7497 7497 }; 7498 7498 struct alc_spec *spec = codec->spec; 7499 7499 7500 + /* Support Audio mute LED and Mic mute LED on keyboard */ 7501 + hda_fixup_ideapad_acpi(codec, fix, action); 7502 + 7500 7503 switch (action) { 7501 7504 case HDA_FIXUP_ACT_PRE_PROBE: 7502 7505 snd_hda_apply_pincfgs(codec, pincfgs); ··· 10817 10814 SND_PCI_QUIRK(0x103c, 0x8b97, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 10818 10815 SND_PCI_QUIRK(0x103c, 0x8bb3, "HP Slim OMEN", ALC287_FIXUP_CS35L41_I2C_2), 10819 10816 SND_PCI_QUIRK(0x103c, 0x8bb4, "HP Slim OMEN", ALC287_FIXUP_CS35L41_I2C_2), 10817 + SND_PCI_QUIRK(0x103c, 0x8bbe, "HP Victus 16-r0xxx (MB 8BBE)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT), 10820 10818 SND_PCI_QUIRK(0x103c, 0x8bc8, "HP Victus 15-fa1xxx", ALC245_FIXUP_HP_MUTE_LED_COEFBIT), 10821 10819 SND_PCI_QUIRK(0x103c, 0x8bcd, "HP Omen 16-xd0xxx", ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT), 10822 10820 SND_PCI_QUIRK(0x103c, 0x8bdd, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), ··· 11010 11006 SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), 11011 11007 SND_PCI_QUIRK(0x1043, 0x1a63, "ASUS UX3405MA", ALC245_FIXUP_CS35L41_SPI_2), 11012 11008 SND_PCI_QUIRK(0x1043, 0x1a83, "ASUS UM5302LA", ALC294_FIXUP_CS35L41_I2C_2), 11009 + SND_PCI_QUIRK(0x1043, 0x1a8e, "ASUS G712LWS", ALC294_FIXUP_LENOVO_MIC_LOCATION), 11013 11010 SND_PCI_QUIRK(0x1043, 0x1a8f, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2), 11014 11011 SND_PCI_QUIRK(0x1043, 0x1b11, "ASUS UX431DA", ALC294_FIXUP_ASUS_COEF_1B), 11015 11012 SND_PCI_QUIRK(0x1043, 0x1b13, "ASUS U41SV/GA403U", ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC),
+21
sound/soc/amd/yc/acp6x-mach.c
··· 420 420 .driver_data = &acp6x_card, 421 421 .matches = { 422 422 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."), 423 + DMI_MATCH(DMI_PRODUCT_NAME, "M6501RM"), 424 + } 425 + }, 426 + { 427 + .driver_data = &acp6x_card, 428 + .matches = { 429 + DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."), 423 430 DMI_MATCH(DMI_PRODUCT_NAME, "E1404FA"), 424 431 } 425 432 }, ··· 546 539 .driver_data = &acp6x_card, 547 540 .matches = { 548 541 DMI_MATCH(DMI_BOARD_VENDOR, "HP"), 542 + DMI_MATCH(DMI_PRODUCT_NAME, "Victus by HP Gaming Laptop 15-fb1xxx"), 543 + } 544 + }, 545 + { 546 + .driver_data = &acp6x_card, 547 + .matches = { 548 + DMI_MATCH(DMI_BOARD_VENDOR, "HP"), 549 549 DMI_MATCH(DMI_PRODUCT_NAME, "Victus by HP Gaming Laptop 15-fb2xxx"), 550 550 } 551 551 }, ··· 596 582 .matches = { 597 583 DMI_MATCH(DMI_BOARD_VENDOR, "HP"), 598 584 DMI_MATCH(DMI_BOARD_NAME, "8A7F"), 585 + } 586 + }, 587 + { 588 + .driver_data = &acp6x_card, 589 + .matches = { 590 + DMI_MATCH(DMI_BOARD_VENDOR, "HP"), 591 + DMI_MATCH(DMI_BOARD_NAME, "8A81"), 599 592 } 600 593 }, 601 594 {
+5 -2
sound/soc/codecs/rt5660.c
··· 1315 1315 regmap_update_bits(rt5660->regmap, RT5660_GPIO_CTRL1, 1316 1316 RT5660_GP1_PIN_MASK, RT5660_GP1_PIN_DMIC1_SCL); 1317 1317 1318 - if (rt5660->pdata.dmic1_data_pin == RT5660_DMIC1_DATA_GPIO2) 1318 + if (rt5660->pdata.dmic1_data_pin == RT5660_DMIC1_DATA_GPIO2) { 1319 1319 regmap_update_bits(rt5660->regmap, RT5660_DMIC_CTRL1, 1320 1320 RT5660_SEL_DMIC_DATA_MASK, 1321 1321 RT5660_SEL_DMIC_DATA_GPIO2); 1322 - else if (rt5660->pdata.dmic1_data_pin == RT5660_DMIC1_DATA_IN1P) 1322 + regmap_update_bits(rt5660->regmap, RT5660_GPIO_CTRL1, 1323 + RT5660_GP2_PIN_MASK, RT5660_GP2_PIN_DMIC1_SDA); 1324 + } else if (rt5660->pdata.dmic1_data_pin == RT5660_DMIC1_DATA_IN1P) { 1323 1325 regmap_update_bits(rt5660->regmap, RT5660_DMIC_CTRL1, 1324 1326 RT5660_SEL_DMIC_DATA_MASK, 1325 1327 RT5660_SEL_DMIC_DATA_IN1P); 1328 + } 1326 1329 } 1327 1330 1328 1331 return devm_snd_soc_register_component(&i2c->dev,
+3 -1
sound/soc/intel/avs/pcm.c
··· 1570 1570 { 1571 1571 struct snd_soc_acpi_mach *mach; 1572 1572 struct snd_soc_dai *dai, *save; 1573 + struct avs_mach_pdata *pdata; 1573 1574 struct hda_codec *codec; 1574 1575 char name[32]; 1575 1576 1576 1577 mach = dev_get_platdata(component->card->dev); 1577 - codec = mach->pdata; 1578 + pdata = mach->pdata; 1579 + codec = pdata->codec; 1578 1580 snprintf(name, sizeof(name), "%s-cpu", dev_name(&codec->core.dev)); 1579 1581 1580 1582 for_each_component_dais_safe(component, dai, save) {
+1 -1
sound/soc/intel/boards/Kconfig
··· 11 11 kernel: saying N will just cause the configurator to skip all 12 12 the questions about Intel ASoC machine drivers. 13 13 14 - if SND_SOC_INTEL_MACH 14 + if SND_SOC_INTEL_MACH && (SND_SOC_SOF_INTEL_COMMON || !SND_SOC_SOF_INTEL_COMMON) 15 15 16 16 config SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES 17 17 bool "Use more user friendly long card names"
+29
sound/soc/intel/common/soc-acpi-intel-arl-match.c
··· 238 238 } 239 239 }; 240 240 241 + static const struct snd_soc_acpi_adr_device rt1316_3_single_adr[] = { 242 + { 243 + .adr = 0x000330025D131601ull, 244 + .num_endpoints = 1, 245 + .endpoints = &single_endpoint, 246 + .name_prefix = "rt1316-1" 247 + } 248 + }; 249 + 241 250 static const struct snd_soc_acpi_adr_device rt1320_2_single_adr[] = { 242 251 { 243 252 .adr = 0x000230025D132001ull, ··· 377 368 {} 378 369 }; 379 370 371 + static const struct snd_soc_acpi_link_adr arl_rt711_l0_rt1316_l3[] = { 372 + { 373 + .mask = BIT(0), 374 + .num_adr = ARRAY_SIZE(rt711_sdca_0_adr), 375 + .adr_d = rt711_sdca_0_adr, 376 + }, 377 + { 378 + .mask = BIT(3), 379 + .num_adr = ARRAY_SIZE(rt1316_3_single_adr), 380 + .adr_d = rt1316_3_single_adr, 381 + }, 382 + {} 383 + }; 384 + 380 385 static const struct snd_soc_acpi_link_adr arl_rt722_l0_rt1320_l2[] = { 381 386 { 382 387 .mask = BIT(0), ··· 503 480 .drv_name = "sof_sdw", 504 481 .sof_tplg_filename = "sof-arl-cs42l43-l2.tplg", 505 482 .get_function_tplg_files = sof_sdw_get_tplg_files, 483 + }, 484 + { 485 + .link_mask = BIT(0) | BIT(3), 486 + .links = arl_rt711_l0_rt1316_l3, 487 + .drv_name = "sof_sdw", 488 + .sof_tplg_filename = "sof-arl-rt711-l0-rt1316-l3.tplg", 506 489 }, 507 490 { 508 491 .link_mask = 0x1, /* link0 required */