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.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"Only small fixes.

- ASoC Cirrus codec fixes

- A regression fix for the recent TAS2781 codec refactoring

- A fix for user-timer error handling

- Fixes for USB-audio descriptor validators

- Usual HD-audio and ASoC device-specific quirks"

* tag 'sound-6.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: usb-audio: Use correct sub-type for UAC3 feature unit validation
ALSA: timer: fix ida_free call while not allocated
ASoC: cs35l56: Remove SoundWire Clock Divider workaround for CS35L63
ASoC: cs35l56: Handle new algorithms IDs for CS35L63
ASoC: cs35l56: Update Firmware Addresses for CS35L63 for production silicon
ALSA: hda: tas2781: Fix wrong reference of tasdevice_priv
ALSA: hda/realtek: Audio disappears on HP 15-fc000 after warm boot again
ALSA: hda/realtek: Fix headset mic on ASUS Zenbook 14
ASoC: codecs: ES9389: Modify the standby configuration
ALSA: usb-audio: Fix size validation in convert_chmap_v3()
ALSA: hda/tas2781: Add name prefix tas2781 for tas2781's dvc_tlv and amp_vol_tlv
ALSA: hda/realtek: Add support for HP EliteBook x360 830 G6 and EliteBook 830 G6

+68 -101
+3 -2
include/sound/cs35l56.h
··· 107 107 #define CS35L56_DSP1_PMEM_5114 0x3804FE8 108 108 109 109 #define CS35L63_DSP1_FW_VER CS35L56_DSP1_FW_VER 110 - #define CS35L63_DSP1_HALO_STATE 0x280396C 111 - #define CS35L63_DSP1_PM_CUR_STATE 0x28042C8 110 + #define CS35L63_DSP1_HALO_STATE 0x2803C04 111 + #define CS35L63_DSP1_PM_CUR_STATE 0x2804518 112 112 #define CS35L63_PROTECTION_STATUS 0x340009C 113 113 #define CS35L63_TRANSDUCER_ACTUAL_PS 0x34000F4 114 114 #define CS35L63_MAIN_RENDER_USER_MUTE 0x3400020 ··· 306 306 struct gpio_desc *reset_gpio; 307 307 struct cs35l56_spi_payload *spi_payload_buf; 308 308 const struct cs35l56_fw_reg *fw_reg; 309 + const struct cirrus_amp_cal_controls *calibration_controls; 309 310 }; 310 311 311 312 static inline bool cs35l56_is_otp_register(unsigned int reg)
+3 -3
include/sound/tas2781-tlv.h
··· 2 2 // 3 3 // ALSA SoC Texas Instruments TAS2781 Audio Smart Amplifier 4 4 // 5 - // Copyright (C) 2022 - 2024 Texas Instruments Incorporated 5 + // Copyright (C) 2022 - 2025 Texas Instruments Incorporated 6 6 // https://www.ti.com 7 7 // 8 8 // The TAS2781 driver implements a flexible and configurable ··· 15 15 #ifndef __TAS2781_TLV_H__ 16 16 #define __TAS2781_TLV_H__ 17 17 18 - static const __maybe_unused DECLARE_TLV_DB_SCALE(dvc_tlv, -10000, 50, 0); 19 - static const __maybe_unused DECLARE_TLV_DB_SCALE(amp_vol_tlv, 1100, 50, 0); 18 + static const __maybe_unused DECLARE_TLV_DB_SCALE(tas2781_dvc_tlv, -10000, 50, 0); 19 + static const __maybe_unused DECLARE_TLV_DB_SCALE(tas2781_amp_tlv, 1100, 50, 0); 20 20 21 21 #endif
+2 -2
sound/core/timer.c
··· 2139 2139 goto err_take_id; 2140 2140 } 2141 2141 2142 + utimer->id = utimer_id; 2143 + 2142 2144 utimer->name = kasprintf(GFP_KERNEL, "snd-utimer%d", utimer_id); 2143 2145 if (!utimer->name) { 2144 2146 err = -ENOMEM; 2145 2147 goto err_get_name; 2146 2148 } 2147 - 2148 - utimer->id = utimer_id; 2149 2149 2150 2150 tid.dev_sclass = SNDRV_TIMER_SCLASS_APPLICATION; 2151 2151 tid.dev_class = SNDRV_TIMER_CLASS_GLOBAL;
+22 -9
sound/hda/codecs/realtek/alc269.c
··· 510 510 hp_pin = 0x21; 511 511 512 512 alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */ 513 + 514 + /* 3k pull low control for Headset jack. */ 515 + /* NOTE: call this before clearing the pin, otherwise codec stalls */ 516 + /* If disable 3k pulldown control for alc257, the Mic detection will not work correctly 517 + * when booting with headset plugged. So skip setting it for the codec alc257 518 + */ 519 + if (spec->en_3kpull_low) 520 + alc_update_coef_idx(codec, 0x46, 0, 3 << 12); 521 + 513 522 hp_pin_sense = snd_hda_jack_detect(codec, hp_pin); 514 523 515 524 if (hp_pin_sense) { ··· 528 519 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 529 520 530 521 msleep(75); 531 - 532 - /* 3k pull low control for Headset jack. */ 533 - /* NOTE: call this before clearing the pin, otherwise codec stalls */ 534 - /* If disable 3k pulldown control for alc257, the Mic detection will not work correctly 535 - * when booting with headset plugged. So skip setting it for the codec alc257 536 - */ 537 - if (spec->en_3kpull_low) 538 - alc_update_coef_idx(codec, 0x46, 0, 3 << 12); 539 522 540 523 if (!spec->no_shutup_pins) 541 524 snd_hda_codec_write(codec, hp_pin, 0, ··· 3580 3579 ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE, 3581 3580 ALC294_FIXUP_ASUS_MIC, 3582 3581 ALC294_FIXUP_ASUS_HEADSET_MIC, 3582 + ALC294_FIXUP_ASUS_I2C_HEADSET_MIC, 3583 3583 ALC294_FIXUP_ASUS_SPK, 3584 3584 ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE, 3585 3585 ALC285_FIXUP_LENOVO_PC_BEEP_IN_NOISE, ··· 4890 4888 }, 4891 4889 .chained = true, 4892 4890 .chain_id = ALC269_FIXUP_HEADSET_MIC 4891 + }, 4892 + [ALC294_FIXUP_ASUS_I2C_HEADSET_MIC] = { 4893 + .type = HDA_FIXUP_PINS, 4894 + .v.pins = (const struct hda_pintbl[]) { 4895 + { 0x19, 0x03a19020 }, /* use as headset mic */ 4896 + { } 4897 + }, 4898 + .chained = true, 4899 + .chain_id = ALC287_FIXUP_CS35L41_I2C_2 4893 4900 }, 4894 4901 [ALC294_FIXUP_ASUS_SPK] = { 4895 4902 .type = HDA_FIXUP_VERBS, ··· 6379 6368 SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3), 6380 6369 SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360), 6381 6370 SND_PCI_QUIRK(0x103c, 0x8537, "HP ProBook 440 G6", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), 6371 + SND_PCI_QUIRK(0x103c, 0x8548, "HP EliteBook x360 830 G6", ALC285_FIXUP_HP_GPIO_LED), 6372 + SND_PCI_QUIRK(0x103c, 0x854a, "HP EliteBook 830 G6", ALC285_FIXUP_HP_GPIO_LED), 6382 6373 SND_PCI_QUIRK(0x103c, 0x85c6, "HP Pavilion x360 Convertible 14-dy1xxx", ALC295_FIXUP_HP_MUTE_LED_COEFBIT11), 6383 6374 SND_PCI_QUIRK(0x103c, 0x85de, "HP Envy x360 13-ar0xxx", ALC285_FIXUP_HP_ENVY_X360), 6384 6375 SND_PCI_QUIRK(0x103c, 0x860f, "HP ZBook 15 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT), ··· 6741 6728 SND_PCI_QUIRK(0x1043, 0x1b13, "ASUS U41SV/GA403U", ALC285_FIXUP_ASUS_GA403U_HEADSET_MIC), 6742 6729 SND_PCI_QUIRK(0x1043, 0x1b93, "ASUS G614JVR/JIR", ALC245_FIXUP_CS35L41_SPI_2), 6743 6730 SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE), 6744 - SND_PCI_QUIRK(0x1043, 0x1c03, "ASUS UM3406HA", ALC287_FIXUP_CS35L41_I2C_2), 6731 + SND_PCI_QUIRK(0x1043, 0x1c03, "ASUS UM3406HA", ALC294_FIXUP_ASUS_I2C_HEADSET_MIC), 6745 6732 SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), 6746 6733 SND_PCI_QUIRK(0x1043, 0x1c33, "ASUS UX5304MA", ALC245_FIXUP_CS35L41_SPI_2), 6747 6734 SND_PCI_QUIRK(0x1043, 0x1c43, "ASUS UX8406MA", ALC245_FIXUP_CS35L41_SPI_2),
+2 -2
sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
··· 267 267 static const struct snd_kcontrol_new tas2781_snd_controls[] = { 268 268 ACARD_SINGLE_RANGE_EXT_TLV("Speaker Analog Volume", TAS2781_AMP_LEVEL, 269 269 1, 0, 20, 0, tas2781_amp_getvol, 270 - tas2781_amp_putvol, amp_vol_tlv), 270 + tas2781_amp_putvol, tas2781_amp_tlv), 271 271 ACARD_SINGLE_BOOL_EXT("Speaker Force Firmware Load", 0, 272 272 tas2781_force_fwload_get, tas2781_force_fwload_put), 273 273 }; ··· 305 305 efi_char16_t efi_name[TAS2563_CAL_VAR_NAME_MAX]; 306 306 unsigned long max_size = TAS2563_CAL_DATA_SIZE; 307 307 unsigned char var8[TAS2563_CAL_VAR_NAME_MAX]; 308 - struct tasdevice_priv *p = h->hda_priv; 308 + struct tasdevice_priv *p = h->priv; 309 309 struct calidata *cd = &p->cali_data; 310 310 struct cali_reg *r = &cd->cali_reg_array; 311 311 unsigned int offset = 0;
+4 -2
sound/hda/codecs/side-codecs/tas2781_hda_spi.c
··· 494 494 495 495 static struct snd_kcontrol_new tas2781_snd_ctls[] = { 496 496 ACARD_SINGLE_RANGE_EXT_TLV(NULL, TAS2781_AMP_LEVEL, 1, 0, 20, 0, 497 - tas2781_amp_getvol, tas2781_amp_putvol, amp_vol_tlv), 497 + tas2781_amp_getvol, tas2781_amp_putvol, 498 + tas2781_amp_tlv), 498 499 ACARD_SINGLE_RANGE_EXT_TLV(NULL, TAS2781_DVC_LVL, 0, 0, 200, 1, 499 - tas2781_digital_getvol, tas2781_digital_putvol, dvc_tlv), 500 + tas2781_digital_getvol, tas2781_digital_putvol, 501 + tas2781_dvc_tlv), 500 502 ACARD_SINGLE_BOOL_EXT(NULL, 0, tas2781_force_fwload_get, 501 503 tas2781_force_fwload_put), 502 504 };
-69
sound/soc/codecs/cs35l56-sdw.c
··· 393 393 return 0; 394 394 } 395 395 396 - static int cs35l63_sdw_kick_divider(struct cs35l56_private *cs35l56, 397 - struct sdw_slave *peripheral) 398 - { 399 - unsigned int curr_scale_reg, next_scale_reg; 400 - int curr_scale, next_scale, ret; 401 - 402 - if (!cs35l56->base.init_done) 403 - return 0; 404 - 405 - if (peripheral->bus->params.curr_bank) { 406 - curr_scale_reg = SDW_SCP_BUSCLOCK_SCALE_B1; 407 - next_scale_reg = SDW_SCP_BUSCLOCK_SCALE_B0; 408 - } else { 409 - curr_scale_reg = SDW_SCP_BUSCLOCK_SCALE_B0; 410 - next_scale_reg = SDW_SCP_BUSCLOCK_SCALE_B1; 411 - } 412 - 413 - /* 414 - * Current clock scale value must be different to new value. 415 - * Modify current to guarantee this. If next still has the dummy 416 - * value we wrote when it was current, the core code has not set 417 - * a new scale so restore its original good value 418 - */ 419 - curr_scale = sdw_read_no_pm(peripheral, curr_scale_reg); 420 - if (curr_scale < 0) { 421 - dev_err(cs35l56->base.dev, "Failed to read current clock scale: %d\n", curr_scale); 422 - return curr_scale; 423 - } 424 - 425 - next_scale = sdw_read_no_pm(peripheral, next_scale_reg); 426 - if (next_scale < 0) { 427 - dev_err(cs35l56->base.dev, "Failed to read next clock scale: %d\n", next_scale); 428 - return next_scale; 429 - } 430 - 431 - if (next_scale == CS35L56_SDW_INVALID_BUS_SCALE) { 432 - next_scale = cs35l56->old_sdw_clock_scale; 433 - ret = sdw_write_no_pm(peripheral, next_scale_reg, next_scale); 434 - if (ret < 0) { 435 - dev_err(cs35l56->base.dev, "Failed to modify current clock scale: %d\n", 436 - ret); 437 - return ret; 438 - } 439 - } 440 - 441 - cs35l56->old_sdw_clock_scale = curr_scale; 442 - ret = sdw_write_no_pm(peripheral, curr_scale_reg, CS35L56_SDW_INVALID_BUS_SCALE); 443 - if (ret < 0) { 444 - dev_err(cs35l56->base.dev, "Failed to modify current clock scale: %d\n", ret); 445 - return ret; 446 - } 447 - 448 - dev_dbg(cs35l56->base.dev, "Next bus scale: %#x\n", next_scale); 449 - 450 - return 0; 451 - } 452 - 453 - static int cs35l56_sdw_bus_config(struct sdw_slave *peripheral, 454 - struct sdw_bus_params *params) 455 - { 456 - struct cs35l56_private *cs35l56 = dev_get_drvdata(&peripheral->dev); 457 - 458 - if ((cs35l56->base.type == 0x63) && (cs35l56->base.rev < 0xa1)) 459 - return cs35l63_sdw_kick_divider(cs35l56, peripheral); 460 - 461 - return 0; 462 - } 463 - 464 396 static int __maybe_unused cs35l56_sdw_clk_stop(struct sdw_slave *peripheral, 465 397 enum sdw_clk_stop_mode mode, 466 398 enum sdw_clk_stop_type type) ··· 408 476 .read_prop = cs35l56_sdw_read_prop, 409 477 .interrupt_callback = cs35l56_sdw_interrupt, 410 478 .update_status = cs35l56_sdw_update_status, 411 - .bus_config = cs35l56_sdw_bus_config, 412 479 #ifdef DEBUG 413 480 .clk_stop = cs35l56_sdw_clk_stop, 414 481 #endif
+26 -3
sound/soc/codecs/cs35l56-shared.c
··· 838 838 }; 839 839 EXPORT_SYMBOL_NS_GPL(cs35l56_calibration_controls, "SND_SOC_CS35L56_SHARED"); 840 840 841 + static const struct cirrus_amp_cal_controls cs35l63_calibration_controls = { 842 + .alg_id = 0xbf210, 843 + .mem_region = WMFW_ADSP2_YM, 844 + .ambient = "CAL_AMBIENT", 845 + .calr = "CAL_R", 846 + .status = "CAL_STATUS", 847 + .checksum = "CAL_CHECKSUM", 848 + }; 849 + 841 850 int cs35l56_get_calibration(struct cs35l56_base *cs35l56_base) 842 851 { 843 852 u64 silicon_uid = 0; ··· 921 912 void cs35l56_log_tuning(struct cs35l56_base *cs35l56_base, struct cs_dsp *cs_dsp) 922 913 { 923 914 __be32 pid, sid, tid; 915 + unsigned int alg_id; 924 916 int ret; 917 + 918 + switch (cs35l56_base->type) { 919 + case 0x54: 920 + case 0x56: 921 + case 0x57: 922 + alg_id = 0x9f212; 923 + break; 924 + default: 925 + alg_id = 0xbf212; 926 + break; 927 + } 925 928 926 929 scoped_guard(mutex, &cs_dsp->pwr_lock) { 927 930 ret = cs_dsp_coeff_read_ctrl(cs_dsp_get_ctl(cs_dsp, "AS_PRJCT_ID", 928 - WMFW_ADSP2_XM, 0x9f212), 931 + WMFW_ADSP2_XM, alg_id), 929 932 0, &pid, sizeof(pid)); 930 933 if (!ret) 931 934 ret = cs_dsp_coeff_read_ctrl(cs_dsp_get_ctl(cs_dsp, "AS_CHNNL_ID", 932 - WMFW_ADSP2_XM, 0x9f212), 935 + WMFW_ADSP2_XM, alg_id), 933 936 0, &sid, sizeof(sid)); 934 937 if (!ret) 935 938 ret = cs_dsp_coeff_read_ctrl(cs_dsp_get_ctl(cs_dsp, "AS_SNPSHT_ID", 936 - WMFW_ADSP2_XM, 0x9f212), 939 + WMFW_ADSP2_XM, alg_id), 937 940 0, &tid, sizeof(tid)); 938 941 } 939 942 ··· 995 974 case 0x35A54: 996 975 case 0x35A56: 997 976 case 0x35A57: 977 + cs35l56_base->calibration_controls = &cs35l56_calibration_controls; 998 978 break; 999 979 case 0x35A630: 980 + cs35l56_base->calibration_controls = &cs35l63_calibration_controls; 1000 981 devid = devid >> 4; 1001 982 break; 1002 983 default:
+1 -1
sound/soc/codecs/cs35l56.c
··· 695 695 return ret; 696 696 697 697 ret = cs_amp_write_cal_coeffs(&cs35l56->dsp.cs_dsp, 698 - &cs35l56_calibration_controls, 698 + cs35l56->base.calibration_controls, 699 699 &cs35l56->base.cal_data); 700 700 701 701 wm_adsp_stop(&cs35l56->dsp);
-3
sound/soc/codecs/cs35l56.h
··· 20 20 #define CS35L56_SDW_GEN_INT_MASK_1 0xc1 21 21 #define CS35L56_SDW_INT_MASK_CODEC_IRQ BIT(0) 22 22 23 - #define CS35L56_SDW_INVALID_BUS_SCALE 0xf 24 - 25 23 #define CS35L56_RX_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE) 26 24 #define CS35L56_TX_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE \ 27 25 | SNDRV_PCM_FMTBIT_S32_LE) ··· 50 52 u8 asp_slot_count; 51 53 bool tdm_mode; 52 54 bool sysclk_set; 53 - u8 old_sdw_clock_scale; 54 55 u8 sdw_link_num; 55 56 u8 sdw_unique_id; 56 57 };
+1 -1
sound/soc/codecs/es8389.c
··· 636 636 regmap_write(es8389->regmap, ES8389_ANA_CTL1, 0x59); 637 637 regmap_write(es8389->regmap, ES8389_ADC_EN, 0x00); 638 638 regmap_write(es8389->regmap, ES8389_CLK_OFF1, 0x00); 639 - regmap_write(es8389->regmap, ES8389_RESET, 0x7E); 639 + regmap_write(es8389->regmap, ES8389_RESET, 0x3E); 640 640 regmap_update_bits(es8389->regmap, ES8389_DAC_INV, 0x80, 0x80); 641 641 usleep_range(8000, 8500); 642 642 regmap_update_bits(es8389->regmap, ES8389_DAC_INV, 0x80, 0x00);
+2 -2
sound/soc/codecs/tas2781-i2c.c
··· 910 910 static const struct snd_kcontrol_new tas2781_snd_controls[] = { 911 911 SOC_SINGLE_RANGE_EXT_TLV("Speaker Analog Volume", TAS2781_AMP_LEVEL, 912 912 1, 0, 20, 0, tas2781_amp_getvol, 913 - tas2781_amp_putvol, amp_vol_tlv), 913 + tas2781_amp_putvol, tas2781_amp_tlv), 914 914 SOC_SINGLE_RANGE_EXT_TLV("Speaker Digital Volume", TAS2781_DVC_LVL, 915 915 0, 0, 200, 1, tas2781_digital_getvol, 916 - tas2781_digital_putvol, dvc_tlv), 916 + tas2781_digital_putvol, tas2781_dvc_tlv), 917 917 }; 918 918 919 919 static const struct snd_kcontrol_new tas2781_cali_controls[] = {
+1 -1
sound/usb/stream.c
··· 349 349 u16 cs_len; 350 350 u8 cs_type; 351 351 352 - if (len < sizeof(*p)) 352 + if (len < sizeof(*cs_desc)) 353 353 break; 354 354 cs_len = le16_to_cpu(cs_desc->wLength); 355 355 if (len < cs_len)
+1 -1
sound/usb/validate.c
··· 285 285 /* UAC_VERSION_3, UAC3_EXTENDED_TERMINAL: not implemented yet */ 286 286 FUNC(UAC_VERSION_3, UAC3_MIXER_UNIT, validate_mixer_unit), 287 287 FUNC(UAC_VERSION_3, UAC3_SELECTOR_UNIT, validate_selector_unit), 288 - FUNC(UAC_VERSION_3, UAC_FEATURE_UNIT, validate_uac3_feature_unit), 288 + FUNC(UAC_VERSION_3, UAC3_FEATURE_UNIT, validate_uac3_feature_unit), 289 289 /* UAC_VERSION_3, UAC3_EFFECT_UNIT: not implemented yet */ 290 290 FUNC(UAC_VERSION_3, UAC3_PROCESSING_UNIT, validate_processing_unit), 291 291 FUNC(UAC_VERSION_3, UAC3_EXTENSION_UNIT, validate_processing_unit),