Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Schoenleitner <dev.c0debabe@gmail.com>
To: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: io-plugin does not call start callback function
Date: Thu, 03 Dec 2009 12:49:32 +0100	[thread overview]
Message-ID: <4B17A5CC.5050906@gmail.com> (raw)

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

             reply	other threads:[~2009-12-03 11:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-03 11:49 Stefan Schoenleitner [this message]
2009-12-03 15:51 ` io-plugin does not call start callback function Stefan Schoenleitner
     [not found]   ` <358341420912040013m526a834bl968668da7b9f3c07@mail.gmail.com>
2009-12-06 15:12     ` Stefan Schoenleitner
2009-12-06 15:20     ` Stefan Schoenleitner
2009-12-06 22:02     ` Stefan Schoenleitner
2009-12-07  6:45       ` Raul Xiong
2009-12-07  7:18         ` Raul Xiong
2009-12-08 11:21       ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B17A5CC.5050906@gmail.com \
    --to=dev.c0debabe@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox