Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]How do I switch from in-kernel alsa to modular alsa?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
otakuj462
n00b
n00b


Joined: 27 Jun 2006
Posts: 32

PostPosted: Sat Jul 01, 2006 9:00 pm    Post subject: [SOLVED]How do I switch from in-kernel alsa to modular alsa? Reply with quote

Hi, I'm trying to get alsa working using the alsa-driver 1.0.11 module. I had been using the the built-in kernel drivers with snd-hda-intel and kernel 2.6.16.9. It was working great for playing back audio, but I was unable to record anything using the mic jack. All the posts I've found where people have gotten audio recording working with my particular machine (a Dell Inspiron 1300) have indicated that they were able to do so using modular alsa, so that's what I'm currently trying to do.
I've tried to do this two different ways. First, I've compiled the kernel and left out support for ALSA and OSS, but left in Sound Card support. Then I tried following the procedure mentioned here, compiling alsa-drivers by hand and moving them into /lib/modules/2.6.16-gentoo-r9/alsa-driver . I then attempted to modprobe snd-hda-intel, but received unknown symbol errors:

Code:

gentoo_laptop linux-2.6.16-gentoo-r9 # modprobe snd-hda-intel
WARNING: Error inserting snd_hda_codec (/lib/modules/2.6.16-gentoo-r9/alsa-driver/snd-hda-codec.ko): Unknown symbol in module, or unknown parameter (see dmesg)
FATAL: Error inserting snd_hda_intel (/lib/modules/2.6.16-gentoo-r9/alsa-driver/snd-hda-intel.ko): Unknown symbol in module, or unknown parameter (see dmesg)


The other way I tried this was by diabling kernel support for ALSA, OSS and Sound Card support. Then, when I repeate the process and put the compiled alsa drivers in /lib/modules/2.6.16-gentoo-r9/alsa-driver and modprobe snd-hda-intel, I receive the following message:

Code:

gentoo_laptop alsa-driver-1.0.11 # modprobe snd-hda-intel
FATAL: Module snd_hda_intel not found.


So, to summarize, I'm not sure what to cut out of the kernel configuration in order to allow me to use the alsa-driver module. If anyone has any advice, I would greatly appreciate hearing it.
Thanks!

-Jake


Last edited by otakuj462 on Tue Jul 04, 2006 5:08 pm; edited 1 time in total
Back to top
View user's profile Send private message
StevenVI
n00b
n00b


Joined: 29 May 2004
Posts: 23

PostPosted: Sat Jul 01, 2006 9:13 pm    Post subject: Reply with quote

I'm unsure if this will work or not, but you may be interested in this: http://gentoo-wiki.com/HOWTO_ALSA_sound_mixer_aka_dmix. It looks to explain setting up ALSA with the driver package in it.


-Steven
Back to top
View user's profile Send private message
ali3nx
l33t
l33t


Joined: 21 Sep 2003
Posts: 722
Location: Winnipeg, Canada

PostPosted: Sat Jul 01, 2006 9:18 pm    Post subject: Reply with quote

all the latest alsa builds have dmix and dsnoop enabled by default.
_________________
Compiling Gentoo since version 1.4
Thousands of Gentoo Installs Completed
Emerged on every continent but Antarctica
Compile long and Prosper!
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Sat Jul 01, 2006 9:35 pm    Post subject: Reply with quote

If you are switching you have to remove the modules created from the other method. In your case you need to do a
Code:
rm -rf /lib/modules/2.6.16-gentoo-r9/drivers/.....

I'm not at my system, but look for the alsa/audio directory above and delete.
Now re-emerge the alsa-driver and do a
Code:
depmod -a

Don't move modules manually into the /lib/modules/... directory. The ebuild should take care of it.

Additionally, the thread you post talked about using the alsa-driver package, but I think the version they refered to is included in the kernel anways, so you probably won't see any difference. Generally using the alsa-driver package is prefered when it is a newer and has features just added that you need. Other then that they should have the same functionality.
Back to top
View user's profile Send private message
otakuj462
n00b
n00b


Joined: 27 Jun 2006
Posts: 32

PostPosted: Sat Jul 01, 2006 11:13 pm    Post subject: More trouble Reply with quote

Thanks to everyone who responded.
Headrush, I tried your procedure, but I ran into some trouble. Here's what happened:
I rebuilt my kernel to include the alsa-drivers as modules. I then located the snd-hda-intel module by running modinfo. It gave me the following output which I usesd to determine the location of the driver file which you told me to delete:
Code:

