Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* How to get pcm buffer ptr info
@ 2004-06-22 22:35 Steve deRosier
  0 siblings, 0 replies; only message in thread
From: Steve deRosier @ 2004-06-22 22:35 UTC (permalink / raw)
  To: Alsa-Devel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-06-22 22:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-22 22:35 How to get pcm buffer ptr info Steve deRosier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox