# HELP:  Cannot get ALSA working on via82xx

## theosib

I hope someone can help me.  I'm having a heck of a time getting ALSA to work.  OSS worked okay, but I couldn't get MIDI to work, so I decided to use ALSA, but that's even worse.

First off, I have an ABIT KD7, which has the KT400 chipset.  I have determined that the applicable driver is "via82xx" (lspci and attempting to modprobe ALL available drivers and then looking at /sys/bus/pci/drivers).  Also, I'm using gentoo-kernel-2.6.7-r7, and I have compiled in ALSA support with various OSS emulations, and I have compiled all sound cards as modules (on startup, the autoload modprobes for via82xx, and it does find the device).

Right now, when I first boot and start KDE, the normal KDE sounds actuall work (didn't at first).  After I started KDE, I tried rosegarden to see if I could play a MIDI file -- no sound came out, and then after that (although I don't know that rosegarden actually caused this), sound stopped working right altogether.

Now, all I get are lots of loud popping sounds.  If something is supposed to play a sound, I get noise, and after that, even when everything should be completely silent, I get intermittent popping noises.

I did my best to follow the instructions at http://www.gentoo.org/doc/en/alsa-guide.xml, but since I don't know what's doesn't apply to 2.6, I may have done something wrong.

Oh, and another thing, all programs say that there is no "/dev/sequencer".  I thought AC97 had a MIDI sequencer built-in, so it should be there, right?  I have all MIDI-related things enabled in the kernel.

Any help that can be provided, I appreciate very much!

Here is the relevant section of my .config file:

```
#

# Sound

#

CONFIG_SOUND=y

#

# Advanced Linux Sound Architecture

#

CONFIG_SND=y

CONFIG_SND_TIMER=y

CONFIG_SND_PCM=y

CONFIG_SND_HWDEP=m

CONFIG_SND_RAWMIDI=m

CONFIG_SND_SEQUENCER=y

# CONFIG_SND_SEQ_DUMMY is not set

CONFIG_SND_OSSEMUL=y

CONFIG_SND_MIXER_OSS=y

CONFIG_SND_PCM_OSS=y

CONFIG_SND_SEQUENCER_OSS=y

# CONFIG_SND_VERBOSE_PRINTK is not set

# CONFIG_SND_DEBUG is not set

#

# Generic devices

#

CONFIG_SND_MPU401_UART=m

CONFIG_SND_OPL3_LIB=m

CONFIG_SND_VX_LIB=m

# CONFIG_SND_DUMMY is not set

CONFIG_SND_VIRMIDI=m

# CONFIG_SND_MTPAV is not set

# CONFIG_SND_SERIAL_U16550 is not set

CONFIG_SND_MPU401=m

#

# PCI devices

#

CONFIG_SND_AC97_CODEC=m

CONFIG_SND_ALI5451=m

CONFIG_SND_ATIIXP=m

CONFIG_SND_AU8810=m

CONFIG_SND_AU8820=m

CONFIG_SND_AU8830=m

CONFIG_SND_AZT3328=m

CONFIG_SND_BT87X=m

CONFIG_SND_CS46XX=m

# CONFIG_SND_CS46XX_NEW_DSP is not set

CONFIG_SND_CS4281=m

CONFIG_SND_EMU10K1=m

CONFIG_SND_KORG1212=m

CONFIG_SND_MIXART=m

CONFIG_SND_NM256=m

CONFIG_SND_RME32=m

CONFIG_SND_RME96=m

CONFIG_SND_RME9652=m

CONFIG_SND_HDSP=m

CONFIG_SND_TRIDENT=m

CONFIG_SND_YMFPCI=m

CONFIG_SND_ALS4000=m

CONFIG_SND_CMIPCI=m

CONFIG_SND_ENS1370=m

CONFIG_SND_ENS1371=m

CONFIG_SND_ES1938=m

CONFIG_SND_ES1968=m

CONFIG_SND_MAESTRO3=m

CONFIG_SND_FM801=m

CONFIG_SND_FM801_TEA575X=m

CONFIG_SND_ICE1712=m

CONFIG_SND_ICE1724=m

CONFIG_SND_INTEL8X0=m

CONFIG_SND_INTEL8X0M=m

CONFIG_SND_SONICVIBES=m

CONFIG_SND_VIA82XX=m

CONFIG_SND_VX222=m
```

----------

## veezi

Can you post your modules list 'lsmod'.

