summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorCezary Rojewski <cezary.rojewski@intel.com>2023-09-26 10:06:20 +0200
committerTakashi Iwai <tiwai@suse.de>2023-10-06 11:11:39 +0200
commit2ee2c75c589acff83e987abfa74b6d81d237d92f (patch)
tree2124dd9e37b8c76a205056bba8765b1b904bf5c4 /include/sound
parentc258bcc289e6920038186eae38b2b7aa9786d796 (diff)
downloadlinux-stable-2ee2c75c589acff83e987abfa74b6d81d237d92f.tar.gz
linux-stable-2ee2c75c589acff83e987abfa74b6d81d237d92f.tar.bz2
linux-stable-2ee2c75c589acff83e987abfa74b6d81d237d92f.zip
ALSA: hda: Poll SDxFIFOS after programming SDxFMT
Software shall read SDxFIFOS calculated by the hardware and notify if invalid value is programmed before continuing the stream preparation. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20230926080623.43927-2-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/hda_register.h2
-rw-r--r--include/sound/hdaudio.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/include/sound/hda_register.h b/include/sound/hda_register.h
index 9c7872c0ca79..55958711d697 100644
--- a/include/sound/hda_register.h
+++ b/include/sound/hda_register.h
@@ -91,6 +91,8 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 };
#define AZX_REG_SD_BDLPL 0x18
#define AZX_REG_SD_BDLPU 0x1c
+#define AZX_SD_FIFOSIZE_MASK GENMASK(15, 0)
+
/* GTS registers */
#define AZX_REG_LLCH 0x14
diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h
index 32c59053b48e..41d725babf53 100644
--- a/include/sound/hdaudio.h
+++ b/include/sound/hdaudio.h
@@ -624,6 +624,9 @@ int snd_hdac_stream_set_lpib(struct hdac_stream *azx_dev, u32 value);
#define snd_hdac_stream_readb_poll(dev, 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_readw_poll(dev, reg, val, cond, delay_us, timeout_us) \
+ read_poll_timeout_atomic(snd_hdac_reg_readw, 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) \
read_poll_timeout_atomic(snd_hdac_reg_readl, val, cond, delay_us, timeout_us, \
false, (dev)->bus, (dev)->sd_addr + AZX_REG_ ## reg)