All of lore.kernel.org
 help / color / mirror / Atom feed
* static snd_pcm_uframes_t snd_aicapcm_pcm_pointer(snd_pcm_substream_t *substream)
@ 2006-02-24 20:41 Adrian McMenamin
  2006-02-26  1:48 ` Lee Revell
  0 siblings, 1 reply; 7+ messages in thread
From: Adrian McMenamin @ 2006-02-24 20:41 UTC (permalink / raw)
  To: alsa-devel

What should my pointer callback return - is it the number of frames
still to come from the dma transfer or the number of frames still to
play in the device's buffer, or something else?

Thanks

Adrian



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

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

* Re: static snd_pcm_uframes_t snd_aicapcm_pcm_pointer(snd_pcm_substream_t *substream)
  2006-02-24 20:41 static snd_pcm_uframes_t snd_aicapcm_pcm_pointer(snd_pcm_substream_t *substream) Adrian McMenamin
@ 2006-02-26  1:48 ` Lee Revell
  2006-02-26 10:55   ` Adrian McMenamin
  0 siblings, 1 reply; 7+ messages in thread
From: Lee Revell @ 2006-02-26  1:48 UTC (permalink / raw)
  To: Adrian McMenamin; +Cc: alsa-devel

On Fri, 2006-02-24 at 20:41 +0000, Adrian McMenamin wrote:
> What should my pointer callback return - is it the number of frames
> still to come from the dma transfer or the number of frames still to
> play in the device's buffer, or something else?
> 

http://www.alsa-project.org/~iwai/writing-an-alsa-driver/x639.htm#PCM-INTERFACE-OPERATORS-POINTER-CALLBACK



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

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

* Re: static snd_pcm_uframes_t snd_aicapcm_pcm_pointer(snd_pcm_substream_t *substream)
  2006-02-26  1:48 ` Lee Revell
@ 2006-02-26 10:55   ` Adrian McMenamin
  2006-02-27 11:35     ` Takashi Iwai
  0 siblings, 1 reply; 7+ messages in thread
From: Adrian McMenamin @ 2006-02-26 10:55 UTC (permalink / raw)
  To: Lee Revell; +Cc: alsa-devel

On Sat, 2006-02-25 at 20:48 -0500, Lee Revell wrote:
> On Fri, 2006-02-24 at 20:41 +0000, Adrian McMenamin wrote:
> > What should my pointer callback return - is it the number of frames
> > still to come from the dma transfer or the number of frames still to
> > play in the device's buffer, or something else?
> > 
> 
> http://www.alsa-project.org/~iwai/writing-an-alsa-driver/x639.htm#PCM-INTERFACE-OPERATORS-POINTER-CALLBACK


The problem with that - which I have read many times and even host
locally - http://newgolddream.dyndns.info/alsa - so I have a copy that
is very easily accessible is that:

"This callback is called when the PCM middle layer inquires the current
hardware position on the buffer." 

Could mean any number of different things because there is more than one
buffer here.

As it is James Courtier-Dutton has clarified this for me.

But one more question: what is the different between this and the
interrupt handling? Are they both seeking to do the same thing?



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

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

* Re: static snd_pcm_uframes_t snd_aicapcm_pcm_pointer(snd_pcm_substream_t *substream)
  2006-02-26 10:55   ` Adrian McMenamin
@ 2006-02-27 11:35     ` Takashi Iwai
  2006-02-27 23:35       ` Adrian McMenamin
  0 siblings, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2006-02-27 11:35 UTC (permalink / raw)
  To: Adrian McMenamin; +Cc: Lee Revell, alsa-devel

At Sun, 26 Feb 2006 10:55:05 +0000,
Adrian McMenamin wrote:
> 
> On Sat, 2006-02-25 at 20:48 -0500, Lee Revell wrote:
> > On Fri, 2006-02-24 at 20:41 +0000, Adrian McMenamin wrote:
> > > What should my pointer callback return - is it the number of frames
> > > still to come from the dma transfer or the number of frames still to
> > > play in the device's buffer, or something else?
> > > 
> > 
> > http://www.alsa-project.org/~iwai/writing-an-alsa-driver/x639.htm#PCM-INTERFACE-OPERATORS-POINTER-CALLBACK
> 
> 
> The problem with that - which I have read many times and even host
> locally - http://newgolddream.dyndns.info/alsa - so I have a copy that
> is very easily accessible is that:
> 
> "This callback is called when the PCM middle layer inquires the current
> hardware position on the buffer." 
> 
> Could mean any number of different things because there is more than one
> buffer here.
> 
> As it is James Courtier-Dutton has clarified this for me.
> 
> But one more question: what is the different between this and the
> interrupt handling? Are they both seeking to do the same thing?

The pointer callback can be at any time to query the current DMA
position, not only from the interrupt handler, e.g. from ioctl.


Takashi


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

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

* Re: static snd_pcm_uframes_t snd_aicapcm_pcm_pointer(snd_pcm_substream_t *substream)
  2006-02-27 11:35     ` Takashi Iwai
