sound fixes for 4.18-rc3
Linus,
please pull sound fixes for v4.18-rc3 from:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-4.18-rc3
The topmost commit is c9a4c63888dbb79ce4d068ca1dd8b05bc3f156b1
----------------------------------------------------------------
sound fixes for 4.18-rc3
Over a dozen of changes, but all small and clear fixes. A half of them are the regression fixes for CA0132 HD-audio codec, and the rest are, again, a few more fixups for HD-audio, two UBSAN fixes in the core ioctls, and a trivial fix in the error path handling in lx6464es driver.
----------------------------------------------------------------
Alastair Bridgewater (6):
ALSA: hda/ca0132: Delete pointless assignments to struct auto_pin_cfg fields
ALSA: hda/ca0132: Delete redundant UNSOL event requests
ALSA: hda/ca0132: Restore behavior of QUIRK_ALIENWARE
ALSA: hda/ca0132: Don't test for QUIRK_NONE
ALSA: hda/ca0132: Restore PCM Analog Mic-In2
ALSA: hda/ca0132: Fix DMic data rate for Alienware M17x R4
Colin Ian King (1):
ALSA: hda/ca0132: make array ca0132_alt_chmaps static
Dan Carpenter (1):
ALSA: lx6464es: Missing error code in snd_lx6464es_create()
Hui Wang (1):
ALSA: hda/realtek - Fix the problem of two front mics on more machines
Takashi Iwai (5):
ALSA: hda/realtek - Fix pop noise on Lenovo P50 & co
ALSA: hda - Force to link down at runtime suspend on ATI/AMD HDMI
ALSA: hda/realtek - Add a quirk for FSC ESPRIMO U9210
ALSA: timer: Fix UBSAN warning at SNDRV_TIMER_IOCTL_NEXT_DEVICE ioctl
ALSA: seq: Fix UBSAN warning at SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT ioctl
--- sound/core/seq/seq_clientmgr.c | 3 +- sound/core/timer.c | 2 +- sound/pci/hda/hda_codec.c | 5 ++-- sound/pci/hda/hda_codec.h | 1 + sound/pci/hda/patch_ca0132.c | 64 +++++++++++++++--------------------------- sound/pci/hda/patch_hdmi.c | 5 ++++ sound/pci/hda/patch_realtek.c | 20 +++++++++++-- sound/pci/lx6464es/lx6464es.c | 1 + 8 files changed, 53 insertions(+), 48 deletions(-)
sound/core/seq/seq_clientmgr.c +2 -1
@@ -2004,7 +2004,8 @@ static int snd_seq_ioctl_query_next_client(struct snd_seq_client *client,struct snd_seq_client *cptr =NULL ;/* search for next client */ - info->client++; +if (info->client <INT_MAX ) + info->client++;if (info->client <0 ) info->client =0 ;for (; info->client <SNDRV_SEQ_MAX_CLIENTS ; info->client++) {
sound/core/timer.c +1 -1
@@ -1520,7 +1520,7 @@ static int snd_timer_user_next_device(struct snd_timer_id __user *_tid) }else {if (id.subdevice <0 ) id.subdevice =0 ; -else +else if (id.subdevice <INT_MAX ) id.subdevice++; } }
sound/pci/hda/hda_codec.c +3 -2
@@ -2899,8 +2899,9 @@ static int hda_codec_runtime_suspend(struct device *dev)list_for_each_entry (pcm, &codec->pcm_list_head, list)snd_pcm_suspend_all (pcm->pcm); state =hda_call_codec_suspend (codec); -if (codec_has_clkstop (codec) &&codec_has_epss (codec) && - (state &AC_PWRST_CLK_STOP_OK )) +if (codec->link_down_at_suspend || + (codec_has_clkstop (codec) &&codec_has_epss (codec) && + (state &AC_PWRST_CLK_STOP_OK )))snd_hdac_codec_link_down (&codec->core);snd_hdac_link_power (&codec->core, false);return 0 ;
sound/pci/hda/hda_codec.h +1 -0
@@ -258,6 +258,7 @@ struct hda_codec { unsigned int power_save_node:1; /* advanced PM for each widget */ unsigned int auto_runtime_pm:1; /* enable automatic codec runtime pm */ unsigned int force_pin_prefix:1; /* Add location prefix */ + unsigned int link_down_at_suspend:1; /* link down at runtime suspend */#ifdef CONFIG_PM unsigned long power_on_acct;unsigned long power_off_acct;
sound/pci/hda/patch_ca0132.c +23 -41
152 lines not on this page · raw message
sound/pci/hda/patch_hdmi.c +5 -0
@@ -3741,6 +3741,11 @@ static int patch_atihdmi(struct hda_codec *codec) spec->chmap.channels_max =max (spec->chmap.channels_max,8u ); +/* AMD GPUs have neither EPSS nor CLKSTOP bits, hence preventing +* the link-down as is. Tell the core to allow it. +*/ + codec->link_down_at_suspend =1 ; +return 0 ; }
sound/pci/hda/patch_realtek.c +17 -3
@@ -2545,6 +2545,7 @@ static const struct snd_pci_quirk alc262_fixup_tbl[] = {SND_PCI_QUIRK (0x10cf ,0x1397 ,"Fujitsu Lifebook S7110" ,ALC262_FIXUP_FSC_S7110 ),SND_PCI_QUIRK (0x10cf ,0x142d ,"Fujitsu Lifebook E8410" ,ALC262_FIXUP_BENQ ),SND_PCI_QUIRK (0x10f1 ,0x2915 ,"Tyan Thunder n6650W" ,ALC262_FIXUP_TYAN ), +SND_PCI_QUIRK (0x1734 ,0x1141 ,"FSC ESPRIMO U9210" ,ALC262_FIXUP_FSC_H270 ),SND_PCI_QUIRK (0x1734 ,0x1147 ,"FSC Celsius H270" ,ALC262_FIXUP_FSC_H270 ),SND_PCI_QUIRK (0x17aa ,0x384e ,"Lenovo 3000" ,ALC262_FIXUP_LENOVO_3000 ), SND_PCI_QUIRK(0x17ff, 0x0560, "Benq ED8", ALC262_FIXUP_BENQ),
@@ -4995,7 +4996,6 @@ static void alc_fixup_tpt440_dock(struct hda_codec *codec,struct alc_spec *spec = codec->spec;if (action ==HDA_FIXUP_ACT_PRE_PROBE ) { - spec->shutup = alc_no_shutup;/* reduce click noise */ spec->reboot_notify = alc_d3_at_reboot;/* reduce noise */ spec->parse_flags =HDA_PINCFG_NO_HP_FIXUP ; codec->power_save_node =0 ;/* avoid click noises */
@@ -5394,6 +5394,13 @@ static void alc274_fixup_bind_dacs(struct hda_codec *codec,/* for hda_fixup_thinkpad_acpi() */ #include "thinkpad_helper.c" +static void alc_fixup_thinkpad_acpi (struct hda_codec *codec, +const struct hda_fixup *fix,int action) +{ +alc_fixup_no_shutup (codec, fix, action);/* reduce click noise */ +hda_fixup_thinkpad_acpi (codec, fix, action); +} +/* for dell wmi mic mute led */ #include "dell_wmi_helper.c"
@@ -5946,7 +5953,7 @@ static const struct hda_fixup alc269_fixups[] = { }, [ALC269_FIXUP_THINKPAD_ACPI] = { .type = HDA_FIXUP_FUNC, - .v.func = hda_fixup_thinkpad_acpi, + .v.func = alc_fixup_thinkpad_acpi, .chained = true, .chain_id = ALC269_FIXUP_SKU_IGNORE, },
@@ -6603,8 +6610,9 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x17aa ,0x30bb ,"ThinkCentre AIO" ,ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY ),SND_PCI_QUIRK (0x17aa ,0x30e2 ,"ThinkCentre AIO" ,ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY ),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 ,0x3138 ,"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),
@@ -6782,6 +6790,12 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { {0x14, 0x90170110}, {0x19, 0x02a11030}, {0x21, 0x02211020}), + SND_HDA_PIN_QUIRK(0x10ec0235, 0x17aa, "Lenovo", ALC294_FIXUP_LENOVO_MIC_LOCATION, + {0x14, 0x90170110}, + {0x19, 0x02a11030}, + {0x1a, 0x02a11040}, + {0x1b, 0x01014020}, + {0x21, 0x0221101f}), SND_HDA_PIN_QUIRK(0x10ec0236, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, {0x12, 0x90a60140}, {0x14, 0x90170110},
sound/pci/lx6464es/lx6464es.c +1 -0
@@ -1018,6 +1018,7 @@ static int snd_lx6464es_create(struct snd_card *card, chip->port_dsp_bar =pci_ioremap_bar (pci,2 );if (!chip->port_dsp_bar) {dev_err (card->dev,"cannot remap PCI memory region\n" ); + err = -ENOMEM ; goto remap_pci_failed; }