Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed3ac021 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull sound fixes from Takashi Iwai:
 "Slightly more than expected as rc7, but all are reasonablly small
  fixes.  A few additions of HD-audio fixup entries, a couple of other
  regression fixes including a revert, and a few other trivial
  oneliners."

* tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ASoC: sh: fix migor.c compilation
  ALSA: HDA: Lessen CPU usage when waiting for chip to respond
  Revert "ALSA: hda - Set codec to D3 forcibly even if not used"
  ALSA: hda/realtek - Call alc_auto_parse_customize_define() always after fixup
  ALSA: hdsp - Provide ioctl_compat
  ALSA: hda/realtek - Add missing CD-input pin for MSI-7350 mobo
  ALSA: hda/realtek - Add a fixup for Acer Aspire 5739G
  ALSA: echoaudio: Remove incorrect part of assertion
parents b7dafa0e 9ea3356d
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -475,7 +475,7 @@ static int load_firmware(struct echoaudio *chip)
	const struct firmware *fw;
	const struct firmware *fw;
	int box_type, err;
	int box_type, err;


	if (snd_BUG_ON(!chip->dsp_code_to_load || !chip->comm_page))
	if (snd_BUG_ON(!chip->comm_page))
		return -EPERM;
		return -EPERM;


	/* See if the ASIC is present and working - only if the DSP is already loaded */
	/* See if the ASIC is present and working - only if the DSP is already loaded */
+0 −4
Original line number Original line Diff line number Diff line
@@ -5444,10 +5444,6 @@ int snd_hda_suspend(struct hda_bus *bus)
	list_for_each_entry(codec, &bus->codec_list, list) {
	list_for_each_entry(codec, &bus->codec_list, list) {
		if (hda_codec_is_power_on(codec))
		if (hda_codec_is_power_on(codec))
			hda_call_codec_suspend(codec);
			hda_call_codec_suspend(codec);
		else /* forcibly change the power to D3 even if not used */
			hda_set_power_state(codec,
					    codec->afg ? codec->afg : codec->mfg,
					    AC_PWRST_D3);
		if (codec->patch_ops.post_suspend)
		if (codec->patch_ops.post_suspend)
			codec->patch_ops.post_suspend(codec);
			codec->patch_ops.post_suspend(codec);
	}
	}
+17 −3
Original line number Original line Diff line number Diff line
@@ -783,11 +783,13 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus,
{
{
	struct azx *chip = bus->private_data;
	struct azx *chip = bus->private_data;
	unsigned long timeout;
	unsigned long timeout;
	unsigned long loopcounter;
	int do_poll = 0;
	int do_poll = 0;


 again:
 again:
	timeout = jiffies + msecs_to_jiffies(1000);
	timeout = jiffies + msecs_to_jiffies(1000);
	for (;;) {

	for (loopcounter = 0;; loopcounter++) {
		if (chip->polling_mode || do_poll) {
		if (chip->polling_mode || do_poll) {
			spin_lock_irq(&chip->reg_lock);
			spin_lock_irq(&chip->reg_lock);
			azx_update_rirb(chip);
			azx_update_rirb(chip);
@@ -803,7 +805,7 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus,
		}
		}
		if (time_after(jiffies, timeout))
		if (time_after(jiffies, timeout))
			break;
			break;
		if (bus->needs_damn_long_delay)
		if (bus->needs_damn_long_delay || loopcounter > 3000)
			msleep(2); /* temporary workaround */
			msleep(2); /* temporary workaround */
		else {
		else {
			udelay(10);
			udelay(10);
@@ -2351,6 +2353,17 @@ static void azx_power_notify(struct hda_bus *bus)
 * power management
 * power management
 */
 */


static int snd_hda_codecs_inuse(struct hda_bus *bus)
{
	struct hda_codec *codec;

	list_for_each_entry(codec, &bus->codec_list, list) {
		if (snd_hda_codec_needs_resume(codec))
			return 1;
	}
	return 0;
}

static int azx_suspend(struct pci_dev *pci, pm_message_t state)
static int azx_suspend(struct pci_dev *pci, pm_message_t state)
{
{
	struct snd_card *card = pci_get_drvdata(pci);
	struct snd_card *card = pci_get_drvdata(pci);
@@ -2397,6 +2410,7 @@ static int azx_resume(struct pci_dev *pci)
		return -EIO;
		return -EIO;
	azx_init_pci(chip);
	azx_init_pci(chip);


	if (snd_hda_codecs_inuse(chip->bus))
		azx_init_chip(chip, 1);
		azx_init_chip(chip, 1);


	snd_hda_resume(chip->bus);
	snd_hda_resume(chip->bus);
+10 −6
Original line number Original line Diff line number Diff line
@@ -5405,6 +5405,8 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
	SND_PCI_QUIRK(0x1025, 0x0142, "Acer Aspire 7730G",
	SND_PCI_QUIRK(0x1025, 0x0142, "Acer Aspire 7730G",
		      ALC882_FIXUP_ACER_ASPIRE_4930G),
		      ALC882_FIXUP_ACER_ASPIRE_4930G),
	SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210),
	SND_PCI_QUIRK(0x1025, 0x0155, "Packard-Bell M5120", ALC882_FIXUP_PB_M5210),
	SND_PCI_QUIRK(0x1025, 0x021e, "Acer Aspire 5739G",
		      ALC882_FIXUP_ACER_ASPIRE_4930G),
	SND_PCI_QUIRK(0x1025, 0x0259, "Acer Aspire 5935", ALC889_FIXUP_DAC_ROUTE),
	SND_PCI_QUIRK(0x1025, 0x0259, "Acer Aspire 5935", ALC889_FIXUP_DAC_ROUTE),
	SND_PCI_QUIRK(0x1025, 0x026b, "Acer Aspire 8940G", ALC882_FIXUP_ACER_ASPIRE_8930G),
	SND_PCI_QUIRK(0x1025, 0x026b, "Acer Aspire 8940G", ALC882_FIXUP_ACER_ASPIRE_8930G),
	SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736),
	SND_PCI_QUIRK(0x1025, 0x0296, "Acer Aspire 7736z", ALC882_FIXUP_ACER_ASPIRE_7736),
@@ -5438,6 +5440,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
	SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_IMAC91_VREF),
	SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_IMAC91_VREF),


	SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD),
	SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD),
	SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD),
	SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
	SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
	SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3", ALC889_FIXUP_CD),
	SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3", ALC889_FIXUP_CD),
	SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
	SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
@@ -5638,13 +5641,13 @@ static int patch_alc262(struct hda_codec *codec)
	snd_hda_codec_write(codec, 0x1a, 0, AC_VERB_SET_PROC_COEF, tmp | 0x80);
	snd_hda_codec_write(codec, 0x1a, 0, AC_VERB_SET_PROC_COEF, tmp | 0x80);
	}
	}
