Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Sam Edwards <cfsworks@gmail.com>, peter.ujfalusi@linux.intel.com
Cc: alsa-devel@alsa-project.org, broonie@kernel.org,
	kai.vehmanen@linux.intel.com, lgirdwood@gmail.com,
	ranjani.sridharan@linux.intel.com,
	yung-chuan.liao@linux.intel.com
Subject: Re: [PATCH 0/3] ASoC: SOF: pcm/Intel: Handle IPC dependent sequencing correctly
Date: Fri, 30 Jun 2023 08:59:36 +0200	[thread overview]
Message-ID: <ed61ddea-9a54-f42e-59f5-60472f09fc90@linux.intel.com> (raw)
In-Reply-To: <875080d0-8771-c47f-a86b-821fe33301b0@gmail.com>



On 6/30/23 08:33, Sam Edwards wrote:
> Hi folks,
> 
> When I upgraded my system to 6.4.0, I encountered a regression in audio
> output. In regression testing, I found that patch 1/3 here was the
> culprit, and the regression goes away entirely (on 6.4.0 final) when
> applying a patch that reverts this whole patchset. The problem is
> currently still unresolved even in broonie/sound.git.
> 
> The regression is an intermittent (few minutes on, few minutes off)
> distortion in audio output on my Tigerlake->ALC298 path. When playing a
> 440 Hz test tone, the output spectrum is distorted into 440 Hz, 560 Hz,
> 1440 Hz, 1560 Hz, 2440 Hz, 2560 Hz, and so on. Since this is the exact
> spectrum one would get if the output were modulated with a 1000 Hz Dirac
> comb, I interpret this to mean that the audio subsystem is dropping
> (zeroing) 1 sample every 1ms.
> 
> There seem to be conditions for this problem to come and go
> spontaneously -- in particular, it won't happen if my nvidia driver is
> unloaded. However, I can make it occur (even with no out-of-tree modules
> loaded) by sending several SIGSTOP->10ms->SIGCONT sequences to my
> pipewire daemon while it's playing audio. The distortion then continues
> until I send several more signals of that same sequence.
> 
> Now, aside from having some DSP background, I'm a total outsider to the
> ALSA and SOF world, so what follows is mere speculation on my part: I
> believe the problem has some probability of being "toggled" by a buffer
> underrun, which happens either deliberately by briefly interrupting
> pipewire, or accidentally due to bus contention from having my GPU
> active. Something (userspace? ALSA?) tries to restart the stream in
> response to that underrun, but this patchset makes stream stop+start
> more of a "warm reset," in that it doesn't clean up DMA. As a result, an
> off-by-one error somehow creeps into the DMA size, thus omitting the
> final sample of every 1ms transfer.
> 
> I am not sure if this is a regression introduced with this patchset, or
> merely a different bug that became apparent now that DMA isn't being
> reset when underruns happen. If it's the latter case, I'm happy to open
> an issue on Bugzilla instead. In either case, let me know if I can
> provide any additional troubleshooting information.

please file an issue here: https://github.com/thesofproject/linux/issues

It would help if you clarified a bit more what the issue is, it's not
clear to me if the problem happens during a long continuous playback or
when starting/stopping the stream.

Also try to disable SOF with the instructions in
https://thesofproject.github.io/latest/getting_started/intel_debug/suggestions.html
to make sure it's not an HDaudio codec issue.

Thanks!

      reply	other threads:[~2023-06-30  7:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-22  9:43 [PATCH 0/3] ASoC: SOF: pcm/Intel: Handle IPC dependent sequencing correctly Peter Ujfalusi
2023-03-22  9:43 ` [PATCH 1/3] ASoC: SOF: Intel: hda-dai: Do not perform DMA cleanup during stop Peter Ujfalusi
2023-03-22  9:43 ` [PATCH 2/3] ASoC: SOF: pcm: Make hw_params reset conditional for IPC3 Peter Ujfalusi
2023-03-22  9:43 ` [PATCH 3/3] ASoC: SOF: pcm: Improve the pcm trigger sequence Peter Ujfalusi
2023-03-22 18:47 ` [PATCH 0/3] ASoC: SOF: pcm/Intel: Handle IPC dependent sequencing correctly Mark Brown
2023-06-30  6:33 ` Sam Edwards
2023-06-30  6:59   ` Pierre-Louis Bossart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ed61ddea-9a54-f42e-59f5-60472f09fc90@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=cfsworks@gmail.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox