sound fixes for 4.18-rc5
Linus,
please pull sound fixes for v4.18-rc5 from:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-4.18-rc5
The topmost commit is c5a59d2477abf04e1b77152bef49383fd212da8d
----------------------------------------------------------------
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.
----------------------------------------------------------------
Alastair Bridgewater (2):
ALSA: hda/ca0132: Add Recon3Di quirk for Gigabyte G1.Sniper Z97
ALSA: hda/ca0132: Update a pci quirk device name
Chris Wilson (1):
ALSA: hda - Handle pm failure during hotplug
Hui Wang (1):
ALSA: hda/realtek - two more lenovo models need fixup of MIC_LOCATION
--- sound/pci/hda/patch_ca0132.c | 3 ++- sound/pci/hda/patch_hdmi.c | 19 ++++++++++++++----- sound/pci/hda/patch_realtek.c | 6 +++++- 3 files changed, 21 insertions(+), 7 deletions(-)
sound/pci/hda/patch_ca0132.c +2 -1
@@ -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), {} };
sound/pci/hda/patch_hdmi.c +14 -5
@@ -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,
sound/pci/hda/patch_realtek.c +5 -1
@@ -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},