From: Takashi Iwai <tiwai@suse.de>
To: "Raphaël Dingé" <raphael.dinge@ohmforce.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: Can't detect "XRUNs"
Date: Wed, 04 Jul 2018 12:33:49 +0200 [thread overview]
Message-ID: <s5hwoubwar6.wl-tiwai@suse.de> (raw)
In-Reply-To: <CAL-i0qF80jHGH_7Cwxik3HO86Ng3PZH18fxf0vABk4cMUY5OdQ@mail.gmail.com>
On Wed, 04 Jul 2018 12:26:01 +0200,
Raphaël Dingé wrote:
>
> Hi,
>
> I don't get audio drop notification "XRUNs" in /proc/kmsg.
>
> Not sure if this is the right mailing list as maybe my question is
> more kernel related, but I'll try a shot here.
>
> I'm currently making a proof of concept to see if I can run a quite
> CPU hungry audio application running without audio drops over time
> given a set of tests. In particular I want to automate playback buffer
> underruns detection so that I don't have to sit and listen closely
> when they happen.
>
> With some very extreme tests, I can hear that there are audio drops
> all over the place.
>
> I have 2 audio cards in the system, one is audio over HDMI, and the
> other one is an USB audio card that supports audio class definition.
> In both case the sound is working as I would expect. The system itself
> is an Intel NUC i7.
>
> I configured the kernel with CONFIG_SND_DEBUG=y,
> CONFIG_SND_PCM_XRUN_DEBUG=y and CONFIG_SND_VERBOSE_PROCFS=y as well as
> echo 5 > /proc/asound/cardX/pcmYp/xrun_debug with X and Y the card and
> pcm stream of interest, and so hw:X,Y when opening the device with
> snd_pcm_open.
>
> Then I watch the output of the ksyslog interface using cat /proc/kmsg
>
> When an audio drop occurs, there is nothing about XRUNs or whatever it
> is called. I don't even know what kind of log message it should look
> like, and can't find it on google as well.
>
> With audio over HDMI, I have some occurence of ALSA: PCM: [Q] Lost
> interrupts? that seems more of less related to audio drops, but not
> always.
> With the USB audio card, I have nothing.
>
> I tried to write to the xrun_injection proc file in the stream, but
> nothing happens as well.
>
> Finally I log any occurence of snd_pcm_writei returning a negative
> number, but that never happens as well.
>
> Am I missing something completely?
The recent kernel puts the xrun debug messages in trace buffer instead
of the kernel messages. Try to enable the tracing in
/sys/kernel/debug/tracing/events/snd_pcm/xrun/enable, and watch the
trace buffer (/sys/kernel/debug/tracing/trace).
Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2018-07-04 10:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-04 10:26 Can't detect "XRUNs" Raphaël Dingé
2018-07-04 10:33 ` Takashi Iwai [this message]
2018-07-04 10:38 ` Raphaël Dingé
2018-07-04 12:11 ` Raphaël Dingé
2018-07-04 13:16 ` Takashi Iwai
2018-07-04 13:49 ` Raphaël Dingé
2018-07-04 14:02 ` Takashi Iwai
2018-07-04 14:16 ` Raphaël Dingé
2018-07-04 15:11 ` Raphaël Dingé
2018-07-04 15:14 ` Takashi Iwai
2018-07-04 15:16 ` Raphaël Dingé
2018-07-04 15:49 ` Raphaël Dingé
2018-07-04 15:56 ` Takashi Iwai
2018-07-04 16:06 ` Raphaël Dingé
2018-07-05 9:10 ` Raphaël Dingé
2018-07-05 10:05 ` Takashi Iwai
2018-07-05 10:59 ` Raphaël Dingé
2018-07-05 12:34 ` Raphaël Dingé
2018-07-05 15:02 ` Takashi Iwai
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=s5hwoubwar6.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=raphael.dinge@ohmforce.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