sound fixes for 4.18-rc5

Just a few HD-auio fixes: one fix for a possible mutex deadlock at
 HDMI hotplug handling is somewhat subtle and delicate, while the
 rest are usual device-specific quirks.
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAltHb34OHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE/J3g//f6ZawZBWUiA2rcwzEEITqK9z4oySucxf+h+r
 8hrgsgGKxDpHPIVP8NeUdKuk30v/1iLT2Qb3BD3TeLu8xN+FmG3tt6V3Nt7IH3xi
 Y4f0oGVlzL8zyOvaY5VvsBdd4gAVSv6fDQj5IcOBgjS5YJJOE7kYKvx/X18q9uLM
 TpaTkcfPrFoCL61/6mYrpnDsuyoFAN4FR8LtWR3+AFrE8NeIxJjQt4ruBpbIFUmN
 U+4/G09y5dS9U25e9PUUSHbrMXJvQFj6qyKMRJeNv9FaHSqm0sOIY+Ft5ZAeRQTf
 J12H+Wuz5jy53+ufl4TD7WMY/QqCua2He+4HAn7w2oD4MQz6r7PTQP31mMlJvbGe
 zUvELpnt9QleP8Wo4Ldf78hEN0XZm9ULIV0k5f9tWOrGyJQD2DaQxmEfhwCkOMhO
 +t+9VCJIp9G5wd9uytckiK2M0oBC4mgflHDHySrJV/QOQO2r4J03O7J0UjjoC4uK
 DqPqv7wXLNIkOXemnZwVfu2iAFbmGllV4v0hjTGcjX1BBFP9t1KKK6Uiojen9ivM
 N4trQ+3hWaBgBUysMNpO7HhxFEJiGPHRgrRnYoe+MwXEzuWWL4g28Ym6+gm9a9oo
 WNf5crKTiw7/bS7kcGCX5jV/QTzCTxLc7EnUbudmtZTlWG2vYtYT40lAiBh5Q8ut
 9Zonzy0=
 =La+f
 -----END PGP SIGNATURE-----

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

Pull sound fixes from Takashi Iwai:
 "Just a few HD-auio fixes: one fix for a possible mutex deadlock at
  HDMI hotplug handling is somewhat subtle and delicate, while the rest
  are usual device-specific quirks"

* tag 'sound-4.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda/ca0132: Update a pci quirk device name
  ALSA: hda/ca0132: Add Recon3Di quirk for Gigabyte G1.Sniper Z97
  ALSA: hda/realtek - two more lenovo models need fixup of MIC_LOCATION
  ALSA: hda - Handle pm failure during hotplug
This commit is contained in:
Linus Torvalds 2018-07-13 11:36:46 -07:00
commit a0092e5ec6
3 changed files with 21 additions and 7 deletions

View File

@ -1048,7 +1048,8 @@ static const struct snd_pci_quirk ca0132_quirks[] = {
SND_PCI_QUIRK(0x1102, 0x0010, "Sound Blaster Z", QUIRK_SBZ),
SND_PCI_QUIRK(0x1102, 0x0023, "Sound Blaster Z", QUIRK_SBZ),
SND_PCI_QUIRK(0x1458, 0xA016, "Recon3Di", QUIRK_R3DI),
SND_PCI_QUIRK(0x1458, 0xA036, "Recon3Di", QUIRK_R3DI),
SND_PCI_QUIRK(0x1458, 0xA026, "Gigabyte G1.Sniper Z97", QUIRK_R3DI),
SND_PCI_QUIRK(0x1458, 0xA036, "Gigabyte GA-Z170X-Gaming 7", QUIRK_R3DI),
{}
};

View File

@ -33,6 +33,7 @@
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <sound/core.h>
#include <sound/jack.h>
#include <sound/asoundef.h>
@ -764,8 +765,10 @@ static void check_presence_and_report(struct hda_codec *codec, hda_nid_t nid,
if (pin_idx < 0)
return;
mutex_lock(&spec->pcm_lock);
if (hdmi_present_sense(get_pin(spec, pin_idx), 1))
snd_hda_jack_report_sync(codec);
mutex_unlock(&spec->pcm_lock);
}
static void jack_callback(struct hda_codec *codec,
@ -1628,21 +1631,23 @@ static void sync_eld_via_acomp(struct hda_codec *codec,
static bool hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll)
{
struct hda_codec *codec = per_pin->codec;
struct hdmi_spec *spec = codec->spec;
int ret;
/* no temporary power up/down needed for component notifier */
if (!codec_has_acomp(codec))
snd_hda_power_up_pm(codec);
if (!codec_has_acomp(codec)) {
ret = snd_hda_power_up_pm(codec);
if (ret < 0 && pm_runtime_suspended(hda_codec_dev(codec))) {
snd_hda_power_down_pm(codec);
return false;
}
}
mutex_lock(&spec->pcm_lock);
if (codec_has_acomp(codec)) {
sync_eld_via_acomp(codec, per_pin);
ret = false; /* don't call snd_hda_jack_report_sync() */
} else {
ret = hdmi_present_sense_via_verbs(per_pin, repoll);
}
mutex_unlock(&spec->pcm_lock);
if (!codec_has_acomp(codec))
snd_hda_power_down_pm(codec);
@ -1654,12 +1659,16 @@ static void hdmi_repoll_eld(struct work_struct *work)
{
struct hdmi_spec_per_pin *per_pin =
container_of(to_delayed_work(work), struct hdmi_spec_per_pin, work);
struct hda_codec *codec = per_pin->codec;
struct hdmi_spec *spec = codec->spec;
if (per_pin->repoll_count++ > 6)
per_pin->repoll_count = 0;
mutex_lock(&spec->pcm_lock);
if (hdmi_present_sense(per_pin, per_pin->repoll_count))
snd_hda_jack_report_sync(per_pin->codec);
mutex_unlock(&spec->pcm_lock);
}
static void intel_haswell_fixup_connect_list(struct hda_codec *codec,

View File

@ -6612,7 +6612,6 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
SND_PCI_QUIRK(0x17aa, 0x312a, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
SND_PCI_QUIRK(0x17aa, 0x312f, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
SND_PCI_QUIRK(0x17aa, 0x3136, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
SND_PCI_QUIRK(0x17aa, 0x313c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC),
@ -6796,6 +6795,11 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
{0x1a, 0x02a11040},
{0x1b, 0x01014020},
{0x21, 0x0221101f}),
SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION,
{0x14, 0x90170110},
{0x19, 0x02a11020},
{0x1a, 0x02a11030},
{0x21, 0x0221101f}),
SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
{0x12, 0x90a60140},
{0x14, 0x90170110},