# vmware's sb16

## okodol

Hello,

  i have been around windows my whole life and decided to give linux a try.  vmware makes the transition easier for me, so far anyway.  i have been installing gentoo, learning tons of stuff, having a great time, until i decided to setup sound (with alsa).  :Very Happy: 

  i have been working on it the last two days.  i have looked around through google, groups.google, vmware's site, linuxnewbie's forum, and the gentoo forum.  i found several similar situations, which i thought would cure my problem, but tried them all and sometimes combinations of them and nothing helped (obviously).  so lets get to the problem already, 

please correct me if i am wrong on any of this:

-vmware emulates a non-pnp sb-16 sound card, io=0x220, irq=5, dma=1, dma16=7.  (i dont understand those dma numbers.  i learned though that the originals that vmware gave, 1 and 5, were wrong.  i also left out a mpu_io=0x330 cause i heard that screwed things up also)

-on my kernel i have only sound support built in. i also have isa pnp built in.

-i followed all the gentoo insructions on installing alsa, and got some sound modules to use, in my case the snd-sb16 (right?).

-edited the modules.conf files (ie aliases and alsa) and ran update-modules so that the result modules conf file looks like:

 *Quote:*   

> ...
> 
> ...
> 
> alias char-major-14 sb
> ...

 

- i checked my devfsd.conf file, and it is correct according to gentoo's docs.

- i added alsasound at boot using the gentoo rc-update

each time i boot and alsa loads i get:

 *Quote:*   

> /lib/modules/2.4.19-gentoo-r7/kernel/sound/isa/sb/snd-sb16.o: init_module: No such device
> 
> /lib/modules/2.4.19-gentoo-r7/kernel/sound/isa/sb/snd-sb16.o: insmod /lib/modules/2.4.19-gentoo-r7/kernel/sound/isa/sb/snd-sb16.o failed
> 
> /lib/modules/2.4.19-gentoo-r7/kernel/sound/isa/sb/snd-sb16.o: insmod snd-sb16 failed
> ...

 

same happens if i just try to modprobe it. i have only been successful modprobeing snd-sb-common, snd-sb16-csp, snd-sb16-dsp, but i think those modules are just base modules for snd-sb16 to rely on.  am i not setting the irq, dma, and io correctly?

i set up suse also, which had already had support for the sb16 or found it and installed it; reminded me of windows.  so i looked around in the suse config files and modules and such, looking for the answer.  that is where i got most of the stuff listed in the modules.conf.  however in suse the modules were named something different like sb.o instead of snd-sb16.o.  i did an lsmod in suse and found sb, sb_lib, and other sound stuff running like snd-pcm and such. isa-pnp was also running which im thinking was just a coincidence since vmwares sb16 is not pnp (right?).  in the modules.conf are all the "sb" strings supposed to be "snd-sb16"?  i tried replacing those strings with snd-sb16 and still got the same error, but that doesnt mean its not right.

if anyone could throw some clues my way id gladly dig in, im just runnin out of ideas.

sorry for the looooooooooonnnnnnggggggggggg message, and thanks in advance for your time and input !!!!!

-jeremy

----------

## mksoft

Did you enable sound support in that specific virtual machine (and pointed to /dev/dsp)  :Question: 

----------

## okodol

mksoft,

yes, i enabled sound support in vmware (tools->config->add->sound->blablabla).  i didnt point it to /dev/dsp though!?  if anywhere id think that would be part of the vmware tools, but i couldnt find it.  vmware didnt have that option anywhere either. are you thinking of linux host with a windows guest (which is not what i am running).  on my windows vmware host i have my sblive selected (which is where on a linux host /dev/dsp would probably be selected).

thanks for the help!

-jeremy

----------

## mksoft

I haven't noticed that the host is windows  :Embarassed:  bad me.

According to vmware's docs, the card is sb-16. Alsa's docs refers to several sb-16 cards. For the standart (non-pci non-pnp sb 16) the driver is called snd-sb16.

