* Metering on record
@ 2003-09-28 2:17 Erik de Castro Lopo
2003-09-29 8:37 ` Jaroslav Kysela
0 siblings, 1 reply; 5+ messages in thread
From: Erik de Castro Lopo @ 2003-09-28 2:17 UTC (permalink / raw)
To: alsa-devel
Hi all,
I was hoping someone might be able to shine some light on the
following issue. I am currently opening an ALSA device for
record say 44.1 kHz and reading 32k frames of data at a time.
Now with the above setup, if I want to do a meter, I can only
only update the meter every 32k frames or a little more than
once a second which makes for a very poor display.
So, looking at /usr/include/alsa/pcm.h I find some function
definitions which seem like they are meant for metering purposes.
Unfortunalety I can't seem to find any documentation on the ALSA
site nor can I find example code showing how this stuff is
used.
Am I missing something or does this stuff just not exist? Do
these snd_pcm_meter_* functions work? Anybody have working code
that uses these things?
Thanks,
Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo nospam@mega-nerd.com (Yes it's valid)
+-----------------------------------------------------------+
"Anyone who says you can have a lot of widely dispersed people hack
away on a complicated piece of code and avoid total anarchy has never
managed a software project." - Andy Tanenbaum in 1992 on comp.os.minix
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Metering on record
2003-09-28 2:17 Metering on record Erik de Castro Lopo
@ 2003-09-29 8:37 ` Jaroslav Kysela
2003-09-29 12:22 ` Erik de Castro Lopo
2003-09-29 22:24 ` PDAudio-CF ALSA Driver Intermittent Failure Len Moskowitz
0 siblings, 2 replies; 5+ messages in thread
From: Jaroslav Kysela @ 2003-09-29 8:37 UTC (permalink / raw)
To: Erik de Castro Lopo; +Cc: alsa-devel
On Sun, 28 Sep 2003, Erik de Castro Lopo wrote:
> Hi all,
>
> I was hoping someone might be able to shine some light on the
> following issue. I am currently opening an ALSA device for
> record say 44.1 kHz and reading 32k frames of data at a time.
>
> Now with the above setup, if I want to do a meter, I can only
> only update the meter every 32k frames or a little more than
> once a second which makes for a very poor display.
>
> So, looking at /usr/include/alsa/pcm.h I find some function
> definitions which seem like they are meant for metering purposes.
> Unfortunalety I can't seem to find any documentation on the ALSA
> site nor can I find example code showing how this stuff is
> used.
>
> Am I missing something or does this stuff just not exist? Do
> these snd_pcm_meter_* functions work? Anybody have working code
> that uses these things?
The examples are in alsa-lib/src/pcm/scopes directory, but don't expect
a better response times, because the meter plugin is also activated
when an application reads or writes data to device.
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] 5+ messages in thread
* Re: Metering on record
2003-09-29 8:37 ` Jaroslav Kysela
@ 2003-09-29 12:22 ` Erik de Castro Lopo
2003-09-29 12:30 ` Jaroslav Kysela
2003-09-29 22:24 ` PDAudio-CF ALSA Driver Intermittent Failure Len Moskowitz
1 sibling, 1 reply; 5+ messages in thread
From: Erik de Castro Lopo @ 2003-09-29 12:22 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: alsa-devel
On Mon, 29 Sep 2003 10:37:56 +0200 (CEST)
Jaroslav Kysela <perex@suse.cz> wrote:
> The examples are in alsa-lib/src/pcm/scopes directory, but don't expect
> a better response times, because the meter plugin is also activated
> when an application reads or writes data to device.
Does that mean that the only way to get better meter response is to
read smaller blocks?
Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo nospam@mega-nerd.com (Yes it's valid)
+-----------------------------------------------------------+
"The day Microsoft makes something that doesn't suck is probably the
day they start making vacuum cleaners." -- Ernst Jan Plugge
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Metering on record
2003-09-29 12:22 ` Erik de Castro Lopo
@ 2003-09-29 12:30 ` Jaroslav Kysela
0 siblings, 0 replies; 5+ messages in thread
From: Jaroslav Kysela @ 2003-09-29 12:30 UTC (permalink / raw)
To: Erik de Castro Lopo; +Cc: alsa-devel
On Mon, 29 Sep 2003, Erik de Castro Lopo wrote:
> On Mon, 29 Sep 2003 10:37:56 +0200 (CEST)
> Jaroslav Kysela <perex@suse.cz> wrote:
>
> > The examples are in alsa-lib/src/pcm/scopes directory, but don't expect
> > a better response times, because the meter plugin is also activated
> > when an application reads or writes data to device.
>
> Does that mean that the only way to get better meter response is to
> read smaller blocks?
Not really. The plugins are activated when snd_pcm_avail_update() is
called, so if you write own meter plugin and call snd_pcm_avail_update
more frequently in the read thread, you may get better results. But I
think that it might be better to read small chunks, because samples are
already processed when snd_pcm_avail_update() is called so there is no
point to delay the processing in application. In other words, it's better
to do additional (large) buffering in application to avoid xruns.
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] 5+ messages in thread
* PDAudio-CF ALSA Driver Intermittent Failure
2003-09-29 8:37 ` Jaroslav Kysela
2003-09-29 12:22 ` Erik de Castro Lopo
@ 2003-09-29 22:24 ` Len Moskowitz
1 sibling, 0 replies; 5+ messages in thread
From: Len Moskowitz @ 2003-09-29 22:24 UTC (permalink / raw)
To: Jaroslav Kysela, Jaroslav Kysela; +Cc: alsa-devel
On the Linux Audio User mailing list, Jamie Lutch wrote:
[Begin]
From: Jamie Lutch <jlutch@al...>
audioio-alsa error
2003-09-23 20:05
So I have my setup (pdaudiocf card>ecasound) running fine at 24/96, but
every once in awhile it just stops mid-stream and gives the following
error:
(audioio-alsa) Unknown Device State!
it just scrolls this message frantically, I have to reboot to get the card
to work again.
any suggestions on where to start troubleshooting? It seems to be random. I
can sometimes record for hours before it happens, other times it happens
sooner (like the other night, halfway through the first set of david
grisman
quintet :( )
thanks,
jamie
[End]
Might someone help us with this problem? What might we do to track down the
cause of this failure?
Len Moskowitz
Core Sound
www.core-sound.com
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-09-29 22:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-28 2:17 Metering on record Erik de Castro Lopo
2003-09-29 8:37 ` Jaroslav Kysela
2003-09-29 12:22 ` Erik de Castro Lopo
2003-09-29 12:30 ` Jaroslav Kysela
2003-09-29 22:24 ` PDAudio-CF ALSA Driver Intermittent Failure Len Moskowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox