Commit 5c94bdab authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull sound fixes from Takashi Iwai:
 "A collection of small fixes, nothing really stands out:

   - Usual HD-audio quirks / device-specific fixes

   - Kconfig dependency fix for UM

   - A series of minor fixes for SoundWire

   - Updates of USB-audio LINE6 contact address"

* tag 'sound-6.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda/conexant - Use cached pin control for Node 0x1d on HP EliteOne 1000 G2
  ALSA/hda: intel-sdw-acpi: add support for sdw-manager-list property read
  ALSA/hda: intel-sdw-acpi: simplify sdw-master-count property read
  ALSA/hda: intel-sdw-acpi: fetch fwnode once in sdw_intel_scan_controller()
  ALSA/hda: intel-sdw-acpi: cleanup sdw_intel_scan_controller
  ALSA: hda/tas2781: Add new quirk for Lenovo, ASUS, Dell projects
  ALSA: scarlett2: Add error check after retrieving PEQ filter values
  ALSA: hda/cs8409: Fix possible NULL dereference
  sound: Make CONFIG_SND depend on INDIRECT_IOMEM instead of UML
  ALSA: line6: update contact information
  ALSA: usb-audio: Fix NULL pointer deref in snd_usb_power_domain_set()
  ALSA: hda/conexant - Fix audio routing for HP EliteOne 1000 G2
  ALSA: hda: Sound support for HP Spectre x360 16 inch model 2024
parents 07d6bf63 164cd0e0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -227,7 +227,7 @@ struct sdw_intel_ops {
/**
 * struct sdw_intel_acpi_info - Soundwire Intel information found in ACPI tables
 * @handle: ACPI controller handle
 * @count: link count found with "sdw-master-count" property
 * @count: link count found with "sdw-master-count" or "sdw-manager-list" property
 * @link_mask: bit-wise mask listing links enabled by BIOS menu
 *
 * this structure could be expanded to e.g. provide all the _ADR
+1 −1
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
menuconfig SOUND
	tristate "Sound card support"
	depends on HAS_IOMEM || UML
	depends on HAS_IOMEM || INDIRECT_IOMEM
	help
	  If you have a sound card in your computer, i.e. if it can say more
	  than an occasional beep, say Y.
+22 −11
Original line number Diff line number Diff line
@@ -56,18 +56,21 @@ static int
sdw_intel_scan_controller(struct sdw_intel_acpi_info *info)
{
	struct acpi_device *adev = acpi_fetch_acpi_dev(info->handle);
	u8 count, i;
	struct fwnode_handle *fwnode;
	unsigned long list;
	unsigned int i;
	u32 count;
	u32 tmp;
	int ret;

	if (!adev)
		return -EINVAL;

	/* Found controller, find links supported */
	count = 0;
	ret = fwnode_property_read_u8_array(acpi_fwnode_handle(adev),
					    "mipi-sdw-master-count", &count, 1);
	fwnode = acpi_fwnode_handle(adev);

	/*
	 * Found controller, find links supported
	 *
	 * In theory we could check the number of links supported in
	 * hardware, but in that step we cannot assume SoundWire IP is
	 * powered.
@@ -78,11 +81,19 @@ sdw_intel_scan_controller(struct sdw_intel_acpi_info *info)
	 *
	 * We will check the hardware capabilities in the startup() step
	 */

	ret = fwnode_property_read_u32(fwnode, "mipi-sdw-manager-list", &tmp);
	if (ret) {
		ret = fwnode_property_read_u32(fwnode, "mipi-sdw-master-count", &count);
		if (ret) {
			dev_err(&adev->dev,
			"Failed to read mipi-sdw-master-count: %d\n", ret);
		return -EINVAL;
				"Failed to read mipi-sdw-master-count: %d\n",
				ret);
			return ret;
		}
		list = GENMASK(count - 1, 0);
	} else {
		list = tmp;
		count = hweight32(list);
	}

	/* Check count is within bounds */
