Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Steve deRosier <derosier@pianodisc.com>
To: Alsa-Devel <alsa-devel@lists.sourceforge.net>
Subject: How to get pcm buffer ptr info
Date: Tue, 22 Jun 2004 15:35:51 -0700	[thread overview]
Message-ID: <40D8B447.6000602@pianodisc.com> (raw)

I'm trying to take a look at the pcm buffer ptr info as printed from:
# cat /proc/asound/card0/pcm0p/sub0/status

state: RUNNING
trigger_time: 1087934998.775591000
tstamp      : 1087935198.156038000
delay       : 16013
avail       : 371
avail_max   : 2048
-----
hw_ptr      : 8794483
appl_ptr    : 8810496

snd_pcm_status_dump() call gives me the first part, but I'd like to get the hw_ptr and appl_ptr portion for debugging output from my program.

Before you go into "you don't need that information" mode, actually I do.  I don't have any interest in using it for anything other than display purposes, but I'm trying to confirm that the number of samples I think my application is writing to alsa actually matches the number of samples that alsa recieved.  So I want to do a call before I send any samples, and then right before I quit, look at the delta and see that it matches the expected ammount.  If there's another way to do this, I'd be happy to know about it.  Unfortuantely, just cat on status before and after I run my program just tells me the state is closed and not the last used ptrs.  

Anyone know how to tickle alsa-lib to tell me what I want to know?

- Steve


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com

                 reply	other threads:[~2004-06-22 22:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=40D8B447.6000602@pianodisc.com \
    --to=derosier@pianodisc.com \
    --cc=alsa-devel@lists.sourceforge.net \
    /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