To pass parameters to it, you need to use those flags (from alsa's doc):

```
parm: snd_index int array (min = 1, max = 8), description "Index value for SoundBlaster 16 soundcard." 

parm: snd_id string array (min = 1, max = 8), description "ID string for SoundBlaster 16 soundcard." 

parm: snd_enable int array (min = 1, max = 8), description "Enable SoundBlaster 16 soundcard." 

parm: snd_port long array (min = 1, max = 8), description "Port # for SB16 driver." 

parm: snd_mpu_port long array (min = 1, max = 8), description "MPU-401 port # for SB16 driver." 

parm: snd_fm_port long array (min = 1, max = 8), description "FM port # for SB16 PnP driver." 

parm: snd_irq int array (min = 1, max = 8), description "IRQ # for SB16 driver." 

parm: snd_dma8 int array (min = 1, max = 8), description "8-bit DMA # for SB16 driver." 

parm: snd_dma16 int array (min = 1, max = 8), description "16-bit DMA # for SB16 driver." 

parm: snd_mic_agc int array (min = 1, max = 8), description "Mic Auto-Gain-Control switch." 

parm: snd_csp int array (min = 1, max = 8), description "ASP/CSP chip support." 

```

Looks like you've passed the wrong params to specify port and irq, and in the file you've posted you're loading the wrong driver.

Look here for more information about sb16 cards with alsa and here for alsa's supported sound cards reference.

----------

## okodol

nuts.

thanks for the info mksoft! i also figured out from dfx from linuxnewbie that i could use modinfo -p to get that same information.

it has been another 2 days that i have been playing with this, and still no success.  my relavant improved modules.conf lines...

 *Quote:*   

> # ALSA portion
> 
> alias char-major-116 snd
> 
> alias snd-card-0 snd-sb16
> ...

 

much better, yes?  i think so.  i am starting to convince myself that my configuration is fine, and for a reason the emulated sound card is "not plugged in".  yet, vmware claims the sound IS connected while i have been trying.

is there something simple i am missing?  is there a way to detect or probe hardware at certain ports/irqs?  the only thing i could find was /proc/interrupts and /proc/ioports.  maybe my config is fine but the emulated system have the sb16 in it?

again i thank you for your help!

-jeremy

----------

## mksoft

Does the module (and the rest of alsa's modules) load at all  :Question:  Or the problem is that you're not hearing any sound  :Question: 

Remeber to run update-modules after changing the files in /etc/modules.d.

If the module loads and no sound, check the mixer for volumes and mute (alsa's devices are muted by default).

----------

## gauched

I have a similiar setup (dual boot between xp and gentoo, with gentoo running in a vmware window under xp).

I've fiddled with trying to get the alsa drivers working under vmware and they never seemed to take no matter what module or parameters (snd_irq, snd_dma, etc.) I passed it.  I hope you find a resolution.

I was able to get the OSS drivers working without too much hassle.  I had to pass the irq and sound card info to the kernel via grub or lilo.  I don't remember whether I tried it with the OSS driver compiled as a module.  The option in the kernel config is 100% sound blaster compatible (near the bottom of the list, I believe) and not the one that references a particular Creative Labs card.  You could always try that.

----------

## okodol

sorry for not being specfic enough last post. i was still having the same error.  i have been using update-modules whenever editing the modules.d/alsa or aliases file.

i tried probing the sb16 alsa driver on the command line, like:

 *Quote:*   

> modprobe snd-sb16 snd_port=0x220 snd_irq=5 snd_dma8=1 snd_dma16=5

 

with the dma16 set to 7 also, but of course, nothing :confused: 

so, took your advice gauched and i caved in.  i am now listening to "our lady peace" with oss drivers.  oh well.  i just thought it would be fun to get alsa working.  i learned alot trying though!  thanks for your help mksoft and gauched!  :Very Happy:  looks like all the irq, io, and dma were right though.

for anyone else wanting to know how to do it with oss and vmware its very simple:

-i just expanded the oss and selected the 100% sb built in.  recompiled.

-added sb=0x220,5,1,7 to the kernel line in grub's menu file

-wala poof, sound  :Smile: 

-if you use kde you might have to disable the sound server it uses or decrease the autosuspend to something lower than 60 seconds.  if you have a sound theme, kde seems to keep /dev/dsp open for 60 seconds (by default) after playing a sound, making you wait for that time to elapse before you get to play something with mplayer or xmms or whatever.  i heard you could also just wrap with artsd or use an arts plugin if the program supports it.

if there are any other breakthroughs or suggestions with alsa and vmware's sb16 i would love to try them.

-jeremy

----------

## mksoft

Have try alsa but without passing all the params (e.g: just port and IRQ)  :Question: 

BTW, you don't have to add the options in grub's menu, you can use an options directive in modules config.

----------

## okodol

yea already tried that.  tried every combination i could think of with modprobe and its parameters...

specifying the options in modules.conf wouldnt load the sb16 until it got to the modules.conf which is in a later part of the linux boot right?  if passing them to the kernel does it just hold the sb parameters until the modules.conf loads anyway, or does it process them and init sound immediatley (before going onto loading linux, its scripts, other modules, etc...).  i cant find a situation in which that would matter though.   :Confused: 

-jeremy

----------

## mksoft

It really doesn't matter, but if you change/add entries to menu.lst and forget to add the params, the module won't load.

Having it in modules.conf will make sure it will load not matter the kernel you're booting and parameters passed to it.

But ifit works, don't touch it  :Wink: 

----------

## akauppi

I had similar problems getting sound out of Connectix Virtual PC 6.0. The card is reported to be SoundBlaster 16.

This helped:

   alias snd-card-0 snd-sb16 

   options snd-sb16 isapnp=0 port=0x220 irq=5 dma8=1 dma16=5

Remember to run 'update-modules' after changing the above lines (in /etc/modules.d/alsa).

-ak

----------