@@ -101,14 +112,14 @@ sdw_intel_scan_controller(struct sdw_intel_acpi_info *info)
	info->count = count;
	info->link_mask = 0;

	for (i = 0; i < count; i++) {
	for_each_set_bit(i, &list, SDW_INTEL_MAX_LINKS) {
		if (ctrl_link_mask && !(ctrl_link_mask & BIT(i))) {
			dev_dbg(&adev->dev,
				"Link %d masked, will not be enabled\n", i);
			continue;
		}

		if (!is_link_enabled(acpi_fwnode_handle(adev), i)) {
		if (!is_link_enabled(fwnode, i)) {
			dev_dbg(&adev->dev,
				"Link %d not selected in firmware\n", i);
			continue;
+19 −0
Original line number Diff line number Diff line
@@ -303,6 +303,7 @@ enum {
	CXT_FIXUP_HP_SPECTRE,
	CXT_FIXUP_HP_GATE_MIC,
	CXT_FIXUP_MUTE_LED_GPIO,
	CXT_FIXUP_HP_ELITEONE_OUT_DIS,
	CXT_FIXUP_HP_ZBOOK_MUTE_LED,
	CXT_FIXUP_HEADSET_MIC,
	CXT_FIXUP_HP_MIC_NO_PRESENCE,
@@ -320,6 +321,19 @@ static void cxt_fixup_stereo_dmic(struct hda_codec *codec,
	spec->gen.inv_dmic_split = 1;
}

/* fix widget control pin settings */
static void cxt_fixup_update_pinctl(struct hda_codec *codec,
				   const struct hda_fixup *fix, int action)
{
	if (action == HDA_FIXUP_ACT_PROBE) {
		/* Unset OUT_EN for this Node pin, leaving only HP_EN.
		 * This is the value stored in the codec register after
		 * the correct initialization of the previous windows boot.
		 */
		snd_hda_set_pin_ctl_cache(codec, 0x1d, AC_PINCTL_HP_EN);
	}
}

static void cxt5066_increase_mic_boost(struct hda_codec *codec,
				   const struct hda_fixup *fix, int action)
{
@@ -971,6 +985,10 @@ static const struct hda_fixup cxt_fixups[] = {
		.type = HDA_FIXUP_FUNC,
		.v.func = cxt_fixup_mute_led_gpio,
	},
	[CXT_FIXUP_HP_ELITEONE_OUT_DIS] = {
		.type = HDA_FIXUP_FUNC,
		.v.func = cxt_fixup_update_pinctl,
	},
	[CXT_FIXUP_HP_ZBOOK_MUTE_LED] = {
		.type = HDA_FIXUP_FUNC,
		.v.func = cxt_fixup_hp_zbook_mute_led,
@@ -1061,6 +1079,7 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {
	SND_PCI_QUIRK(0x103c, 0x83b2, "HP EliteBook 840 G5", CXT_FIXUP_HP_DOCK),
	SND_PCI_QUIRK(0x103c, 0x83b3, "HP EliteBook 830 G5", CXT_FIXUP_HP_DOCK),
	SND_PCI_QUIRK(0x103c, 0x83d3, "HP ProBook 640 G4", CXT_FIXUP_HP_DOCK),
	SND_PCI_QUIRK(0x103c, 0x83e5, "HP EliteOne 1000 G2", CXT_FIXUP_HP_ELITEONE_OUT_DIS),
	SND_PCI_QUIRK(0x103c, 0x8402, "HP ProBook 645 G4", CXT_FIXUP_MUTE_LED_GPIO),
	SND_PCI_QUIRK(0x103c, 0x8427, "HP ZBook Studio G5", CXT_FIXUP_HP_ZBOOK_MUTE_LED),
	SND_PCI_QUIRK(0x103c, 0x844f, "HP ZBook Studio G5", CXT_FIXUP_HP_ZBOOK_MUTE_LED),
+3 −2
Original line number Diff line number Diff line
@@ -1403,6 +1403,7 @@ void dolphin_fixups(struct hda_codec *codec, const struct hda_fixup *fix, int ac
		kctrl = snd_hda_gen_add_kctl(&spec->gen, "Line Out Playback Volume",
					     &cs42l42_dac_volume_mixer);
		/* Update Line Out kcontrol template */
		if (kctrl)
			kctrl->private_value = HDA_COMPOSE_AMP_VAL_OFS(DOLPHIN_HP_PIN_NID, 3, CS8409_CODEC1,
					       HDA_OUTPUT, CS42L42_VOL_DAC) | HDA_AMP_VAL_MIN_MUTE;
		cs8409_enable_ur(codec, 0);
Loading