Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
configuring snd_hda_intel for ALSA
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
mbreith
Apprentice
Apprentice


Joined: 09 Mar 2006
Posts: 196

PostPosted: Sat Jun 23, 2007 10:27 pm    Post subject: configuring snd_hda_intel for ALSA Reply with quote

I think this file should exist, so I am writing it - even though I feel completely unqualified to do so. Basically I am going to gather a bunch of information from several different posts that I used to get my sound working.

First, the list of sound chipsets that are supported by the snd-hda-intel module:
    ATI: SB450, SB600w RS600
    VIA: VT8251/VT8237A
    SIS966, ULI M5461
    There may be others as well, but this is the list that I have been able to find

Since you are still reading this I am going to assume that you need to use the hda-intel driver and that it didn't work 'out of the box'. I am also going to assume that you followed all the other instructions in the ALSA-howto documentation.

The basic idea is that this kernel module is trying to support a variety of related, but different, soundcards and it doesn't have good enough autodetection to be able to do this well. You will need to give it a hand by passing some options to it when the module is loaded.

The two main options that need to be specified are the model name and the position fix. The first specifies which flavor of sound card you have, and the second is a bug workaround for poor quality sound. All of the available options are specified in the file
Code:
/usr/src/linux-`uname -r`/Documentation/sound/alsa/ALSA-Configuration.txt
Search through there (use / in less) for snd-hda-intel. I'm not going to go into the position fix option other than to list the syntax for it later.

To find a good model name, first modprobe the snd_hda_intel module and look through dmesg. If the model name is bad, it should give a line such as this one
Quote:
hda_codec: Unknown model for ALC660VD/ALC861VD, trying auto-probe from BIOS...
si3054: cannot initialize. EXT MID = 0000

Look through the ALSA-configuration.txt file for something that matches. For this it would be
Quote:
ALC861VD/660VD
3stack 3-jack
3stack-dig 3-jack with SPDIF OUT
6stack-dig 6-jack with SPDIF OUT
3stack-660 3-jack (for ALC660VD)
auto auto-config reading BIOS (default)
At this point, your guess is as good as mine on which is the correct model name. At least it has been narrowed down a bit. Mine happens to need the 3stack.

For drivers compiled as modules (either kernel supplied ALSA or ALSA-driver downloaded modules), add a line to the file
Code:
/etc/modules.d/alsa
I don't know if it is important where in the file the line should go. Anyway, the syntax is
Code:
options snd-hda-intel model=3stack position_fix=1
Obviously replace the model name and position fix number to the proper settings for your system. After that, run
Code:
update-modules
to finalize the changes.

For drivers compiled directly into the kernel, add a boot parameter to the kernel at boot time. Meaning edit your grub or lilo file and add a line such as
Code:
snd_hda_intel.model=3stack
You can do something similar for the position fix as well.

There are also reports of ACPI interfering with the sound driver. See here.
_________________
I don't stat chatspeak acronyms.


Last edited by mbreith on Fri Jun 29, 2007 5:52 pm; edited 1 time in total
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Mon Jun 25, 2007 4:06 pm    Post subject: Reply with quote

Nice post mbreith!
Back to top
View user's profile Send private message
sonicbhoc
Veteran
Veteran


Joined: 24 Oct 2005
Posts: 1805
Location: In front of the computer screen

PostPosted: Mon Jun 25, 2007 4:35 pm    Post subject: Reply with quote

Position fix keeps returning unknown argument on my machine with the 3stack-dig model.
_________________
I'm too lazy to keep this stupid signature up to date, so here's something more interesting:
My friend Hetdegon can draw if you ask me.
Now using PClinuxOS on my laptop and Gentoo on my desktop and new laptop.
Back to top
View user's profile Send private message
mbreith
Apprentice
Apprentice


Joined: 09 Mar 2006
Posts: 196

PostPosted: Wed Jun 27, 2007 12:46 am    Post subject: Reply with quote

Hmmm... What's the module argument line that you have?
Code:
grep options /etc/modules.d/alsa

Or if you have everything compiled directly
Code:
cat /boot/grub/grub.conf

or similar for lilo.
_________________
I don't stat chatspeak acronyms.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Wed Jun 27, 2007 1:05 am    Post subject: Reply with quote

sonicbhoc wrote:
Position fix keeps returning unknown argument

