Port-arm archive

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

audio can't set params??

I have a program which, among other things, plays audio.  Works fine on
i386 (both 3.1 and my old 1.4T).  But when I tried to run it on my
shark (also 3.1), I had trouble.

First time I run it after boot, it starts up fine.  But if I exit and
then restart, it fails when trying to open /dev/sound; the open call
shows EINVAL.  Adding debugging printfs to the kernel, I find that the
call to hw->set_params inside autiosetinfo() is failing.  Resetting the
audio playback state with "sh -c '< /dev/audio'" (/dev/audio being the
reset-on-open device) brings it back into a state where it can open

It seems to me there's surely something broken if it can set a
particular state with AUDIO_SETINFO while the device is open, but it
can't set the same state on open.

In case it matters, here's a diff between audioctl -a output in the
before ("working") and after ("broken") states.

< blocksize=800
< hiwat=81
> blocksize=8816
> hiwat=7
< play.rate=8000
< play.channels=1
< play.precision=8
< play.encoding=mulaw
> play.rate=44100
> play.channels=2
> play.precision=16
> play.encoding=slinear_be

Any ideas what's wrong, and what to do about it?  (I'm going to try
making the program open /dev/audio instead, since it sets its own state
anyway and thus doesn't care whether state is reset on open.  But that
feels to me like a workaround, not a fix.)

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML                mouse%rodents-montreal.org@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Home | Main Index | Thread Index | Old Index