# VIA soundcard problems

## Darkas

Hi!

I got a VIA soundcard in my pc:

lspci -v | grep -i audio

80:01.1 Audio Device: VIA Technologies, Inc. VIA High Definition Audio Controller

Subsystem: VIA Technologies, Inc. VIA High Definition Audio Controller

I want to have all the drivers for my soundcard directly built in the kernel (I'm not completely sure which driver to use, hda-intel, VIA82XX or maybe something completely different?) so I don't have to use modules (should be faster, right?), but for some reasons it doesn't work:

aplay -l

aplay: device_list:215: no soundcards found...

Could anyone help me please? Thanks in advance!

----------

## NeddySeagoon

Darkas,

Welcome to the Gentoo forums.

snd-intel-hda is right for you but you should make it as a module, rather than built in.

This sound driver is not very good at detecting its codec and often needs a module paramater to tell it what to do.

Its much easier to do trial and error with module parameters with modules than as built in.

The former only needs 

```
modpobe -r <module>

modprobe <module> <parameter>=<value>
```

Built in needs the option to be passed on the kernel line at boot, so thats a reboot.

Modules also make it easier to solve problems.

I'm not sure monolithic kernels are faster. They may be slower to boot because all the code that could have been loaded later, while something else is goinig on is in the kernel file. It makes no difference to the run time performance at all.

Do you have a populated /dev/snd ?  That indicates that he driver has found your hardware.

----------

## Darkas

Well, I think I'll try both, built-in and module and then decide which one I'll use. The other thing is that I don't know what parameters I have to pass to the driver. My soundcard is a VT1708.

----------

## NeddySeagoon

Darkas,

look in  /usr/src//linux/Documentation/sound/alsa/ALSA-Configuration.txt  for parameters for snd-intel-hda and in /usr/src//linux/Documentation/kernel-parameters.txt to see how to pass module parameters to built in modules.

----------

## Darkas

There is just one problem left: as I have no ALSA-Configuration.txt file, I searched it on the internet and found the file (not exactly that of my kernel version but very recent so there should be not very much information left out), but there is nothing for the vt1708 chipset in this file. I looked through the whole snd-hda-intel section but found nothing. There must be a driver available, because it worked on Ubuntu. Is there maybe a way to find out how the module was configured under Ubuntu (I haven't deleted that partition yet)?

----------

## Dorsai!

you could always try OSS4:

http://www.opensound.com/

With version 4.1 it is far better than ALSA.

You'll find an installation instruction for gentoo in the linux section of the forum.

Or you can simply install it through the "oss-overlay" overlay in layman.

Then emerging oss or oss-devel is enough.

I do not know if that particular card of yours is supported, but chances are good.

----------

## NeddySeagoon

Darkas,

The file is organised by driver rather than chipset. You need to look under snd-hda-intel at the various options that describe the configuration of sound jacks you have.

There may be several that match.  Thats why you need a module, so trying them all is easy.

The model table is given by codec ... it helps if you know your codec.  alsamixer shows this as the Chip in the top left of the screen.

----------

## Darkas

I haven't found the driver yet (I tried some) because I don't know the codec (I think vt1708 is the codec name, but it's not in the alsa-configuration.txt) of my card and alsamixer isn't starting (alsamixer: snd_ctl_open failed for default: no such file or directory). My soundcard worked on ubuntu 8.10 without any installation, but I don't know what drivers they use in ubuntu and even if they use alsa so I think the fastest way would be to find out how ubuntu gets the soundcard working, right? But I'm not very familiar with all the ubuntu config files. Is there any help available?

I would try oss 4 out, but I think more and more that for some reason, there is a problem with the hardware in my kernel configuration, because in every alsa manual I can read that even if there is no driver running, alsamixer should run (and also /proc/asound/cards says that there is no soundcard)

----------

## NeddySeagoon

Darkas,

You need snd-hda-intel with that loaded, alsamixer should show your codec, even if its not configured to drive it properly, which it may not be without a model= paramater.

You can confirm its the right module as your /dev/snd will exist and be populated

----------

## Darkas

If I run modprobe snd-hda-intel and then alsamixer, I got the same problem. /dev/snd exists, but what do you mean with populated? In that device, there are also subdevices (are they called subdevices???): seq and timer if you mean that.

----------

## NeddySeagoon

Darkas,

/dev/snd is a directory, it holds all your real alsa device files.

The key ones are controlC0, pcmC0D0c, pcmC0D0p.

If they are missing, snd-hda-intel is probably the wrong module.

----------

## Darkas

Yes, they aren't there. But I also found some strage messages in dmesg:

hda-intel; unable to grab device IRQ 0, disabling device

HDA intel: probe of 0000:80:01:0 failed with error -16

In the output of lspci, there is 80:01:1 in front of my soundcard. Does maybe the driver try to access a wrong hardware slot or something?

----------

## NeddySeagoon

Darkas,

80:01:1 is a very odd set of numbers.

80 is the PCI bus number. Its hex, so that means bus number 128.  I doubt you have 128 PCI buses in you computer.

01 is the device number on the bus, that looks ok

1 is the function number.  Many PCI devices perform several functions.

Please post all your lspci (without any -v options) and tell if your card is built in or on a card. I guess being VIA, its built in.

Sight of your /proc/interrupts might be useful too.

----------

## Darkas

Well yes, I think that I don't have 128 buses too  :Wink:  This is the whole lspci output:

```
00:00.0 Host bridge: VIA Technologies, Inc. P4M890 Host Bridge

00:00.1 Host bridge: VIA Technologies, Inc. P4M890 Host Bridge

00:00.2 Host bridge: VIA Technologies, Inc. P4M890 Host Bridge

00:00.3 Host bridge: VIA Technologies, Inc. P4M890 Host Bridge

00:00.4 Host bridge: VIA Technologies, Inc. P4M890 Host Bridge

00:00.5 PIC: VIA Technologies, Inc. P4M890 I/O APIC Interrupt Controller

00:00.6 Host bridge: VIA Technologies, Inc. P4M890 Security Device

00:00.7 Host bridge: VIA Technologies, Inc. P4M890 Host Bridge

00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI Bridge

00:02.0 PCI bridge: VIA Technologies, Inc. P4M890 PCI to PCI Bridge Controller

00:03.0 PCI bridge: VIA Technologies, Inc. P4M890 PCI to PCI Bridge Controller

00:09.0 Multimedia controller: Philips Semiconductors SAA7133/SAA7135 Video Broadcast Decoder (rev d1)

00:0f.0 IDE interface: VIA Technologies, Inc. VT8237A SATA 2-Port Controller (rev 80)

00:0f.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 07)

00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev a0)

00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev a0)

00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev a0)

00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev a0)

00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86)

00:11.0 ISA bridge: VIA Technologies, Inc. VT8237A PCI to ISA Bridge

00:11.7 Host bridge: VIA Technologies, Inc. VT8251 Ultra VLINK Controller

00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 7c)

00:13.0 Host bridge: VIA Technologies, Inc. VT8237A Host Bridge

02:00.0 VGA compatible controller: nVidia Corporation G72 [GeForce 7300 SE] (rev a1)

80:01.0 Audio device: VIA Technologies, Inc. VIA High Definition Audio Controller (rev 10)
```

And this are the contents of /proc/interrupts:

```
           CPU0       CPU1       

  0:        224          0   IO-APIC-edge      timer

  1:        895          9   IO-APIC-edge      i8042

  2:          0          0    XT-PIC-XT        cascade

  8:          1          1   IO-APIC-edge      rtc0

 12:          0          4   IO-APIC-edge      i8042

 14:         37         17   IO-APIC-edge      pata_via

 15:          0          0   IO-APIC-edge      pata_via

 20:          0          0   IO-APIC-fasteoi   uhci_hcd:usb2

 21:      12774         77   IO-APIC-fasteoi   sata_via, ehci_hcd:usb1, uhci_hcd:usb4

 22:       1475         40   IO-APIC-fasteoi   uhci_hcd:usb3

 23:          0          0   IO-APIC-fasteoi   uhci_hcd:usb5

NMI:          0          0   Non-maskable interrupts

LOC:     279199     279221   Local timer interrupts

RES:        222        352   Rescheduling interrupts

CAL:         70         50   function call interrupts

TLB:       1198       1832   TLB shootdowns

TRM:          0          0   Thermal event interrupts

SPU:          0          0   Spurious interrupts

ERR:          0

MIS:          0

```

My card is onboard.

----------

## NeddySeagoon

Darkas,

That all looks good. Other users report a PCI bus numer of 80 too, so it must be the way your motherboard is designed.

The sound card should not be trying to use IRQ 0.

Try adding noapic to the kernel line in grub. This will make your Advanced Peripherial Interrupt Controller revert to XT-PIC mode.

If that allows the module to load and the device files to appear in /dev/snd then we are getting closer.

Reverting you APIC to XT mode, makes dealinf with IRQs slightly slower but you won't notice.

----------

## Darkas

I tried to add the noapic option, but there seems to be no change. I loaded the module after boothing with that option but there aren't any new devices in /dev/snd and alsamixer shows the same error message as before.

I added the line just temporary to grub by editing the boot options at runtime, but they shouldn't be reverted if I boot I think. Or is there a way to save it that I missed and have to take?

----------

## NeddySeagoon

Darkas,

Thats fine.

Do you still have sound related error messages in dmesg ?

----------

## Darkas

Yes, exactly the same messages. But, I'm not sure if this was before too, one line in front of it is an additional message:

```
HDA Intel 0000:80:01.0: can't find IRQ for PCI INT A
```

It also said that I should try pci=biosirq, but after I tried that, this part just disappeared.

----------

## NeddySeagoon

Darkas,

In turn, try pci=biosirq and irqpoll on your kernel line.

These options are both aimed at getting IRQs handled properly.

----------

## Darkas

I tried both (together with noapic) and it didn't work again. Should I try to juse not all of the options but some combinations of them?

----------

