FAILED: patch "[PATCH] ALSA: hda/ext: preserve PPLCCTL bits when clearing reset" failed to apply to 5.10-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y
git checkout FETCH_HEAD
git cherry-pick -x 36aa66de481d29edd63cbad9b5c4dc18c340fdf6
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026090345-hangnail-getup-f661@gregkh' --subject-prefix 'PATCH 5.10.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 36aa66de481d29edd63cbad9b5c4dc18c340fdf6 Mon Sep 17 00:00:00 2001
From: Xu Rao <[email protected]>
Date: Thu, 13 Aug 2026 14:55:24 +0800
Subject: [PATCH] ALSA: hda/ext: preserve PPLCCTL bits when clearing reset
snd_hdac_ext_stream_reset() polls PPLCCTL for STRST by masking the register value with AZX_PPLCCTL_STRST:
val = readl(...) & AZX_PPLCCTL_STRST;
The same masked value is then used when clearing STRST. Since val contains no bits other than STRST, clearing STRST from it always produces zero. The subsequent writel() therefore writes zero to the entire PPLCCTL register instead of clearing only the reset bit.
PPLCCTL contains other stream control fields, including the stream tag in AZX_PPLCCTL_STRM_MASK. Those fields must not be modified as a side effect of clearing stream reset.
Use snd_hdac_updatel() to clear STRST, matching the existing set-reset path and preserving all unrelated PPLCCTL bits.
sound/hda/core/ext/stream.c +2 -2
@@ -210,8 +210,8 @@ void snd_hdac_ext_stream_reset(struct hdac_ext_stream *hext_stream)break ;udelay (3 ); }while (--timeout); - val &= ~AZX_PPLCCTL_STRST ; -writel (val, hext_stream->pplc_addr +AZX_REG_PPLCCTL ); +snd_hdac_updatel (hext_stream->pplc_addr,AZX_REG_PPLCCTL , +AZX_PPLCCTL_STRST ,0 );udelay (3 ); timeout =50 ;
Sasha Levin
maintainerPATCH 1/3 ALSA: hda: fix kernel-doc warnings
From: Pierre-Louis Bossart <[email protected]>
[ Upstream commit 3531ba21f5520d0865004e7d75b6f505d08589f2 ]
v5.12-rc1 flags new warnings with make W=1, fix missing or broken function descriptors.
sound/pci/hda/hda_codec.c:3492: warning: expecting prototype for snd_hda_input_mux_info_info(). Prototype was for snd_hda_input_mux_info() instead
sound/pci/hda/hda_codec.c:3521: warning: expecting prototype for snd_hda_input_mux_info_put(). Prototype was for snd_hda_input_mux_put() instead
sound/pci/hda/hda_codec.c:3958: warning: expecting prototype for _snd_hda_pin_ctl(). Prototype was for _snd_hda_set_pin_ctl() instead
sound/pci/hda/hda_jack.c:223: warning: expecting prototype for snd_hda_set_dirty_all(). Prototype was for snd_hda_jack_set_dirty_all() instead
sound/pci/hda/hda_jack.c:309: warning: expecting prototype for snd_hda_jack_detect_enable_mst(). Prototype was for snd_hda_jack_detect_enable_callback_mst() instead
sound/pci/hda/hda_generic.c:3933: warning: expecting prototype for snd_dha_gen_add_mute_led_cdev(). Prototype was for snd_hda_gen_add_mute_led_cdev() instead
sound/pci/hda/hda_generic.c:4093: warning: expecting prototype for snd_dha_gen_add_micmute_led_cdev(). Prototype was for snd_hda_gen_add_micmute_led_cdev() instead
sound/pci/hda/patch_ca0132.c:2357: warning: expecting prototype for Prepare and send the SCP message to DSP(). Prototype was for dspio_scp() instead
sound/pci/hda/patch_ca0132.c:2883: warning: expecting prototype for Allocate router ports(). Prototype was for dsp_allocate_router_ports() instead
sound/pci/hda/patch_ca0132.c:3202: warning: expecting prototype for Write a block of data into DSP code or data RAM using pre(). Prototype was for dspxfr_one_seg() instead
sound/pci/hda/patch_ca0132.c:3397: warning: expecting prototype for data overlay to DSP memories(). Prototype was for dspxfr_image() instead
sound/hda/hdac_regmap.c:393: warning: expecting prototype for snd_hdac_regmap_init(). Prototype was for snd_hdac_regmap_exit() instead
sound/hda/ext/hdac_ext_controller.c:142: warning: expecting prototype for snd_hdac_ext_bus_get_link_index(). Prototype was for snd_hdac_ext_bus_get_link() instead
sound/hda/ext/hdac_ext_stream.c:140: warning: expecting prototype for snd_hdac_ext_linkstream_start(). Prototype was for snd_hdac_ext_link_stream_start() instead
Stable-dep-of: 36aa66de481d ("ALSA: hda/ext: preserve PPLCCTL bits when clearing reset")
--- sound/hda/ext/hdac_ext_controller.c | 2 +- sound/hda/ext/hdac_ext_stream.c | 2 +- sound/hda/hdac_regmap.c | 2 +- sound/pci/hda/hda_codec.c | 6 +++--- sound/pci/hda/hda_generic.c | 4 ++-- sound/pci/hda/hda_jack.c | 4 ++-- sound/pci/hda/patch_ca0132.c | 9 ++++----- 7 files changed, 14 insertions(+), 15 deletions(-)
sound/hda/ext/hdac_ext_controller.c +1 -1
@@ -133,7 +133,7 @@ void snd_hdac_link_free_all(struct hdac_bus *bus)EXPORT_SYMBOL_GPL (snd_hdac_link_free_all);/** -* snd_hdac_ext_bus_get_link_index - get link based on codec name +* snd_hdac_ext_bus_get_link - get link based on codec name * @bus: the pointer to HDAC bus object * @codec_name: codec name */
sound/hda/ext/hdac_ext_stream.c +1 -1
@@ -141,7 +141,7 @@ void snd_hdac_ext_stream_decouple(struct hdac_bus *bus,EXPORT_SYMBOL_GPL (snd_hdac_ext_stream_decouple);/** -* snd_hdac_ext_linkstream_start - start a stream +* snd_hdac_ext_link_stream_start - start a stream * @stream: HD-audio ext core stream to start */ void snd_hdac_ext_link_stream_start (struct hdac_ext_stream *stream)
sound/hda/hdac_regmap.c +1 -1
@@ -386,7 +386,7 @@ int snd_hdac_regmap_init(struct hdac_device *codec)EXPORT_SYMBOL_GPL (snd_hdac_regmap_init);/** -* snd_hdac_regmap_init - Release the regmap from HDA codec +* snd_hdac_regmap_exit - Release the regmap from HDA codec * @codec: the codec object */ void snd_hdac_regmap_exit (struct hdac_device *codec)
sound/pci/hda/hda_codec.c +3 -3
@@ -3491,7 +3491,7 @@ EXPORT_SYMBOL_GPL(snd_hda_check_amp_list_power);*/ /** -* snd_hda_input_mux_info_info - Info callback helper for the input-mux enum +* snd_hda_input_mux_info - Info callback helper for the input-mux enum * @imux: imux helper object * @uinfo: pointer to get/store the data */
@@ -3514,7 +3514,7 @@ int snd_hda_input_mux_info(const struct hda_input_mux *imux,EXPORT_SYMBOL_GPL (snd_hda_input_mux_info);/** -* snd_hda_input_mux_info_put - Put callback helper for the input-mux enum +* snd_hda_input_mux_put - Put callback helper for the input-mux enum * @codec: the HDA codec * @imux: imux helper object * @ucontrol: pointer to get/store the data
@@ -3949,7 +3949,7 @@ unsigned int snd_hda_correct_pin_ctl(struct hda_codec *codec,EXPORT_SYMBOL_GPL (snd_hda_correct_pin_ctl);/** -* _snd_hda_pin_ctl - Helper to set pin ctl value +* _snd_hda_set_pin_ctl - Helper to set pin ctl value * @codec: the HDA codec * @pin: referred pin NID * @val: pin control value to set
sound/pci/hda/hda_generic.c +2 -2
@@ -3947,7 +3947,7 @@ static void vmaster_update_mute_led(void *private_data, int enabled) }/** -* snd_dha_gen_add_mute_led_cdev - Create a LED classdev and enable as vmaster mute LED +* snd_hda_gen_add_mute_led_cdev - Create a LED classdev and enable as vmaster mute LED * @codec: the HDA codec * @callback: the callback for LED classdev brightness_set_blocking */
@@ -4098,7 +4098,7 @@ static int add_micmute_led_hook(struct hda_codec *codec) }/** -* snd_dha_gen_add_micmute_led_cdev - Create a LED classdev and enable as mic-mute LED +* snd_hda_gen_add_micmute_led_cdev - Create a LED classdev and enable as mic-mute LED * @codec: the HDA codec * @callback: the callback for LED classdev brightness_set_blocking *
sound/pci/hda/hda_jack.c +2 -2
@@ -213,7 +213,7 @@ static void jack_detect_update(struct hda_codec *codec, }/** -* snd_hda_set_dirty_all - Mark all the cached as dirty +* snd_hda_jack_set_dirty_all - Mark all the cached as dirty * @codec: the HDA codec * * This function sets the dirty flag to all entries of jack table.
@@ -293,7 +293,7 @@ find_callback_from_list(struct hda_jack_tbl *jack, }/** -* snd_hda_jack_detect_enable_mst - enable the jack-detection +* snd_hda_jack_detect_enable_callback_mst - enable the jack-detection * @codec: the HDA codec * @nid: pin NID to enable * @func: callback function to register
sound/pci/hda/patch_ca0132.c +4 -5
@@ -2210,7 +2210,7 @@ static int dspio_send_scp_message(struct hda_codec *codec, }/** -* Prepare and send the SCP message to DSP +* dspio_scp - Prepare and send the SCP message to DSP * @codec: the HDA codec * @mod_id: ID of the DSP module to send the command * @src_id: ID of the source
@@ -2744,7 +2744,7 @@ static int dsp_dma_stop(struct hda_codec *codec, }/** -* Allocate router ports +* dsp_allocate_router_ports - Allocate router ports * * @codec: the HDA codec * @num_chans: number of channels in the stream
@@ -3057,8 +3057,7 @@ static int dspxfr_hci_write(struct hda_codec *codec, }/** -* Write a block of data into DSP code or data RAM using pre-allocated -* DMA engine. +* dspxfr_one_seg - Write a block of data into DSP code or data RAM using pre-allocated DMA engine. * * @codec: the HDA codec * @fls: pointer to a fast load image
@@ -3255,7 +3254,7 @@ static int dspxfr_one_seg(struct hda_codec *codec, }/** -* Write the entire DSP image of a DSP code/data overlay to DSP memories +* dspxfr_image - Write the entire DSP image of a DSP code/data overlay to DSP memories * * @codec: the HDA codec * @fls_data: pointer to a fast load image
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 2/3 ALSA: HDA: hdac_ext_stream: use consistent prefixes for variables
From: Pierre-Louis Bossart <[email protected]>
[ Upstream commit 0f7e5ee62f4c24ca9db58351c86653cc3ee0bd0e ]
The existing code maximizes confusion by using 'stream' and 'hstream' variables of different types. Examples:
struct hdac_stream *stream;
struct hdac_ext_stream *stream;
struct hdac_stream *hstream;
struct hdac_ext_stream *hstream;
with some additional copy/paste remains:
struct hdac_ext_stream *azx_dev;
This patch suggests a consistent naming across all 'hdac_ext_stream' functions. The convention is:
struct hdac_stream *hstream;
struct hdac_ext_stream *hext_stream;
No functionality change - just renaming of variables and more consistent indentation.
Stable-dep-of: 36aa66de481d ("ALSA: hda/ext: preserve PPLCCTL bits when clearing reset")
--- include/sound/hdaudio_ext.h | 26 ++--- sound/hda/ext/hdac_ext_stream.c | 199 ++++++++++++++++---------------- 2 files changed, 113 insertions(+), 112 deletions(-)
include/sound/hdaudio_ext.h +13 -13
@@ -78,35 +78,35 @@ struct hdac_ext_stream { container_of(s, struct hdac_ext_stream, hstream)void snd_hdac_ext_stream_init (struct hdac_bus *bus, -struct hdac_ext_stream *stream,int idx, -int direction,int tag); +struct hdac_ext_stream *hext_stream,int idx, +int direction,int tag);int snd_hdac_ext_stream_init_all (struct hdac_bus *bus,int start_idx, -int num_stream,int dir); +int num_stream,int dir);void snd_hdac_stream_free_all (struct hdac_bus *bus);void snd_hdac_link_free_all (struct hdac_bus *bus);struct hdac_ext_stream *snd_hdac_ext_stream_assign (struct hdac_bus *bus,struct snd_pcm_substream *substream,int type); -void snd_hdac_ext_stream_release (struct hdac_ext_stream *azx_dev,int type); +void snd_hdac_ext_stream_release (struct hdac_ext_stream *hext_stream,int type);void snd_hdac_ext_stream_decouple_locked (struct hdac_bus *bus, -struct hdac_ext_stream *azx_dev,bool decouple); +struct hdac_ext_stream *hext_stream,bool decouple);void snd_hdac_ext_stream_decouple (struct hdac_bus *bus,struct hdac_ext_stream *azx_dev,bool decouple);int snd_hdac_ext_stream_set_spib (struct hdac_bus *bus, -struct hdac_ext_stream *stream,u32 value); +struct hdac_ext_stream *hext_stream,u32 value);int snd_hdac_ext_stream_get_spbmaxfifo (struct hdac_bus *bus, -struct hdac_ext_stream *stream); +struct hdac_ext_stream *hext_stream);void snd_hdac_ext_stream_drsm_enable (struct hdac_bus *bus,bool enable,int index);int snd_hdac_ext_stream_set_dpibr (struct hdac_bus *bus, -struct hdac_ext_stream *stream,u32 value); -int snd_hdac_ext_stream_set_lpib (struct hdac_ext_stream *stream,u32 value); +struct hdac_ext_stream *hext_stream,u32 value); +int snd_hdac_ext_stream_set_lpib (struct hdac_ext_stream *hext_stream,u32 value); -void snd_hdac_ext_link_stream_start (struct hdac_ext_stream *hstream); -void snd_hdac_ext_link_stream_clear (struct hdac_ext_stream *hstream); -void snd_hdac_ext_link_stream_reset (struct hdac_ext_stream *hstream); -int snd_hdac_ext_link_stream_setup (struct hdac_ext_stream *stream,int fmt); +void snd_hdac_ext_link_stream_start (struct hdac_ext_stream *hext_stream); +void snd_hdac_ext_link_stream_clear (struct hdac_ext_stream *hext_stream); +void snd_hdac_ext_link_stream_reset (struct hdac_ext_stream *hext_stream); +int snd_hdac_ext_link_stream_setup (struct hdac_ext_stream *hext_stream,int fmt);struct hdac_ext_link {struct hdac_bus *bus;
sound/hda/ext/hdac_ext_stream.c +100 -99
464 lines not on this page · raw message
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 3/3 ALSA: hda/ext: preserve PPLCCTL bits when clearing reset
In reply to Sasha LevinFrom: Xu Rao <[email protected]>
[ Upstream commit 36aa66de481d29edd63cbad9b5c4dc18c340fdf6 ]
snd_hdac_ext_stream_reset() polls PPLCCTL for STRST by masking the register value with AZX_PPLCCTL_STRST:
val = readl(...) & AZX_PPLCCTL_STRST;
The same masked value is then used when clearing STRST. Since val contains no bits other than STRST, clearing STRST from it always produces zero. The subsequent writel() therefore writes zero to the entire PPLCCTL register instead of clearing only the reset bit.
PPLCCTL contains other stream control fields, including the stream tag in AZX_PPLCCTL_STRM_MASK. Those fields must not be modified as a side effect of clearing stream reset.
Use snd_hdac_updatel() to clear STRST, matching the existing set-reset path and preserving all unrelated PPLCCTL bits.
--- sound/hda/ext/hdac_ext_stream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/hda/ext/hdac_ext_stream.c +2 -2
@@ -183,8 +183,8 @@ void snd_hdac_ext_link_stream_reset(struct hdac_ext_stream *hext_stream)break ;udelay (3 ); }while (--timeout); - val &= ~AZX_PPLCCTL_STRST ; -writel (val, hext_stream->pplc_addr +AZX_REG_PPLCCTL ); +snd_hdac_updatel (hext_stream->pplc_addr,AZX_REG_PPLCCTL , +AZX_PPLCCTL_STRST ,0 );udelay (3 ); timeout =50 ;
Signature · 1 line
2.53.0