Cheers,

----------

## theosib

Here you go....

Thanks.

```
Module                  Size  Used by

nfsd                   65992  8

exportfs                6208  1 nfsd

lockd                  48264  2 nfsd

sunrpc                144100  2 nfsd,lockd

lp                     10536  0

via_rhine              20232  0

ehci_hcd               40132  0

uhci_hcd               31180  0

snd_via82xx            26948  0

snd_ac97_codec         63428  1 snd_via82xx

snd_mpu401_uart         7424  1 snd_via82xx

snd_rawmidi            24420  1 snd_mpu401_uart

i2c_viapro              6860  0

i2c_isa                 2048  0

w83627hf               25284  0

lm90                   11268  0

i2c_sensor              2944  2 w83627hf,lm90

sg                     32736  0

ide_tape               33680  0

st                     38044  0

```

----------

## Deathwing00

Moved from Multimedia.

----------

## veezi

No clue here!

From what I know, major problems with ALSA:

1. OSS is either comiled in or modules loaded. Either case OSS conflicts with ALSA and should be disabled alltogether in the kernel.

2. /dev/mixer,sound should show (and point to /dev/sound /[..]) if you're loading ALSA OSS compatibilty modules .. from your list of modules they don't show. Double check your /etc/env.d/alsa, do 'modules-update' followed by /etc/init.d/alsasound restart.

Good luck!

----------

## theosib

Thanks for responding.  

 *vzeidat wrote:*   

> No clue here!
> 
> From what I know, major problems with ALSA:
> 
> 1. OSS is either comiled in or modules loaded. Either case OSS conflicts with ALSA and should be disabled alltogether in the kernel.

 

Unless there's something going on that I don't know about, OSS isn't in there.  I disabled it entirely in the "make menuconfig" thing.  However, I did enable all OSS-compatibility options in the ALSA menu.  I'm certain that I've made a stupid mistake somewhere...

 *Quote:*   

> 2. /dev/mixer,sound should show (and point to /dev/sound /[..]) if you're loading ALSA OSS compatibilty modules .. from your list of modules they don't show. Double check your /etc/env.d/alsa, do 'modules-update' followed by /etc/init.d/alsasound restart.
> 
> Good luck!

 