@ 2006-02-27 23:35       ` Adrian McMenamin
  2006-02-28  8:20         ` static snd_pcm_uframes_t snd_aicapcm_pcm_pointe Giuliano Pochini
  2006-02-28 10:25         ` static snd_pcm_uframes_t snd_aicapcm_pcm_pointer(snd_pcm_substream_t *substream) Takashi Iwai
  0 siblings, 2 replies; 7+ messages in thread
From: Adrian McMenamin @ 2006-02-27 23:35 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Lee Revell, alsa-devel

On Mon, 2006-02-27 at 12:35 +0100, Takashi Iwai wrote:

> 
> The pointer callback can be at any time to query the current DMA
> position, not only from the interrupt handler, e.g. from ioctl.
> 
> 
What has DMA got to do with it? I am again confused.. I thought it was
meant to return the current playback position, not the DMA position.



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

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

* Re: static snd_pcm_uframes_t snd_aicapcm_pcm_pointe
  2006-02-27 23:35       ` Adrian McMenamin
@ 2006-02-28  8:20         ` Giuliano Pochini
  2006-02-28 10:25         ` static snd_pcm_uframes_t snd_aicapcm_pcm_pointer(snd_pcm_substream_t *substream) Takashi Iwai
  1 sibling, 0 replies; 7+ messages in thread
From: Giuliano Pochini @ 2006-02-28  8:20 UTC (permalink / raw)
  To: Adrian McMenamin; +Cc: alsa-devel


On 27-Feb-2006 Adrian McMenamin wrote:
> On Mon, 2006-02-27 at 12:35 +0100, Takashi Iwai wrote:
>
>>
>> The pointer callback can be at any time to query the current DMA
>> position, not only from the interrupt handler, e.g. from ioctl.
>>
>>
> What has DMA got to do with it? I am again confused.. I thought it was
> meant to return the current playback position, not the DMA position.

The ring buffer that holds audio data is accessed by your card
via DMA I guess.
.pointer(substream) shall return the position inside the buffer,
in frames, that the card is accessing in this moment. It's not
important whether the card uses DMA or it doesn't.


--
Giuliano.


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

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

* Re: static snd_pcm_uframes_t snd_aicapcm_pcm_pointer(snd_pcm_substream_t *substream)
  2006-02-27 23:35       ` Adrian McMenamin
  2006-02-28  8:20         ` static snd_pcm_uframes_t snd_aicapcm_pcm_pointe Giuliano Pochini
@ 2006-02-28 10:25         ` Takashi Iwai
  1 sibling, 0 replies; 7+ messages in thread
From: Takashi Iwai @ 2006-02-28 10:25 UTC (permalink / raw)
  To: Adrian McMenamin; +Cc: Lee Revell, alsa-devel

At Mon, 27 Feb 2006 23:35:26 +0000,
Adrian McMenamin wrote:
> 
> On Mon, 2006-02-27 at 12:35 +0100, Takashi Iwai wrote:
> 
> > 
> > The pointer callback can be at any time to query the current DMA
> > position, not only from the interrupt handler, e.g. from ioctl.
> > 
> > 
> What has DMA got to do with it? I am again confused.. I thought it was
> meant to return the current playback position, not the DMA position.

OK, you're right, not always DMA.

But note that this position is not accumulative but the offset in the
ring buffer.


Takashi


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

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

end of thread, other threads:[~2006-02-28 10:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-24 20:41 static snd_pcm_uframes_t snd_aicapcm_pcm_pointer(snd_pcm_substream_t *substream) Adrian McMenamin
2006-02-26  1:48 ` Lee Revell
2006-02-26 10:55   ` Adrian McMenamin
2006-02-27 11:35     ` Takashi Iwai
2006-02-27 23:35       ` Adrian McMenamin
2006-02-28  8:20         ` static snd_pcm_uframes_t snd_aicapcm_pcm_pointe Giuliano Pochini
2006-02-28 10:25         ` static snd_pcm_uframes_t snd_aicapcm_pcm_pointer(snd_pcm_substream_t *substream) Takashi Iwai

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.