All of lore.kernel.org
 help / color / mirror / Atom feed
* Meaning of "pointer" operations
@ 2002-03-22 10:09 Kasparek Tomas
  2002-03-22 16:02 ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: Kasparek Tomas @ 2002-03-22 10:09 UTC (permalink / raw)
  To: alsa-devel

Hi all,

I would like to ask you , ALSA gurus for some help.

What is exact meaning if "pointer" operations.

I know, that it should return offset in DMA buffer. What I'm not sure
about is unit - should the offset be in frames or in bytes. And should
it be offset against begin of DMA buffer (runtime->dma_addr) or
against actual period begin?

I'm writing ALSA driver for UDA1341 on Compaq iPAQ (H3600). It produce
some sound yet, but it's far from beeing usable. Actually I'm forking on
DMA part, and I got these messages from ALSA core (included in my debug
listing). If you could give me some hint, what this should be about, I
will be pleased :) (listing is a bit longer :(

command:

aplay -traw -c2 -r8000 -fS16_LE /usr/local/tmp/test3.raw

dmesg:

...
playback trigger
pcm_trigger id: 0 cmd: 1
  rate: 8000
  channels: 2
  period_size 1000
  periods: 4
  buffer_size: 4000
  dma_addr c1164000
  dma_bytes: 16000
  dma_area: 51 00 13 01 25 00 e2 00 a9 ff 65 00
process_dma
  sending period 4 (buffer_size: 4000)
    dma_bytes: 16000
    offset: 0
    dma_size: 4000
    data: 51 00 13 01 25 00 e2 00 a9 ff 65 00
OK
  sending period 3 (buffer_size: 4000)
    dma_bytes: 16000
    offset: 4000
    dma_size: 4000
    data: 44 ff 01 00 21 ff de ff 08 ff cb ff
OK
  sending period 2 (buffer_size: 4000)
    dma_bytes: 16000
    offset: 8000
    dma_size: 4000
    data: 69 31 83 32 88 33 a9 34 81 29 8d 2a
pcm trigger done
playback pointer
get_dma_pos 1320 -> 1320 -> 1320 -> 330
  min_align: 1
  hw_ptr_base: 00000000
  hw_ptr_interrupt: 00000000
  period_size: 1000
  updated pos: 330
dma_call_back
  -> period done (still pending 1) <-
playback pointer
get_dma_pos 4256 -> 256 -> 256 -> 64
  min_align: 1
  hw_ptr_base: 00000000
  hw_ptr_interrupt: 00000000
  period_size: 1000
  updated pos: 64
ALSA ../alsa-kernel/core/pcm_lib.c:120: U1nexpected hw_pointer value
(stream = 0, delta: -936, max jitter = 2000): wrong interrupt acknowledge?
process_dma
  sending period 2 (buffer_size: 4000)
    dma_bytes: 16000
    offset: 8000
    dma_size: 4000
    data: 69 31 83 32 88 33 a9 34 81 29 8d 2a
OK
  sending period 1 (buffer_size: 4000)
    dma_bytes: 16000
    offset: 12000
    dma_size: 4000
    data: 06 00 c3 00 4a fb fa fb 01 fa b5 fa
dma_callback done
dma_call_back
  -> period done (still pending 1) <-
playback pointer
get_dma_pos 8296 -> 296 -> 296 -> 74
  min_align: 1
  hw_ptr_base: 00000000
  hw_ptr_interrupt: 00000000
  period_size: 1000
  updated pos: 74
ALSA ../alsa-kernel/core/pcm_lib.c:120: U1nexpected hw_pointer value
(stream = 0, delta: -926, max jitter = 2000): wrong interrupt acknowledge?

Thanks

--

	Tomas Kasparek (sioux, xkaspa06)
 	 Tomas.Kasparek@[seznam.cz,volny.cz]
	 Linux@dcse.fee.vutbr.cz
	student UIVT FEI VUT Brno


_______________________________________________
Alsa-devel mailing list
Alsa-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-devel

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

end of thread, other threads:[~2002-03-30 14:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-22 10:09 Meaning of "pointer" operations Kasparek Tomas
2002-03-22 16:02 ` Takashi Iwai
2002-03-30 14:05   ` pmac.c compilation error matt yee-king

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.