From: Sasha Levin Date: Sat, 14 Mar 2020 00:33:15 +0000 (-0400) Subject: fixes for v5.5 X-Git-Tag: v4.19.110~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c323adac2d928780c333ae9a07891f15089ccaaf;p=thirdparty%2Fkernel%2Fstable-queue.git fixes for v5.5 Signed-off-by: Sasha Levin --- diff --git a/queue-5.5/alsa-hda-realtek-add-headset-mic-supported-for-hp-cp.patch b/queue-5.5/alsa-hda-realtek-add-headset-mic-supported-for-hp-cp.patch new file mode 100644 index 00000000000..4d65e7edd5d --- /dev/null +++ b/queue-5.5/alsa-hda-realtek-add-headset-mic-supported-for-hp-cp.patch @@ -0,0 +1,98 @@ +From 4ee1a312090c9653cf5fd0692d6548bcbad17a41 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 17 Jan 2020 14:04:01 +0800 +Subject: ALSA: hda/realtek - Add Headset Mic supported for HP cPC + +From: Kailang Yang + +[ Upstream commit 5af29028fd6db9438b5584ab7179710a0a22569d ] + +HP ALC671 need to support Headset Mic. + +Signed-off-by: Kailang Yang +Link: https://lore.kernel.org/r/06a9d2b176e14706976d6584cbe2d92a@realtek.com +Signed-off-by: Takashi Iwai +Signed-off-by: Sasha Levin +--- + sound/pci/hda/patch_realtek.c | 44 +++++++++++++++++++++++++++++++++++ + 1 file changed, 44 insertions(+) + +diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c +index 9a4e42f44044f..25d0013abcb0e 100644 +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -8513,6 +8513,29 @@ static void alc662_fixup_aspire_ethos_hp(struct hda_codec *codec, + } + } + ++static void alc671_fixup_hp_headset_mic2(struct hda_codec *codec, ++ const struct hda_fixup *fix, int action) ++{ ++ struct alc_spec *spec = codec->spec; ++ ++ static const struct hda_pintbl pincfgs[] = { ++ { 0x19, 0x02a11040 }, /* use as headset mic, with its own jack detect */ ++ { 0x1b, 0x0181304f }, ++ { } ++ }; ++ ++ switch (action) { ++ case HDA_FIXUP_ACT_PRE_PROBE: ++ spec->gen.mixer_nid = 0; ++ spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; ++ snd_hda_apply_pincfgs(codec, pincfgs); ++ break; ++ case HDA_FIXUP_ACT_INIT: ++ alc_write_coef_idx(codec, 0x19, 0xa054); ++ break; ++ } ++} ++ + static const struct coef_fw alc668_coefs[] = { + WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0), + WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80), +@@ -8586,6 +8609,7 @@ enum { + ALC662_FIXUP_LENOVO_MULTI_CODECS, + ALC669_FIXUP_ACER_ASPIRE_ETHOS, + ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET, ++ ALC671_FIXUP_HP_HEADSET_MIC2, + }; + + static const struct hda_fixup alc662_fixups[] = { +@@ -8927,6 +8951,10 @@ static const struct hda_fixup alc662_fixups[] = { + .chained = true, + .chain_id = ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET + }, ++ [ALC671_FIXUP_HP_HEADSET_MIC2] = { ++ .type = HDA_FIXUP_FUNC, ++ .v.func = alc671_fixup_hp_headset_mic2, ++ }, + }; + + static const struct snd_pci_quirk alc662_fixup_tbl[] = { +@@ -9109,6 +9137,22 @@ static const struct snd_hda_pin_quirk alc662_pin_fixup_tbl[] = { + {0x12, 0x90a60130}, + {0x14, 0x90170110}, + {0x15, 0x0321101f}), ++ SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2, ++ {0x14, 0x01014010}, ++ {0x17, 0x90170150}, ++ {0x1b, 0x01813030}, ++ {0x21, 0x02211020}), ++ SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2, ++ {0x14, 0x01014010}, ++ {0x18, 0x01a19040}, ++ {0x1b, 0x01813030}, ++ {0x21, 0x02211020}), ++ SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2, ++ {0x14, 0x01014020}, ++ {0x17, 0x90170110}, ++ {0x18, 0x01a19050}, ++ {0x1b, 0x01813040}, ++ {0x21, 0x02211030}), + {} + }; + +-- +2.20.1 + diff --git a/queue-5.5/alsa-hda-realtek-fixed-one-of-hp-alc671-platform-hea.patch b/queue-5.5/alsa-hda-realtek-fixed-one-of-hp-alc671-platform-hea.patch new file mode 100644 index 00000000000..598b5209c66 --- /dev/null +++ b/queue-5.5/alsa-hda-realtek-fixed-one-of-hp-alc671-platform-hea.patch @@ -0,0 +1,37 @@ +From ceee339fa50a5819bd997418f4e8bbc01e5e7036 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 5 Feb 2020 15:40:01 +0800 +Subject: ALSA: hda/realtek - Fixed one of HP ALC671 platform Headset Mic + supported + +From: Kailang Yang + +[ Upstream commit f2adbae0cb20c8eaf06914b2187043ea944b0aff ] + +HP want to keep BIOS verb table for release platform. +So, it need to add 0x19 pin for quirk. + +Fixes: 5af29028fd6d ("ALSA: hda/realtek - Add Headset Mic supported for HP cPC") +Signed-off-by: Kailang Yang +Link: https://lore.kernel.org/r/74636ccb700a4cbda24c58a99dc430ce@realtek.com +Signed-off-by: Takashi Iwai +Signed-off-by: Sasha Levin +--- + sound/pci/hda/patch_realtek.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c +index 25d0013abcb0e..835af7d2bbd4d 100644 +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -9140,6 +9140,7 @@ static const struct snd_hda_pin_quirk alc662_pin_fixup_tbl[] = { + SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2, + {0x14, 0x01014010}, + {0x17, 0x90170150}, ++ {0x19, 0x02a11060}, + {0x1b, 0x01813030}, + {0x21, 0x02211020}), + SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2, +-- +2.20.1 + diff --git a/queue-5.5/alsa-hda-realtek-more-constifications.patch b/queue-5.5/alsa-hda-realtek-more-constifications.patch new file mode 100644 index 00000000000..d6b7ff65332 --- /dev/null +++ b/queue-5.5/alsa-hda-realtek-more-constifications.patch @@ -0,0 +1,479 @@ +From 5e7825ec8ae0186c9c7da88a668ff9a8f1977c4c Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 5 Jan 2020 15:47:18 +0100 +Subject: ALSA: hda/realtek - More constifications + +From: Takashi Iwai + +[ Upstream commit 6b0f95c49d890440c01a759c767dfe40e2acdbf2 ] + +Apply const prefix to each coef table array. + +Just for minor optimization and no functional changes. + +Link: https://lore.kernel.org/r/20200105144823.29547-4-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Sasha Levin +--- + sound/pci/hda/patch_realtek.c | 118 +++++++++++++++++----------------- + 1 file changed, 59 insertions(+), 59 deletions(-) + +diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c +index 4436ebbea1086..9a4e42f44044f 100644 +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -949,7 +949,7 @@ struct alc_codec_rename_pci_table { + const char *name; + }; + +-static struct alc_codec_rename_table rename_tbl[] = { ++static const struct alc_codec_rename_table rename_tbl[] = { + { 0x10ec0221, 0xf00f, 0x1003, "ALC231" }, + { 0x10ec0269, 0xfff0, 0x3010, "ALC277" }, + { 0x10ec0269, 0xf0f0, 0x2010, "ALC259" }, +@@ -970,7 +970,7 @@ static struct alc_codec_rename_table rename_tbl[] = { + { } /* terminator */ + }; + +-static struct alc_codec_rename_pci_table rename_pci_tbl[] = { ++static const struct alc_codec_rename_pci_table rename_pci_tbl[] = { + { 0x10ec0280, 0x1028, 0, "ALC3220" }, + { 0x10ec0282, 0x1028, 0, "ALC3221" }, + { 0x10ec0283, 0x1028, 0, "ALC3223" }, +@@ -3000,7 +3000,7 @@ static void alc269_shutup(struct hda_codec *codec) + alc_shutup_pins(codec); + } + +-static struct coef_fw alc282_coefs[] = { ++static const struct coef_fw alc282_coefs[] = { + WRITE_COEF(0x03, 0x0002), /* Power Down Control */ + UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */ + WRITE_COEF(0x07, 0x0200), /* DMIC control */ +@@ -3112,7 +3112,7 @@ static void alc282_shutup(struct hda_codec *codec) + alc_write_coef_idx(codec, 0x78, coef78); + } + +-static struct coef_fw alc283_coefs[] = { ++static const struct coef_fw alc283_coefs[] = { + WRITE_COEF(0x03, 0x0002), /* Power Down Control */ + UPDATE_COEF(0x05, 0xff3f, 0x0700), /* FIFO and filter clock */ + WRITE_COEF(0x07, 0x0200), /* DMIC control */ +@@ -4188,7 +4188,7 @@ static void alc269_fixup_hp_line1_mic1_led(struct hda_codec *codec, + } + } + +-static struct coef_fw alc225_pre_hsmode[] = { ++static const struct coef_fw alc225_pre_hsmode[] = { + UPDATE_COEF(0x4a, 1<<8, 0), + UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), + UPDATE_COEF(0x63, 3<<14, 3<<14), +@@ -4201,7 +4201,7 @@ static struct coef_fw alc225_pre_hsmode[] = { + + static void alc_headset_mode_unplugged(struct hda_codec *codec) + { +- static struct coef_fw coef0255[] = { ++ static const struct coef_fw coef0255[] = { + WRITE_COEF(0x1b, 0x0c0b), /* LDO and MISC control */ + WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */ + UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/ +@@ -4209,7 +4209,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec) + WRITE_COEFEX(0x57, 0x03, 0x8aa6), /* Direct Drive HP Amp control */ + {} + }; +- static struct coef_fw coef0256[] = { ++ static const struct coef_fw coef0256[] = { + WRITE_COEF(0x1b, 0x0c4b), /* LDO and MISC control */ + WRITE_COEF(0x45, 0xd089), /* UAJ function set to menual mode */ + WRITE_COEF(0x06, 0x6104), /* Set MIC2 Vref gate with HP */ +@@ -4217,7 +4217,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec) + UPDATE_COEFEX(0x57, 0x05, 1<<14, 0), /* Direct Drive HP Amp control(Set to verb control)*/ + {} + }; +- static struct coef_fw coef0233[] = { ++ static const struct coef_fw coef0233[] = { + WRITE_COEF(0x1b, 0x0c0b), + WRITE_COEF(0x45, 0xc429), + UPDATE_COEF(0x35, 0x4000, 0), +@@ -4227,7 +4227,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec) + WRITE_COEF(0x32, 0x42a3), + {} + }; +- static struct coef_fw coef0288[] = { ++ static const struct coef_fw coef0288[] = { + UPDATE_COEF(0x4f, 0xfcc0, 0xc400), + UPDATE_COEF(0x50, 0x2000, 0x2000), + UPDATE_COEF(0x56, 0x0006, 0x0006), +@@ -4235,18 +4235,18 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec) + UPDATE_COEF(0x67, 0x2000, 0), + {} + }; +- static struct coef_fw coef0298[] = { ++ static const struct coef_fw coef0298[] = { + UPDATE_COEF(0x19, 0x1300, 0x0300), + {} + }; +- static struct coef_fw coef0292[] = { ++ static const struct coef_fw coef0292[] = { + WRITE_COEF(0x76, 0x000e), + WRITE_COEF(0x6c, 0x2400), + WRITE_COEF(0x18, 0x7308), + WRITE_COEF(0x6b, 0xc429), + {} + }; +- static struct coef_fw coef0293[] = { ++ static const struct coef_fw coef0293[] = { + UPDATE_COEF(0x10, 7<<8, 6<<8), /* SET Line1 JD to 0 */ + UPDATE_COEFEX(0x57, 0x05, 1<<15|1<<13, 0x0), /* SET charge pump by verb */ + UPDATE_COEFEX(0x57, 0x03, 1<<10, 1<<10), /* SET EN_OSW to 1 */ +@@ -4255,16 +4255,16 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec) + UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */ + {} + }; +- static struct coef_fw coef0668[] = { ++ static const struct coef_fw coef0668[] = { + WRITE_COEF(0x15, 0x0d40), + WRITE_COEF(0xb7, 0x802b), + {} + }; +- static struct coef_fw coef0225[] = { ++ static const struct coef_fw coef0225[] = { + UPDATE_COEF(0x63, 3<<14, 0), + {} + }; +- static struct coef_fw coef0274[] = { ++ static const struct coef_fw coef0274[] = { + UPDATE_COEF(0x4a, 0x0100, 0), + UPDATE_COEFEX(0x57, 0x05, 0x4000, 0), + UPDATE_COEF(0x6b, 0xf000, 0x5000), +@@ -4329,25 +4329,25 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec) + static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin, + hda_nid_t mic_pin) + { +- static struct coef_fw coef0255[] = { ++ static const struct coef_fw coef0255[] = { + WRITE_COEFEX(0x57, 0x03, 0x8aa6), + WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */ + {} + }; +- static struct coef_fw coef0256[] = { ++ static const struct coef_fw coef0256[] = { + UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14), /* Direct Drive HP Amp control(Set to verb control)*/ + WRITE_COEFEX(0x57, 0x03, 0x09a3), + WRITE_COEF(0x06, 0x6100), /* Set MIC2 Vref gate to normal */ + {} + }; +- static struct coef_fw coef0233[] = { ++ static const struct coef_fw coef0233[] = { + UPDATE_COEF(0x35, 0, 1<<14), + WRITE_COEF(0x06, 0x2100), + WRITE_COEF(0x1a, 0x0021), + WRITE_COEF(0x26, 0x008c), + {} + }; +- static struct coef_fw coef0288[] = { ++ static const struct coef_fw coef0288[] = { + UPDATE_COEF(0x4f, 0x00c0, 0), + UPDATE_COEF(0x50, 0x2000, 0), + UPDATE_COEF(0x56, 0x0006, 0), +@@ -4356,30 +4356,30 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin, + UPDATE_COEF(0x67, 0x2000, 0x2000), + {} + }; +- static struct coef_fw coef0292[] = { ++ static const struct coef_fw coef0292[] = { + WRITE_COEF(0x19, 0xa208), + WRITE_COEF(0x2e, 0xacf0), + {} + }; +- static struct coef_fw coef0293[] = { ++ static const struct coef_fw coef0293[] = { + UPDATE_COEFEX(0x57, 0x05, 0, 1<<15|1<<13), /* SET charge pump by verb */ + UPDATE_COEFEX(0x57, 0x03, 1<<10, 0), /* SET EN_OSW to 0 */ + UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */ + {} + }; +- static struct coef_fw coef0688[] = { ++ static const struct coef_fw coef0688[] = { + WRITE_COEF(0xb7, 0x802b), + WRITE_COEF(0xb5, 0x1040), + UPDATE_COEF(0xc3, 0, 1<<12), + {} + }; +- static struct coef_fw coef0225[] = { ++ static const struct coef_fw coef0225[] = { + UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14), + UPDATE_COEF(0x4a, 3<<4, 2<<4), + UPDATE_COEF(0x63, 3<<14, 0), + {} + }; +- static struct coef_fw coef0274[] = { ++ static const struct coef_fw coef0274[] = { + UPDATE_COEFEX(0x57, 0x05, 0x4000, 0x4000), + UPDATE_COEF(0x4a, 0x0010, 0), + UPDATE_COEF(0x6b, 0xf000, 0), +@@ -4465,7 +4465,7 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin, + + static void alc_headset_mode_default(struct hda_codec *codec) + { +- static struct coef_fw coef0225[] = { ++ static const struct coef_fw coef0225[] = { + UPDATE_COEF(0x45, 0x3f<<10, 0x30<<10), + UPDATE_COEF(0x45, 0x3f<<10, 0x31<<10), + UPDATE_COEF(0x49, 3<<8, 0<<8), +@@ -4474,14 +4474,14 @@ static void alc_headset_mode_default(struct hda_codec *codec) + UPDATE_COEF(0x67, 0xf000, 0x3000), + {} + }; +- static struct coef_fw coef0255[] = { ++ static const struct coef_fw coef0255[] = { + WRITE_COEF(0x45, 0xc089), + WRITE_COEF(0x45, 0xc489), + WRITE_COEFEX(0x57, 0x03, 0x8ea6), + WRITE_COEF(0x49, 0x0049), + {} + }; +- static struct coef_fw coef0256[] = { ++ static const struct coef_fw coef0256[] = { + WRITE_COEF(0x45, 0xc489), + WRITE_COEFEX(0x57, 0x03, 0x0da3), + WRITE_COEF(0x49, 0x0049), +@@ -4489,12 +4489,12 @@ static void alc_headset_mode_default(struct hda_codec *codec) + WRITE_COEF(0x06, 0x6100), + {} + }; +- static struct coef_fw coef0233[] = { ++ static const struct coef_fw coef0233[] = { + WRITE_COEF(0x06, 0x2100), + WRITE_COEF(0x32, 0x4ea3), + {} + }; +- static struct coef_fw coef0288[] = { ++ static const struct coef_fw coef0288[] = { + UPDATE_COEF(0x4f, 0xfcc0, 0xc400), /* Set to TRS type */ + UPDATE_COEF(0x50, 0x2000, 0x2000), + UPDATE_COEF(0x56, 0x0006, 0x0006), +@@ -4502,26 +4502,26 @@ static void alc_headset_mode_default(struct hda_codec *codec) + UPDATE_COEF(0x67, 0x2000, 0), + {} + }; +- static struct coef_fw coef0292[] = { ++ static const struct coef_fw coef0292[] = { + WRITE_COEF(0x76, 0x000e), + WRITE_COEF(0x6c, 0x2400), + WRITE_COEF(0x6b, 0xc429), + WRITE_COEF(0x18, 0x7308), + {} + }; +- static struct coef_fw coef0293[] = { ++ static const struct coef_fw coef0293[] = { + UPDATE_COEF(0x4a, 0x000f, 0x000e), /* Combo Jack auto detect */ + WRITE_COEF(0x45, 0xC429), /* Set to TRS type */ + UPDATE_COEF(0x1a, 1<<3, 0), /* Combo JD gating without LINE1-VREFO */ + {} + }; +- static struct coef_fw coef0688[] = { ++ static const struct coef_fw coef0688[] = { + WRITE_COEF(0x11, 0x0041), + WRITE_COEF(0x15, 0x0d40), + WRITE_COEF(0xb7, 0x802b), + {} + }; +- static struct coef_fw coef0274[] = { ++ static const struct coef_fw coef0274[] = { + WRITE_COEF(0x45, 0x4289), + UPDATE_COEF(0x4a, 0x0010, 0x0010), + UPDATE_COEF(0x6b, 0x0f00, 0), +@@ -4584,53 +4584,53 @@ static void alc_headset_mode_ctia(struct hda_codec *codec) + { + int val; + +- static struct coef_fw coef0255[] = { ++ static const struct coef_fw coef0255[] = { + WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */ + WRITE_COEF(0x1b, 0x0c2b), + WRITE_COEFEX(0x57, 0x03, 0x8ea6), + {} + }; +- static struct coef_fw coef0256[] = { ++ static const struct coef_fw coef0256[] = { + WRITE_COEF(0x45, 0xd489), /* Set to CTIA type */ + WRITE_COEF(0x1b, 0x0e6b), + {} + }; +- static struct coef_fw coef0233[] = { ++ static const struct coef_fw coef0233[] = { + WRITE_COEF(0x45, 0xd429), + WRITE_COEF(0x1b, 0x0c2b), + WRITE_COEF(0x32, 0x4ea3), + {} + }; +- static struct coef_fw coef0288[] = { ++ static const struct coef_fw coef0288[] = { + UPDATE_COEF(0x50, 0x2000, 0x2000), + UPDATE_COEF(0x56, 0x0006, 0x0006), + UPDATE_COEF(0x66, 0x0008, 0), + UPDATE_COEF(0x67, 0x2000, 0), + {} + }; +- static struct coef_fw coef0292[] = { ++ static const struct coef_fw coef0292[] = { + WRITE_COEF(0x6b, 0xd429), + WRITE_COEF(0x76, 0x0008), + WRITE_COEF(0x18, 0x7388), + {} + }; +- static struct coef_fw coef0293[] = { ++ static const struct coef_fw coef0293[] = { + WRITE_COEF(0x45, 0xd429), /* Set to ctia type */ + UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */ + {} + }; +- static struct coef_fw coef0688[] = { ++ static const struct coef_fw coef0688[] = { + WRITE_COEF(0x11, 0x0001), + WRITE_COEF(0x15, 0x0d60), + WRITE_COEF(0xc3, 0x0000), + {} + }; +- static struct coef_fw coef0225_1[] = { ++ static const struct coef_fw coef0225_1[] = { + UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10), + UPDATE_COEF(0x63, 3<<14, 2<<14), + {} + }; +- static struct coef_fw coef0225_2[] = { ++ static const struct coef_fw coef0225_2[] = { + UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10), + UPDATE_COEF(0x63, 3<<14, 1<<14), + {} +@@ -4702,48 +4702,48 @@ static void alc_headset_mode_ctia(struct hda_codec *codec) + /* Nokia type */ + static void alc_headset_mode_omtp(struct hda_codec *codec) + { +- static struct coef_fw coef0255[] = { ++ static const struct coef_fw coef0255[] = { + WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */ + WRITE_COEF(0x1b, 0x0c2b), + WRITE_COEFEX(0x57, 0x03, 0x8ea6), + {} + }; +- static struct coef_fw coef0256[] = { ++ static const struct coef_fw coef0256[] = { + WRITE_COEF(0x45, 0xe489), /* Set to OMTP Type */ + WRITE_COEF(0x1b, 0x0e6b), + {} + }; +- static struct coef_fw coef0233[] = { ++ static const struct coef_fw coef0233[] = { + WRITE_COEF(0x45, 0xe429), + WRITE_COEF(0x1b, 0x0c2b), + WRITE_COEF(0x32, 0x4ea3), + {} + }; +- static struct coef_fw coef0288[] = { ++ static const struct coef_fw coef0288[] = { + UPDATE_COEF(0x50, 0x2000, 0x2000), + UPDATE_COEF(0x56, 0x0006, 0x0006), + UPDATE_COEF(0x66, 0x0008, 0), + UPDATE_COEF(0x67, 0x2000, 0), + {} + }; +- static struct coef_fw coef0292[] = { ++ static const struct coef_fw coef0292[] = { + WRITE_COEF(0x6b, 0xe429), + WRITE_COEF(0x76, 0x0008), + WRITE_COEF(0x18, 0x7388), + {} + }; +- static struct coef_fw coef0293[] = { ++ static const struct coef_fw coef0293[] = { + WRITE_COEF(0x45, 0xe429), /* Set to omtp type */ + UPDATE_COEF(0x10, 7<<8, 7<<8), /* SET Line1 JD to 1 */ + {} + }; +- static struct coef_fw coef0688[] = { ++ static const struct coef_fw coef0688[] = { + WRITE_COEF(0x11, 0x0001), + WRITE_COEF(0x15, 0x0d50), + WRITE_COEF(0xc3, 0x0000), + {} + }; +- static struct coef_fw coef0225[] = { ++ static const struct coef_fw coef0225[] = { + UPDATE_COEF(0x45, 0x3f<<10, 0x39<<10), + UPDATE_COEF(0x63, 3<<14, 2<<14), + {} +@@ -4803,17 +4803,17 @@ static void alc_determine_headset_type(struct hda_codec *codec) + int val; + bool is_ctia = false; + struct alc_spec *spec = codec->spec; +- static struct coef_fw coef0255[] = { ++ static const struct coef_fw coef0255[] = { + WRITE_COEF(0x45, 0xd089), /* combo jack auto switch control(Check type)*/ + WRITE_COEF(0x49, 0x0149), /* combo jack auto switch control(Vref + conteol) */ + {} + }; +- static struct coef_fw coef0288[] = { ++ static const struct coef_fw coef0288[] = { + UPDATE_COEF(0x4f, 0xfcc0, 0xd400), /* Check Type */ + {} + }; +- static struct coef_fw coef0298[] = { ++ static const struct coef_fw coef0298[] = { + UPDATE_COEF(0x50, 0x2000, 0x2000), + UPDATE_COEF(0x56, 0x0006, 0x0006), + UPDATE_COEF(0x66, 0x0008, 0), +@@ -4821,19 +4821,19 @@ static void alc_determine_headset_type(struct hda_codec *codec) + UPDATE_COEF(0x19, 0x1300, 0x1300), + {} + }; +- static struct coef_fw coef0293[] = { ++ static const struct coef_fw coef0293[] = { + UPDATE_COEF(0x4a, 0x000f, 0x0008), /* Combo Jack auto detect */ + WRITE_COEF(0x45, 0xD429), /* Set to ctia type */ + {} + }; +- static struct coef_fw coef0688[] = { ++ static const struct coef_fw coef0688[] = { + WRITE_COEF(0x11, 0x0001), + WRITE_COEF(0xb7, 0x802b), + WRITE_COEF(0x15, 0x0d60), + WRITE_COEF(0xc3, 0x0c00), + {} + }; +- static struct coef_fw coef0274[] = { ++ static const struct coef_fw coef0274[] = { + UPDATE_COEF(0x4a, 0x0010, 0), + UPDATE_COEF(0x4a, 0x8000, 0), + WRITE_COEF(0x45, 0xd289), +@@ -5120,7 +5120,7 @@ static void alc_fixup_headset_mode_no_hp_mic(struct hda_codec *codec, + static void alc255_set_default_jack_type(struct hda_codec *codec) + { + /* Set to iphone type */ +- static struct coef_fw alc255fw[] = { ++ static const struct coef_fw alc255fw[] = { + WRITE_COEF(0x1b, 0x880b), + WRITE_COEF(0x45, 0xd089), + WRITE_COEF(0x1b, 0x080b), +@@ -5128,7 +5128,7 @@ static void alc255_set_default_jack_type(struct hda_codec *codec) + WRITE_COEF(0x1b, 0x0c0b), + {} + }; +- static struct coef_fw alc256fw[] = { ++ static const struct coef_fw alc256fw[] = { + WRITE_COEF(0x1b, 0x884b), + WRITE_COEF(0x45, 0xd089), + WRITE_COEF(0x1b, 0x084b), +@@ -8513,7 +8513,7 @@ static void alc662_fixup_aspire_ethos_hp(struct hda_codec *codec, + } + } + +-static struct coef_fw alc668_coefs[] = { ++static const struct coef_fw alc668_coefs[] = { + WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0), + WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80), + WRITE_COEF(0x08, 0x0031), WRITE_COEF(0x0a, 0x0060), WRITE_COEF(0x0b, 0x0), +-- +2.20.1 + diff --git a/queue-5.5/nfsd-fixing-possible-null-pointer-derefering-in-copy.patch b/queue-5.5/nfsd-fixing-possible-null-pointer-derefering-in-copy.patch new file mode 100644 index 00000000000..266f5879186 --- /dev/null +++ b/queue-5.5/nfsd-fixing-possible-null-pointer-derefering-in-copy.patch @@ -0,0 +1,38 @@ +From a264e7b209f248f59b4fee0d1ed3fbde014a942e Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 4 Dec 2019 15:13:54 -0500 +Subject: NFSD fixing possible null pointer derefering in copy offload + +From: Olga Kornievskaia + +[ Upstream commit 2e577f0faca4640348c398cb85d60a1eedac4b1e ] + +Static checker revealed possible error path leading to possible +NULL pointer dereferencing. + +Reported-by: Dan Carpenter +Fixes: e0639dc5805a: ("NFSD introduce async copy feature") +Signed-off-by: Olga Kornievskaia +Signed-off-by: J. Bruce Fields +Signed-off-by: Sasha Levin +--- + fs/nfsd/nfs4proc.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c +index 4798667af647c..91b64c15556e6 100644 +--- a/fs/nfsd/nfs4proc.c ++++ b/fs/nfsd/nfs4proc.c +@@ -1223,7 +1223,8 @@ static void cleanup_async_copy(struct nfsd4_copy *copy) + { + nfs4_free_cp_state(copy); + nfsd_file_put(copy->nf_dst); +- nfsd_file_put(copy->nf_src); ++ if (copy->cp_intra) ++ nfsd_file_put(copy->nf_src); + spin_lock(©->cp_clp->async_lock); + list_del(©->copies); + spin_unlock(©->cp_clp->async_lock); +-- +2.20.1 + diff --git a/queue-5.5/series b/queue-5.5/series new file mode 100644 index 00000000000..bc655a1f36e --- /dev/null +++ b/queue-5.5/series @@ -0,0 +1,5 @@ +virtio_balloon-adjust-label-in-virtballoon_probe.patch +alsa-hda-realtek-more-constifications.patch +alsa-hda-realtek-add-headset-mic-supported-for-hp-cp.patch +alsa-hda-realtek-fixed-one-of-hp-alc671-platform-hea.patch +nfsd-fixing-possible-null-pointer-derefering-in-copy.patch diff --git a/queue-5.5/virtio_balloon-adjust-label-in-virtballoon_probe.patch b/queue-5.5/virtio_balloon-adjust-label-in-virtballoon_probe.patch new file mode 100644 index 00000000000..a5385cc0e81 --- /dev/null +++ b/queue-5.5/virtio_balloon-adjust-label-in-virtballoon_probe.patch @@ -0,0 +1,48 @@ +From 5d5176c7dbf5586b5f065843db7c8534cdde9927 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sat, 15 Feb 2020 17:40:39 -0700 +Subject: virtio_balloon: Adjust label in virtballoon_probe + +From: Nathan Chancellor + +[ Upstream commit 6ae4edab2fbf86ec92fbf0a8f0c60b857d90d50f ] + +Clang warns when CONFIG_BALLOON_COMPACTION is unset: + +../drivers/virtio/virtio_balloon.c:963:1: warning: unused label +'out_del_vqs' [-Wunused-label] +out_del_vqs: +^~~~~~~~~~~~ +1 warning generated. + +Move the label within the preprocessor block since it is only used when +CONFIG_BALLOON_COMPACTION is set. + +Fixes: 1ad6f58ea936 ("virtio_balloon: Fix memory leaks on errors in virtballoon_probe()") +Link: https://github.com/ClangBuiltLinux/linux/issues/886 +Signed-off-by: Nathan Chancellor +Link: https://lore.kernel.org/r/20200216004039.23464-1-natechancellor@gmail.com +Signed-off-by: Michael S. Tsirkin +Reviewed-by: David Hildenbrand +Signed-off-by: Sasha Levin +--- + drivers/virtio/virtio_balloon.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c +index 7bfe365d93720..341458fd95ca4 100644 +--- a/drivers/virtio/virtio_balloon.c ++++ b/drivers/virtio/virtio_balloon.c +@@ -959,8 +959,8 @@ out_iput: + iput(vb->vb_dev_info.inode); + out_kern_unmount: + kern_unmount(balloon_mnt); +-#endif + out_del_vqs: ++#endif + vdev->config->del_vqs(vdev); + out_free_vb: + kfree(vb); +-- +2.20.1 +