2004-11-01 04:44:17

by Martin Schlemmer

[permalink] [raw]
Subject: XMMS (or some other audio player) 'hang' issues with intel8x0 and dmix plugin [u]

Hi,

I have mailed below to alsa-user a time or two already, but no
response as of yet, so I am wondering if anybody here have had
similar issues. Not much has changed, but I have also tried
BMP, and alsa-player, with similar results.

-----------

I have a Asus P4C800-E with a SoundMax 1985 audio chip on.
Alsa-lib-1.0.[56] and 2.6.[6789] kernel. I have dmix setup (.asoundrc
below).

Now I mostly use XMMS for playing mp3's, and intermittently xmms
will just 'hang'. It is not locked or anything, but the 'graph'
just stand still, and no audio. If I press play again, it starts
to play for some time again. This is especially easy to duplicate
if the box is under heavy load. If I use the device directly,
without the dmix plugin, it works fine, or if I use oss emulation,
it works fine as well ...

If any more info is needed, let me know. My .asoundrc and a strace
of XMMS pid follows.


My .asoundrc looks like this:

---
pcm.!default {
type plug
slave.pcm "asymed"
}

pcm.dsp0 {
type plug
slave.pcm "asymed"
}

ctl.mixer0 {
type hw
card 0
}

pcm.asymed {
type asym
playback.pcm "dmixer"
capture.pcm "mixin"
}

pcm.dmixer {
type dmix
ipc_key 1025
slave {
pcm "hw:0,0"
# period_time 0
# period_size 1024
# buffer_size 4096
# periods 128
# rate 48000
}
bindings {
0 0
1 1
}
}

pcm.mixin {
type dsnoop
ipc_key 1026
ipc_key_add_uid yes
slave {
pcm "hw:0,0"
channels 2
# period_size 1024
# buffer_size 4096
# rate 48000
# periods 0
# period_time 0
}
bindings {
0 0
0 1
}
}
---

And a strace of the xmms pid something like this (keeps looping,
and stops for a few seconds at every other poll):