gentoo_laptop linux-2.6.16-gentoo-r9 # modinfo snd-hda-intel
filename:       /lib/modules/2.6.16-gentoo-r9/kernel/sound/pci/hda/snd-hda-intel.ko
license:        GPL
description:    Intel HDA driver
vermagic:       2.6.16-gentoo-r9 SMP PENTIUMM 4KSTACKS gcc-3.4
depends:        snd-pcm,snd-page-alloc,snd-hda-codec,snd
alias:          pci:v00008086d00002668sv*sd*bc*sc*i*
alias:          pci:v00008086d000027D8sv*sd*bc*sc*i*
alias:          pci:v00008086d0000269Asv*sd*bc*sc*i*
alias:          pci:v00008086d0000284Bsv*sd*bc*sc*i*
alias:          pci:v00001002d0000437Bsv*sd*bc*sc*i*
alias:          pci:v00001106d00003288sv*sd*bc*sc*i*
alias:          pci:v00001039d00007502sv*sd*bc*sc*i*
alias:          pci:v000010B9d00005461sv*sd*bc*sc*i*
alias:          pci:v000010DEd0000026Csv*sd*bc*sc*i*
alias:          pci:v000010DEd00000371sv*sd*bc*sc*i*
parm:           enable:bool
parm:           probe_mask:Bitmask to probe codecs (default = -1). (int)
parm:           position_fix:Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size). (int)
parm:           model:Use the given board model. (charp)
parm:           id:ID string for Intel HD audio interface. (charp)
parm:           index:Index value for Intel HD audio interface. (int)

I removed /lib/modules/2.6.16-gentoo-r9/kernel/sound/pci/hda/, then reemerged alsa-utils. The output of modinfo changed appropriately:
Code:

 gentoo_laptop linux-2.6.16-gentoo-r9 # modinfo snd-hda-intel
filename:       /lib/modules/2.6.16-gentoo-r9/alsa-driver/pci/hda/snd-hda-intel.ko
license:        GPL
description:    Intel HDA driver
vermagic:       2.6.16-gentoo-r9 SMP PENTIUMM 4KSTACKS gcc-3.4
depends:        snd-pcm,snd-page-alloc,snd-hda-codec,snd,snd
alias:          pci:v00008086d00002668sv*sd*bc*sc*i*
alias:          pci:v00008086d000027D8sv*sd*bc*sc*i*
alias:          pci:v00008086d0000269Asv*sd*bc*sc*i*
alias:          pci:v00008086d0000284Bsv*sd*bc*sc*i*
alias:          pci:v00001002d0000437Bsv*sd*bc*sc*i*
alias:          pci:v00001002d00004383sv*sd*bc*sc*i*
alias:          pci:v00001106d00003288sv*sd*bc*sc*i*
alias:          pci:v00001039d00007502sv*sd*bc*sc*i*
alias:          pci:v000010B9d00005461sv*sd*bc*sc*i*
alias:          pci:v000010DEd0000026Csv*sd*bc*sc*i*
alias:          pci:v000010DEd00000371sv*sd*bc*sc*i*
parm:           enable:bool
parm:           single_cmd:Use single command to communicate with codecs (for debugging only). (bool)
parm:           probe_mask:Bitmask to probe codecs (default = -1). (int)
parm:           position_fix:Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size). (int)
parm:           model:Use the given board model. (charp)
parm:           id:ID string for Intel HD audio interface. (charp)
parm:           index:Index value for Intel HD audio interface. (int)

I then ran depmod -a. It returned no output. I checked the man page and there were no entries for option -a. Is it synonymous with -A?
Finally, I ran /etc/init.d/alsasound restart, and it gave me the same missing symbol error messages that it gave me in the fbeginning:

Code:

gentoo_laptop linux-2.6.16-gentoo-r9 # /etc/init.d/alsasound restart
 * Storing ALSA Mixer Levels ...
/usr/sbin/alsactl: save_state:1163: No soundcards found...                [ !! ] * Unloading ALSA ...                                                     [ ok ] * Unloading ALSA modules ...                                             [ ok ] * Loading ALSA modules ...
 *   Loading: snd-card-0 ...
