Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: How to report error in _pointer function?
Date: Fri, 08 Aug 2008 10:55:56 -0500	[thread overview]
Message-ID: <489C6C8C.7020706@freescale.com> (raw)
In-Reply-To: <s5h1w0z67eq.wl%tiwai@suse.de>

Takashi Iwai wrote:

> What about ltrace?  I'd like to know which functions are called.

This is an embedded system.  I don't have ltrace or strace installed.

I suspect that this problem can easily be reproduced on any system.  Just modify
the _pointer function to always return XRUN, and see what aplay does.

Anyway, I tried debugging aplay.  I'm not familiar with ALSA application
programming (just drivers), so I don't know what to look for, but I did find a
pattern.

I set a breakpoint on function snd_pcm_hw_writei(), which I presume is an
alsa-lib function.  When I run aplay, the breakpoint is hit:

Breakpoint 1, snd_pcm_hw_writei (pcm=0x10024fd8, buffer=0x100250e8, size=6000)
    at pcm_hw.c:627
627             err = ioctl(fd, SNDRV_PCM_IOCTL_WRITEI_FRAMES, &xferi);
(gdb)

I hit continue, and then it immediately stops at this function again.  I can do
continue four more times and it does the same thing.  On the sixth "continue",
there is an 8-second delay.  Then my driver prints a message saying that it's
returning XRUN, and GDB stops again at snd_pcm_hw_writei().  I don't know what's
happening during that 8-second delay.

This whole process repeats forever.

-- 
Timur Tabi
Linux kernel developer at Freescale

  reply	other threads:[~2008-08-08 16:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-30 15:56 How to report error in _pointer function? Timur Tabi
2008-07-30 16:12 ` Takashi Iwai
2008-08-06 21:54   ` Timur Tabi
2008-08-07 16:29     ` Takashi Iwai
2008-08-07 18:59       ` Timur Tabi
2008-08-08 12:03         ` Takashi Iwai
2008-08-08 15:55           ` Timur Tabi [this message]
2008-08-08 22:26           ` Timur Tabi
2008-08-11  7:19             ` Takashi Iwai
2008-08-11 15:37               ` Timur Tabi

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=489C6C8C.7020706@freescale.com \
    --to=timur@freescale.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /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