All of lore.kernel.org
 help / color / mirror / Atom feed
* ALSA HW buffer managment
@ 2006-11-07  6:48 Assaf Hoffman
  2006-11-07  7:08 ` Lee Revell
  0 siblings, 1 reply; 5+ messages in thread
From: Assaf Hoffman @ 2006-11-07  6:48 UTC (permalink / raw)
  To: alsa-devel; +Cc: Rita Shtern

Hi,
As I understood, ALSA buffer management uses the 'periods' notion to
control the latency between SW stack and HW DMA.
My HW is not capable of interrupting the SW on a period basis. The only
interrupt HW generates is on half or quarter of the DMA buffer (for
example, in capture, after each half of the buffer is filled with
samples the HW will signal interrupt).
Please advise.
Thanks.



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: ALSA HW buffer managment
@ 2006-11-07  7:15 Assaf Hoffman
  2006-11-07 12:15 ` Takashi Iwai
  0 siblings, 1 reply; 5+ messages in thread
From: Assaf Hoffman @ 2006-11-07  7:15 UTC (permalink / raw)
  To: Lee Revell; +Cc: Rita Shtern, alsa-devel

Hi,
Yes, I read the "Writing an ALSA driver".
Nevertheless, it seems that the stack can configure the HW with two
independent parameters: Buffer size and period size. In such a system
where you get the interrupts on a portion of the DMA buffer size those
parameters depend on each other. How the ALSA stack can know that?
Thanks.

-----Original Message-----
From: Lee Revell [mailto:rlrevell@joe-job.com] 
Sent: Tuesday, November 07, 2006 9:08 AM
To: Assaf Hoffman
Cc: alsa-devel@lists.sourceforge.net; Rita Shtern
Subject: Re: [Alsa-devel] ALSA HW buffer managment

On Tue, 2006-11-07 at 08:48 +0200, Assaf Hoffman wrote:
> Hi,
> As I understood, ALSA buffer management uses the 'periods' notion to
> control the latency between SW stack and HW DMA.
> My HW is not capable of interrupting the SW on a period basis. The
only
> interrupt HW generates is on half or quarter of the DMA buffer (for
> example, in capture, after each half of the buffer is filled with
> samples the HW will signal interrupt).

"Period" just refers to the interval between interrupts. So your
hardware supports either 2 or 4 periods per buffer.

Did you read "Writing an ALSA driver"?

Lee


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: ALSA HW buffer managment
@ 2006-11-07 13:11 Assaf Hoffman
  0 siblings, 0 replies; 5+ messages in thread
From: Assaf Hoffman @ 2006-11-07 13:11 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, Lee Revell, Rita Shtern

Hi,
Thank you for your reply.
If I can limit the number of periods via the "hw_constrains", is it
possible also to limit the period size?
Thanks you.

-----Original Message-----
From: Takashi Iwai [mailto:tiwai@suse.de] 
Sent: Tuesday, November 07, 2006 2:15 PM
To: Assaf Hoffman
Cc: Lee Revell; Rita Shtern; alsa-devel@lists.sourceforge.net
Subject: Re: [Alsa-devel] ALSA HW buffer managment

At Tue, 7 Nov 2006 09:15:42 +0200,
Assaf Hoffman wrote:
> 
> Hi,
> Yes, I read the "Writing an ALSA driver".
> Nevertheless, it seems that the stack can configure the HW with two
> independent parameters: Buffer size and period size.

Yes, but they are _not_ necessarily independent with each other.
You can set correleation/limitations between them (called
"hw_constraints").  For example, you can limit the number of periods
to 2 or 4.  That's what Lee suggested.

> In such a system
> where you get the interrupts on a portion of the DMA buffer size those
> parameters depend on each other. How the ALSA stack can know that?


Takashi


> Thanks.
> 
> -----Original Message-----
> From: Lee Revell [mailto:rlrevell@joe-job.com] 
> Sent: Tuesday, November 07, 2006 9:08 AM
> To: Assaf Hoffman
> Cc: alsa-devel@lists.sourceforge.net; Rita Shtern
> Subject: Re: [Alsa-devel] ALSA HW buffer managment
> 
> On Tue, 2006-11-07 at 08:48 +0200, Assaf Hoffman wrote:
> > Hi,
> > As I understood, ALSA buffer management uses the 'periods' notion to
> > control the latency between SW stack and HW DMA.
> > My HW is not capable of interrupting the SW on a period basis. The
> only
> > interrupt HW generates is on half or quarter of the DMA buffer (for
> > example, in capture, after each half of the buffer is filled with
> > samples the HW will signal interrupt).
> 
> "Period" just refers to the interval between interrupts. So your
> hardware supports either 2 or 4 periods per buffer.
> 
> Did you read "Writing an ALSA driver"?
> 
> Lee
> 
> 
>
------------------------------------------------------------------------
-
> Using Tomcat but need to do more? Need to support web services,
security?
> Get stuff done quickly with pre-integrated technology to make your job
easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
>
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/alsa-devel
> 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-11-07 13:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-07  6:48 ALSA HW buffer managment Assaf Hoffman
2006-11-07  7:08 ` Lee Revell
  -- strict thread matches above, loose matches on Subject: below --
2006-11-07  7:15 Assaf Hoffman
2006-11-07 12:15 ` Takashi Iwai
2006-11-07 13:11 Assaf Hoffman

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.