Skip to contentSkip to conversation

static snd_pcm_uframes_t snd_aicapcm_pcm_pointer(snd_pcm_substream_t *substream)

DISCUSSION Adrian McMenamin 4 participants 7 messages Feb 24, 2006 – Feb 28, 2006

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 4 lines · Adrian McMenamin

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

#2 lore raw
Quoted 7 lines · Lee Revell
Quoted 4 lines · Adrian McMenamin

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

#3 lore raw

At Sun, 26 Feb 2006 10:55:05 +0000,

Quoted 18 lines · Adrian McMenamin
Quoted 7 lines · Lee Revell
Quoted 4 lines · Adrian McMenamin

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."

Quoted 7 lines

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

#4 lore raw
Quoted 5 lines · Takashi Iwai

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

#5 lore raw

Re: static snd_pcm_uframes_t snd_aicapcm_pcm_pointe

Quoted 9 lines · On 27-Feb-2006 Adrian McMenamin wrote:
Quoted 5 lines · Takashi Iwai

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

#6 lore raw
In reply to Adrian McMenamin

At Mon, 27 Feb 2006 23:35:26 +0000,

Quoted 10 lines · Adrian McMenamin
Quoted 5 lines · Takashi Iwai

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