Skip to content

Commit 556a11a

Browse files
Amadeusz Sławińskitiwai
authored andcommitted
ALSA: hda: Update register polling macros
Recent commit d918570 ("ALSA: hda: Rework snd_hdac_stream_reset() to use macros") missed that on some devices register access needs to be done with unaligned access helper. Change polling macros to use read_poll_timeout_atomic() in order to specify register read function. Fixes: d918570 ("ALSA: hda: Rework snd_hdac_stream_reset() to use macros") Reported-by: Jon Hunter <[email protected]> Link: https://lore.kernel.org/alsa-devel/[email protected]/T/#m1270737db52b5ef163eff73cb5f862d16a07a428 Reviewed-by: Cezary Rojewski <[email protected]> Signed-off-by: Amadeusz Sławiński <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 417b9c5 commit 556a11a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/sound/hdaudio.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -592,11 +592,11 @@ int snd_hdac_get_stream_stripe_ctl(struct hdac_bus *bus,
592592
#define snd_hdac_stream_readb(dev, reg) \
593593
snd_hdac_reg_readb((dev)->bus, (dev)->sd_addr + AZX_REG_ ## reg)
594594
#define snd_hdac_stream_readb_poll(dev, reg, val, cond, delay_us, timeout_us) \
595-
readb_poll_timeout((dev)->sd_addr + AZX_REG_ ## reg, val, cond, \
596-
delay_us, timeout_us)
595+
read_poll_timeout_atomic(snd_hdac_reg_readb, val, cond, delay_us, timeout_us, \
596+
false, (dev)->bus, (dev)->sd_addr + AZX_REG_ ## reg)
597597
#define snd_hdac_stream_readl_poll(dev, reg, val, cond, delay_us, timeout_us) \
598-
readl_poll_timeout((dev)->sd_addr + AZX_REG_ ## reg, val, cond, \
599-
delay_us, timeout_us)
598+
read_poll_timeout_atomic(snd_hdac_reg_readl, val, cond, delay_us, timeout_us, \
599+
false, (dev)->bus, (dev)->sd_addr + AZX_REG_ ## reg)
600600

601601
/* update a register, pass without AZX_REG_ prefix */
602602
#define snd_hdac_stream_updatel(dev, reg, mask, val) \

0 commit comments

Comments
 (0)