From 400d12b3d8295fe3e9b8a83959de6709f306212f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 23 Aug 2020 13:59:13 +0200 Subject: [PATCH] 5.8-stable patches added patches: alsa-hda-avoid-reset-of-sdo_limit.patch alsa-hda-realtek-add-quirk-for-samsung-galaxy-book-ion.patch alsa-hda-realtek-add-quirk-for-samsung-galaxy-flex-book.patch --- .../alsa-hda-avoid-reset-of-sdo_limit.patch | 70 +++++++++++++++++++ ...dd-quirk-for-samsung-galaxy-book-ion.patch | 34 +++++++++ ...d-quirk-for-samsung-galaxy-flex-book.patch | 34 +++++++++ queue-5.8/series | 3 + 4 files changed, 141 insertions(+) create mode 100644 queue-5.8/alsa-hda-avoid-reset-of-sdo_limit.patch create mode 100644 queue-5.8/alsa-hda-realtek-add-quirk-for-samsung-galaxy-book-ion.patch create mode 100644 queue-5.8/alsa-hda-realtek-add-quirk-for-samsung-galaxy-flex-book.patch diff --git a/queue-5.8/alsa-hda-avoid-reset-of-sdo_limit.patch b/queue-5.8/alsa-hda-avoid-reset-of-sdo_limit.patch new file mode 100644 index 00000000000..ac01866b350 --- /dev/null +++ b/queue-5.8/alsa-hda-avoid-reset-of-sdo_limit.patch @@ -0,0 +1,70 @@ +From b90b925fd52c75ee7531df739d850a1f7c58ef06 Mon Sep 17 00:00:00 2001 +From: Sameer Pujar +Date: Wed, 19 Aug 2020 21:02:10 +0530 +Subject: ALSA: hda: avoid reset of sdo_limit + +From: Sameer Pujar + +commit b90b925fd52c75ee7531df739d850a1f7c58ef06 upstream. + +By default 'sdo_limit' is initialized with a default value of '8' +as per spec. This is overridden in cases where a different value is +required. However this is getting reset when snd_hdac_bus_init_chip() +is called again, which happens during runtime PM cycle. + +Avoid this reset by moving 'sdo_limit' setup to 'snd_hdac_bus_init()' +function which would be called only once. + +Fixes: 67ae482a59e9 ("ALSA: hda: add member to store ratio for stripe control") +Cc: +Signed-off-by: Sameer Pujar +Link: https://lore.kernel.org/r/1597851130-6765-1-git-send-email-spujar@nvidia.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/hda/hdac_bus.c | 12 ++++++++++++ + sound/hda/hdac_controller.c | 11 ----------- + 2 files changed, 12 insertions(+), 11 deletions(-) + +--- a/sound/hda/hdac_bus.c ++++ b/sound/hda/hdac_bus.c +@@ -46,6 +46,18 @@ int snd_hdac_bus_init(struct hdac_bus *b + INIT_LIST_HEAD(&bus->hlink_list); + init_waitqueue_head(&bus->rirb_wq); + bus->irq = -1; ++ ++ /* ++ * Default value of '8' is as per the HD audio specification (Rev 1.0a). ++ * Following relation is used to derive STRIPE control value. ++ * For sample rate <= 48K: ++ * { ((num_channels * bits_per_sample) / number of SDOs) >= 8 } ++ * For sample rate > 48K: ++ * { ((num_channels * bits_per_sample * rate/48000) / ++ * number of SDOs) >= 8 } ++ */ ++ bus->sdo_limit = 8; ++ + return 0; + } + EXPORT_SYMBOL_GPL(snd_hdac_bus_init); +--- a/sound/hda/hdac_controller.c ++++ b/sound/hda/hdac_controller.c +@@ -529,17 +529,6 @@ bool snd_hdac_bus_init_chip(struct hdac_ + + bus->chip_init = true; + +- /* +- * Default value of '8' is as per the HD audio specification (Rev 1.0a). +- * Following relation is used to derive STRIPE control value. +- * For sample rate <= 48K: +- * { ((num_channels * bits_per_sample) / number of SDOs) >= 8 } +- * For sample rate > 48K: +- * { ((num_channels * bits_per_sample * rate/48000) / +- * number of SDOs) >= 8 } +- */ +- bus->sdo_limit = 8; +- + return true; + } + EXPORT_SYMBOL_GPL(snd_hdac_bus_init_chip); diff --git a/queue-5.8/alsa-hda-realtek-add-quirk-for-samsung-galaxy-book-ion.patch b/queue-5.8/alsa-hda-realtek-add-quirk-for-samsung-galaxy-book-ion.patch new file mode 100644 index 00000000000..0525e425248 --- /dev/null +++ b/queue-5.8/alsa-hda-realtek-add-quirk-for-samsung-galaxy-book-ion.patch @@ -0,0 +1,34 @@ +From e17f02d0559c174cf1f6435e45134490111eaa37 Mon Sep 17 00:00:00 2001 +From: Mike Pozulp +Date: Tue, 18 Aug 2020 09:54:44 -0700 +Subject: ALSA: hda/realtek: Add quirk for Samsung Galaxy Book Ion + +From: Mike Pozulp + +commit e17f02d0559c174cf1f6435e45134490111eaa37 upstream. + +The Galaxy Book Ion uses the same ALC298 codec as other Samsung laptops +which have the no headphone sound bug, like my Samsung Notebook. The +Galaxy Book owner confirmed that this patch fixes the bug. + +BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207423 +Signed-off-by: Mike Pozulp +Cc: +Link: https://lore.kernel.org/r/20200818165446.499821-1-pozulp.kernel@gmail.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + 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 +@@ -7697,6 +7697,7 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET), + SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET), + SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Flex Book (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET), ++ SND_PCI_QUIRK(0x144d, 0xc18a, "Samsung Galaxy Book Ion (NT950XCJ-X716A)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET), + SND_PCI_QUIRK(0x144d, 0xc740, "Samsung Ativ book 8 (NP870Z5G)", ALC269_FIXUP_ATIV_BOOK_8), + SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET), + SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC), diff --git a/queue-5.8/alsa-hda-realtek-add-quirk-for-samsung-galaxy-flex-book.patch b/queue-5.8/alsa-hda-realtek-add-quirk-for-samsung-galaxy-flex-book.patch new file mode 100644 index 00000000000..694047a8018 --- /dev/null +++ b/queue-5.8/alsa-hda-realtek-add-quirk-for-samsung-galaxy-flex-book.patch @@ -0,0 +1,34 @@ +From f70fff83cda63bbf596f99edc131b9daaba07458 Mon Sep 17 00:00:00 2001 +From: Mike Pozulp +Date: Thu, 13 Aug 2020 21:53:44 -0700 +Subject: ALSA: hda/realtek: Add quirk for Samsung Galaxy Flex Book + +From: Mike Pozulp + +commit f70fff83cda63bbf596f99edc131b9daaba07458 upstream. + +The Flex Book uses the same ALC298 codec as other Samsung laptops which +have the no headphone sound bug, like my Samsung Notebook. The Flex Book +owner used Early Patching to confirm that this quirk fixes the bug. + +BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207423 +Signed-off-by: Mike Pozulp +Cc: +Link: https://lore.kernel.org/r/20200814045346.645367-1-pozulp.kernel@gmail.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + 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 +@@ -7696,6 +7696,7 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC), + SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET), + SND_PCI_QUIRK(0x144d, 0xc176, "Samsung Notebook 9 Pro (NP930MBE-K04US)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET), ++ SND_PCI_QUIRK(0x144d, 0xc189, "Samsung Galaxy Flex Book (NT950QCG-X716)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET), + SND_PCI_QUIRK(0x144d, 0xc740, "Samsung Ativ book 8 (NP870Z5G)", ALC269_FIXUP_ATIV_BOOK_8), + SND_PCI_QUIRK(0x144d, 0xc812, "Samsung Notebook Pen S (NT950SBE-X58)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET), + SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC), diff --git a/queue-5.8/series b/queue-5.8/series index f26e7921d64..7de4df2399a 100644 --- a/queue-5.8/series +++ b/queue-5.8/series @@ -3,3 +3,6 @@ drm-panel-simple-fix-inverted-v-h-sync-for-frida-frd.patch drm-ast-remove-unused-code-paths-for-ast-1180.patch drm-ast-initialize-dram-type-before-posting-gpu.patch khugepaged-adjust-vm_bug_on_mm-in-__khugepaged_enter.patch +alsa-hda-avoid-reset-of-sdo_limit.patch +alsa-hda-realtek-add-quirk-for-samsung-galaxy-flex-book.patch +alsa-hda-realtek-add-quirk-for-samsung-galaxy-book-ion.patch -- 2.47.3