---
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 0) = 0
gettimeofday({1090098067, 90349}, NULL) = 0
gettimeofday({1090098067, 90384}, NULL) = 0
write(3, "\226\3\n\0\34\0\300\0029\0\300\2\0\6@\0\240\2\0\0L\0\20"..., 116) = 116
read(3, "\1\2\257\376\0\0\0\0\22\0\240\2\0\0\0\0\0\0\0\0\1\0\0\0"..., 32) = 32
gettimeofday({1090098067, 90817}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 9) = 0
gettimeofday({1090098067, 101150}, NULL) = 0
gettimeofday({1090098067, 101214}, NULL) = 0
gettimeofday({1090098067, 101275}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 8) = 0
gettimeofday({1090098067, 110151}, NULL) = 0
gettimeofday({1090098067, 110194}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 0) = 0
gettimeofday({1090098067, 110350}, NULL) = 0
gettimeofday({1090098067, 110387}, NULL) = 0
gettimeofday({1090098067, 110485}, NULL) = 0
write(3, "\226\3\n\0\34\0\300\0029\0\300\2\0\6@\0\0\2\20\0L\0\20"..., 40) = 40
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 9) = 0
gettimeofday({1090098067, 120150}, NULL) = 0
gettimeofday({1090098067, 120191}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 0) = 0
gettimeofday({1090098067, 120345}, NULL) = 0
write(3, ">\3\7\0\213\7\300\2\32\0\300\0029\0\300\2\253\0\0\0p\0"..., 76) = 76
read(3, "\1\2\264\376\0\0\0\0\22\0\240\2\0\0\0\0\0\0\0\0\1\0\0\0"..., 32) = 32
gettimeofday({1090098067, 120680}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 9) = 0
gettimeofday({1090098067, 130139}, NULL) = 0
gettimeofday({1090098067, 130176}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 0) = 0
gettimeofday({1090098067, 130319}, NULL) = 0
gettimeofday({1090098067, 130353}, NULL) = 0
gettimeofday({1090098067, 130438}, NULL) = 0
write(3, "\226\3\n\0\34\0\300\0029\0\300\2\0\6@\0P\2\20\0L\0\20\0"..., 40) = 40
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 9) = 0
gettimeofday({1090098071, 727050}, NULL) = 0
gettimeofday({1090098071, 727116}, NULL) = 0
gettimeofday({1090098071, 727154}, NULL) = 0
gettimeofday({1090098071, 727261}, NULL) = 0
write(3, "\226\3\n\0\34\0\300\0029\0\300\2\0\6@\0\240\2\20\0L\0\20"..., 40) = 40
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 9) = 0
gettimeofday({1090098071, 738803}, NULL) = 0
gettimeofday({1090098071, 738864}, NULL) = 0
write(3, ">\3\7\0\213\7\300\2\32\0\300\0029\0\300\2\254\0\0\0p\0"..., 76) = 76
read(3, "\1\2\272\376\0\0\0\0\22\0\240\2\0\0\0\0\0\0\0\0\1\0\0\0"..., 32) = 32
gettimeofday({1090098071, 739165}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 9) = 0
gettimeofday({1090098071, 750043}, NULL) = 0
gettimeofday({1090098071, 750108}, NULL) = 0
gettimeofday({1090098071, 750145}, NULL) = 0
gettimeofday({1090098071, 750249}, NULL) = 0
write(3, "\226\3\n\0\34\0\300\0029\0\300\2\0\6@\0\0\2 \0L\0\20\0"..., 40) = 40
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 6) = 0
gettimeofday({1090098071, 758043}, NULL) = 0
gettimeofday({1090098071, 758090}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 1) = 0
gettimeofday({1090098071, 760033}, NULL) = 0
gettimeofday({1090098071, 760075}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 0) = 0
gettimeofday({1090098071, 760254}, NULL) = 0
write(3, ">\3\7\0\213\7\300\2\32\0\300\0029\0\300\2\255\0\0\0p\0"..., 76) = 76
read(3, "\1\2\277\376\0\0\0\0\22\0\240\2\0\0\0\0\0\0\0\0\1\0\0\0"..., 32) = 32
gettimeofday({1090098071, 760592}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 9) = 0
gettimeofday({1090098071, 776028}, NULL) = 0
gettimeofday({1090098071, 776093}, NULL) = 0
gettimeofday({1090098071, 776128}, NULL) = 0
gettimeofday({1090098071, 776232}, NULL) = 0
write(3, "\226\3\n\0\34\0\300\0029\0\300\2\0\6@\0P\2 \0L\0\20\0\30"..., 40) = 40
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 9) = 0
gettimeofday({1090098071, 809155}, NULL) = 0
gettimeofday({1090098071, 809234}, NULL) = 0
gettimeofday({1090098071, 809273}, NULL) = 0
read(15, 0xbfffe850, 72) = -1 EAGAIN (Resource temporarily unavailable)
gettimeofday({1090098071, 809426}, NULL) = 0
write(3, "\226\3\n\0\34\0\300\0029\0\300\2\0\6@\0\240\2 \0L\0\20"..., 40) = 40
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 9) = 0
gettimeofday({1090098071, 820034}, NULL) = 0
gettimeofday({1090098071, 820103}, NULL) = 0
write(3, ">\3\7\0\213\7\300\2\32\0\300\0029\0\300\2\256\0\0\0p\0"..., 76) = 76
read(3, "\1\2\305\376\0\0\0\0\22\0\240\2\0\0\0\0\0\0\0\0\1\0\0\0"..., 32) = 32
gettimeofday({1090098071, 820476}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 9) = 0
gettimeofday({1090098071, 831020}, NULL) = 0
gettimeofday({1090098071, 831083}, NULL) = 0
gettimeofday({1090098071, 831119}, NULL) = 0
gettimeofday({1090098071, 831223}, NULL) = 0
write(3, "\226\3\n\0\34\0\300\0029\0\300\2\0\6@\0\0\0020\0L\0\20"..., 40) = 40
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 7) = 0
gettimeofday({1090098071, 840020}, NULL) = 0
gettimeofday({1090098071, 840066}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 0) = 0
gettimeofday({1090098071, 840250}, NULL) = 0
write(3, ">\3\7\0\213\7\300\2\32\0\300\0029\0\300\2\257\0\0\0p\0"..., 76) = 76
read(3, "\1\2\312\376\0\0\0\0\22\0\240\2\0\0\0\0\0\0\0\0\1\0\0\0"..., 32) = 32
gettimeofday({1090098071, 840586}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 9) = 0
gettimeofday({1090098071, 852096}, NULL) = 0
gettimeofday({1090098071, 852161}, NULL) = 0
gettimeofday({1090098071, 852211}, NULL) = 0
gettimeofday({1090098071, 852306}, NULL) = 0
write(3, "\226\3\n\0\34\0\300\0029\0\300\2\0\6@\0P\0020\0L\0\20\0"..., 40) = 40
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 9) = 0
gettimeofday({1090098071, 864690}, NULL) = 0
gettimeofday({1090098071, 864754}, NULL) = 0
gettimeofday({1090098071, 864817}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 5) = 0
gettimeofday({1090098071, 871014}, NULL) = 0
gettimeofday({1090098071, 871057}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 3) = 0
gettimeofday({1090098071, 875023}, NULL) = 0
gettimeofday({1090098071, 875094}, NULL) = 0
gettimeofday({1090098071, 875135}, NULL) = 0
write(3, "\226\3\n\0\34\0\300\0029\0\300\2\0\6@\0\240\0020\0L\0\20"..., 88) = 88
read(3, "\1\2\317\376\0\0\0\0\22\0\240\2\0\0\0\0\0\0\0\0\1\0\0\0"..., 32) = 32
gettimeofday({1090098071, 875567}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
select(4, [3], NULL, NULL, {0, 0}) = 0 (Timeout)
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 9) = 0
gettimeofday({1090098071, 904090}, NULL) = 0
gettimeofday({1090098071, 904151}, NULL) = 0
gettimeofday({1090098071, 904197}, NULL) = 0
gettimeofday({1090098071, 904288}, NULL) = 0
write(3, "\226\3\n\0\34\0\300\0029\0\300\2\0\6@\0\0\3\0\0L\0\20\0"..., 40) = 40
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 9) = 0
gettimeofday({1090098071, 915044}, NULL) = 0
gettimeofday({1090098071, 915135}, NULL) = 0
write(3, ">\3\7\0\213\7\300\2\32\0\300\0029\0\300\2\1\0\0\0p\0\31"..., 48) = 48
read(3, "\1\2\323\376\0\0\0\0\22\0\240\2\0\0\0\0\0\0\0\0\1\0\0\0"..., 32) = 32
gettimeofday({1090098071, 915546}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 9) = 0
gettimeofday({1090098071, 932763}, NULL) = 0
gettimeofday({1090098071, 932831}, NULL) = 0
gettimeofday({1090098071, 932869}, NULL) = 0
gettimeofday({1090098071, 932976}, NULL) = 0
write(3, "\226\3\n\0\34\0\300\0029\0\300\2\0\6@\0P\3\0\0L\0\20\0"..., 40) = 40
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 1) = 0
gettimeofday({1090098071, 935996}, NULL) = 0
gettimeofday({1090098071, 936049}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 6) = 0
gettimeofday({1090098071, 943001}, NULL) = 0
gettimeofday({1090098071, 943068}, NULL) = 0
write(3, ">\3\7\0\213\7\300\2\32\0\300\0029\0\300\2\2\0\0\0p\0\31"..., 48) = 48
read(3, "\1\2\327\376\0\0\0\0\22\0\240\2\0\0\0\0\0\0\0\0\1\0\0\0"..., 32) = 32
gettimeofday({1090098071, 943424}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 9) = 0
gettimeofday({1090098071, 954008}, NULL) = 0
gettimeofday({1090098071, 954069}, NULL) = 0
gettimeofday({1090098071, 954103}, NULL) = 0
read(15, 0xbfffe850, 72) = -1 EAGAIN (Resource temporarily unavailable)
gettimeofday({1090098071, 954256}, NULL) = 0
write(3, "\226\3\n\0\34\0\300\0029\0\300\2\0\6@\0\240\3\0\0L\0\20"..., 40) = 40
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 9) = 0
gettimeofday({1090098071, 968303}, NULL) = 0
gettimeofday({1090098071, 968368}, NULL) = 0
gettimeofday({1090098071, 968408}, NULL) = 0
gettimeofday({1090098071, 968516}, NULL) = 0
write(3, "\226\3\n\0\34\0\300\0029\0\300\2\0\6@\0\0\3\20\0L\0\20"..., 40) = 40
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 9) = 0
gettimeofday({1090098072, 2636}, NULL) = 0
gettimeofday({1090098072, 2699}, NULL) = 0
gettimeofday({1090098072, 2736}, NULL) = 0
write(3, "\226\3\n\0\34\0\300\0029\0\300\2\0\6@\0P\3\20\0L\0\20\0"..., 88) = 88
read(3, "\1\2\335\376\0\0\0\0\22\0\240\2\0\0\0\0\0\0\0\0\1\0\0\0"..., 32) = 32
gettimeofday({1090098072, 3081}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 9) = 0
gettimeofday({1090098072, 13986}, NULL) = 0
gettimeofday({1090098072, 14056}, NULL) = 0
write(3, ">\3\7\0\213\7\300\2\32\0\300\0029\0\300\2\4\0\0\0p\0\31"..., 48) = 48
read(3, "\1\2\340\376\0\0\0\0\22\0\240\2\0\0\0\0\0\0\0\0\1\0\0\0"..., 32) = 32
gettimeofday({1090098072, 14404}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 9) = 0
gettimeofday({1090098072, 25462}, NULL) = 0
gettimeofday({1090098072, 25524}, NULL) = 0
gettimeofday({1090098072, 25559}, NULL) = 0
gettimeofday({1090098072, 25649}, NULL) = 0
write(3, "\226\3\n\0\34\0\300\0029\0\300\2\0\6@\0\240\3\20\0L\0\20"..., 40) = 40
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 6) = 0
gettimeofday({1090098072, 32981}, NULL) = 0
gettimeofday({1090098072, 33028}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 2) = 0
gettimeofday({1090098072, 36059}, NULL) = 0
gettimeofday({1090098072, 36129}, NULL) = 0
write(3, ">\3\7\0\213\7\300\2\32\0\300\0029\0\300\2\5\0\0\0p\0\31"..., 48) = 48
read(3, "\1\2\344\376\0\0\0\0\22\0\240\2\0\0\0\0\0\0\0\0\1\0\0\0"..., 32) = 32
gettimeofday({1090098072, 36464}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 9) = 0
gettimeofday({1090098072, 46970}, NULL) = 0
gettimeofday({1090098072, 47034}, NULL) = 0
gettimeofday({1090098072, 47070}, NULL) = 0
gettimeofday({1090098072, 47176}, NULL) = 0
write(3, "\226\3\n\0\34\0\300\0029\0\300\2\0\6@\0\0\3 \0L\0\20\0"..., 40) = 40
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 9) = 0
gettimeofday({1090098072, 58798}, NULL) = 0
gettimeofday({1090098072, 58861}, NULL) = 0
gettimeofday({1090098072, 58931}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 4) = 0
gettimeofday({1090098072, 64932}, NULL) = 0
gettimeofday({1090098072, 64976}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 3) = 0
gettimeofday({1090098072, 68955}, NULL) = 0
gettimeofday({1090098072, 69020}, NULL) = 0
gettimeofday({1090098072, 69058}, NULL) = 0
write(3, "\226\3\n\0\34\0\300\0029\0\300\2\0\6@\0P\3 \0L\0\20\0\30"..., 88) = 88
read(3, "\1\2\351\376\0\0\0\0\22\0\240\2\0\0\0\0\0\0\0\0\1\0\0\0"..., 32) = 32
gettimeofday({1090098072, 69435}, NULL) = 0
ioctl(3, FIONREAD, [0]) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 3, 9) = 0
gettimeofday({1090098072, 106582}, NULL) = 0
gettimeofday({1090098072, 106663}, NULL) = 0
gettimeofday({1090098072, 106709}, NULL) = 0
gettimeofday({1090098072, 106836}, NULL) = 0
write(3, "\226\3\n\0\34\0\300\0029\0\300\2\0\6@\0\240\3 \0L\0\20"..., 40) = 40
ioctl(3, FIONREAD, [0]) = 0
poll(
---

--
Martin Schlemmer


Attachments:
signature.asc (189.00 B)
This is a digitally signed message part

2004-11-02 07:44:26

by Clemens Schwaighofer

[permalink] [raw]
Subject: Re: XMMS (or some other audio player) 'hang' issues with intel8x0 and dmix plugin [u]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/01/2004 01:42 PM, Martin Schlemmer [c] wrote:
| Hi,
|
| I have mailed below to alsa-user a time or two already, but no
| response as of yet, so I am wondering if anybody here have had
| similar issues. Not much has changed, but I have also tried
| BMP, and alsa-player, with similar results.
|
| -----------
|
| I have a Asus P4C800-E with a SoundMax 1985 audio chip on.
| Alsa-lib-1.0.[56] and 2.6.[6789] kernel. I have dmix setup (.asoundrc
| below).
|
| Now I mostly use XMMS for playing mp3's, and intermittently xmms
| will just 'hang'. It is not locked or anything, but the 'graph'
| just stand still, and no audio. If I press play again, it starts
| to play for some time again. This is especially easy to duplicate
| if the box is under heavy load. If I use the device directly,
| without the dmix plugin, it works fine, or if I use oss emulation,
| it works fine as well ...

I have the same problem at home, I changed something in the .asoundrc
and it went away. it still plays a little bit skippy, but better than
suddenly stop.

I had this problem on a Sony Laptop (GRX series) with an i8x0 chipsetz
and a yamaha soundchip (which is controlled by the i8x0 drivers).

I can give more info if needed.

- --
[ Clemens Schwaighofer -----=====:::::~ ]
[ TBWA\ && TEQUILA\ Japan IT Group ]
[ 6-17-2 Ginza Chuo-ku, Tokyo 104-0061, JAPAN ]
[ Tel: +81-(0)3-3545-7703 Fax: +81-(0)3-3545-7343 ]
[ http://www.tequila.co.jp http://www.tbwajapan.co.jp ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBhzqdjBz/yQjBxz8RAit3AKCZy9/EHC1h3xDw4Vhxshl47WfulwCfYAJf
W6PgGSyS5O0g9vMa/KNtuzU=
=uFSF
-----END PGP SIGNATURE-----

2004-11-02 08:59:31

by Christophe Saout

[permalink] [raw]
Subject: Re: XMMS (or some other audio player) 'hang' issues with intel8x0 and dmix plugin [u]

Am Montag, den 01.11.2004, 06:42 +0200 schrieb Martin Schlemmer [c]:

> I have mailed below to alsa-user a time or two already, but no
> response as of yet, so I am wondering if anybody here have had
> similar issues. Not much has changed, but I have also tried
> BMP, and alsa-player, with similar results.

I've tracked this down to what seems to be a bug in the libalsa dmix
code with mmap emulation. If the sound output was stopped for some
reason (stream paused or underrun) the library will accept more data
until the buffer is full but never restart the output.

https://bugtrack.alsa-project.org/alsa-bug/view.php?id=209


Attachments:
signature.asc (189.00 B)
Dies ist ein digital signierter Nachrichtenteil

2004-11-02 11:40:25

by Jan Knutar

[permalink] [raw]
Subject: Re: XMMS (or some other audio player) 'hang' issues with intel8x0 and dmix plugin [u]

On Tuesday 02 November 2004 10:57, Christophe Saout wrote:

> I've tracked this down to what seems to be a bug in the libalsa dmix
> code with mmap emulation. If the sound output was stopped for some
> reason (stream paused or underrun) the library will accept more data
> until the buffer is full but never restart the output.

Strangely, I've observed these kinds of "Hangs" with bmp and mplayer,
without mmap mode enabled in either. Also using dmix as in the other
reports here. Could of course be some third application using alsa in
mmap mode, I suppose.

Unfortunately, I have no strace to offer right now as the bug is happening
randomly and I haven't been able to find any method by which to reproduce
it.

What's strange is that almost always when it happens, either mplayer or
beep-media-player will have an extra forked process. As bmp is threaded
and I shouldn't see more than one bmp in ps aux on NPTL, this seemed a
bit strange. Strace on the process that looked more recent makes it usually
wake up from deep sleep, and then it promptly vanishes after only a few syscalls.
The strace itself seems to wake it up... After the 'extra' process is gone,
sound output usually resumes, but not always. Other times strace only reveals
the app doing nanosleep's and nothing else, and the only solution is to kill
all apps that might've touched sound.

Another dmix+mplayer issue I have is that mplayer's get_delay for alsa seems
to return bogus values for alsa+dmix case, but I digress...

2004-11-02 11:52:31

by Christophe Saout

[permalink] [raw]
Subject: Re: XMMS (or some other audio player) 'hang' issues with intel8x0 and dmix plugin [u]

Am Dienstag, den 02.11.2004, 13:40 +0200 schrieb Jan Knutar:

> > I've tracked this down to what seems to be a bug in the libalsa dmix
> > code with mmap emulation. If the sound output was stopped for some
> > reason (stream paused or underrun) the library will accept more data
> > until the buffer is full but never restart the output.
>
> Strangely, I've observed these kinds of "Hangs" with bmp and mplayer,
> without mmap mode enabled in either. Also using dmix as in the other
> reports here. Could of course be some third application using alsa in
> mmap mode, I suppose.

It might have something to do whether dmix needs to convert the data or
not. In my case /proc shows that the card supports 48kHz but bmp plays a
44kHz file.

> Unfortunately, I have no strace to offer right now as the bug is happening
> randomly and I haven't been able to find any method by which to reproduce
> it.

100% reproducable on my machine. I stopped debugging when I found out
that it happened somewhere deep inside the libalsa dmix core, the code
didn't look easy to follow.

> What's strange is that almost always when it happens, either mplayer or
> beep-media-player will have an extra forked process.

This has something to do with dmix forking off a process, I don't know
exactly what it is for, it does something with the dmix unix socket
in /tmp.


Attachments:
signature.asc (189.00 B)
Dies ist ein digital signierter Nachrichtenteil

2004-11-02 12:05:07

by Jan Knutar

[permalink] [raw]
Subject: Re: XMMS (or some other audio player) 'hang' issues with intel8x0 and dmix plugin [u]

On Tuesday 02 November 2004 13:52, Christophe Saout wrote:

> > What's strange is that almost always when it happens, either mplayer or
> > beep-media-player will have an extra forked process.
>
> This has something to do with dmix forking off a process, I don't know
> exactly what it is for, it does something with the dmix unix socket
> in /tmp.

Aha. I've also, I recall, seen player hang right on start, and then also presumably
in alsa-lib trying to open the socket in /tmp but blocking forever on that for some
reason... Intermittent bugs are the most annoying of all :-)

2004-11-03 01:45:46

by Martin Schlemmer

[permalink] [raw]
Subject: Re: XMMS (or some other audio player) 'hang' issues with intel8x0 and dmix plugin [u]

On Tue, 2004-11-02 at 16:43 +0900, Clemens Schwaighofer wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 11/01/2004 01:42 PM, Martin Schlemmer [c] wrote:

> | Now I mostly use XMMS for playing mp3's, and intermittently xmms
> | will just 'hang'. It is not locked or anything, but the 'graph'
> | just stand still, and no audio. If I press play again, it starts
> | to play for some time again. This is especially easy to duplicate
> | if the box is under heavy load. If I use the device directly,
> | without the dmix plugin, it works fine, or if I use oss emulation,
> | it works fine as well ...
>
> I have the same problem at home, I changed something in the .asoundrc
> and it went away. it still plays a little bit skippy, but better than
> suddenly stop.
>
> I had this problem on a Sony Laptop (GRX series) with an i8x0 chipsetz
> and a yamaha soundchip (which is controlled by the i8x0 drivers).
>
> I can give more info if needed.
>

I would appreciate that. Any workaround currently will be nice.


Thanks,

--
Martin Schlemmer


Attachments:
signature.asc (189.00 B)
This is a digitally signed message part

2004-11-03 01:51:03

by Martin Schlemmer

[permalink] [raw]
Subject: Re: XMMS (or some other audio player) 'hang' issues with intel8x0 and dmix plugin [u]

On Tue, 2004-11-02 at 09:57 +0100, Christophe Saout wrote:
> Am Montag, den 01.11.2004, 06:42 +0200 schrieb Martin Schlemmer [c]:
>
> > I have mailed below to alsa-user a time or two already, but no
> > response as of yet, so I am wondering if anybody here have had
> > similar issues. Not much has changed, but I have also tried
> > BMP, and alsa-player, with similar results.
>
> I've tracked this down to what seems to be a bug in the libalsa dmix
> code with mmap emulation. If the sound output was stopped for some
> reason (stream paused or underrun) the library will accept more data
> until the buffer is full but never restart the output.
>
> https://bugtrack.alsa-project.org/alsa-bug/view.php?id=209
>

I will be honest that I cannot remember the outcome when I tried without
mmap support - was some time back. I will try now again.

I also had a look at the bug, and it seems like it could be if it must
do conversion - any way to disable it, or some other workaround ? Or
anybody to bug/help to patch this ? =)


