Commit 956b610c authored by Cezary Rojewski's avatar Cezary Rojewski Committed by Takashi Iwai

ALSA: hda: Fix stream fifo_size initialization

SDxFIFOS register indicates the fifo size directly. There is no need to
modify the value after reading the register.
Signed-off-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20231006102857.749143-3-cezary.rojewski@intel.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent f93dc90c
...@@ -308,7 +308,7 @@ int snd_hdac_stream_setup(struct hdac_stream *azx_dev) ...@@ -308,7 +308,7 @@ int snd_hdac_stream_setup(struct hdac_stream *azx_dev)
if (ret) if (ret)
dev_dbg(bus->dev, "polling SD_FIFOSIZE 0x%04x failed: %d\n", dev_dbg(bus->dev, "polling SD_FIFOSIZE 0x%04x failed: %d\n",
AZX_REG_SD_FIFOSIZE, ret); AZX_REG_SD_FIFOSIZE, ret);
azx_dev->fifo_size = snd_hdac_stream_readw(azx_dev, SD_FIFOSIZE) + 1; azx_dev->fifo_size = snd_hdac_stream_readw(azx_dev, SD_FIFOSIZE);
/* when LPIB delay correction gives a small negative value, /* when LPIB delay correction gives a small negative value,
* we ignore it; currently set the threshold statically to * we ignore it; currently set the threshold statically to
......
...@@ -806,7 +806,7 @@ static unsigned int azx_via_get_position(struct azx *chip, ...@@ -806,7 +806,7 @@ static unsigned int azx_via_get_position(struct azx *chip,
mod_dma_pos = le32_to_cpu(*azx_dev->core.posbuf); mod_dma_pos = le32_to_cpu(*azx_dev->core.posbuf);
mod_dma_pos %= azx_dev->core.period_bytes; mod_dma_pos %= azx_dev->core.period_bytes;
fifo_size = azx_stream(azx_dev)->fifo_size - 1; fifo_size = azx_stream(azx_dev)->fifo_size;
if (azx_dev->insufficient) { if (azx_dev->insufficient) {
/* Link position never gather than FIFO size */ /* Link position never gather than FIFO size */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment