From: Takashi Iwai <tiwai@suse.de>
To: James Courtier-Dutton <James@superbug.demon.co.uk>
Cc: Alsa-devel@lists.sourceforge.net
Subject: Re: status pointer's problem with dmix.
Date: Thu, 18 Sep 2003 10:28:07 +0200 [thread overview]
Message-ID: <s5hwuc6qz54.wl@alsa2.suse.de> (raw)
In-Reply-To: <3F68C83C.8030902@superbug.demon.co.uk>
At Wed, 17 Sep 2003 21:46:52 +0100,
James Courtier-Dutton wrote:
>
> Takashi Iwai wrote:
> > At Wed, 17 Sep 2003 20:01:36 +0100,
> > James Courtier-Dutton wrote:
> >
> >>Takashi Iwai wrote:
> >>
> >>>At Wed, 17 Sep 2003 19:33:29 +0100,
> >>>James Courtier-Dutton wrote:
> >>>
> >>>
> >>>>Output from sending stereo sound to the "dmix" device.
> >>>>bash-2.05b# cat status
> >>>>state: RUNNING
> >>>>trigger_time: 1063822024.640173000
> >>>>tstamp : 1063822060.456968000
> >>>>delay : -1719463
> >>>>avail : 1731463
> >>>>avail_max : 1731463
> >>>>-----
> >>>>hw_ptr : 1719463
> >>>>appl_ptr : 0
> >>>>bash-2.05b#
> >>>>
> >>>>Output from sending stereo sound to the "front" device.
> >>>>bash-2.05b# cat status
> >>>>state: RUNNING
> >>>>trigger_time: 1063823309.038609000
> >>>>tstamp : 1063823320.869677000
> >>>>delay : 14161
> >>>>avail : 2223
> >>>>avail_max : 3586
> >>>>-----
> >>>>hw_ptr : 567983
> >>>>appl_ptr : 582144
> >>>>
> >>>>As you can see, the "front" device acts correctly, with all the pointers
> >>>>acting as they should.
> >>>>But with "dmix", all the pointers are wrong.
> >>>>This is particularly problematic for me, as I need a properly
> >>>>functioning "delay" value for my application.
> >>>>
> >>>>This is using alsa from 2.6test5 kernel.
> >>>
> >>>
> >>>is it through the rate plugin?
> >>>there was a bug about rate plugin together with dmix, which was fixed
> >>>recently on cvs.
> >>>
> >>>
> >>>Takashi
> >>>
> >>>
> >>
> >>How do I tell if it is using the "rate" plugin?
> >>I am outputing a single stereo signal at 48khz, 16 bits.
> >>Where do I configure the rate that dmix works at natively?
> >
> >
> > at best you can dump the pcm status to the error log from your app.
> > to check the rate conversion, comparing the status in
> > /proc/asound/card0/pcm0p/sub0/hw_params would be enough, though.
> > if the hardware uses a different sample rate, surely the rate plugin
> > is working.
> >
> > anyway, if you're using the cvs version of yesterday/today, it must be
> > ok.
> >
> >
> > Takashi
> >
> >
> "rate" is not being used.
> application outputting at 48khz, hw_params set at 48khz.
> I have tested with latest alsa-lib anon cvs.
>
> So, this is a new bug.
looks like so.
i guess it's stopping at the same position as well as the rate plugin
bug hit. it was at snd_pcm_wait() in snd_pcm_write_areas(). but it
should be better to check it via gdb.
as you see, delay shows a minus value, that is the underrun.
and the appl_ptr is zero. this is the hint to debug.
but, i have no time in this week to debug further...
Takashi
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
next prev parent reply other threads:[~2003-09-18 8:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-17 18:33 status pointer's problem with dmix James Courtier-Dutton
2003-09-17 18:52 ` Takashi Iwai
2003-09-17 19:01 ` James Courtier-Dutton
2003-09-17 19:10 ` Takashi Iwai
2003-09-17 20:46 ` James Courtier-Dutton
2003-09-18 8:28 ` Takashi Iwai [this message]
2003-09-19 2:17 ` AthlonRob
2003-09-20 11:07 ` Clemens Ladisch
2003-09-21 11:43 ` Jaroslav Kysela
2003-09-21 17:06 ` AthlonRob
2003-09-27 21:13 ` AthlonRob
2003-09-18 9:50 ` Jaroslav Kysela
2003-09-18 12:48 ` James Courtier-Dutton
2003-09-18 13:03 ` Jaroslav Kysela
2003-09-18 16:20 ` James Courtier-Dutton
2003-09-18 17:28 ` Jaroslav Kysela
2003-09-18 14:10 ` Paul Davis
2003-09-18 15:02 ` Jaroslav Kysela
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=s5hwuc6qz54.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=Alsa-devel@lists.sourceforge.net \
--cc=James@superbug.demon.co.uk \
/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