Thanks,

--
Martin Schlemmer


Attachments:
signature.asc (189.00 B)
This is a digitally signed message part

2004-11-03 01:54:22

by Martin Schlemmer

[permalink] [raw]
Subject: Re: XMMS (or some other audio player) 'hang' issues with intel8x0 and dmix plugin [u]

On Tue, 2004-11-02 at 13:40 +0200, Jan Knutar wrote:
> On Tuesday 02 November 2004 10:57, Christophe Saout wrote:
>
> > I've tracked this down to what seems to be a bug in the libalsa dmix
> > code with mmap emulation. If the sound output was stopped for some
> > reason (stream paused or underrun) the library will accept more data
> > until the buffer is full but never restart the output.
>
> Strangely, I've observed these kinds of "Hangs" with bmp and mplayer,
> without mmap mode enabled in either. Also using dmix as in the other
> reports here. Could of course be some third application using alsa in
> mmap mode, I suppose.
>
> Unfortunately, I have no strace to offer right now as the bug is happening
> randomly and I haven't been able to find any method by which to reproduce
> it.
>
> What's strange is that almost always when it happens, either mplayer or
> beep-media-player will have an extra forked process. As bmp is threaded
> and I shouldn't see more than one bmp in ps aux on NPTL, this seemed a
> bit strange. Strace on the process that looked more recent makes it usually
> wake up from deep sleep, and then it promptly vanishes after only a few syscalls.
> The strace itself seems to wake it up... After the 'extra' process is gone,
> sound output usually resumes, but not always. Other times strace only reveals
> the app doing nanosleep's and nothing else, and the only solution is to kill
> all apps that might've touched sound.
>

