[alsa-devel] io-plugin does not call start callback function
Stefan Schoenleitner
dev.c0debabe at gmail.com
Thu Dec 3 12:49:32 CET 2009
Hi,
I'm writing an io plugin that should transfer all PCM samples to a UNIX socket.
For this reason in my plugin I open the socket and then fill the plugin struct like this:
socketdump->io.mmap_rw = 0;
socketdump->io.poll_fd = socketdump->sock_fd;
socketdump->io.poll_events = POLLOUT;
Thus for my understanding (the alsa doc is really bad), every time
the socket file descriptor is available for writing the alsa plugin would generally speaking issue a data transfer.
However, when playing audio over that plugin for some reason the start callback function is never called.
Instead I get output like this:
socketdump_hw_constraint:417 26944
_snd_pcm_socketdump_open:585 26944 SND_PCM_PLUGIN_DEFINE_FUNC(): done, err=0
Playing WAVE 'test_8khz_16LE_mono.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
snd_pcm_socketdump_prepare:309 26944 Preparing with io->period_size=164 io->buffer_size=3936
snd_pcm_socketdump_pointer:229 26944 hw_ptr: 0 ()
snd_pcm_socketdump_write:268 26944 snd_pcm_socketdump_write(): areas->step=16 areas->first=0 areas->addr=0x22f1f60 offset=0, size=164 io->nonblock=0
......
Do you have any idea why the start callback function is not called at all ?
cheers,
stefan
More information about the Alsa-devel
mailing list