* Unexpected hw_pointer value
@ 2003-08-07 23:05 Giuliano Pochini
0 siblings, 0 replies; 7+ messages in thread
From: Giuliano Pochini @ 2003-08-07 23:05 UTC (permalink / raw)
To: Alsa-devel
When I play something, depending on the buffer length and the period length,
sometimes ALSA complaints about a wrong hw_pointer value. pcm_hw_pointer()
returns the right value and the irq handler (not shown below) calls
snd_pcm_period_elapsed() only when the period is done. I can't understand what
happens. Below I report the first burst since I started playing something.
1.7MB transferred, buffer_size=32768 frames, period_size=1323 frames (25
periods). fr=the position (in frames) inside the buffer. I choosed that
setting because it makes alsa to spit the warning sooner than others. It seems
to happen when the period size is not a multiple of the buffer size, but I
failed to find a relation between bufsz/persz and the points where it prints
the errors.
pcm_hw_pointer=1699968 fr=31776
pcm_hw_pointer=1704064 fr=32
pcm_hw_pointer=1704064 fr=32
pcm_hw_pointer=1709312 fr=1344
pcm_hw_pointer=1709312 fr=1344
ALSA ../alsa-kernel/core/pcm_lib.c:155: Unexpected hw_pointer value (stream = 0, delta: -1, max jitter = 16384): wrong interrupt acknowledge?
pcm_hw_pointer=1714560 fr=2656
pcm_hw_pointer=1714560 fr=2656
pcm_hw_pointer=1714560 fr=2656
pcm_hw_pointer=1714560 fr=2656
pcm_hw_pointer=1714560 fr=2656
pcm_hw_pointer=1719936 fr=4000
pcm_hw_pointer=1719936 fr=4000
pcm_hw_pointer=1719936 fr=4000
pcm_hw_pointer=1725184 fr=5312
pcm_hw_pointer=1725184 fr=5312
ALSA ../alsa-kernel/core/pcm_lib.c:155: Unexpected hw_pointer value (stream = 0, delta: -2, max jitter = 16384): wrong interrupt acknowledge?
pcm_hw_pointer=1730432 fr=6624
pcm_hw_pointer=1730432 fr=6624
pcm_hw_pointer=1730432 fr=6624
pcm_hw_pointer=1730432 fr=6624
pcm_hw_pointer=1735808 fr=7968
pcm_hw_pointer=1735808 fr=7968
pcm_hw_pointer=1735808 fr=7968
pcm_hw_pointer=1741056 fr=9280
pcm_hw_pointer=1741056 fr=9280
ALSA ../alsa-kernel/core/pcm_lib.c:155: Unexpected hw_pointer value (stream = 0, delta: -3, max jitter = 16384): wrong interrupt acknowledge?
pcm_hw_pointer=1746304 fr=10592
pcm_hw_pointer=1746304 fr=10592
pcm_hw_pointer=1746304 fr=10592
pcm_hw_pointer=1746304 fr=10592
pcm_hw_pointer=1751680 fr=11936
pcm_hw_pointer=1751680 fr=11936
pcm_hw_pointer=1751680 fr=11936
pcm_hw_pointer=1756928 fr=13248
pcm_hw_pointer=1756928 fr=13248
ALSA ../alsa-kernel/core/pcm_lib.c:155: Unexpected hw_pointer value (stream = 0, delta: -4, max jitter = 16384): wrong interrupt acknowledge?
pcm_hw_pointer=1762176 fr=14560
pcm_hw_pointer=1762176 fr=14560
pcm_hw_pointer=1762176 fr=14560
pcm_hw_pointer=1762176 fr=14560
pcm_hw_pointer=1767552 fr=15904
pcm_hw_pointer=1767552 fr=15904
pcm_hw_pointer=1767552 fr=15904
pcm_hw_pointer=1772800 fr=17216
pcm_hw_pointer=1772800 fr=17216
ALSA ../alsa-kernel/core/pcm_lib.c:155: Unexpected hw_pointer value (stream = 0, delta: -5, max jitter = 16384): wrong interrupt acknowledge?
pcm_hw_pointer=1778048 fr=18528
pcm_hw_pointer=1778048 fr=18528
pcm_hw_pointer=1778048 fr=18528
pcm_hw_pointer=1778048 fr=18528
pcm_hw_pointer=1783424 fr=19872
pcm_hw_pointer=1783424 fr=19872
pcm_hw_pointer=1783424 fr=19872
pcm_hw_pointer=1788672 fr=21184
pcm_hw_pointer=1788672 fr=21184
ALSA ../alsa-kernel/core/pcm_lib.c:155: Unexpected hw_pointer value (stream = 0, delta: -6, max jitter = 16384): wrong interrupt acknowledge?
pcm_hw_pointer=1793920 fr=22496
pcm_hw_pointer=1793920 fr=22496
pcm_hw_pointer=1793920 fr=22496
pcm_hw_pointer=1793920 fr=22496
pcm_hw_pointer=1799296 fr=23840
pcm_hw_pointer=1799296 fr=23840
pcm_hw_pointer=1799296 fr=23840
pcm_hw_pointer=1804544 fr=25152
pcm_hw_pointer=1804544 fr=25152
ALSA ../alsa-kernel/core/pcm_lib.c:155: Unexpected hw_pointer value (stream = 0, delta: -7, max jitter = 16384): wrong interrupt acknowledge?
pcm_hw_pointer=1809792 fr=26464
pcm_hw_pointer=1809792 fr=26464
pcm_hw_pointer=1809792 fr=26464
pcm_hw_pointer=1809792 fr=26464
pcm_hw_pointer=1815168 fr=27808
pcm_hw_pointer=1815168 fr=27808
pcm_hw_pointer=1815168 fr=27808
pcm_hw_pointer=1820416 fr=29120
pcm_hw_pointer=1820416 fr=29120
ALSA ../alsa-kernel/core/pcm_lib.c:155: Unexpected hw_pointer value (stream = 0, delta: -8, max jitter = 16384): wrong interrupt acknowledge?
pcm_hw_pointer=1825664 fr=30432
pcm_hw_pointer=1825664 fr=30432
pcm_hw_pointer=1825664 fr=30432
pcm_hw_pointer=1825664 fr=30432
pcm_hw_pointer=1831040 fr=31776
pcm_hw_pointer=1831040 fr=31776
pcm_hw_pointer=1831040 fr=31776
pcm_hw_pointer=1835136 fr=32
--
Bye.
Giuliano.
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
^ permalink raw reply [flat|nested] 7+ messages in thread
* Unexpected hw_pointer value
@ 2003-10-04 21:12 Jon
2003-10-04 21:58 ` Ryan Underwood
0 siblings, 1 reply; 7+ messages in thread
From: Jon @ 2003-10-04 21:12 UTC (permalink / raw)
To: alsa-devel
hello,
i have an ES1983S Maestro-3i on a c600 dell laptop
i got this message in syslog :
ALSA sound/core/pcm_lib.c:214: Unexpected hw_pointer value (stream = 0,
delta: -944, max jitter = 1024): wrong interrupt acknowledge?
what does it mean ?
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Unexpected hw_pointer value
2003-10-04 21:12 Unexpected hw_pointer value Jon
@ 2003-10-04 21:58 ` Ryan Underwood
2003-10-05 14:26 ` Giuliano Pochini
2003-10-06 11:07 ` Takashi Iwai
0 siblings, 2 replies; 7+ messages in thread
From: Ryan Underwood @ 2003-10-04 21:58 UTC (permalink / raw)
To: alsa-devel
Hi,
On Sat, Oct 04, 2003 at 11:12:00PM +0200, Jon wrote:
> hello,
>
> i have an ES1983S Maestro-3i on a c600 dell laptop
> i got this message in syslog :
>
> ALSA sound/core/pcm_lib.c:214: Unexpected hw_pointer value (stream = 0,
> delta: -944, max jitter = 1024): wrong interrupt acknowledge?
I get a lot of these as well with the in-development Aureal driver. I'm
also curious as to what they mean. (I seem to be the only person having
the problem). They mostly occur while playing music in xmms with xmms
alsa plugin. They fill up syslog with hundreds of megabytes. :)
Thanks,
--
Ryan Underwood, <nemesis at icequake.net>, icq=10317253
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Unexpected hw_pointer value
2003-10-04 21:58 ` Ryan Underwood
@ 2003-10-05 14:26 ` Giuliano Pochini
2003-10-06 13:36 ` Jaroslav Kysela
2003-10-06 11:07 ` Takashi Iwai
1 sibling, 1 reply; 7+ messages in thread
From: Giuliano Pochini @ 2003-10-05 14:26 UTC (permalink / raw)
To: Ryan Underwood; +Cc: alsa-devel
On Sat, 4 Oct 2003 16:58:12 -0500
Ryan Underwood <nemesis-lists@icequake.net> wrote:
> > i have an ES1983S Maestro-3i on a c600 dell laptop
> > i got this message in syslog :
> >
> > ALSA sound/core/pcm_lib.c:214: Unexpected hw_pointer value (stream = 0,
> > delta: -944, max jitter = 1024): wrong interrupt acknowledge?
>
> I get a lot of these as well with the in-development Aureal driver.
Me too, with the Echoaudio driver. I had quick look at the code that prints
that warning and I couldn't see anything obviously wrong. btw I can't figure
out why it happens. It seems harmless, so I left the question on hold.
> I'm also curious as to what they mean. (I seem to be the only person having
> the problem). They mostly occur while playing music in xmms with xmms
> alsa plugin. They fill up syslog with hundreds of megabytes. :)
It happens with any program and it depends a lot on the period number and
period size settings.
--
Giuliano.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Unexpected hw_pointer value
2003-10-04 21:58 ` Ryan Underwood
2003-10-05 14:26 ` Giuliano Pochini
@ 2003-10-06 11:07 ` Takashi Iwai
1 sibling, 0 replies; 7+ messages in thread
From: Takashi Iwai @ 2003-10-06 11:07 UTC (permalink / raw)
To: Ryan Underwood; +Cc: alsa-devel
At Sat, 4 Oct 2003 16:58:12 -0500,
Ryan Underwood wrote:
>
>
> Hi,
>
> On Sat, Oct 04, 2003 at 11:12:00PM +0200, Jon wrote:
> > hello,
> >
> > i have an ES1983S Maestro-3i on a c600 dell laptop
> > i got this message in syslog :
> >
> > ALSA sound/core/pcm_lib.c:214: Unexpected hw_pointer value (stream = 0,
> > delta: -944, max jitter = 1024): wrong interrupt acknowledge?
>
> I get a lot of these as well with the in-development Aureal driver. I'm
> also curious as to what they mean. (I seem to be the only person having
> the problem). They mostly occur while playing music in xmms with xmms
> alsa plugin. They fill up syslog with hundreds of megabytes. :)
in alsa pcm, there are two routes to update the hwptr, namely,
snd_pcm_update_hw_ptr_interrupt() and snd_pcm_update_hw_ptr().
the former is called through snd_pcm_period_elapsed(), which is
originally called from the device's interrupt handler.
meanwhile, the latter is called from timer tick and some ioctl
handlers (reset, read, write).
these routines are quite similar, and we can clean up them more...
Takashi
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Unexpected hw_pointer value
2003-10-05 14:26 ` Giuliano Pochini
@ 2003-10-06 13:36 ` Jaroslav Kysela
2003-10-06 22:33 ` Jon
0 siblings, 1 reply; 7+ messages in thread
From: Jaroslav Kysela @ 2003-10-06 13:36 UTC (permalink / raw)
To: Giuliano Pochini; +Cc: Ryan Underwood, alsa-devel
On Sun, 5 Oct 2003, Giuliano Pochini wrote:
> On Sat, 4 Oct 2003 16:58:12 -0500
> Ryan Underwood <nemesis-lists@icequake.net> wrote:
>
> > > i have an ES1983S Maestro-3i on a c600 dell laptop
> > > i got this message in syslog :
> > >
> > > ALSA sound/core/pcm_lib.c:214: Unexpected hw_pointer value (stream = 0,
> > > delta: -944, max jitter = 1024): wrong interrupt acknowledge?
> >
> > I get a lot of these as well with the in-development Aureal driver.
>
> Me too, with the Echoaudio driver. I had quick look at the code that prints
> that warning and I couldn't see anything obviously wrong. btw I can't figure
> out why it happens. It seems harmless, so I left the question on hold.
>
> > I'm also curious as to what they mean. (I seem to be the only person having
> > the problem). They mostly occur while playing music in xmms with xmms
> > alsa plugin. They fill up syslog with hundreds of megabytes. :)
>
> It happens with any program and it depends a lot on the period number and
> period size settings.
We added these sanity checks for debugging purposes, but if they occur too
much, there's something bad with driver or hardware.
Basically, we have only information from last interrupt position and the
actual position in the ring buffer. We need to determine the new
"absolute" position. To detect the wrap point, we compute the delta value
for the new and old position and if delta is greater than buffer_size / 2,
we correct the new position by adding buffer_size. Otherwise we take value
as error, because we ask driver to acknowledge interrupts after
period_size not before. Note that some interrupt might be lost.
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Unexpected hw_pointer value
2003-10-06 13:36 ` Jaroslav Kysela
@ 2003-10-06 22:33 ` Jon
0 siblings, 0 replies; 7+ messages in thread
From: Jon @ 2003-10-06 22:33 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: Giuliano Pochini, Ryan Underwood, alsa-devel
On Monday 06 October, 2003 � 03:36:32PM +0200, Jaroslav Kysela wrote:
> We added these sanity checks for debugging purposes, but if they occur too
> much, there's something bad with driver or hardware.
>
> Basically, we have only information from last interrupt position and the
> actual position in the ring buffer. We need to determine the new
> "absolute" position. To detect the wrap point, we compute the delta value
> for the new and old position and if delta is greater than buffer_size / 2,
> we correct the new position by adding buffer_size. Otherwise we take value
> as error, because we ask driver to acknowledge interrupts after
> period_size not before. Note that some interrupt might be lost.
>
> Jaroslav
my hardware seems really bad : ES1983S Maestro-3i on a dell c600.
i experience lots of hardware freeze (bios does not respond) caused the
driver/card with oss or alsa.
i'm kind of desperate with my sound card :(
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-10-06 22:33 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-04 21:12 Unexpected hw_pointer value Jon
2003-10-04 21:58 ` Ryan Underwood
2003-10-05 14:26 ` Giuliano Pochini
2003-10-06 13:36 ` Jaroslav Kysela
2003-10-06 22:33 ` Jon
2003-10-06 11:07 ` Takashi Iwai
-- strict thread matches above, loose matches on Subject: below --
2003-08-07 23:05 Giuliano Pochini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.