I cannot say that I have seen this. It always just resumes fine if I
click on play again, and I cannot remember it having an extra process.
But then I mostly tried it with mmap enabled (as without it also had
this issue), so I will have a look without mmap, and report if similar
issues happens this side.


Thanks,

--
Martin Schlemmer


Attachments:
signature.asc (189.00 B)
This is a digitally signed message part

2004-11-03 06:36:55

by Clemens Schwaighofer

[permalink] [raw]
Subject: Re: XMMS (or some other audio player) 'hang' issues with intel8x0 and dmix plugin [u]

pcm.!default {
type plug
slave.pcm "dmixer"
}

pcm.dsp0 {
type plug
slave.pcm "dmixer"
}

pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 4096
rate 44100
}
bindings {
0 0
1 1
}
}

ctl.dmixer {
type hw
card 0
}


Attachments:
.asoundrc (288.00 B)
signature.asc (256.00 B)
OpenPGP digital signature
Download all attachments

2004-11-03 17:36:09

by Martin Schlemmer

[permalink] [raw]
Subject: Re: XMMS (or some other audio player) 'hang' issues with intel8x0 and dmix plugin [u]

On Wed, 2004-11-03 at 15:36 +0900, Clemens Schwaighofer wrote:
> On 11/03/2004 10:45 AM, Martin Schlemmer [c] wrote:
>
> > I would appreciate that. Any workaround currently will be nice.
>
> attached my .asoundrc
>
> What I did, I halfed the buffer_size from 8K to 4K. After that it worked
> fine.
>

I will try this, thanks. I had my period/buffer size the same, but the
rate I had 48000 .. maybe this could be it.

Also, I am positive that with alsa-lib-1.0.5, with/without mmap, it
would do the same, but I put it on without mmap last night, and now
about 22/24 hours later it was still playing, so it might be fixed
for non-mmap at least.

My audio controller is also an Intel (SoundMax):

-----
0000:00:1f.5 Multimedia audio controller: Intel Corp. 82801EB/ER
(ICH5/ICH5R) AC'97 Audio Controller (rev 02)
Subsystem: ASUSTeK Computer Inc. P4P800 Mainboard
Flags: bus master, medium devsel, latency 0, IRQ 201
I/O ports at e800
I/O ports at ee80 [size=64]
Memory at febff800 (32-bit, non-prefetchable) [size=512]
Memory at febff400 (32-bit, non-prefetchable) [size=256]
Capabilities: [50] Power Management version 2
-----

and somebody else had an intel chipset mobo with yamaha sound chip
on, so I do not know if it might be with intel chipset based ac97
sound that this issue comes to light - anybody else have an sis/nvidia
based board?


Thanks,

--
Martin Schlemmer


Attachments:
signature.asc (189.00 B)
This is a digitally signed message part