sound fixes for 4.8-rc2

A regression fix of HD-audio runtime PM and two USB quirks.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIrBAABCAAVBQJXrZczDhx0aXdhaUBzdXNlLmRlAAoJEGwxgFQ9KSmkpfgP/R1H
 NdG0cPQ1J3V6Js89ZtaKUhmB+5by0fUy0v4ABwsDG2NbFRZZX8zs+im2lRpTz5JY
 pK7Oqy+pqpe1nkIOMR6PF66hwqhL/O78iC23/wOrsuGZeYHVmbT8P871MOOts4EC
 PSv5L4QSdSV6ahGYdT7io7YWeBZFoPdmTNd3nqcWPks3gcuAtBQiOOc7aIHQjevf
 HhURMwiHeVnyQEJ1lb+R5wJGa5+clH2CaKnU+Fd/fUxEfM/bGaxvrTv9P186yA+a
 T/dOCS7cenCWmnYWZEQocUXWRUHflwBwFn/wEHCpwrbO1xFWZiHet5SgbxtyYShn
 RbfJ5BL/niGQ43RGkoJCyq/gIrRnHd1WoBLGV5guoD1BFLKFWtOcJYIJ6JbEfRI5
 1qAIRvWFsVq5PT5hKTYFq1gbxa2Rv+gMe3M6+8fRWD+FSJ1deS9zPTFO7MpYEOel
 xypQCfKDzmsCS00O6EU88NrTRUNSwJMMrsbbpBylmmCnQkKXqPnxGGuueHgAtuFy
 yp91zz0EdPHNcjQHTb2Hb4RxKLuy4J/PxtnWuIb06+VOLQAKFk/TLwyq4aVxqkSP
 L8QyFRHgd97b5VSPWdXVBlTrk098nYfLirS9WWSpy13aLrfTIAwuXWNIw64PR92s
 +5ZxtSjxOVXDAEyNTBHXf6DqmnLFuIlT4FFuXqF6
 =eGih
 -----END PGP SIGNATURE-----

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

Pull sound fixes from Takashi Iwai:
 "A regression fix of HD-audio runtime PM and two USB quirks"

* tag 'sound-4.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Manage power well properly for resume
  ALSA: usb-audio: Add quirk for ELP HD USB Camera
  ALSA: usb-audio: Add a sample rate quirk for Creative Live! Cam Socialize HD (VF0610)
This commit is contained in:
Linus Torvalds 2016-08-12 12:26:59 -07:00
commit 86fc048823
2 changed files with 22 additions and 12 deletions

View File

@ -906,20 +906,23 @@ static int azx_resume(struct device *dev)
struct snd_card *card = dev_get_drvdata(dev);
struct azx *chip;
struct hda_intel *hda;
struct hdac_bus *bus;
if (!card)
return 0;
chip = card->private_data;
hda = container_of(chip, struct hda_intel, chip);
bus = azx_bus(chip);
if (chip->disabled || hda->init_failed || !chip->running)
return 0;
if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL
&& hda->need_i915_power) {
snd_hdac_display_power(azx_bus(chip), true);
snd_hdac_i915_set_bclk(azx_bus(chip));
if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) {
snd_hdac_display_power(bus, true);
if (hda->need_i915_power)
snd_hdac_i915_set_bclk(bus);
}
if (chip->msi)
if (pci_enable_msi(pci) < 0)
chip->msi = 0;
@ -929,6 +932,11 @@ static int azx_resume(struct device *dev)
hda_intel_init_chip(chip, true);
/* power down again for link-controlled chips */
if ((chip->driver_caps & AZX_DCAPS_I915_POWERWELL) &&
!hda->need_i915_power)
snd_hdac_display_power(bus, false);
snd_power_change_state(card, SNDRV_CTL_POWER_D0);
trace_azx_resume(chip);
@ -1008,6 +1016,7 @@ static int azx_runtime_resume(struct device *dev)
chip = card->private_data;
hda = container_of(chip, struct hda_intel, chip);
bus = azx_bus(chip);
if (chip->disabled || hda->init_failed)
return 0;
@ -1015,15 +1024,9 @@ static int azx_runtime_resume(struct device *dev)
return 0;
if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) {
bus = azx_bus(chip);
if (hda->need_i915_power) {
snd_hdac_display_power(bus, true);
snd_hdac_display_power(bus, true);
if (hda->need_i915_power)
snd_hdac_i915_set_bclk(bus);
} else {
/* toggle codec wakeup bit for STATESTS read */
snd_hdac_set_codec_wakeup(bus, true);
snd_hdac_set_codec_wakeup(bus, false);
}
}
/* Read STATESTS before controller reset */
@ -1043,6 +1046,11 @@ static int azx_runtime_resume(struct device *dev)
azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) &
~STATESTS_INT_MASK);
/* power down again for link-controlled chips */
if ((chip->driver_caps & AZX_DCAPS_I915_POWERWELL) &&
!hda->need_i915_power)
snd_hdac_display_power(bus, false);
trace_azx_runtime_resume(chip);
return 0;
}

View File

@ -1128,6 +1128,7 @@ bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip)
{
/* devices which do not support reading the sample rate. */
switch (chip->usb_id) {
case USB_ID(0x041E, 0x4080): /* Creative Live Cam VF0610 */
case USB_ID(0x045E, 0x075D): /* MS Lifecam Cinema */
case USB_ID(0x045E, 0x076D): /* MS Lifecam HD-5000 */
case USB_ID(0x045E, 0x076E): /* MS Lifecam HD-5001 */
@ -1138,6 +1139,7 @@ bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip)
case USB_ID(0x047F, 0xAA05): /* Plantronics DA45 */
case USB_ID(0x04D8, 0xFEEA): /* Benchmark DAC1 Pre */
case USB_ID(0x0556, 0x0014): /* Phoenix Audio TMX320VC */
case USB_ID(0x05A3, 0x9420): /* ELP HD USB Camera */
case USB_ID(0x074D, 0x3553): /* Outlaw RR2150 (Micronas UAC3553B) */
case USB_ID(0x1de7, 0x0013): /* Phoenix Audio MT202exe */
case USB_ID(0x1de7, 0x0014): /* Phoenix Audio TMX320 */