# My junky ISA sound card [SOLVED]

## nixscripter

Hello everyone. Hopefully, this is the right forum.

I have a real piece of junk sound card, which Linux can detect -- sort of.

```

# cat /proc/asound/cards

 0 [S16            ]: SB16 - Sound Blaster 16

                      Sound Blaster 16 at 0x220, irq 5, dma 1&5

```

But the actual card is detected by alsaconf as a "Creative SB AWE64 PnP". I believe that is correct. I also the kernel driver for 32/64 AWE cards.

1. When I try to play a sound with aplay, the command returns right away. Nothing comes out the speakers.

2. alsamixer can control the volume of what little white noise always comes through with the 'playback' mixer.

3. When I try to test the speakers:

```

# speaker-test 

speaker-test 1.0.16

Playback device is default

Stream parameters are 48000Hz, S16_LE, 1 channels

Using 16 octaves of pink noise

Rate set to 48000Hz (requested 48000Hz)

Buffer size range from 34 to 35665

Period size range from 34 to 35666

Using max buffer size 35664

Periods = 4

was set period_size = 0

was set buffer_size = 35664

 0 - Front Left

Floating point exception

```

Any ideas?Last edited by nixscripter on Fri Oct 03, 2008 11:19 pm; edited 1 time in total

----------

## di1bert

Spend a little money and get a proper PCI soundcard ? ISA is notoriously painful to get working

and all you're going to do is give yourself a headache trying to get it working.

</0.02c>

-em

----------

## pappy_mcfae

Absolutely. If you can buy a cheapie PCI sound card for ten or fifteen bucks, it's worth it just in the amount of aspirin you'll save trying to resurrect a real dinosaur.  :Smile: 

Blessed be!

Pappy

----------

## Cyker

Wow, what mobo are you using that still has ISA slots?

I've been after one just so I can use my 28MB AWE32 again  :Razz: 

One problem I can see is that the SB16's and AWE's do not support 48kHz sample rates; 44.1kHZ@16bit is the highest they will go which maybe why you're getting that crash.

Also, the other posters are right in a way: ALSA really sucks arse for ISA stuff; OSS is *MUCH* easier to get working with the SB16/AWE cards, but may lack some features. Also, some more modern apps don't seem to like OSS.

BTW, if you have an AWE and not an SB16, I'd also recommend getting the Soundfont packages (awesfx or something like that; Been a looong time since I've used it  :Sad:  ), then you can have hardware MIDI decoding which (At least to me) sounds much better than ALSA's crappy soft-midi implementation, and has much lower latency and CPU burn. (The latency with ALSA on my Live! Platinum makes it almost unusable for serious MIDI work)

----------

## DirtyHairy

You could also try OSS4 which is opensource nowadays and much evolved beyond the kernel OSS implementation.

----------

## nixscripter

Thanks everyone.

1. This project is currently dealing in junk computers I can get out of people's basements. If I bought a sound card, that would be more than the computer I got it out of cost, and I'm real cheap  :Wink: . If I can't get it to work before I get high blood pressure, I will just buy a card -- but linux is supposed to work with everything this old, right?  :Smile: 

