Wrong offset, step and size passed from alsa-lib layers to external io type plugin
Hi,
In my external io type plugin, the alsa buffer is not accessible in the transfer function, symptom of this
is I am unable to memcpy period size data from alsa buffer to my local buffers.
after debugging a little I found out that values of offset, size and areas->step are wrong.
#aplay --period-size =1024 --buffer-size=8192 test.wav
static snd_pcm_sframes_t alsa_transfer(snd_pcm_ioplug_t *io,
const snd_pcm_channel_area_t *areas, snd_pcm_uframes_t offset, snd_pcm_uframes_t size)
I get following,
Buffer size = 32768 bytes
Period size = 4096 bytes
*ALSA buffer base addr = 0x2c6e0 //wrong
Offset = 0xbeb4c7dc **//wrong*
*size = 1063777280 **//wrong*
step = 32
What could be the reason?
-Pharaoh.