Ok, I looked, and I have /dev/mixer, /dev/sound, /dev/sequencer, etc.  They are all symbolic links to /dev/sound/*, and they are:

```
root@hermione dev # ls -l sound

total 0

crw-------  1 tim audio 14, 12 Dec 31  1969 adsp

crw-------  1 tim audio 14,  4 Dec 31  1969 audio

crw-------  1 tim audio 14,  3 Dec 31  1969 dsp

crw-------  1 tim audio 14,  0 Dec 31  1969 mixer

crw-------  1 tim audio 14,  1 Dec 31  1969 sequencer

crw-------  1 tim audio 14,  8 Dec 31  1969 sequencer2
```

One mistake I might be making is where you refer to loading OSS compatbility modules.  I really don't know which ones to load.  But for what I want to do, are they even necessary?  Based on the gentoo docs, I try using pmidi, and it does not find any midi devices.  pmidi shouldn't require any compat modules, right?  In any event, can you give me some idea of which modules to load in case they help?

I don't have a file called "/etc/env.d/alsa", however, the docs talk about "/etc/modules.d/alsa" just before "modules-update", etc.  I followed that procedure.  I even did the Windows thing of rebooting when it didn't work at first, and it did help a LITTLE in that I got some audio, but then it broke.

Anyhow, thanks for responding.  If we keep at it, we'll find the problem.   :Smile: 

----------

## Chrisw02

Hello -

I found a decent FAQ on here once to get sound working on my board with the via82xx chipset which I have shortened.

1) Compile your kernel with no sound at all in it. I use genkernel so I issue a genkernel --menuconfig all. Then I go in to sound and tell it yes, but turn off every single module available for selection. Then exit and let the kernel build, takes about an hour or so.

2) When thats done you have to emerge alsa-driver (And any other ALSA files you want, alsa-tools is nice, alsa-utils is ok, but all you need is alsa-driver to make it work. 

3) When thats done you need to edit some stuff in /etc/modules.d/alsa. All I usually do is add these 2 lines in there...

    alias snd-card-0 snd-via82xx

    alias sound-slot-0 snd-card-0

And comment out any other lines that refer to that alias from a previous sound system.

Then run modules-update to get the settings into their proper places.

4) Once thats done you can run /etc/init.d/alsasound start to start the sound system up, should report all OK's on the screen, if not then try to figure out what the errors are. The only error I seem to always get is a MIXER Settings error, which will go away when you save your settings with alsamixer

    note: You can also need to add it with rc-update add alsasound default to get it to come alive when you reboot.

5) I then install alsa-tools and run alsamixer and unmute all the channels I want unmuted (they are muted by default) also, arrow all the way over to VIA DXS (far right) and make all 4 of those 100%

After that, my sound works fine in X, console.

Remember, if you re-install a kernel, upgrade a kernel, you must recompile your alsa (and any drivers that rely on kernel modules) or when you reboot, your alsa will tell you that it cannot load the drivers.

-Chris

----------

## theosib

 *Chrisw02 wrote:*   

> Hello -
> 
> I found a decent FAQ on here once to get sound working on my board with the via82xx chipset which I have shortened.

 

Thank you!

 *Quote:*   

> 1) Compile your kernel with no sound at all in it. I use genkernel so I issue a genkernel --menuconfig all. Then I go in to sound and tell it yes, but turn off every single module available for selection. Then exit and let the kernel build, takes about an hour or so.

 

Ok, I'm rebuilding my kernel with all sound stuff as modules.

 *Quote:*   

> 2) When thats done you have to emerge alsa-driver (And any other ALSA files you want, alsa-tools is nice, alsa-utils is ok, but all you need is alsa-driver to make it work. 

 

From the documentation I read, it said not to emerge "alsa-driver" for 2.6 kernels, since they already have all the ALSA stuff built-in.  Is this not correct?

 *Quote:*   

> 3) When thats done you need to edit some stuff in /etc/modules.d/alsa. All I usually do is add these 2 lines in there...
> 
>     alias snd-card-0 snd-via82xx

 

Ah, one mistake I made was that I had it say "sound-card-0", not "snd-card-0".

Anyhow, there's lots of OSS/Free stuff in there, but I don't have any OSS (besides compatbility) stuff in the kernel (or modules).  Is that still going to work?

 *Quote:*   

>     alias sound-slot-0 snd-card-0
> 
> And comment out any other lines that refer to that alias from a previous sound system.

 

Well, the other lines in there that aren't commented out are ones which are recommended by the docs.  All the uncommented lines are:

```

alias char-major-116 snd

alias char-major-14 soundcore

alias snd-card-0 snd-via82xx

alias sound-slot-0 snd-card-0

alias sound-service-0-0 snd-mixer-oss

alias sound-service-0-1 snd-seq-oss

alias sound-service-0-3 snd-pcm-oss

alias sound-service-0-8 snd-seq-oss

alias sound-service-0-12 snd-pcm-oss

alias /dev/mixer snd-mixer-oss

alias /dev/dsp snd-pcm-oss

alias /dev/midi snd-seq-oss

options snd cards_limit=1
```

 *Quote:*   

> Then run modules-update to get the settings into their proper places.

 

Ok, I'm snipping the rest of this because I can't report on it until I reboot.  The reason is that since I changed the kernel configuration, (sound is now ALL modules), restarting alsasound completely breaks.

Be back in a minute.   :Smile: 

----------

## veezi

Just two comments on Chrisw02's post (and they're to the best of my knowledge):

1. You don't need alsa-driver if you're running kernel 2.6, it's needed only with 2.4 kernels

2. If you comment out oss compatibility lines from /etc/modules.d/alsa, then oss compatibility modules will not be loaded, and programs written to use OSS only (they don't know ALSA) will not work. And you'll start getting messages like 'missing /dev/mixer, or missing /dev/sound, etc.)

Good luck.

----------

## theosib

I made the changes as I mentioned, and I just rebooted.  When I started KDE, the start-up sound played okay.  I then immediately tried "pmidi -l" to get a list of sequencers.  The result:  "Could not open sequencer No such file or directory".

It's still broken.  Also, I didn't do anything else, but about 30 seconds later, I started getting loud random noise out of my speakers (scared the crap out of me).

Something is still way broken.

veezi:  Thanks, I didn't install alsa-driver, and what I have for OSS in /etc/modules.d/alsa is as I said in my previous post.  I suspect I may not be loading a module that I need to load, but given all the modules I have built, I have no idea which one to load.  Maybe I'll have to try brute-force -- modprobe each one until something changes.

But a missing module wouldn't explain the loud popping noises.

----------

## theosib

I found some virmidi module and modprobed it, and pmidi reported some channels, but when I tried playing something, I got silence.

I unprobed that and modprobed something called "snd-emux-synth", whatever that is, and a whole bunch of things got loaded with it, but now, there are no midi devices.

This popping is really annoying.  I have to keep turning the volume up and down when testing.

----------

## theosib

I wrote a little script to modprobe ALL modules.  Here's my lsmod now (some line breaks added manually):

```
Module                  Size  Used by

snd_virmidi             4740  0

snd_opl3_synth         15300  0

snd_seq_oss            31936  0

snd_ainstr_fm           2816  1 snd_opl3_synth

snd_ymfpci             58532  0

snd_vx222              13700  0

snd_vx_lib             33024  1 snd_vx222

snd_trident_synth      13120  0

snd_trident            44520  1 snd_trident_synth

snd_ainstr_simple       3200  1 snd_trident_synth

snd_seq_instr           8768  2 snd_opl3_synth,snd_trident_synth

snd_sonicvibes         22632  0

snd_rme96              26088  0

snd_rme32              21416  0

snd_nm256              69672  0

snd_mixart             37440  0

snd_maestro3           24104  0

snd_korg1212           39980  0

snd_intel8x0m          19016  0

snd_intel8x0           32776  0

snd_ice1724            37156  0

snd_ice1712            62276  0

snd_ice17xx_ak4xxx      4160  2 snd_ice1724,snd_ice1712

snd_ak4xxx_adda         5888  3 snd_ice1724,snd_ice1712,snd_ice17xx_ak4xxx

snd_cs8427             10432  1 snd_ice1712

snd_i2c                 5440  2 snd_ice1712,snd_cs8427

snd_rme9652            29000  0

snd_hdsp               53928  0

snd_fm801              18824  0

snd_tea575x_tuner       4160  1 snd_fm801

videodev                9792  1 snd_tea575x_tuner

snd_es1968             30216  0

snd_es1938             21288  0

snd_ens1371            22696  0

snd_ens1370            18344  0

snd_emu10k1_synth       7296  0

snd_emu10k1            89928  1 snd_emu10k1_synth

snd_cs46xx             83112  0

snd_cs4281             21284  0

snd_cmipci             31108  0

snd_bt87x              14088  0

snd_azt3328            19180  0

snd_au8830             60132  0

snd_au8820             35076  0

snd_au8810             53412  0

snd_atiixp             20584  0

snd_als4000            12776  0

snd_sb_common          14784  1 snd_als4000

snd_opl3_lib           10496  9 snd_opl3_synth,snd_ymfpci,snd_sonicvibes,snd_fm801,snd_es1938,snd_cs4281,snd_cmipci,snd_azt3328,snd_als4000

snd_ali5451            23944  0

snd_ak4531_codec        7680  1 snd_ens1370

snd_seq_midi            8288  0

snd_emux_synth         36096  1 snd_emu10k1_synth

snd_seq_virmidi         7360  2 snd_virmidi,snd_emux_synth

snd_seq_midi_event      7680  3 snd_seq_oss,snd_seq_midi,snd_seq_virmidi

snd_seq_midi_emul       7808  3 snd_opl3_synth,snd_trident_synth,snd_emux_synth

snd_seq                50576  11 snd_opl3_synth,snd_seq_oss,snd_trident_synth,snd_seq_instr,snd_seq_midi,

snd_emux_synth,snd_seq_virmidi,snd_seq_midi_event,snd_seq_midi_emul

snd_hwdep               9220  6 snd_vx_lib,snd_mixart,snd_hdsp,snd_emu10k1,snd_opl3_lib,snd_emux_synth

snd_util_mem            4544  3 snd_trident,snd_emu10k1,snd_emux_synth

snd_pcm_oss            51432  0

snd_mixer_oss          18432  1 snd_pcm_oss

nfsd                   65992  8

exportfs                6208  1 nfsd

lockd                  48264  2 nfsd

sunrpc                144100  2 nfsd,lockd

lp                     10536  0

via_rhine              20232  0

ehci_hcd               40132  0

uhci_hcd               31180  0

snd_via82xx            26948  0

snd_ac97_codec         63428  20 snd_ymfpci,snd_trident,snd_nm256,snd_maestro3,snd_intel8x0m,snd_intel8x0,

snd_ice1724,snd_ice1712,snd_fm801,snd_es1968,snd_ens1371,snd_emu10k1,

snd_cs46xx,snd_cs4281,snd_au8830,snd_au8820,snd_au8810,snd_atiixp,snd_ali5451,snd_via82xx

snd_pcm                93576  35 snd_ymfpci,snd_vx_lib,snd_trident,snd_sonicvibes,snd_rme96,snd_rme32,snd_nm256,

snd_mixart,snd_maestro3,snd_korg1212,snd_intel8x0m,snd_intel8x0,snd_ice1724,

snd_ice1712,snd_rme9652,snd_hdsp,snd_fm801,snd_es1968,snd_es1938,snd_ens1371,

snd_ens1370,snd_emu10k1,snd_cs46xx,snd_cs4281,snd_cmipci,snd_bt87x,snd_azt3328,

snd_au8830,snd_au8820,snd_au8810,snd_atiixp,snd_als4000,snd_ali5451,snd_pcm_oss,snd_via82xx

snd_timer              24580  4 snd_ymfpci,snd_opl3_lib,snd_seq,snd_pcm

snd_page_alloc         11208  17 snd_ymfpci,snd_trident_synth,snd_trident,snd_mixart,snd_korg1212,snd_intel8x0m,

snd_intel8x0,snd_rme9652,snd_hdsp,snd_es1968,snd_ens1370,snd_emu10k1,snd_cs46xx,

snd_bt87x,snd_atiixp,snd_via82xx,snd_pcm

snd_mpu401_uart         7424  16 snd_ymfpci,snd_trident,snd_sonicvibes,snd_intel8x0,snd_ice1724,snd_ice1712,snd_fm801,

snd_es1968,snd_es1938,snd_cmipci,snd_azt3328,snd_au8830,snd_au8820,snd_au8810,

snd_als4000,snd_via82xx

snd_rawmidi            24420  9 snd_hdsp,snd_ens1371,snd_ens1370,snd_emu10k1,snd_cs46xx,snd_cs4281,snd_seq_midi,

snd_seq_virmidi,snd_mpu401_uart

snd_seq_device          8008  11 snd_opl3_synth,snd_seq_oss,snd_trident_synth,snd_trident,snd_emu10k1_synth,snd_emu10k1,

snd_opl3_lib,snd_seq_midi,snd_emux_synth,snd_seq,snd_rawmidi

snd                    52836  60 snd_virmidi,snd_opl3_synth,snd_seq_oss,snd_ymfpci,snd_vx222,snd_vx_lib,snd_trident,

snd_seq_instr,snd_sonicvibes,snd_rme96,snd_rme32,snd_nm256,snd_mixart,snd_maestro3,

snd_korg1212,snd_intel8x0m,snd_intel8x0,snd_ice1724,snd_ice1712,snd_ak4xxx_adda,

snd_cs8427,snd_i2c,snd_rme9652,snd_hdsp,snd_fm801,snd_es1968,snd_es1938,snd_ens1371,

snd_ens1370,snd_emu10k1,snd_cs46xx,snd_cs4281,snd_cmipci,snd_bt87x,snd_azt3328,

snd_au8830,snd_au8820,snd_au8810,snd_atiixp,snd_als4000,snd_sb_common,snd_opl3_lib,

snd_ali5451,snd_ak4531_codec,snd_seq_midi,snd_emux_synth,snd_seq_virmidi,snd_seq_midi_event,

snd_seq,snd_hwdep,snd_util_mem,snd_pcm_oss,snd_mixer_oss,snd_via82xx,snd_ac97_codec,

snd_pcm,snd_timer,snd_mpu401_uart,snd_rawmidi,snd_seq_device

i2c_viapro              6860  0

i2c_isa                 2048  0

w83627hf               25284  0

lm90                   11268  0

i2c_sensor              2944  2 w83627hf,lm90

sg                     32736  0

ide_tape               33680  0

st                     38044  0
```

This is the output of "pmidi -l":

```
 Port     Client name                       Port name

 72:0     Virtual Raw MIDI 1-0              VirMIDI 1-0

 73:0     Virtual Raw MIDI 1-1              VirMIDI 1-1

 74:0     Virtual Raw MIDI 1-2              VirMIDI 1-2

 75:0     Virtual Raw MIDI 1-3              VirMIDI 1-3
```

I have attempted to play a midi file on each of those ports, but got silence.

NOTE:  I do get regular sound working, but it sounds awful.  It's like there is some kind of random noise being added to what's playing.  In addition, in a separate channel, random popping sounds are being generated.

HELP!   :Sad: 

----------

## Chrisw02

 *veezi wrote:*   

> Just two comments on Chrisw02's post (and they're to the best of my knowledge):
> 
> 1. You don't need alsa-driver if you're running kernel 2.6, it's needed only with 2.4 kernels
> 
> 2. If you comment out oss compatibility lines from /etc/modules.d/alsa, then oss compatibility modules will not be loaded, and programs written to use OSS only (they don't know ALSA) will not work. And you'll start getting messages like 'missing /dev/mixer, or missing /dev/sound, etc.)
> ...

 

You are correct, 2.6 kernels will have alsa built into it, I run the 2.4 series still, sorry, forgot to mention that small but important detail. The only experience I have with the 2.6 kernel is mandrake 10.0 and I wasnt impressed (yet) with the way it treated my hardware, but at least sound worked... so I know its possible.

Chris-

----------

## bk0

 *theosib wrote:*   

> 
> 
> NOTE:  I do get regular sound working, but it sounds awful.  It's like there is some kind of random noise being added to what's playing.  In addition, in a separate channel, random popping sounds are being generated.
> 
> HELP!  

 

I have the same soundchip (KM400 chipset) and the popping/cracking problem is due apparently to a buggy BIOS. (see the via82xx page at alsa-project.org).

I fixed it by adding the following to my /etc/modules.d/alsa file:

```

# This must be set to keep the via card

# from making awful crackling noise during 

# playback

options snd-via82xx dxs_support=3

```

After adding that, doing an "etc-update" and reloading the module, sound worked perfectly.

----------

## theosib

 *bk0 wrote:*   

> 
> 
> ```
> 
> # This must be set to keep the via card
> ...

 

You mean modules-update, right?

Anyhow, I did this, and I found two things.  One is that my regular audio volume levels became way too quiet, and that the DXS channels (whatever they are) that others have told me to turn all the way up were muted, and when I turned them up, I got my volume back, but with the crackling.

BTW, the crackling I'm REALLY having a problem with is what I get when I should be hearing nothing at all.

And, of course, the whole reason I decided to use ALSA in the first place was so I could use MIDI, and that's still completely nonfunctional.

<sigh>  I posted to LKML about this, but I haven't gotten any response yet.  I'm starting to wonder if I'm ever going to get this fixed.

Anyhow, thanks for the help so far.

----------

## theosib

The alsa page documentation talks about a module called 'soundcore'.  I have all sound stuff compiled as modules, but I don't have anything called 'soundcore'.  Somehow, I have a feeling that that's for 2.4 kernels.  Where can I get docs for 2.6 kernels?

Thanks.

----------

## theosib

I'm sorry for bumping this up, but I'm still getting absolutely nowhere here.  

*BEG* *BEG* *BEG*

----------

## bk0

I have an ASUS A7V8X-MX motherboard with the KM400 chipset. Currently running 2.6.7-ck2. My sound works fine although I've never tried MIDI output. I use my PC as a digital stereo so sound quality is pretty important and I'm not disappointed.

Here's the sound modules I have loaded a la lsmod:

```

snd_pcm_oss            49000  0 

snd_mixer_oss          17344  2 snd_pcm_oss

snd_via82xx            23684  2 

snd_ac97_codec         65732  1 snd_via82xx

snd_pcm                84744  2 snd_pcm_oss,snd_via82xx

snd_timer              21060  1 snd_pcm

snd_page_alloc          8840  2 snd_via82xx,snd_pcm

snd_mpu401_uart         6144  1 snd_via82xx

snd_rawmidi            20260  1 snd_mpu401_uart

snd_seq_device          6472  1 snd_rawmidi

snd                    47460  11 snd_pcm_oss,snd_mixer_oss,snd_via82xx,snd_ac97_codec,snd_pcm,snd_timer,snd_mpu401_uart,snd_rawmidi,snd_seq_device

soundcore               7456  2 snd

```

All I did was add "snd-via82xx" and "snd-pcm-oss" to /etc/modules.autoload.d/kernel-2.6, add the DXS option mentioned above to /etc/modules.d/alsa and everything worked fine on a reboot.

Beyond that I'm not sure what I can do to help.

----------

## megadonkey

There's some info on how to get midi working here.

There's also some stuff on how to improve the sound quality.

----------

## wads

I had many problems with my Via onboard sound.  Here are some things to check out:

1)  Since you're running KDE, you may be unwittingly getting sound via arts.  You can disable the KDE sound system in the control panel.  Just make sure that your other apps (Xine, XMMS, mplayer, etc.) are set to use ALSA.

2)  Unmute after each change.  Annoying, I know.  But after playing around forever, I realized that I was forgetting to unmute.  So this is a heads up.

3)  I had problems with crackling that were only partially remedied by the dxs_support=3 trick.  There was something else I needed to do after I set dxs_support and that was modify ~/.asoundrc.  Here's mine:

```

#.asoundrc

pcm.ossmix {

    type dmix

    ipc_key 1024

    slave {

        pcm "hw:0,0"

        period_time 0

        period_size 1024

        buffer_size 4096        # buffer size < 6653, but pow(x, 2)

        rate 48000              # THIS IS THE KEY CHANGE

    }

    bindings {

        0 0

                1 1

        }

}

# Everything shall be dmixed, so redefine "default":

pcm.!default {

    type plug

    slave.pcm "ossmix"

}

# OSS via aoss should d(mix)stroyed:

pcm.dsp0 {

    type plug

    slave.pcm "ossmix"

}

ctl.mixer0 {

    type hw

    card 0

}

```

Good luck.

----------

## theosib

 *megadonkey wrote:*   

> There's some info on how to get midi working here.
> 
> There's also some stuff on how to improve the sound quality.

 

Well, I attempted to follow the instructions at the URL you mentioned, but when I type "modprobe snd-mpu401", I get this error:

```
FATAL: Error inserting snd_mpu401 (/lib/modules/2.6.7-gentoo-r7/kernel/sound/drivers/mpu401/snd-mpu401.ko): No such device
```

Something is still broken.  Things should not be this hard!!!  <sigh>

----------

## theosib

Well, I followed all of your directions, except the part about turning off ARTS, since I can't figure out how to do that.  Anyhow, the instant something tries to play a sound, a continuous low-pitch tone starts playing forever.  No other sounds come out of the audio system.

I'm about ready to give up and go back to OSS, because it worked well enough.  It seems that I should just give up trying to get MIDI to work also.  No one has told me that via8235 doesn't have a built-in MIDI synthesizer, but I've never gotten anywhere on this.

Based on what I see from some of the links people have offered, ALSA for via82xx is so buggy, it's practically not worth using.  Plus, I'm not sure I'll ever really like ALSA since it looks like it's a total nightmare to configure anyhow.

 *wads wrote:*   

> I had many problems with my Via onboard sound.  Here are some things to check out:
> 
> 1)  Since you're running KDE, you may be unwittingly getting sound via arts.  You can disable the KDE sound system in the control panel.  Just make sure that your other apps (Xine, XMMS, mplayer, etc.) are set to use ALSA.
> 
> 2)  Unmute after each change.  Annoying, I know.  But after playing around forever, I realized that I was forgetting to unmute.  So this is a heads up.
> ...

 

----------

## megadonkey

 *theosib wrote:*   

>  *megadonkey wrote:*   There's some info on how to get midi working here.
> 
> There's also some stuff on how to improve the sound quality. 
> 
> Well, I attempted to follow the instructions at the URL you mentioned, but when I type "modprobe snd-mpu401", I get this error:
> ...

 

I think I really need to learn to read. Or atleast not try and help people when I'm tired.

That info is about getting your midi-port working so you can connect a keyboard.  :Embarassed: 

Have you tried to get timidity working?

It's in the gentoo alsa documentation.

And as for the via82xx sound chip. I never got a decent sound out of it.

No matter what I did it sounded absolutely awful.

Thank the gods for my sb live.  :Smile: 

----------

## theosib

 *megadonkey wrote:*   

>  *theosib wrote:*    *megadonkey wrote:*   There's some info on how to get midi working here.
> 
> There's also some stuff on how to improve the sound quality. 
> 
> Well, I attempted to follow the instructions at the URL you mentioned, but when I type "modprobe snd-mpu401", I get this error:
> ...

 

I have not tried to get Timidity working.  I had assumed that the 8235 had a built-in sequencer, but perhaps that is wrong.  Either way, I can't get regular sound working anyhow, so the point's kinda moot right now.

 *Quote:*   

> And as for the via82xx sound chip. I never got a decent sound out of it.
> 
> No matter what I did it sounded absolutely awful.
> 
> Thank the gods for my sb live. 

 

All I need is the kind of sound quality I get out of it when running Windows.  It's good enough for everything I need.  I don't need stellar quality -- I just need basic sound that WORKS.

Right now, all I'm getting is a continuous low-pitched tone.  It seems that every time someone gives me a new piece of advise, things only get worse.   :Sad: 

----------

## megadonkey

Well, maybe it's time to go back to a basic config.

This is what I had in my /etc/modules.d/alsa when I used the via82xx.

```
# Alsa 0.9.X kernel modules' configuration file.

# $Header: /home/cvsroot/gentoo-x86/media-sound/alsa-driver/files/alsa-modules.conf-rc,v 1.1 2002/12/21 06:31:52 agenkin Exp $

# ALSA portion

alias char-major-116 snd

# OSS/Free portion

alias char-major-14 soundcore

##

## IMPORTANT:

## You need to customise this section for your specific sound card(s)

## and then run `update-modules' command.

## Read alsa-driver's INSTALL file in /usr/share/doc for more info.

##

##  ALSA portion

alias snd-card-0 snd-via82xx

#options snd-via82xx index=1 dxs_support=3 

## alias snd-card-1 snd-ens1371

##  OSS/Free portion

alias sound-slot-0 snd-card-0

#alias sound-slot-1 snd-card-1

##

# OSS/Free portion - card #1

alias sound-service-0-0 snd-mixer-oss

alias sound-service-0-1 snd-seq-oss

alias sound-service-0-3 snd-pcm-oss

alias sound-service-0-8 snd-seq-oss

alias sound-service-0-12 snd-pcm-oss

##  OSS/Free portion - card #2

#alias sound-service-1-0 snd-mixer-oss

#alias sound-service-1-1 snd-seq-oss

#alias sound-service-1-3 snd-pcm-oss

#alias sound-service-1-8 snd-seq-oss

#alias sound-service-1-12 snd-pcm-oss

alias /dev/mixer snd-mixer-oss

alias /dev/dsp snd-pcm-oss

alias /dev/midi snd-seq-oss

##

# Set this to the correct number of cards.

options snd cards_limit=1

```

My .asoundrc:

```
pcm.via82xx {

           type hw

           card 0

        }

        ctl.via82xx {

           type hw

           card 0

        }

```

I know it worked with those settings and although it sounded like crap, I still could hear something.

----------

## hakbeest

I also have built-in sound via82C686 using via82xx. with 2.6 kernel

I believe it doesn't have midi-synthesizer built-in, since according to this link:

http://www.linuxfocus.org/English/September2002/article259.shtml

only soundblaster live has that.

so in the gentoo alsa sound doc (http://www.gentoo.org/doc/en/alsa-guide.xml) i did

emerge timidity++

emerge timidity-eawpatches

// etc...

emerge pmidi

now timidity first complained about the config file, so I looked back through my emerge output and i found that the eaw thing creates a /etc/._cfg0000_timidity.cfg file . This should be used as config file, so  rename it to /etc/timidity.cfg.

Then timidity should work. try: 

timidity midfile.mid                       (1)

if using kde, then in the config center it explains that it monopolizes the sound. I suspect this is the reason for the following strange error that you may get while trying (1):

mcop warning: user defined signal handler found for SIG_PIPE, overriding

Segmentation fault

when you wait a minute it works...and then after playback ends you have to wait again...why is this? Seems like KDE repossesses the sound ...

Allright now, payback time.

when I do "pmidi -l" I get (like the other guy):

Could not open sequencer No such file or directory

I believe that the problem is that you have to tell timidity that you want some virtual midi devices. Once they exist pmidi can use them to play midi files. For this (check out first link) you should use something like:

timidity -iA -B2,8 -Os -EFreverb=0

This is explained in several places. Check the other resources at gentoo sound tut.

Now my question is how you can automate this. Although it seems that the first guy got pmidi working without manually telling timidity anything. Is there perhaps another file should be moved?

thanx

----------

## Scouby

 *hakbeest wrote:*   

> Now my question is how you can automate this.

 

Have a look at /etc/init.d/timidity.

```
rc-update add timidity default
```

should be the only thing to do to automate this.

----------

