Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Timur Tabi <timur@freescale.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: How to report error in _pointer function?
Date: Thu, 07 Aug 2008 18:29:38 +0200	[thread overview]
Message-ID: <s5hfxpg6b65.wl%tiwai@suse.de> (raw)
In-Reply-To: <489A1D9E.7040709@freescale.com>

At Wed, 06 Aug 2008 16:54:38 -0500,
Timur Tabi wrote:
> 
> Takashi Iwai wrote:
> 
> > You can return SNDRV_PCM_POS_XRUN from the pointer callback (with
> > kernel messages if you like).  Then the PCM stream is stopped and the
> > status is changed to SND_PCM_STATUS_XRUN.  Further access will result
> > in -EPIPE.
> 
> This doesn't seem to work.  I don't get any more underrun/overrun messages, but
>  the application doesn't know that something's failed.
> 
> With mplayer, I see this message:
> 
> alsa-lib: pcm_hw.c:405:(snd_pcm_hw_hwsync) SNDRV_PCM_IOCTL_HWSYNC failed: Broken
> pipe
> 
> And then mplayer hangs with the status bar here:
> 
> A:   0.0 (00.0) of 249.0 (04:09.0) ??,?% $<50>
> 
> aplay just hangs.

Hm... The behavior with returning SNDRV_PCM_POS_XRUN is basically
identical with the real XRUN detection.  I guess the XRUN-stop
mechanism doesn't work well with the case of hwsync.

How is the PCM status during hang?  Check
/proc/asound/card0/pcm*/sub*/* files.
Also, could you run with gdb and check at which code-path is it
stopped?


thanks,

Takashi

  reply	other threads:[~2008-08-07 16:29 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 [this message]
2008-08-07 18:59       ` Timur Tabi
2008-08-08 12:03         ` Takashi Iwai
2008-08-08 15:55           ` Timur Tabi
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=s5hfxpg6b65.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=timur@freescale.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