(In reply to Ernst Sjöstrand from comment #240)
> (In reply to Takashi Iwai from comment #237)
> > What if you remove azx_get_delay_from_fifo assignment to get_delay[0/1],
> > together with dropping SNDRV_PCM_INFO_BATCH flag?  Still getting the same
> > problem?
> 
> I getting the crackling mic input if I do that yes.

And you didn't get the same crackling mic input with patch no.2?
If so, there are still two differences:
- The patch2 calculates the delay from the register
- The patch2 applies the delay also for the playback

But the second point shouldn't influence on the recording quality.  Then
it's about the first point, and it can be changed like:

--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -866,8 +866,8 @@ static unsigned int azx_get_pos_fifo(struct azx *chip, 
struct azx_dev *azx_dev)
        if (!runtime)
                return pos;
 
-       runtime->delay = AMD_FIFO_SIZE;
-       delay = frames_to_bytes(runtime, AMD_FIFO_SIZE);
+       delay = snd_hdac_stream_readw(azx_stream(azx_dev), SD_FIFOSIZE) + 1;
+       runtime->delay = bytes_to_frames(runtime, delay);
        if (azx_dev->insufficient) {
                if (pos < delay) {
                        delay = pos;


FWIW, the second point can be changed even more simply.

--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -878,7 +878,7 @@ static unsigned int azx_get_pos_fifo(struct azx *chip, 
struct azx_dev *azx_dev)
        }
 
        /* correct the DMA position for capture stream */
-       if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
+       if (1 /*substream->stream == SNDRV_PCM_STREAM_CAPTURE*/) {
                if (pos < delay)
                        pos += azx_dev->core.bufsize;
                pos -= delay;


Let us know if any of these (with/without the get_delay disablement) makes 
improvement.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1801540

Title:
  Microphone distorted sound on ALC892/1220 on AMD chipsets

To manage notifications about this bug go to:
https://bugs.launchpad.net/linux/+bug/1801540/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to