ALSA: hda: Update register polling macros
PATCH 1/1 ALSA: hda: Update register polling macros
Recent commit d91857059def ("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.
Reported-by Jon Hunter <[email protected]>
Link https://lore.kernel.org/alsa-devel/[email protected]/T/#m1270737db52b5ef163eff73cb5f862d16a07a428 open here
Reviewed-by Cezary Rojewski <[email protected]>
Signed-off-by Amadeusz Sławiński <[email protected]>
--- include/sound/hdaudio.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
include/sound/hdaudio.h +4 -4
@@ -592,11 +592,11 @@ int snd_hdac_get_stream_stripe_ctl(struct hdac_bus *bus,#define snd_hdac_stream_readb (dev, reg) \ snd_hdac_reg_readb((dev)->bus, (dev)->sd_addr + AZX_REG_ ## reg)#define snd_hdac_stream_readb_poll (dev, reg, val, cond, delay_us, timeout_us) \ - readb_poll_timeout((dev)->sd_addr + AZX_REG_ ## reg, val, cond, \ - delay_us, timeout_us) + read_poll_timeout_atomic(snd_hdac_reg_readb, val, cond, delay_us, timeout_us, \ + false, (dev)->bus, (dev)->sd_addr + AZX_REG_ ## reg)#define snd_hdac_stream_readl_poll (dev, reg, val, cond, delay_us, timeout_us) \ - readl_poll_timeout((dev)->sd_addr + AZX_REG_ ## reg, val, cond, \ - delay_us, timeout_us) + read_poll_timeout_atomic(snd_hdac_reg_readl, val, cond, delay_us, timeout_us, \ + false, (dev)->bus, (dev)->sd_addr + AZX_REG_ ## reg)/* update a register, pass without AZX_REG_ prefix */ #define snd_hdac_stream_updatel (dev, reg, mask, val) \
Signature · 1 line
2.25.1
Takashi Iwai
AppliedQuoted 10 lines · Amadeusz Sławiński
Recent commit
d91857059def("ALSA: hda: Reworksnd_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 useread_poll_timeout_atomic()in order to specify register read function.
Thanks, applied with Fixes tag.
Takashi