2. Out of curiosity, what about isapnp? ALSA can work with it (or so I've read), but it is considered un-necessary. Anyone know if that might help in this case?

3. Thanks for the pointer about the sampling rate. My instinct says that's the problem. If that doesn't work, I'll try OSS. All I want to do with it is play MP3s from the command line, so I don't think software will be a problem.

4. To answer Cyker's question, the computer it's in is also a piece of junk: a Dell Dimension XPS T450 (I can't find the motherboard specs). The card itself came from an even junkier computer: a Micron Electronics Powerdigm XSU.

----------

## nixscripter

Alright, some progress.

First, the sampling rate was the problem. I now hear the single tone as I should (using sine wave options):

```

speaker-test -r 44100 -t sine -f 880 -c 2

speaker-test 1.0.16

Playback device is default

Stream parameters are 44100Hz, S16_LE, 2 channels

Sine wave rate is 880.0000Hz

Rate set to 44100Hz (requested 44100Hz)

Buffer size range from 16 to 16384

Period size range from 16 to 16384

Using max buffer size 16384

Periods = 4

was set period_size = 4096

was set buffer_size = 16384

 0 - Front Left

 1 - Front Right

...

```

However, I had to manually specify two channels (-c 2) or it would play through both of the speakers (mono), reporting it was sending everything to "0 - Front left".

And that brings me to aplay's problem. I tried to play the sound file directly, and:

```

# speaker-test -r 44100 -t wav -c 2 -W . -w tada.wav 

speaker-test 1.0.16

Playback device is default

Stream parameters are 44100Hz, S16_LE, 2 channels

WAV file(s)

Rate set to 44100Hz (requested 44100Hz)

Buffer size range from 16 to 16384

Period size range from 16 to 16384

Using max buffer size 16384

Periods = 4

was set period_size = 4096

was set buffer_size = 16384

./tada.wav is not a mono stream (2 channels)

```

What? Why does it want mono? In any case, I reconverted it and:

```

speaker-test -r 44100 -t wav -c 1 -W . -w tada_mono.wav    

speaker-test 1.0.16

Playback device is default

Stream parameters are 44100Hz, S16_LE, 1 channels

WAV file(s)

Rate set to 44100Hz (requested 44100Hz)

Buffer size range from 32 to 32768

Period size range from 32 to 32768

Using max buffer size 32768

Periods = 4

was set period_size = 8192

was set buffer_size = 32768

 0 - Front Left

```

That works, through both speakers again. aplay also works correclty playing back the mono verson. I don't expect much from this thing. I suppose I could live with mono sound.

However, I don't want to have to specify the stupid parameters for every program who tries to open the device. I tried to create a slave device in /etc/asound.conf, but the default settings of speaker-test still want to try and shove 44 KHz down the throat of the rate_convert device:

```

# speaker-test -D rate_convert -t sine -f 880 -c 2

speaker-test 1.0.16

Playback device is rate_convert

Stream parameters are 48000Hz, S16_LE, 2 channels

Sine wave rate is 880.0000Hz

Rate set to 48000Hz (requested 48000Hz)

Buffer size range from 17 to 17832

Period size range from 17 to 17833

Using max buffer size 17832

Periods = 4

was set period_size = 0

was set buffer_size = 17832

 0 - Front Left

Floating point exception

```

Conversion to mono would also be nice. I've tried what they suggest on the ALSA wiki, but with no luck.

My attempt at the file:

```

pcm.card0 {

    type hw

    card S16

}

pcm_slave.mydevice {

        pcm card0

        rate 44100

}

pcm.rate_convert {

        type rate

        slave mydevice

}

```

Any suggestions?

----------

## nixscripter

I've tried several other things suggested on ALSA wiki forums, several pcm declarations of type plug. Nothing seems to work. It tries to run 44 KHz anyway, and either fails (floating point exception again) or complains (correctly) about the stream parameters (because it's just dying instead of downsampling).

I have a feeling I'm missing something obvious. Any ideas?

----------

## DirtyHairy

Have you tried setting up a dmix plugin as default pcm? This way you can also fix the sample rate and force conversion if I am not mistaken; e.g. my configuration for a USB audio device which only works at 48kHz looks like

```
pcm.hardware {

   type hw

   card 0

}

pcm.dmixer {

   type dmix

   ipc_key 1024

   ipc_perm 0666

   slave {

      pcm "hardware"

#      period_time 0

      period_size 2048

      buffer_size 2048

      rate 48000

   }

}

pcm.!default {

   type plug

   slave.pcm "dmixer"

}
```

Otherwise, I would really give OSS a shot, either in-kernel or (better in my opinion) OSS4; I too have had ALSA crapping out on me on certain configurations no matter what I did, while OSS basically always worked.

----------

## nixscripter

Thanks. I tried:

```

pcm.hardware {

   type hw

   card S16

}

pcm.dmixer {

   type dmix

   slave {

      pcm "hardware"

      rate 44100

   }

}

```

But speakertest -D dmixer still didn't do the right thing.

Fortunately, madplay can change the channels and downsample the output. I can just use that all the time, and call that good enough:

```
alias madplay='madplay -r 44100 -m'
```

Thanks again everyone.

----------

