--- /dev/null
+From 6d9ffcff646bbd0ede6c2a59f4cd28414ecec6e0 Mon Sep 17 00:00:00 2001
+From: Kailang Yang <kailang@realtek.com>
+Date: Fri, 3 Jan 2020 16:24:06 +0800
+Subject: ALSA: hda/realtek - Add new codec supported for ALCS1200A
+
+From: Kailang Yang <kailang@realtek.com>
+
+commit 6d9ffcff646bbd0ede6c2a59f4cd28414ecec6e0 upstream.
+
+Add ALCS1200A supported.
+It was similar as ALC900.
+
+Signed-off-by: Kailang Yang <kailang@realtek.com>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/a9bd3cdaa02d4fa197623448d5c51e50@realtek.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_realtek.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -442,6 +442,7 @@ static void alc_fill_eapd_coef(struct hd
+ break;
+ case 0x10ec0899:
+ case 0x10ec0900:
++ case 0x10ec0b00:
+ case 0x10ec1168:
+ case 0x10ec1220:
+ alc_update_coef_idx(codec, 0x7, 1<<1, 0);
+@@ -2521,6 +2522,7 @@ static int patch_alc882(struct hda_codec
+ case 0x10ec0882:
+ case 0x10ec0885:
+ case 0x10ec0900:
++ case 0x10ec0b00:
+ case 0x10ec1220:
+ break;
+ default:
+@@ -8989,6 +8991,7 @@ static const struct hda_device_id snd_hd
+ HDA_CODEC_ENTRY(0x10ec0892, "ALC892", patch_alc662),
+ HDA_CODEC_ENTRY(0x10ec0899, "ALC898", patch_alc882),
+ HDA_CODEC_ENTRY(0x10ec0900, "ALC1150", patch_alc882),
++ HDA_CODEC_ENTRY(0x10ec0b00, "ALCS1200A", patch_alc882),
+ HDA_CODEC_ENTRY(0x10ec1168, "ALC1220", patch_alc882),
+ HDA_CODEC_ENTRY(0x10ec1220, "ALC1220", patch_alc882),
+ {} /* terminator */
--- /dev/null
+From 54a6a7dc107da0492a9e84fd7e9a107b3c58138d Mon Sep 17 00:00:00 2001
+From: Kailang Yang <kailang@realtek.com>
+Date: Wed, 8 Jan 2020 16:47:56 +0800
+Subject: ALSA: hda/realtek - Add quirk for the bass speaker on Lenovo Yoga X1 7th gen
+
+From: Kailang Yang <kailang@realtek.com>
+
+commit 54a6a7dc107da0492a9e84fd7e9a107b3c58138d upstream.
+
+Add quirk to ALC285_FIXUP_SPEAKER2_TO_DAC1, which is the same fixup
+applied for X1 Carbon 7th gen in commit d2cd795c4ece ("ALSA: hda -
+fixup for the bass speaker on Lenovo Carbon X1 7th gen").
+
+Signed-off-by: Kailang Yang <kailang@realtek.com>
+Reviewed-by: Jaroslav Kysela <perex@perex.cz>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_realtek.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -7042,6 +7042,7 @@ static const struct snd_pci_quirk alc269
+ SND_PCI_QUIRK(0x17aa, 0x224c, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
+ SND_PCI_QUIRK(0x17aa, 0x224d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK),
+ SND_PCI_QUIRK(0x17aa, 0x225d, "Thinkpad T480", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
++ SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Yoga 7th", ALC285_FIXUP_SPEAKER2_TO_DAC1),
+ SND_PCI_QUIRK(0x17aa, 0x2293, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_SPEAKER2_TO_DAC1),
+ 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),
--- /dev/null
+From 9194a1ebbc56d7006835e2b4cacad301201fb832 Mon Sep 17 00:00:00 2001
+From: Kailang Yang <kailang@realtek.com>
+Date: Tue, 7 Jan 2020 17:22:19 +0800
+Subject: ALSA: hda/realtek - Set EAPD control to default for ALC222
+
+From: Kailang Yang <kailang@realtek.com>
+
+commit 9194a1ebbc56d7006835e2b4cacad301201fb832 upstream.
+
+Set EAPD control to verb control.
+
+Signed-off-by: Kailang Yang <kailang@realtek.com>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/hda/patch_realtek.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -424,6 +424,7 @@ static void alc_fill_eapd_coef(struct hd
+ case 0x10ec0672:
+ alc_update_coef_idx(codec, 0xd, 0, 1<<14); /* EAPD Ctrl */
+ break;
++ case 0x10ec0222:
+ case 0x10ec0623:
+ alc_update_coef_idx(codec, 0x19, 1<<13, 0);
+ break;
--- /dev/null
+From 51d4efab7865e6ea6a4ebcd25b3f03c019515c4c Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Sat, 4 Jan 2020 12:09:36 +0100
+Subject: ALSA: usb-audio: Apply the sample rate quirk for Bose Companion 5
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 51d4efab7865e6ea6a4ebcd25b3f03c019515c4c upstream.
+
+Bose Companion 5 (with USB ID 05a7:1020) doesn't seem supporting
+reading back the sample rate, so the existing quirk is needed.
+
+BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206063
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20200104110936.14288-1-tiwai@suse.de
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/usb/quirks.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/usb/quirks.c
++++ b/sound/usb/quirks.c
+@@ -1177,6 +1177,7 @@ bool snd_usb_get_sample_rate_quirk(struc
+ 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(0x05a7, 0x1020): /* Bose Companion 5 */
+ case USB_ID(0x074D, 0x3553): /* Outlaw RR2150 (Micronas UAC3553B) */
+ case USB_ID(0x1395, 0x740a): /* Sennheiser DECT */
+ case USB_ID(0x1901, 0x0191): /* GE B850V3 CP2114 audio interface */
--- /dev/null
+From cf8ce8b80f8bf9669f6ec4e71e16668430febdac Mon Sep 17 00:00:00 2001
+From: Russell King <rmk+kernel@armlinux.org.uk>
+Date: Sun, 15 Dec 2019 16:39:05 +0000
+Subject: i2c: fix bus recovery stop mode timing
+
+From: Russell King <rmk+kernel@armlinux.org.uk>
+
+commit cf8ce8b80f8bf9669f6ec4e71e16668430febdac upstream.
+
+The I2C specification states that tsu:sto for standard mode timing must
+be at minimum 4us. Pictographically, this is:
+
+SCL: ____/~~~~~~~~~
+SDA: _________/~~~~
+ ->| |<- 4us minimum
+
+We are currently waiting 2.5us between asserting SCL and SDA, which is
+in violation of the standard. Adjust the timings to ensure that we meet
+what is stipulated as the minimum timings to ensure that all devices
+correctly interpret the STOP bus transition.
+
+This is more important than trying to generate a square wave with even
+duty cycle.
+
+Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
+Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/i2c/i2c-core-base.c | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+--- a/drivers/i2c/i2c-core-base.c
++++ b/drivers/i2c/i2c-core-base.c
+@@ -194,10 +194,11 @@ int i2c_generic_scl_recovery(struct i2c_
+ * If we can set SDA, we will always create a STOP to ensure additional
+ * pulses will do no harm. This is achieved by letting SDA follow SCL
+ * half a cycle later. Check the 'incomplete_write_byte' fault injector
+- * for details.
++ * for details. Note that we must honour tsu:sto, 4us, but lets use 5us
++ * here for simplicity.
+ */
+ bri->set_scl(adap, scl);
+- ndelay(RECOVERY_NDELAY / 2);
++ ndelay(RECOVERY_NDELAY);
+ if (bri->set_sda)
+ bri->set_sda(adap, scl);
+ ndelay(RECOVERY_NDELAY / 2);
+@@ -219,7 +220,13 @@ int i2c_generic_scl_recovery(struct i2c_
+ scl = !scl;
+ bri->set_scl(adap, scl);
+ /* Creating STOP again, see above */
+- ndelay(RECOVERY_NDELAY / 2);
++ if (scl) {
++ /* Honour minimum tsu:sto */
++ ndelay(RECOVERY_NDELAY);
++ } else {
++ /* Honour minimum tf and thd:dat */
++ ndelay(RECOVERY_NDELAY / 2);
++ }
+ if (bri->set_sda)
+ bri->set_sda(adap, scl);
+ ndelay(RECOVERY_NDELAY / 2);
chardev-avoid-potential-use-after-free-in-chrdev_open.patch
+i2c-fix-bus-recovery-stop-mode-timing.patch
+usb-chipidea-host-disable-port-power-only-if-previously-enabled.patch
+alsa-usb-audio-apply-the-sample-rate-quirk-for-bose-companion-5.patch
+alsa-hda-realtek-add-new-codec-supported-for-alcs1200a.patch
+alsa-hda-realtek-set-eapd-control-to-default-for-alc222.patch
+alsa-hda-realtek-add-quirk-for-the-bass-speaker-on-lenovo-yoga-x1-7th-gen.patch
--- /dev/null
+From c1ffba305dbcf3fb9ca969c20a97acbddc38f8e9 Mon Sep 17 00:00:00 2001
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Thu, 26 Dec 2019 07:57:54 -0800
+Subject: usb: chipidea: host: Disable port power only if previously enabled
+
+From: Guenter Roeck <linux@roeck-us.net>
+
+commit c1ffba305dbcf3fb9ca969c20a97acbddc38f8e9 upstream.
+
+On shutdown, ehci_power_off() is called unconditionally to power off
+each port, even if it was never called to power on the port.
+For chipidea, this results in a call to ehci_ci_portpower() with a request
+to power off ports even if the port was never powered on.
+This results in the following warning from the regulator code.
+
+WARNING: CPU: 0 PID: 182 at drivers/regulator/core.c:2596 _regulator_disable+0x1a8/0x210
+unbalanced disables for usb_otg2_vbus
+Modules linked in:
+CPU: 0 PID: 182 Comm: init Not tainted 5.4.6 #1
+Hardware name: Freescale i.MX7 Dual (Device Tree)
+[<c0313658>] (unwind_backtrace) from [<c030d698>] (show_stack+0x10/0x14)
+[<c030d698>] (show_stack) from [<c1133afc>] (dump_stack+0xe0/0x10c)
+[<c1133afc>] (dump_stack) from [<c0349098>] (__warn+0xf4/0x10c)
+[<c0349098>] (__warn) from [<c0349128>] (warn_slowpath_fmt+0x78/0xbc)
+[<c0349128>] (warn_slowpath_fmt) from [<c09f36ac>] (_regulator_disable+0x1a8/0x210)
+[<c09f36ac>] (_regulator_disable) from [<c09f374c>] (regulator_disable+0x38/0xe8)
+[<c09f374c>] (regulator_disable) from [<c0df7bac>] (ehci_ci_portpower+0x38/0xdc)
+[<c0df7bac>] (ehci_ci_portpower) from [<c0db4fa4>] (ehci_port_power+0x50/0xa4)
+[<c0db4fa4>] (ehci_port_power) from [<c0db5420>] (ehci_silence_controller+0x5c/0xc4)
+[<c0db5420>] (ehci_silence_controller) from [<c0db7644>] (ehci_stop+0x3c/0xcc)
+[<c0db7644>] (ehci_stop) from [<c0d5bdc4>] (usb_remove_hcd+0xe0/0x19c)
+[<c0d5bdc4>] (usb_remove_hcd) from [<c0df7638>] (host_stop+0x38/0xa8)
+[<c0df7638>] (host_stop) from [<c0df2f34>] (ci_hdrc_remove+0x44/0xe4)
+...
+
+Keeping track of the power enable state avoids the warning and traceback.
+
+Fixes: c8679a2fb8dec ("usb: chipidea: host: add portpower override")
+Cc: Michael Grzeschik <m.grzeschik@pengutronix.de>
+Cc: Peter Chen <peter.chen@freescale.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Peter Chen <peter.chen@nxp.com>
+Link: https://lore.kernel.org/r/20191226155754.25451-1-linux@roeck-us.net
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/chipidea/host.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/chipidea/host.c
++++ b/drivers/usb/chipidea/host.c
+@@ -25,6 +25,7 @@ static int (*orig_bus_suspend)(struct us
+
+ struct ehci_ci_priv {
+ struct regulator *reg_vbus;
++ bool enabled;
+ };
+
+ static int ehci_ci_portpower(struct usb_hcd *hcd, int portnum, bool enable)
+@@ -36,7 +37,7 @@ static int ehci_ci_portpower(struct usb_
+ int ret = 0;
+ int port = HCS_N_PORTS(ehci->hcs_params);
+
+- if (priv->reg_vbus) {
++ if (priv->reg_vbus && enable != priv->enabled) {
+ if (port > 1) {
+ dev_warn(dev,
+ "Not support multi-port regulator control\n");
+@@ -52,6 +53,7 @@ static int ehci_ci_portpower(struct usb_
+ enable ? "enable" : "disable", ret);
+ return ret;
+ }
++ priv->enabled = enable;
+ }
+
+ if (enable && (ci->platdata->phy_mode == USBPHY_INTERFACE_MODE_HSIC)) {