No subject


Wed Jun 6 11:47:16 CEST 2007


However, although the application always delivers 0x1200 bytes to ALSA,
my driver receives different amount of data.  Why?  Is there some
buffering in ALSA?  

Secondly, although my period_size is 0x2000 bytes, why do I receive for
example 0x0a00+0x0800+0x1200=0x2400 bytes (see [0]) or 0x1200 bytes and
not at most 0x2000 bytes?

Thirdly, how is the value returned by snd_pcm_status_get_avail()
determined?  I mean, if my pointer always toggles between 0 and
period_bytes[2], how can ALSA return the values logged below [4]?  

(Here 1 sample equals 4 bytes, S16_LE, stereo.)

,----[ 4 ]
| loop: writing 0x480 samples to sound device
| audio_alsa_out: writing 0x480 samples to ALSA
| 
| loop: writing 0x480 samples to sound device
| audio_alsa_out: writing 0x480 samples to ALSA
| 
| loop: writing 0x480 samples to sound device
| audio_alsa_out: #avail: 0x700
| audio_alsa_out: writing 0x480 samples to ALSA
| 
| loop: writing 0x480 samples to sound device
| audio_alsa_out: #avail: 0xa80
| audio_alsa_out: writing 0x480 samples to ALSA
| 
| loop: writing 0x480 samples to sound device
| audio_alsa_out: #avail: 0xe00
| audio_alsa_out: writing 0x480 samples to ALSA
| 
| loop: writing 0x480 samples to sound device
| audio_alsa_out: #avail: 0x980
| audio_alsa_out: writing 0x480 samples to ALSA
| 
| loop: writing 0x480 samples to sound device
| audio_alsa_out: #avail: 0x500
| audio_alsa_out: writing 0x480 samples to ALSA
| 
| loop: writing 0x480 samples to sound device
| audio_alsa_out: #avail: 0x80
| audio_alsa_out: writing 0x480 samples to ALSA
| 
| loop: writing 0x480 samples to sound device
| audio_alsa_out: #avail: 0x400
| audio_alsa_out: writing 0x480 samples to ALSA
| 
| loop: writing 0x480 samples to sound device
| audio_alsa_out: #avail: 0x780
| audio_alsa_out: writing 0x480 samples to ALSA
`----

Thanks in advance.

Regards,
Markus Korber


More information about the Alsa-devel mailing list