From 1b1c71645331d19afb71f61a67ada08f04028836 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 26 May 2023 21:00:20 +0100 Subject: [PATCH] drop alsa-hda-fix-unhandled-register-update-during-auto-suspend-period.patch from 4.14, 4.19, and 5.4 --- ...er-update-during-auto-suspend-period.patch | 67 ------------------- queue-4.14/series | 1 - ...er-update-during-auto-suspend-period.patch | 67 ------------------- queue-4.19/series | 1 - ...er-update-during-auto-suspend-period.patch | 67 ------------------- queue-5.4/series | 1 - 6 files changed, 204 deletions(-) delete mode 100644 queue-4.14/alsa-hda-fix-unhandled-register-update-during-auto-suspend-period.patch delete mode 100644 queue-4.19/alsa-hda-fix-unhandled-register-update-during-auto-suspend-period.patch delete mode 100644 queue-5.4/alsa-hda-fix-unhandled-register-update-during-auto-suspend-period.patch diff --git a/queue-4.14/alsa-hda-fix-unhandled-register-update-during-auto-suspend-period.patch b/queue-4.14/alsa-hda-fix-unhandled-register-update-during-auto-suspend-period.patch deleted file mode 100644 index 168285541da..00000000000 --- a/queue-4.14/alsa-hda-fix-unhandled-register-update-during-auto-suspend-period.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 81302b1c7c997e8a56c1c2fc63a296ebeb0cd2d0 Mon Sep 17 00:00:00 2001 -From: Takashi Iwai -Date: Thu, 18 May 2023 13:35:20 +0200 -Subject: ALSA: hda: Fix unhandled register update during auto-suspend period -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Takashi Iwai - -commit 81302b1c7c997e8a56c1c2fc63a296ebeb0cd2d0 upstream. - -It's reported that the recording started right after the driver probe -doesn't work properly, and it turned out that this is related with the -codec auto-suspend. Namely, after the probe phase, the usage count -goes zero, and the auto-suspend is programmed, but the codec is kept -still active until the auto-suspend expiration. When an application -(e.g. alsactl) updates the mixer values at this moment, the values are -cached but not actually written. Then, starting arecord thereafter -also results in the silence because of the missing unmute. - -The root cause is the handling of "lazy update" mode; when a mixer -value is updated *after* the suspend, it should update only the cache -and exits. At the resume, the cached value is written to the device, -in turn. The problem is that the current code misinterprets the state -of auto-suspend as if it were already suspended. - -Although we can add the check of the actual device state after -pm_runtime_get_if_in_use() for catching the missing state, this won't -suffice; the second call of regmap_update_bits_check() will skip -writing the register because the cache has been already updated by the -first call. So we'd need fixes in two different places. - -OTOH, a simpler fix is to replace pm_runtime_get_if_in_use() with -pm_runtime_get_if_active() (with ign_usage_count=true). This change -implies that the driver takes the pm refcount if the device is still -in ACTIVE state and continues the processing. A small caveat is that -this will leave the auto-suspend timer. But, since the timer callback -itself checks the device state and aborts gracefully when it's active, -this won't be any substantial problem. - -Long story short: we address the missing register-write problem just -by replacing the pm_runtime_*() call in snd_hda_keep_power_up(). - -Fixes: fc4f000bf8c0 ("ALSA: hda - Fix unexpected resume through regmap code path") -Reported-by: Amadeusz Sławiński -Closes: https://lore.kernel.org/r/a7478636-af11-92ab-731c-9b13c582a70d@linux.intel.com -Suggested-by: Cezary Rojewski -Cc: -Link: https://lore.kernel.org/r/20230518113520.15213-1-tiwai@suse.de -Signed-off-by: Takashi Iwai -Signed-off-by: Greg Kroah-Hartman ---- - sound/hda/hdac_device.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/sound/hda/hdac_device.c -+++ b/sound/hda/hdac_device.c -@@ -619,7 +619,7 @@ EXPORT_SYMBOL_GPL(snd_hdac_power_up_pm); - int snd_hdac_keep_power_up(struct hdac_device *codec) - { - if (!atomic_inc_not_zero(&codec->in_pm)) { -- int ret = pm_runtime_get_if_in_use(&codec->dev); -+ int ret = pm_runtime_get_if_active(&codec->dev, true); - if (!ret) - return -1; - if (ret < 0) diff --git a/queue-4.14/series b/queue-4.14/series index 61363cf230f..cfd5d1d6e21 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -55,6 +55,5 @@ netfilter-nf_tables-bogus-ebusy-in-helper-removal-from-transaction.patch spi-spi-fsl-spi-automatically-adapt-bits-per-word-in-cpu-mode.patch spi-fsl-spi-re-organise-transfer-bits_per_word-adaptation.patch spi-fsl-cpm-use-16-bit-mode-for-large-transfers-with-even-size.patch -alsa-hda-fix-unhandled-register-update-during-auto-suspend-period.patch m68k-move-signal-frame-following-exception-on-68020-030.patch parisc-allow-to-reboot-machine-after-system-halt.patch diff --git a/queue-4.19/alsa-hda-fix-unhandled-register-update-during-auto-suspend-period.patch b/queue-4.19/alsa-hda-fix-unhandled-register-update-during-auto-suspend-period.patch deleted file mode 100644 index 68ec69863be..00000000000 --- a/queue-4.19/alsa-hda-fix-unhandled-register-update-during-auto-suspend-period.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 81302b1c7c997e8a56c1c2fc63a296ebeb0cd2d0 Mon Sep 17 00:00:00 2001 -From: Takashi Iwai -Date: Thu, 18 May 2023 13:35:20 +0200 -Subject: ALSA: hda: Fix unhandled register update during auto-suspend period -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Takashi Iwai - -commit 81302b1c7c997e8a56c1c2fc63a296ebeb0cd2d0 upstream. - -It's reported that the recording started right after the driver probe -doesn't work properly, and it turned out that this is related with the -codec auto-suspend. Namely, after the probe phase, the usage count -goes zero, and the auto-suspend is programmed, but the codec is kept -still active until the auto-suspend expiration. When an application -(e.g. alsactl) updates the mixer values at this moment, the values are -cached but not actually written. Then, starting arecord thereafter -also results in the silence because of the missing unmute. - -The root cause is the handling of "lazy update" mode; when a mixer -value is updated *after* the suspend, it should update only the cache -and exits. At the resume, the cached value is written to the device, -in turn. The problem is that the current code misinterprets the state -of auto-suspend as if it were already suspended. - -Although we can add the check of the actual device state after -pm_runtime_get_if_in_use() for catching the missing state, this won't -suffice; the second call of regmap_update_bits_check() will skip -writing the register because the cache has been already updated by the -first call. So we'd need fixes in two different places. - -OTOH, a simpler fix is to replace pm_runtime_get_if_in_use() with -pm_runtime_get_if_active() (with ign_usage_count=true). This change -implies that the driver takes the pm refcount if the device is still -in ACTIVE state and continues the processing. A small caveat is that -this will leave the auto-suspend timer. But, since the timer callback -itself checks the device state and aborts gracefully when it's active, -this won't be any substantial problem. - -Long story short: we address the missing register-write problem just -by replacing the pm_runtime_*() call in snd_hda_keep_power_up(). - -Fixes: fc4f000bf8c0 ("ALSA: hda - Fix unexpected resume through regmap code path") -Reported-by: Amadeusz Sławiński -Closes: https://lore.kernel.org/r/a7478636-af11-92ab-731c-9b13c582a70d@linux.intel.com -Suggested-by: Cezary Rojewski -Cc: -Link: https://lore.kernel.org/r/20230518113520.15213-1-tiwai@suse.de -Signed-off-by: Takashi Iwai -Signed-off-by: Greg Kroah-Hartman ---- - sound/hda/hdac_device.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/sound/hda/hdac_device.c -+++ b/sound/hda/hdac_device.c -@@ -597,7 +597,7 @@ EXPORT_SYMBOL_GPL(snd_hdac_power_up_pm); - int snd_hdac_keep_power_up(struct hdac_device *codec) - { - if (!atomic_inc_not_zero(&codec->in_pm)) { -- int ret = pm_runtime_get_if_in_use(&codec->dev); -+ int ret = pm_runtime_get_if_active(&codec->dev, true); - if (!ret) - return -1; - if (ret < 0) diff --git a/queue-4.19/series b/queue-4.19/series index 5f236dc7dcd..d8acf7cb0b0 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -104,6 +104,5 @@ spi-spi-fsl-spi-automatically-adapt-bits-per-word-in-cpu-mode.patch spi-fsl-spi-re-organise-transfer-bits_per_word-adaptation.patch spi-fsl-cpm-use-16-bit-mode-for-large-transfers-with-even-size.patch alsa-hda-ca0132-add-quirk-for-evga-x299-dark.patch -alsa-hda-fix-unhandled-register-update-during-auto-suspend-period.patch m68k-move-signal-frame-following-exception-on-68020-030.patch parisc-allow-to-reboot-machine-after-system-halt.patch diff --git a/queue-5.4/alsa-hda-fix-unhandled-register-update-during-auto-suspend-period.patch b/queue-5.4/alsa-hda-fix-unhandled-register-update-during-auto-suspend-period.patch deleted file mode 100644 index 691eb5b593c..00000000000 --- a/queue-5.4/alsa-hda-fix-unhandled-register-update-during-auto-suspend-period.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 81302b1c7c997e8a56c1c2fc63a296ebeb0cd2d0 Mon Sep 17 00:00:00 2001 -From: Takashi Iwai -Date: Thu, 18 May 2023 13:35:20 +0200 -Subject: ALSA: hda: Fix unhandled register update during auto-suspend period -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Takashi Iwai - -commit 81302b1c7c997e8a56c1c2fc63a296ebeb0cd2d0 upstream. - -It's reported that the recording started right after the driver probe -doesn't work properly, and it turned out that this is related with the -codec auto-suspend. Namely, after the probe phase, the usage count -goes zero, and the auto-suspend is programmed, but the codec is kept -still active until the auto-suspend expiration. When an application -(e.g. alsactl) updates the mixer values at this moment, the values are -cached but not actually written. Then, starting arecord thereafter -also results in the silence because of the missing unmute. - -The root cause is the handling of "lazy update" mode; when a mixer -value is updated *after* the suspend, it should update only the cache -and exits. At the resume, the cached value is written to the device, -in turn. The problem is that the current code misinterprets the state -of auto-suspend as if it were already suspended. - -Although we can add the check of the actual device state after -pm_runtime_get_if_in_use() for catching the missing state, this won't -suffice; the second call of regmap_update_bits_check() will skip -writing the register because the cache has been already updated by the -first call. So we'd need fixes in two different places. - -OTOH, a simpler fix is to replace pm_runtime_get_if_in_use() with -pm_runtime_get_if_active() (with ign_usage_count=true). This change -implies that the driver takes the pm refcount if the device is still -in ACTIVE state and continues the processing. A small caveat is that -this will leave the auto-suspend timer. But, since the timer callback -itself checks the device state and aborts gracefully when it's active, -this won't be any substantial problem. - -Long story short: we address the missing register-write problem just -by replacing the pm_runtime_*() call in snd_hda_keep_power_up(). - -Fixes: fc4f000bf8c0 ("ALSA: hda - Fix unexpected resume through regmap code path") -Reported-by: Amadeusz Sławiński -Closes: https://lore.kernel.org/r/a7478636-af11-92ab-731c-9b13c582a70d@linux.intel.com -Suggested-by: Cezary Rojewski -Cc: -Link: https://lore.kernel.org/r/20230518113520.15213-1-tiwai@suse.de -Signed-off-by: Takashi Iwai -Signed-off-by: Greg Kroah-Hartman ---- - sound/hda/hdac_device.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/sound/hda/hdac_device.c -+++ b/sound/hda/hdac_device.c -@@ -607,7 +607,7 @@ EXPORT_SYMBOL_GPL(snd_hdac_power_up_pm); - int snd_hdac_keep_power_up(struct hdac_device *codec) - { - if (!atomic_inc_not_zero(&codec->in_pm)) { -- int ret = pm_runtime_get_if_in_use(&codec->dev); -+ int ret = pm_runtime_get_if_active(&codec->dev, true); - if (!ret) - return -1; - if (ret < 0) diff --git a/queue-5.4/series b/queue-5.4/series index dc855a65c27..03f589707a7 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -125,7 +125,6 @@ spi-fsl-spi-re-organise-transfer-bits_per_word-adaptation.patch spi-fsl-cpm-use-16-bit-mode-for-large-transfers-with-even-size.patch mt76-mt7615-fix-build-with-older-compilers.patch alsa-hda-ca0132-add-quirk-for-evga-x299-dark.patch -alsa-hda-fix-unhandled-register-update-during-auto-suspend-period.patch alsa-hda-realtek-enable-headset-onlenovo-m70-m90.patch m68k-move-signal-frame-following-exception-on-68020-030.patch parisc-handle-kgdb-breakpoints-only-in-kernel-context.patch -- 2.47.3