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

Commit 1618e84a authored by Takashi Iwai's avatar Takashi Iwai
Browse files

Merge branch 'for-linus' into for-next

Since init_failed flag was moved to struct hda_intel, its access in
the commit [4da63c6f: ALSA: hda - Fix broken PM due to incomplete
i915 initialization] is also replaced with hda->init_failed
appropriately.
parents 03fe805a 4da63c6f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -194,7 +194,8 @@ azx_assign_device(struct azx *chip, struct snd_pcm_substream *substream)
				dsp_unlock(azx_dev);
				return azx_dev;
			}
			if (!res)
			if (!res ||
			    (chip->driver_caps & AZX_DCAPS_REVERSE_ASSIGN))
				res = azx_dev;
		}
		dsp_unlock(azx_dev);
+11 −6
Original line number Diff line number Diff line
@@ -272,7 +272,7 @@ enum {
/* quirks for Intel PCH */
#define AZX_DCAPS_INTEL_PCH_NOPM \
	(AZX_DCAPS_SCH_SNOOP | AZX_DCAPS_BUFSIZE | \
	 AZX_DCAPS_COUNT_LPIB_DELAY)
	 AZX_DCAPS_COUNT_LPIB_DELAY | AZX_DCAPS_REVERSE_ASSIGN)

#define AZX_DCAPS_INTEL_PCH \
	(AZX_DCAPS_INTEL_PCH_NOPM | AZX_DCAPS_PM_RUNTIME)
@@ -773,9 +773,10 @@ static int azx_suspend(struct device *dev)
	struct pci_dev *pci = to_pci_dev(dev);
	struct snd_card *card = dev_get_drvdata(dev);
	struct azx *chip = card->private_data;
	struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
	struct azx_pcm *p;

	if (chip->disabled)
	if (chip->disabled || hda->init_failed)
		return 0;

	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
@@ -806,8 +807,9 @@ static int azx_resume(struct device *dev)
	struct pci_dev *pci = to_pci_dev(dev);
	struct snd_card *card = dev_get_drvdata(dev);
	struct azx *chip = card->private_data;
	struct hda_intel *hda = container_of(chip, struct hda_intel, chip);

	if (chip->disabled)
	if (chip->disabled || hda->init_failed)
		return 0;

	if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) {
@@ -843,8 +845,9 @@ static int azx_runtime_suspend(struct device *dev)
{
	struct snd_card *card = dev_get_drvdata(dev);
	struct azx *chip = card->private_data;
	struct hda_intel *hda = container_of(chip, struct hda_intel, chip);

	if (chip->disabled)
	if (chip->disabled || hda->init_failed)
		return 0;

	if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME))
@@ -867,11 +870,12 @@ static int azx_runtime_resume(struct device *dev)
{
	struct snd_card *card = dev_get_drvdata(dev);
	struct azx *chip = card->private_data;
	struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
	struct hda_bus *bus;
	struct hda_codec *codec;
	int status;

	if (chip->disabled)
	if (chip->disabled || hda->init_failed)
		return 0;

	if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME))
@@ -907,8 +911,9 @@ static int azx_runtime_idle(struct device *dev)
{
	struct snd_card *card = dev_get_drvdata(dev);
	struct azx *chip = card->private_data;
	struct hda_intel *hda = container_of(chip, struct hda_intel, chip);

	if (chip->disabled)
	if (chip->disabled || hda->init_failed)
		return 0;

	if (!power_save_controller ||
+1 −0
Original line number Diff line number Diff line
@@ -166,6 +166,7 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 };
#define AZX_DCAPS_BUFSIZE	(1 << 21)	/* no buffer size alignment */
#define AZX_DCAPS_ALIGN_BUFSIZE	(1 << 22)	/* buffer size alignment */
#define AZX_DCAPS_4K_BDLE_BOUNDARY (1 << 23)	/* BDLE in 4k boundary */
#define AZX_DCAPS_REVERSE_ASSIGN (1 << 24)	/* Assign devices in reverse order */
#define AZX_DCAPS_COUNT_LPIB_DELAY  (1 << 25)	/* Take LPIB as delay */
#define AZX_DCAPS_PM_RUNTIME	(1 << 26)	/* runtime PM support */
#define AZX_DCAPS_I915_POWERWELL (1 << 27)	/* HSW i915 powerwell support */
+1 −1
Original line number Diff line number Diff line
@@ -235,6 +235,7 @@ static int hda_tegra_enable_clocks(struct hda_tegra *data)
	return rc;
}

#ifdef CONFIG_PM_SLEEP
static void hda_tegra_disable_clocks(struct hda_tegra *data)
{
	clk_disable_unprepare(data->hda2hdmi_clk);
@@ -242,7 +243,6 @@ static void hda_tegra_disable_clocks(struct hda_tegra *data)
	clk_disable_unprepare(data->hda_clk);
}

#ifdef CONFIG_PM_SLEEP
/*
 * power management
 */
+2 −0
Original line number Diff line number Diff line
@@ -3338,6 +3338,7 @@ static const struct hda_codec_preset snd_hda_preset_hdmi[] = {
{ .id = 0x10de0051, .name = "GPU 51 HDMI/DP",	.patch = patch_nvhdmi },
{ .id = 0x10de0060, .name = "GPU 60 HDMI/DP",	.patch = patch_nvhdmi },
{ .id = 0x10de0067, .name = "MCP67 HDMI",	.patch = patch_nvhdmi_2ch },
{ .id = 0x10de0070, .name = "GPU 70 HDMI/DP",	.patch = patch_nvhdmi },
{ .id = 0x10de0071, .name = "GPU 71 HDMI/DP",	.patch = patch_nvhdmi },
{ .id = 0x10de8001, .name = "MCP73 HDMI",	.patch = patch_nvhdmi_2ch },
{ .id = 0x11069f80, .name = "VX900 HDMI/DP",	.patch = patch_via_hdmi },
@@ -3395,6 +3396,7 @@ MODULE_ALIAS("snd-hda-codec-id:10de0044");
MODULE_ALIAS("snd-hda-codec-id:10de0051");
MODULE_ALIAS("snd-hda-codec-id:10de0060");
MODULE_ALIAS("snd-hda-codec-id:10de0067");
MODULE_ALIAS("snd-hda-codec-id:10de0070");
MODULE_ALIAS("snd-hda-codec-id:10de0071");
MODULE_ALIAS("snd-hda-codec-id:10de8001");
MODULE_ALIAS("snd-hda-codec-id:11069f80");