WARNING: Error inserting snd_timer (/lib/modules/2.6.16-gentoo-r9/kernel/sound/core/snd-timer.ko): Unknown symbol in module, or unknown parameter (see dmesg)
WARNING: Error inserting snd_pcm (/lib/modules/2.6.16-gentoo-r9/kernel/sound/core/snd-pcm.ko): Unknown symbol in module, or unknown parameter (see dmesg)
WARNING: Error inserting snd_hda_codec (/lib/modules/2.6.16-gentoo-r9/alsa-driver/pci/hda/snd-hda-codec.ko): Unknown symbol in module, or unknown parameter (see dmesg)
FATAL: Error inserting snd_hda_intel (/lib/modules/2.6.16-gentoo-r9/alsa-driver/pci/hda/snd-hda-intel.ko): Unknown symbol in module, or unknown parameter (see dmesg)                                                                     [ !! ] *   Loading: snd-seq-oss ...
WARNING: Error inserting snd_timer (/lib/modules/2.6.16-gentoo-r9/kernel/sound/core/snd-timer.ko): Unknown symbol in module, or unknown parameter (see dmesg)
WARNING: Error inserting snd_seq (/lib/modules/2.6.16-gentoo-r9/alsa-driver/acore/seq/snd-seq.ko): Unknown symbol in module, or unknown parameter (see dmesg)
WARNING: Error inserting snd_seq_midi_event (/lib/modules/2.6.16-gentoo-r9/alsa-driver/acore/seq/snd-seq-midi-event.ko): Unknown symbol in module, or unknown parameter (see dmesg)
FATAL: Error inserting snd_seq_oss (/lib/modules/2.6.16-gentoo-r9/alsa-driver/acore/seq/oss/snd-seq-oss.ko): Unknown symbol in module, or unknown parameter (see dmesg)                                                                   [ !! ] *   Loading: snd-pcm-oss ...
WARNING: Error inserting snd_timer (/lib/modules/2.6.16-gentoo-r9/kernel/sound/core/snd-timer.ko): Unknown symbol in module, or unknown parameter (see dmesg)
WARNING: Error inserting snd_pcm (/lib/modules/2.6.16-gentoo-r9/kernel/sound/core/snd-pcm.ko): Unknown symbol in module, or unknown parameter (see dmesg)
FATAL: Error inserting snd_pcm_oss (/lib/modules/2.6.16-gentoo-r9/alsa-driver/acore/oss/snd-pcm-oss.ko): Unknown symbol in module, or unknown parameter (see dmesg)                                                                       [ !! ] *   Loading: snd-seq ...
WARNING: Error inserting snd_timer (/lib/modules/2.6.16-gentoo-r9/kernel/sound/core/snd-timer.ko): Unknown symbol in module, or unknown parameter (see dmesg)
FATAL: Error inserting snd_seq (/lib/modules/2.6.16-gentoo-r9/alsa-driver/acore/seq/snd-seq.ko): Unknown symbol in module, or unknown parameter (see dme  [ !! ] * ERROR: Failed to load necessary drivers                                [ ok ] * Restoring Mixer Levels ...   


Additionally, I failed to make it clear in my first post the reason why I'm building these drivers by hand. There's a patch which can be modified and applied before building the drivers which will (hopefully) fix the problem with my sound. So that's the idea behind that...

If you have any idea what is going wrong or how I can fix it, please let me know. Thanks again.

-Jake
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Sun Jul 02, 2006 3:14 am    Post subject: Reply with quote

You have to remove all the old modules from the in-kernel ALSA, not just the sound card. (except snd, it can stay)

Looks like you have parts in-kernel and parts alsa-driver.

If you do a
Code:
cat /usr/src/linux/.config | grep SOUND

everything should be no except
Code:
CONFIG_SOUND=y
or
Code:
CONFIG_SOUND=m


Edit: Added option of being module also.


Last edited by Headrush on Tue Jul 04, 2006 4:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
metalfan
Apprentice
Apprentice


Joined: 09 Apr 2005
Posts: 260
Location: 127home0sweet0home1 .endofinternet.net

PostPosted: Tue Jul 04, 2006 11:27 am    Post subject: Reply with quote

Hi,



Are you sure that this: cat /usr/src/linux/.config | grep SND
shoud return: CONFIG_SND=y ?

because if i look in my .config:

Code:

#
# Sound
#
CONFIG_SOUND=y

#
# Advanced Linux Sound Architecture
#
#CONFIG_SND is not set

#
# Open Sound System
#
# CONFIG_SOUND_PRIME is not set


do you mean maybe that CONFIG_SOUND has to be set as described in the gentoo alsa howto?

My sound is not working at the moment, tried to switch from in kernel -> alsa driver......got the same unknown symbol mess up, any ideas?
errors: http://nopaste.php-q.net/223471


greets
metalfan
_________________
please add [SOLVED] to the topic if you found the answer
Back to top
View user's profile Send private message
mirojira
l33t
l33t


Joined: 18 Feb 2006
Posts: 685

PostPosted: Tue Jul 04, 2006 1:06 pm    Post subject: Reply with quote

I use alsa-driver and have this settings
Code:
localhost / # cat /usr/src/linux/.config | grep SND
# CONFIG_SND is not set
localhost / # cat /usr/src/linux/.config | grep SOUND
CONFIG_SOUND=m
# CONFIG_SOUND_PRIME is not set


Your problem, "Unknown symbol in module" error is described in http://www.gentoo.org/doc/en/alsa-guide.xml Code Listing 3.10-3.12.
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Tue Jul 04, 2006 4:22 pm    Post subject: Reply with quote

metalfan, like I described above the issue is from having duplicate kernel modules. One supplied from the in-kernel ALSA and the other from the alsa-driver package.

Un-merging the alsa-driver packages DOES NOT remove the kernel modules in /lib/modules/kernel-version/....

The link mirojira posted explains how to fix this issue. Seems the Gentoo ALSA documentation has been updated with this info since it is a really common error. (Thankfully a simple fix)
Back to top
View user's profile Send private message
otakuj462
n00b
n00b


Joined: 27 Jun 2006
Posts: 32

PostPosted: Tue Jul 04, 2006 5:08 pm    Post subject: Done Reply with quote

I've got mine working now. The combination that worked for me was enabling Sound Card Support in-kernel, and removing support for alsa and oss.

Code:

sudo cat /usr/src/linux-2.6.16-gentoo-r9/.config | grep SND
# CONFIG_SND is not set


I already had alsa-driver emerged, so as soon as I restarted with the new kernel, sound playback worked fine.

I'm still trying to get the patch to work though...

-Jake
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia 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