#endif
#endif
	alc_auto_parse_customize_define(codec);

	alc_fix_pll_init(codec, 0x20, 0x0a, 10);
	alc_fix_pll_init(codec, 0x20, 0x0a, 10);


	alc_pick_fixup(codec, NULL, alc262_fixup_tbl, alc262_fixups);
	alc_pick_fixup(codec, NULL, alc262_fixup_tbl, alc262_fixups);
	alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);
	alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);


	alc_auto_parse_customize_define(codec);

	/* automatic parse from the BIOS config */
	/* automatic parse from the BIOS config */
	err = alc262_parse_auto_config(codec);
	err = alc262_parse_auto_config(codec);
	if (err < 0)
	if (err < 0)
@@ -6249,8 +6252,6 @@ static int patch_alc269(struct hda_codec *codec)


	spec->mixer_nid = 0x0b;
	spec->mixer_nid = 0x0b;


	alc_auto_parse_customize_define(codec);

	err = alc_codec_rename_from_preset(codec);
	err = alc_codec_rename_from_preset(codec);
	if (err < 0)
	if (err < 0)
		goto error;
		goto error;
@@ -6283,6 +6284,8 @@ static int patch_alc269(struct hda_codec *codec)
		       alc269_fixup_tbl, alc269_fixups);
		       alc269_fixup_tbl, alc269_fixups);
	alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);
	alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);


	alc_auto_parse_customize_define(codec);

	/* automatic parse from the BIOS config */
	/* automatic parse from the BIOS config */
	err = alc269_parse_auto_config(codec);
	err = alc269_parse_auto_config(codec);
	if (err < 0)
	if (err < 0)
@@ -6859,8 +6862,6 @@ static int patch_alc662(struct hda_codec *codec)
	/* handle multiple HPs as is */
	/* handle multiple HPs as is */
	spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
	spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;


	alc_auto_parse_customize_define(codec);

	alc_fix_pll_init(codec, 0x20, 0x04, 15);
	alc_fix_pll_init(codec, 0x20, 0x04, 15);


	err = alc_codec_rename_from_preset(codec);
	err = alc_codec_rename_from_preset(codec);
@@ -6877,6 +6878,9 @@ static int patch_alc662(struct hda_codec *codec)
	alc_pick_fixup(codec, alc662_fixup_models,
	alc_pick_fixup(codec, alc662_fixup_models,
		       alc662_fixup_tbl, alc662_fixups);
		       alc662_fixup_tbl, alc662_fixups);
	alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);
	alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);

	alc_auto_parse_customize_define(codec);

	/* automatic parse from the BIOS config */
	/* automatic parse from the BIOS config */
	err = alc662_parse_auto_config(codec);
	err = alc662_parse_auto_config(codec);
	if (err < 0)
	if (err < 0)
+1 −0
Original line number Original line Diff line number Diff line
@@ -5170,6 +5170,7 @@ static int snd_hdsp_create_hwdep(struct snd_card *card, struct hdsp *hdsp)
	strcpy(hw->name, "HDSP hwdep interface");
	strcpy(hw->name, "HDSP hwdep interface");


	hw->ops.ioctl = snd_hdsp_hwdep_ioctl;
	hw->ops.ioctl = snd_hdsp_hwdep_ioctl;
	hw->ops.ioctl_compat = snd_hdsp_hwdep_ioctl;


	return 0;
	return 0;
}
}
Loading