So look for it. If using in-kernel alsa:
Code:
$ find /usr/src/linux/ -type f | xargs grep position_fix
/usr/src/linux/Documentation/sound/alsa/ALSA-Configuration.txt:    position_fix - Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size)
...
/usr/src/linux/sound/pci/hda/hda_intel.c:MODULE_PARM_DESC(position_fix, "Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size).");
Back to top
View user's profile Send private message
gsoe
Apprentice
Apprentice


Joined: 10 Dec 2006
Posts: 289
Location: Denmark

PostPosted: Wed Jun 27, 2007 6:07 am    Post subject: Reply with quote

Good work mbreith! I'm happy to see you got your hda-intel working. Mine is basically working (with the SB600); only problem is that the volume slider in the kmix panel applet picks up the pc-speaker channel instead of the output. I've searched around a bit, but as far as I can find, kmix is to blame. I'm going to try experimenting with the model settings though. If anybody knows about this problem, please let me know.
Back to top
View user's profile Send private message
sonicbhoc
Veteran
Veteran


Joined: 24 Oct 2005
Posts: 1805
Location: In front of the computer screen

PostPosted: Wed Jun 27, 2007 12:17 pm    Post subject: Reply with quote

Code:

parm:           index:Index value for Intel HD audio interface. (int)
parm:           id:ID string for Intel HD audio interface. (charp)
parm:           model:Use the given board model. (charp)
parm:           position_fix:Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size). (int)
parm:           probe_mask:Bitmask to probe codecs (default = -1). (int)
parm:           single_cmd:Use single command to communicate with codecs (for debugging only). (bool)
parm:           enable_msi:Enable Message Signaled Interrupt (MSI) (int)
parm:           enable:bool


That's a snip from modinfo. I got position fix to work somehow. I did it exactly the way I usually do it, which doesn't normally work, and it worked.

However, it doesn't fix my problems with JACK. I can't set -n3 on my card. I always get:
Code:

ALSA: got smaller periods 2 than 3 for playback


The JACK mailing list was no help in solving my problem. Do you guys think you could give me a hand if I start a new thread?
_________________
I'm too lazy to keep this stupid signature up to date, so here's something more interesting:
My friend Hetdegon can draw if you ask me.
Now using PClinuxOS on my laptop and Gentoo on my desktop and new laptop.
Back to top
View user's profile Send private message
gerardo
Apprentice
Apprentice


Joined: 05 Feb 2004
Posts: 228
Location: Belgium

PostPosted: Sat Aug 18, 2007 5:33 pm    Post subject: Reply with quote

Does anyone know how to split sound output?
I would like my music player (Exaile) to play on side-channels, as these are connected to my stereo set.
Normal sound (like from mplayer, vlc, firefox, ...) should go to my PC-speakers only (=front).
Is this possible?
I presume I have to play with the ~/.asoundrc, but I don't know how to start. Has anyone done that already?

Fyi: I use HDA-intel drivers for ALC883 with 6 jacks on Intel Core 2 Duo with ~amd64.
_________________
Windoze : Plug and Pay...
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sat Aug 18, 2007 5:44 pm    Post subject: Reply with quote

Use something like this, which duplicates stereo sound to the rear speakers also (for my SoundBlaster Audigy, anyway - the ttable entries might change for other soundcards/configurations):
Code:
pcm.ch51dup {
         slave.pcm surround51
         slave.channels 6
         type route
         ttable.0.0 0.5
         ttable.1.1 0.5
         ttable.0.2 0.5
         ttable.1.3 0.5
         ttable.0.4 0.25
         ttable.1.4 0.25
         ttable.0.5 0.25
         ttable.1.5 0.25
}

Google for "ch51dup" for more info.
Back to top
View user's profile Send private message
herrzattacke
n00b
n00b


Joined: 26 Oct 2003
Posts: 49

PostPosted: Tue Jun 03, 2008 7:06 pm    Post subject: Reply with quote

mbreith you are my HERO!!!

Thanks a lot. This should be referenced in alsa documentation.

THANK YOU, THANK YOU, THANKS A LOT!!!
Back to top
View user's profile Send private message
pdw_hu
Apprentice
Apprentice


Joined: 02 Jun 2008
Posts: 200
Location: Budapest, Hungary

PostPosted: Wed Jun 04, 2008 6:57 pm    Post subject: Reply with quote

Also to find out what kind of chip you have (and dmesg doesn't help) you can do:
Code:
grep Codec /proc/asound/card0/codec#0

to find out.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum