Comment 309 for bug 1801540

Revision history for this message
In , tiwai (tiwai-linux-kernel-bugs) wrote :

For all people who still see the problem: please test 5.3-rc6 or rc7 kernel and confirm that the problem persists.

Once after confirming the same issue with 5.3-rc7, and it's about the PCI device 1022:1457 or 1022:1487, then check the following:

1. Change the return value of azx_get_delay_from_fifo() to 0, e.g.

--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -887,7 +887,7 @@ static int azx_get_delay_from_fifo(struct azx *chip, struct azx_dev *azx_dev,
  struct snd_pcm_substream *substream = azx_dev->core.substream;

  /* just read back the calculated value in the above */
- return substream->runtime->delay;
+ return 0; // return substream->runtime->delay;
 }

 static unsigned int azx_skl_get_dpib_pos(struct azx *chip,

2. Change the return value of azx_get_delay_from_fifo() to 0 only for playback, e.g.
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -887,7 +887,9 @@ static int azx_get_delay_from_fifo(struct azx *chip, struct azx_dev *azx_dev,
  struct snd_pcm_substream *substream = azx_dev->core.substream;

  /* just read back the calculated value in the above */
- return substream->runtime->delay;
+ if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
+ return substream->runtime->delay;
+ return 0;
 }

 static unsigned int azx_skl_get_dpib_pos(struct azx *chip,

3. Drop SNDRV_PCM_INFO_BATCH workaround in hda_controller.c

--- a/sound/pci/hda/hda_controller.c
+++ b/sound/pci/hda/hda_controller.c
@@ -613,12 +613,14 @@ static int azx_pcm_open(struct snd_pcm_substream *substream)
          20,
          178000000);

+#if 0
  /* by some reason, the playback stream stalls on PulseAudio with
   * tsched=1 when a capture stream triggers. Until we figure out the
   * real cause, disable tsched mode by telling the PCM info flag.
   */
  if (chip->driver_caps & AZX_DCAPS_AMD_WORKAROUND)
   runtime->hw.info |= SNDRV_PCM_INFO_BATCH;
+#endif

  if (chip->align_buffer_size)
   /* constrain buffer sizes to be multiple of 128