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

Re: audio?



> you probably are. default setting for /dev/audio is 8bit mono ulaw. a wav
> may or may not have a header which happens to be of the correct size to be
> one or more audio "blocks" and hence not upset things when you cat it to
> /dev/audio, i dunno.

I was under the impression that an audio "block" for an 8-bit mono wav file
was 8 bits.  Headers are multiples of 8 bits, so that should be ok.  The
real problem is the ulaw format.  i386 /dev/dsp defaults to linear mode, no?

I used sox to convert a wav file from linear to ulaw encoding and then
used cat to send it to /dev/dsp and it sounded ok once I dropped the sampling
rate to 8 KHz.  (It was still intelligible without the rate conversion of
course.)

> sun "au" is more my bag,

I see.  These default to u-law?

> though lately it's been mp3 or nothing.

None of the Debian supplied mp3 players will run correctly, if at all.  (At
least for me.)

> In reality a player problem like tplay would be your best bet;
> If you get noise, add the -x arg (for byte swapping) and try again. I have
> a 4231 in my SS4, and I wrote the driver. I assure you, it does work.

Ok.  I'd have to download the source for that.  That's not included with
Debian.  I still haven't gotten around to it. 
 
> As to /dev/dsp versus /dev/audio, in 2.2 kernels SunOS/Solaris ioctls
> worked much better than Linux ioctls. People whined,

Understandably so.  This is Linux, after all.

> so I went back and
> entirely rewrote the Linux (OSS-compatibility) interface. [clip]
> Anyhow, you *should* be able to get all of drivers/sbus/audio/* and
> include/asm-sparc/audioio.h (or include/asm-sparc64/audioio.h if sparc64)
> from the CVS tree on cvs.on.openprojects.net,

I'm sorry.  It's not obvious to me how to access this server.  Is it the
same as the drive included in the v2.3 snapshots?

> in the devel (2.3) tree,
> drop them in your 2.2 kernel, and compile.

I downloaded several different 2.3 kernels/patches from .18 to .23.  I
haven't yet been able to get any of them to compile.  Has anyone on this
list successfully compiled a recent 2.3 kernel?


I tried your suggestion of dropping the 2.3 audio related files into the
2.2 source, but that failed miserably:

make[4]: Entering directory `/usr/src/kernel-source-2.2.12/drivers/sbus/audio'
sparc64-linux-gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare   -DEXPORT_SYMTAB -c audio.c
In file included from audio.c:38:
/usr/src/linux/include/asm/audioio.h:277: parse error before `wait_queue_head_t'
/usr/src/linux/include/asm/audioio.h:277: warning: no semicolon at end of struct or union
/usr/src/linux/include/asm/audioio.h:290: parse error before `output_write_wait'
/usr/src/linux/include/asm/audioio.h:290: warning: type defaults to `int' in declaration of `output_write_wait'
/usr/src/linux/include/asm/audioio.h:290: warning: type defaults to `int' in declaration of `output_drain_wait'
/usr/src/linux/include/asm/audioio.h:290: warning: data definition has no type or storage class
/usr/src/linux/include/asm/audioio.h:298: parse error before `input_read_wait'
/usr/src/linux/include/asm/audioio.h:298: warning: type defaults to `int' in declaration of `input_read_wait'
/usr/src/linux/include/asm/audioio.h:298: warning: data definition has no type or storage class
/usr/src/linux/include/asm/audioio.h:304: parse error before `}'


I can probably back-port this code, but, do you have any better suggestions
before I do this?  (As you can gather from the latency of my reply, I don't
have as much time to devote to this as I'd like.)

Eric


Reply to: