[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Choppy audio on SPARCstation 5. My fault?



list - 

*I posted this to sparc_(_at_)_openbsd_(_dot_)_org, but I think ports may be more
appropriate.  Also, if theres anything you'd like me to test not related
to this, please let me know,*

I have a SPARCstation 5 and run OpenBSD 3.1 on it.  I love using it
as a workstation because I can export my sessions from more powerful
machines and still get the joy of using something really stable, and with
a pretty screen.  Also I can give it a static IP with the default install
and be pretty confident that there will be no problems with my workstation
losing its integrity.  Thank you for all your work on the sparc port of
OpenBSD.  I've enjoyed it much, and I recommend OpenBSD to my friends.

Something else I love about SPARCStations is that they have nice noiseless
audio.  No buzzing or hissing, just clean audio.

Unfortunately, mine isn't working so well.  I know the audio device
works, because I can cat a file into /dev/audio and hear the noise.  I
know the audio device can be used properly because when I start
/usr/local/bin/esd, I can hear the test beeps.  What I don't know is why
mpg321 will give up after 3 seconds of choppy noise and why play from
/usr/ports/audio/sox freezes up the whole machine.

I'm including:




First, heres dmesg:

OpenBSD 3.1 (GENERIC) #27: Wed Apr 17 13:52:53 MDT 2002
    deraadt_(_at_)_sparc_(_dot_)_openbsd_(_dot_)_org:/usr/src/sys/arch/sparc/compile/GENERIC
real mem = 66789376
avail mem = 58900480
using 200 buffers containing 3338240 bytes of memory
bootpath: /iommu_(_at_)_0,10000000/sbus_(_at_)_0,10001000/espdma_(_at_)_5,8400000/esp_(_at_)_5,8800000/sd_(_at_)_3,0
mainbus0 (root): SUNW,SPARCstation-5
cpu0 at mainbus0: MB86904 @ 85 MHz, on-chip FPU
cpu0: 16K instruction (32 b/l), 8K data (16 b/l) cache enabled
obio0 at mainbus0
clock0 at obio0 addr 0x71200000: mk48t08 (eeprom)
timer0 at obio0 addr 0x71d00000 delay constant 40
zs0 at obio0 addr 0x71100000 pri 12, softpri 6
zs1 at obio0 addr 0x71000000 pri 12, softpri 6
slavioconfig at obio0 addr 0x71800000 not configured
auxreg0 at obio0 addr 0x71900000
power0 at obio0 addr 0x71910000
fdc0 at obio0 addr 0x71400000 pri 11, softpri 4: chip 82077
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
iommu0 at mainbus0 addr 0x10000000: version 0x4/0x0, page-size 4096, range 64MB
sbus0 at iommu0: clock = 21.250 MHz
dma0 at sbus0 slot 5 offset 0x8400000: rev 2
esp0 at dma0 offset 0x8800000 pri 4: ESP200, 40MHz, SCSI ID 7
scsibus0 at esp0: 8 targets
sd0 at scsibus0 targ 3 lun 0: <SEAGATE, ST5660N SUN0535, 0638> SCSI2 0/direct fixed
sd0: 520MB, 3002 cyl, 4 head, 88 sec, 512 bytes/sec, 1065664 sec total
bpp0 at sbus0 slot 5 offset 0xc800000: DMA2
ledma0 at sbus0 slot 5 offset 0x8400010: rev 2
le0 at ledma0 offset 0x8c00000 pri 6: address 08:00:20:75:79:d7
le0: 16 receive buffers, 4 transmit buffers
audiocs0 at sbus0 slot 4 offset 0xc000000 pri 9, softpri 4
audio0 at audiocs0
power-management at sbus0 slot 4 offset 0xa000000 not configured
tcx0 at sbus0 slot 0 offset 0x800000: SUNW,tcx, 1152 x 900, id 7, rev 1, sense 0 (console)
tcx0: attached to /dev/fb
root on sd0a
kbd: type = 4, layout = 0x22
rootdev=0x700 rrootdev=0x1100 rawdev=0x1102



And , here are my devices.  Am I missing anything? :

$ ls -al /dev/audio*
lrwx------  1 root  wheel         6 Sep 23 16:54 /dev/audio -> audio0
crwxrwxrwx  1 root  wheel   69, 128 Oct 29 22:19 /dev/audio0
lrwx------  1 root  wheel         9 Sep 23 16:54 /dev/audioctl ->
audioctl0
crwxrwxrwx  1 root  wheel   69, 192 Sep 23 16:54 /dev/audioctl0

$ ls -al /dev/sound*
lrwx------  1 root  wheel         6 Sep 23 16:54 /dev/sound -> sound0
crwxrwxrwx  1 root  wheel   69,   0 Sep 23 16:54 /dev/sound0




Here is the output of audioctl -a :

$ audioctl -a
name=SUNW,CS4231
version=a
config=onboard1
encodings=mulaw:8,alaw:8,slinear_le:16,ulinear:8,slinear_be:16,slinear:8*,ulinear_le:16*,ulinear_be:16*,adpcm:8
properties=full_duplex
full_duplex=0
fullduplex=0
blocksize=8816
hiwat=7
lowat=1
monitor_gain=32
mode=
play.rate=44100
play.channels=2
play.precision=16
play.encoding=slinear_be
play.gain=0
play.balance=32
play.port=0x1
play.avail_ports=0x7
play.seek=8816
play.samples=7008
play.eof=0
play.pause=0
play.error=1
play.waiting=0
play.open=0
play.active=0
play.buffer_size=65536
record.rate=44100
record.channels=2
record.precision=16
record.encoding=slinear_be
record.gain=248
record.balance=32
record.port=0x1
record.avail_ports=0x5
record.seek=0
record.samples=0
record.eof=0
record.pause=0
record.error=0
record.waiting=0
record.open=0
record.active=0
record.buffer_size=65536
record.errors=0




>From /usr/ports/packages/sparc, these are the only packages installed on
top of the default install with X:

# ls -R
All        audio      converters devel

./All:
autoconf-2.52.tgz        libao-esd-0.8.2.tgz      mpg321-0.2.10.tgz
esound-0.2.24.tgz        libaudiofile-0.2.3.tgz   sox-12.17.3.tgz
gettext-0.10.40.tgz      libiconv-1.7.tgz         xmix-2.1.tgz
libao-0.8.2.tgz          mad-0.14.2b.tgz

./audio:
esound-0.2.24.tgz        libaudiofile-0.2.3.tgz   sox-12.17.3.tgz
libao-0.8.2.tgz          mad-0.14.2b.tgz          xmix-2.1.tgz
libao-esd-0.8.2.tgz      mpg321-0.2.10.tgz

./converters:
libiconv-1.7.tgz

./devel:
autoconf-2.52.tgz        libaudiofile-0.2.3.tgz   mad-0.14.2b.tgz
gettext-0.10.40.tgz      libiconv-1.7.tgz



I'm not using many resources at the start.  Here is the output of top:

load averages:  0.08,  0.14,  0.15
23:14:46
26 processes:  1 running, 25 idle
CPU:  3.2% user,  0.0% nice,  1.2% system,  0.2% interrupt, 95.4% idle
Memory: Real: 20M/30M act/tot  Free: 30M  Swap: 0K/119M used/tot

  PID USERNAME PRI NICE  SIZE   RES STATE WAIT     TIME    CPU COMMAND
 3261 justin     2    0 9036K  232K sleep select   5:21  6.05% Xsun
 9863 justin     2    0  436K  252K sleep select   0:08  0.83% fvwm
 3573 justin     2    0  544K  216K idle  select   0:24  0.00% ssh
 4421 justin     2    0  936K  248K sleep select   0:11  0.00% xterm
28269 root      28    0  184K  296K run   -        0:09  0.00% top
 6989 root       2    0  412K   60K idle  select   0:08  0.00% sshd
 8762 justin     2    0 1284K  244K sleep select   0:05  0.00% xterm
28742 justin     2    0 1280K  228K sleep select   0:02  0.00% xterm
23629 justin    18    0  460K  196K idle  pause    0:01  0.00% ksh
16324 root       2    0  924K  112K sleep select   0:01  0.00% sendmail
17377 justin     2    0  144K  248K sleep select   0:00  0.00% FvwmPager
11802 justin     2    0  272K  316K sleep poll     0:00  0.00% xconsole
 3402 justin     2    0  128K  196K idle  poll     0:00  0.00% xclock
32434 justin     3    0  464K  196K sleep ttyin    0:00  0.00% ksh
11315 root      18    0  412K  164K idle  pause    0:00  0.00% csh
29248 justin    10    0   88K  188K idle  wait     0:00  0.00% xinit
31505 root       2    0  112K  172K sleep select   0:00  0.00% syslogd
13201 root       2    0  116K  200K idle  select   0:00  0.00% inetd
 5507 justin    18    0  456K  196K idle  pause    0:00  0.00% sh
 8927 justin    18    0  464K  196K idle  pause    0:00  0.00% ksh
26507 root      10    0  256K  172K idle  nanosl   0:00  0.00% cron
 1853 justin    18    0  464K  196K idle  pause    0:00  0.00% ksh
12746 justin    18    0  456K  196K idle  pause    0:00  0.00% sh
    1 root      10    0  408K  168K idle  wait     0:00  0.00% init
22079 root       2    0  104K  140K idle  select   0:00  0.00% portmap
29493 root       2    0   36K  112K idle  select   0:00  0.00% screenblank





Now I'll try to play this ogg vorbis file with mpg321:
ls -al $ ls -al ghost_train.ogg  
-rw-rw-r--  1 justin  justin  2819552 Oct 30 20:18 ghost_train.ogg

This song by the bad livers would normally be about 3 minutes long:

$ mpg321 ghost_train.ogg  
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2, and 3.
Version 0.59q (2002/03/23). Written and copyrights by Joe Drew.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
Title  : Ghost Train                     Artist: Bad Livers                    
Album  : Delusions Of Banjer             Year  : 0   
Comment: Created by Grip                 Genre : Rock                          

Playing MPEG stream from ghost_train.ogg ...
MPEG 1.0 layer I, 2826 kbit/s, 32000 Hz mono

[0:01] Decoding of ghost_train.ogg finished.
$ 


after you press return you hear
Click click

Right after the line "Comment: Created by Grip...." 
there is a small pause of about 3/4 second, then another two clicks.


I had the shell execute the same mpg321 command end to end so I could
watch top.  It stayed like this:

load averages:  1.16,  0.62,  0.38
23:42:57
26 processes:  2 running, 24 idle
CPU states: 74.9% user,  0.0% nice, 22.0% system,  2.4% interrupt,  0.6%
idle
Memory: Real: 22M/33M act/tot  Free: 27M  Swap: 0K/119M used/tot

  PID USERNAME PRI NICE  SIZE   RES STATE WAIT     TIME    CPU COMMAND
 3261 justin     2    0 9036K  232K sleep select   6:31 24.07% Xsun
 5958 justin    64    0  120K  260K run   -        0:01  1.51% mpg321


I don't understand why its 74.9% user while mpg321 only takes 1.51%,
(peaking to 12% once, and the cpu column never adds up to more than 40%?


Also theres 27M of free memory the whole time and swap is never used.


If I try to play a wav file with:

play file.wav

The whole system locks up.



I should probably cross post this to ports, but I havn't subscribed yet.
what else should I do besides post to ports?


Thanks!,

Justin



Visit your host, monkey.org