On Mon, Dec 22, 2008 at 05:17:03PM +0100, Alexandre Ratchov wrote:
> On Mon, Dec 22, 2008 at 04:22:42PM +0100, Pierre Riteau wrote:
> > Hi,
> > I noticed that when running `aucat -l', on some of my machines sndio
> > apps would play the first sample buffer and then stop (for example,
> > ogg123, but also sdlmame).
> > These apps become unkillable by SIGTERM (they are killable by SIGKILL)
> > until aucat is killed.
> > 
> 
> does "aucat -i file.wav" stop too while "aucat -l" is running?

Yes it does stop.

> > I found that running `aucat -l -m play` solves this issue, is it normal?
> > 
> 
> no, it shouldn't fail. The default server mode is full-duplex (and
> it's supposed to work), so if there's a problem in the full-duplex
> mode of the driver, using "-m play" might hide the problem.
> 
> you can test full-duplex mode as follows:
> 
>       aucat -i file.wav -o /dev/null
> 
> it should play file.wav normally, does it? If it doesn't, could you
> send me the stderr output when the above command is started with
> AUCAT_DEBUG=4 env variable?

Running this command while an aucat server is not running plays the music
fine. The fullduplex/full_duplex variables in audioctl switch to 1.

If I'm running an aucat server, the music stops with this output
(output of the aucat client, not the server):
song42.wav: assuming wav file format
/dev/null: assuming headerless file
safile_new: using 11776(2944) fpb
file_new: sndio:hdl
dev_init: hw recording s16le,0:1,44100Hz
dev_init: hw playing s16le,0:1,44100Hz
mix_newout: using 2944 fpb
mix_bzero: used = 0, todo = 0
mix_bzero: ocount 11776, todo 11776
dev_init: using 14720 fpb
safile_start: play/rec started
file_new: wav:song42.wav
wav_readfmt: using s16le,0:1,44100Hz
song42.wav->none: abuf_fill_do: out avail
rpipe_out: song42.wav
aproc_opos: song42.wav: delta = 0
mix_setmaster: 0x2081df000: 32768/32768 -> 32768
dev_setvol: 0x2081df000
dev_setvol: 0x2081df000 -> 32768
file_new: wav:/dev/null
aproc_ipos: /dev/null: delta = 0
file_poll: /dev/null(4) song42.wav(1) hdl(5)
file_poll: /dev/null wok
wpipe_out: /dev/null
sub->/dev/null: abuf_fill_do: out avail
hdl->sub: abuf_fill_do: out avail
rpipe_out: hdl
file_poll: song42.wav rok
rpipe_in: song42.wav
pipe_read: song42.wav: got 58880 bytes in 31us
song42.wav->mix: abuf_flush_do: in ready
mix_in: used = 58880, done = 0, todo = 11776
mix_badd: todo = 11776, done = 0
mix_badd: added 2944, done = 11776, todo = 11776
mix->hdl: abuf_flush_do: in ready
wpipe_in: hdl
mix_bzero: used = 11776, todo = 0
song42.wav->mix: abuf_fill: blocked
song42.wav->mix: abuf_flush_do: in ready
mix_in: used = 47104, done = 0, todo = 0
rpipe_in: song42.wav
pipe_read: song42.wav: got 11776 bytes in 15us
song42.wav->mix: abuf_flush_do: in ready
mix_in: used = 58880, done = 0, todo = 0
rpipe_in: song42.wav
file_poll: hdl wok
wpipe_out: hdl
mix->hdl: abuf_fill_do: out avail
mix_out: used = 11776, todo = 0
safile_write: hdl: wrote 11776 bytes in 6220us
wpipe_out: hdl
mix->hdl: abuf_fill_do: out avail
mix_out: used = 0, todo = 0
mix_bzero: used = 0, todo = 0
mix_bzero: ocount 11776, todo 11776
song42.wav->mix: abuf_fill_do: out avail
rpipe_out: song42.wav
mix_badd: todo = 11776, done = 0
mix_badd: added 2944, done = 11776, todo = 11776
mix->hdl: abuf_fill_do: out avail
mix_out: used = 11776, todo = 0
safile_write: hdl: wrote 11776 bytes in 246us
wpipe_out: hdl
mix->hdl: abuf_fill_do: out avail
mix_out: used = 0, todo = 0
mix_bzero: used = 0, todo = 0
mix_bzero: ocount 11776, todo 11776
song42.wav->mix: abuf_fill_do: out avail
rpipe_out: song42.wav
pipe_read: song42.wav: got 11776 bytes in 12us
song42.wav->mix: abuf_fill_do: out avail
rpipe_out: song42.wav
mix_badd: todo = 11776, done = 0
mix_badd: added 2944, done = 11776, todo = 11776
mix->hdl: abuf_fill_do: out avail
mix_out: used = 11776, todo = 0
safile_write: hdl: wrote 4096 bytes in 85us
wpipe_out: hdl
mix->hdl: abuf_fill_do: out avail
mix_out: used = 7680, todo = 0
mix_bzero: used = 7680, todo = 0
mix_bzero: ocount 4096, todo 4096
song42.wav->mix: abuf_fill_do: out avail
rpipe_out: song42.wav
pipe_read: song42.wav: got 11776 bytes in 8us
song42.wav->mix: abuf_fill_do: out avail
rpipe_out: song42.wav
mix_badd: todo = 4096, done = 0
mix_badd: added 1024, done = 4096, todo = 4096
mix->hdl: abuf_fill_do: out avail
mix_out: used = 11776, todo = 0
safile_write: hdl: blocking...
file_poll: /dev/null(0) song42.wav(0) hdl(5)
file_poll: hdl wok
wpipe_out: hdl
mix->hdl: abuf_fill_do: out avail
mix_out: used = 11776, todo = 0
safile_write: hdl: wrote 4056 bytes in 22us
wpipe_out: hdl
mix->hdl: abuf_fill_do: out avail
mix_out: used = 7720, todo = 0
mix_bzero: used = 7720, todo = 0
mix_bzero: ocount 4056, todo 4056
song42.wav->mix: abuf_fill_do: out avail
rpipe_out: song42.wav
pipe_read: song42.wav: got 4096 bytes in 19us
song42.wav->mix: abuf_fill_do: out avail
rpipe_out: song42.wav
mix_badd: todo = 4056, done = 0
mix_badd: added 1014, done = 4056, todo = 4056
mix->hdl: abuf_fill_do: out avail
mix_out: used = 11776, todo = 0
safile_write: hdl: blocking...
file_poll: /dev/null(0) song42.wav(0) hdl(5)
file_poll: hdl wok
wpipe_out: hdl
mix->hdl: abuf_fill_do: out avail
mix_out: used = 11776, todo = 0
safile_write: hdl: wrote 3624 bytes in 17us
wpipe_out: hdl
mix->hdl: abuf_fill_do: out avail
mix_out: used = 8152, todo = 0
mix_bzero: used = 8152, todo = 0
mix_bzero: ocount 3624, todo 3624
song42.wav->mix: abuf_fill_do: out avail
rpipe_out: song42.wav
pipe_read: song42.wav: got 4056 bytes in 11us
song42.wav->mix: abuf_fill_do: out avail
rpipe_out: song42.wav
mix_badd: todo = 3624, done = 0
mix_badd: added 906, done = 3624, todo = 3624
mix->hdl: abuf_fill_do: out avail
mix_out: used = 11776, todo = 0
safile_write: hdl: blocking...
file_poll: /dev/null(0) song42.wav(0) hdl(5)
file_poll: hdl wok
wpipe_out: hdl
mix->hdl: abuf_fill_do: out avail
mix_out: used = 11776, todo = 0
safile_write: hdl: wrote 4056 bytes in 16us
wpipe_out: hdl
mix->hdl: abuf_fill_do: out avail
mix_out: used = 7720, todo = 0
mix_bzero: used = 7720, todo = 0
mix_bzero: ocount 4056, todo 4056
song42.wav->mix: abuf_fill_do: out avail
rpipe_out: song42.wav
pipe_read: song42.wav: got 3624 bytes in 9us
song42.wav->mix: abuf_fill_do: out avail
rpipe_out: song42.wav
mix_badd: todo = 4056, done = 0
mix_badd: added 1014, done = 4056, todo = 4056
mix->hdl: abuf_fill_do: out avail
mix_out: used = 11776, todo = 0
safile_write: hdl: blocking...
file_poll: /dev/null(0) song42.wav(0) hdl(5)
file_poll: hdl wok
wpipe_out: hdl
mix->hdl: abuf_fill_do: out avail
mix_out: used = 11776, todo = 0
safile_write: hdl: wrote 4056 bytes in 23us
wpipe_out: hdl
mix->hdl: abuf_fill_do: out avail
mix_out: used = 7720, todo = 0
mix_bzero: used = 7720, todo = 0
mix_bzero: ocount 4056, todo 4056
song42.wav->mix: abuf_fill_do: out avail
rpipe_out: song42.wav
pipe_read: song42.wav: got 4056 bytes in 13us
song42.wav->mix: abuf_fill_do: out avail
rpipe_out: song42.wav
mix_badd: todo = 4056, done = 0
mix_badd: added 1014, done = 4056, todo = 4056
mix->hdl: abuf_fill_do: out avail
mix_out: used = 11776, todo = 0
safile_write: hdl: blocking...
file_poll: /dev/null(0) song42.wav(0) hdl(5)
file_poll: hdl wok
wpipe_out: hdl
mix->hdl: abuf_fill_do: out avail
mix_out: used = 11776, todo = 0
safile_write: hdl: wrote 3664 bytes in 17us
wpipe_out: hdl
mix->hdl: abuf_fill_do: out avail
mix_out: used = 8112, todo = 0
mix_bzero: used = 8112, todo = 0
mix_bzero: ocount 3664, todo 3664
song42.wav->mix: abuf_fill_do: out avail
rpipe_out: song42.wav
pipe_read: song42.wav: got 4056 bytes in 10us
song42.wav->mix: abuf_fill_do: out avail
rpipe_out: song42.wav
mix_badd: todo = 3664, done = 0
mix_badd: added 916, done = 3664, todo = 3664
mix->hdl: abuf_fill_do: out avail
mix_out: used = 11776, todo = 0
safile_write: hdl: blocking...
file_poll: /dev/null(0) song42.wav(0) hdl(5)
dev_done: dev_mix = 0x20d028900, dev_sub = 0x20d028600
file_eof: song42.wav: immediate
rpipe_eof: song42.wav
aproc_del: rpipe(song42.wav): terminating...
file_del: wav:song42.wav <ROK>: delayed
song42.wav->mix: abuf_eof: requested
none->mix: abuf_flush_do: in ready
mix_in: used = 55216, done = 0, todo = 0
none->mix: abuf_eof: will drain later
aproc_del: rpipe(song42.wav): freed
file_del: wav:song42.wav <ROK>: immediate
file_poll: /dev/null(0) hdl(5)

> > It happens on VMware virtual machines but also on a real i386 with an
> > auich sound chipset (unfortunatly I haven't had the chance to test the
> > `-m play' workaround on it).
> > Below is dmesg/audioctl/mixerctl of the VMware VM.
> > I guess this is because my sound hw doesn't support fullduplex, as
> > advertised in audioctl (why fullduplex and full_duplex anyway?) but
> > shouldn't aucat work around this automatically? (I'm just playing sound,
> > not recording at the same time).
> > 
> 
> If "aucat -l" is running in full duplex mode, then it will use
> full-duplex even if sometimes all clients are only playing. That's
> because it has to keep play and rec directions in sync, in case a
> new client requests a full-duplex stream.
> 
> Anyway, if the driver advertises full-duplex, but actually it
> doesn't support it, aucat can't guess it ;) and will fail.
> 
> -- Alexandre

Reply via email to