Compiling something as a module AND question about my sound
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Q: How can I compile something as a module? A: Choose M when you compile your kernel.
Here's a Kernel Build HOW-TO. There's also one included in the kernel source which you can get from Kernel.org. Unpack it somewhere under your home directory, then read the ./linux-2.x.x.x/README file for good instructions from Linus Torvalds. If compiling your own kernel, I would suggest 2.6.12.3, the latest stable version.
Q: I don't have sound anymore. (Reads more like a statement...) A: What did you do since you did have sound that caused this problem?
Try running alsaconf (configuration tool for the Advanced Linux Sound Architecture) in a terminal as root.
You really should read How To Ask a Question. You don't even list your distribution, kernel, or any system information...which would help us help you. ;)
Edit: I just noticed you ran "alsamixer" as root. You should never run your system as root, only use root for adminstrative needs; and you should be running "alsamixer" as a normal user. However, your sound card isn't detected atm, so "alsamixer" iisn't going to do you any good...
Last edited by Bruce Hill; 07-18-2005 at 08:56 PM.
Whoops, I forgot I don't have my distro and kernel in my profile anymore, sorry. I'm on Slackware 10.1 with 2.6.12.3. This is what I get when I open cpuinfo.
Code:
processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 10
model name : AMD Athlon(tm) XP 3000+
stepping : 0
cpu MHz : 2158.109
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov$bogomips : 4299.16
I recompiled Saturday morning, and that's when it stopped working. I thought I selected some type of audio support. Maybe not. Do you have a name for what needs to be selected for sound to work when I recompile?
Thanks for explaining what to compile as a module was.
I just need the name of your soundchip. ALSA support is included in 2.6.12.3 and you obviously left it out. I'll post my ./linux-2.6.12.3/.config sound portion, and you just change that module of mine (emu10k1) for the appropriate one for your card. If you don't know the module, you can issue "/sbin/lspci" (as a normal user) and it will be the Multimedia audio controller. Still need help then, just post it.
As for that one module, you can run "make xconfig" (or whichever config suits you) and make the one change, then save it and run "make modules" and "make modules_install" and then "modprobe <module_name>" to have it loaded. I'm not sure if this will load it every time you boot, however, so I always recompile when I leave something out. There might be a better way, but to me recompiling is less than 10 minutes work, and cleaner. Here's the necessary sound modules:
Code:
# Sound
#
CONFIG_SOUND=m
#
# Advanced Linux Sound Architecture
#
CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_HWDEP=m
CONFIG_SND_RAWMIDI=m
# CONFIG_SND_SEQUENCER is not set
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=m
CONFIG_SND_PCM_OSS=m
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set
#
# Generic devices
#
# CONFIG_SND_DUMMY is not set
# CONFIG_SND_MTPAV is not set
# CONFIG_SND_SERIAL_U16550 is not set
# CONFIG_SND_MPU401 is not set
#
# PCI devices
#
CONFIG_SND_AC97_CODEC=m
# CONFIG_SND_ALI5451 is not set
# CONFIG_SND_ATIIXP is not set
# CONFIG_SND_ATIIXP_MODEM is not set
# CONFIG_SND_AU8810 is not set
# CONFIG_SND_AU8820 is not set
# CONFIG_SND_AU8830 is not set
# CONFIG_SND_AZT3328 is not set
# CONFIG_SND_BT87X is not set
# CONFIG_SND_CS46XX is not set
# CONFIG_SND_CS4281 is not set
CONFIG_SND_EMU10K1=m <--- this is mine ... say N here and M for yours
# CONFIG_SND_EMU10K1X is not set
# CONFIG_SND_CA0106 is not set
# CONFIG_SND_KORG1212 is not set
# CONFIG_SND_MIXART is not set
# CONFIG_SND_NM256 is not set
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_HDSP is not set
# CONFIG_SND_TRIDENT is not set
# CONFIG_SND_YMFPCI is not set
# CONFIG_SND_ALS4000 is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_ENS1370 is not set
# CONFIG_SND_ENS1371 is not set
# CONFIG_SND_ES1938 is not set
# CONFIG_SND_ES1968 is not set
# CONFIG_SND_MAESTRO3 is not set
# CONFIG_SND_FM801 is not set
# CONFIG_SND_ICE1712 is not set
# CONFIG_SND_ICE1724 is not set
# CONFIG_SND_INTEL8X0 is not set
# CONFIG_SND_INTEL8X0M is not set
# CONFIG_SND_SONICVIBES is not set
# CONFIG_SND_VIA82XX is not set
# CONFIG_SND_VIA82XX_MODEM is not set
# CONFIG_SND_VX222 is not set
# CONFIG_SND_HDA_INTEL is not set
After you load the module, whichever way you choose, run "alsamixer" again as a normal user to unmute (with the M) and turn up your volumes.
Thank you for the detailed response, however, I don't understand a lot of it. I'm recompiling everything, because I left out some firewire things, and I also realized I downloaded 2.6.12, and not 2.6.12.3.
So, any idea where the audio module will be? I'll probably come across it eventually, but just so I know.
Code:
Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)
That's a VIA chipset motherboard with onboard sound, right?
Choose CONFIG_SND_VIA82XX=m (4th from the bottom maybe?).
To learn about them, look it up in the ALSA Soundcard Matrix. You don't have to use those instructions, however, because Slackware-10.1 includes the ALSA packages, and the 2.6.x.x kernels have ALSA support. You just need to build that module. If you recompile your kernel, and then subsequently reboot, Slack will modprobe the module.
As for the Firewire, let's see...that will be in this section of the kernel .config
# IEEE 1394 (FireWire) support
I'm not using Firewire on this box. I do have a VIA chipset box with Firewire and that same soundcard, but it's my server now and using neither.
I would suggest that you use "make xconfig" to configure your kernel. It gives a nice GUI screen and the layout is easy to follow. It's harder to "loose things" than with "menuconfig" IMO. If you need further help, post back. If you don't have a clue what to select, you can probably choose M (module) for most everything under Firewire, and it should work. You might have things you don't need, though, rather than just the specific stuff for your hardware.
NB: With "make xconfig" you configure as a module by putting a dot in the box, and a check mark means it's built in.
On second thought, I believe this is what you'll need for Firewire:
Code:
IEEE 1394 (FireWire) support (IEEE1394)
OHCI-1394 support (IEEE1394_OHCI1394)
SBP-2 support (Harddisks etc.) (IEEE1394_SBP2)
Raw IEEE1394 I/O support (IEEE1394_RAWIO)
Just my opinion, but I think if you compile those as modules you'll have all you need.
I have been using make gconfig to compile, so yeah, I have a nice easy interface tow ork with. I didn't read your post before I finished up selecting things, and I selected the AC97 for my audio, but that will be easy to fix thanks to you.
I am now posting this from my family's 8 year old windows machine because I have lost internet access on slackware. I have no idea what happened, I didn't mess with anything in the network settings -- maybe I should've.
My NIC card is integrated, should I have changed things around in that or no? You've really been a terrific help so far. Thanks for being patient. Hopefully I can get this fixed, then work on connecting my iPod.
and then you'll need the proper module for your chipset. That Broadcom Gigabit NIC uses TIGON3 and the cheap-o Realtek uses 8139TOO.
Post back your output if you don't know the chipset. I've been enjoying your site, especially the W3Schools link. I've never learned HTML since leaving Windoze and Dreamweaver behind. ;)
I'm happy you like the site. In my opinion, w3schools is the best place to get started for webdesign. After I learned and experimented there, I visited messageboards and blogs and read as much as I can. I have a bunch of other useful links that I need to get up there. I've been so busy lately that I can't update it, that'll change now, because it's summer.
Anyway.. Back to linux.
How do you find out the module you need once you have the chipset? This is what I get with /sbin/lspci
Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II]
Originally posted by Matt.Ramos How do you find out the module you need once you have the chipset? This is what I get with /sbin/lspci
Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II]
Thanks, once again :)
Either reading in the options in the config, or Google. That's the same one I have on this comp, and you'll read under Networking support > Ethernet (10 or 100Mbit)
Code:
VIA Rhine support (VIA_RHINE)
If you have a VIA "Rhine" based network card (Rhine-I (VT86C100A),
Rhine-II (VT6102), or Rhine-III (VT6105)), say Y here. Rhine-type
Ethernet functions can also be found integrated on South Bridges
(e.g. VT8235).
To compile this driver as a module, choose M here. The module
will be called via-rhine.
I also select (can only be built in) Use MMIO instead of PIO (VIA_RHINE_MMIO) below it.
After 3 recompiles already, I'm back online. I've learned a lot recompiling and selecting modules. Thanks a lot, you are good at what you do
My sound still doesn't work.. alsaconf detects the sound card, but alsamixer still brings up that error I posted first. I guess I'll google it and search on here, hopefully I'll find something.
Which modules do you have for sound in your kernel? Lines relevant to what I posted...
What is the output of "lsmod"?
Have you restarted the box since recompiling? This restarts the alsa daemon.
What is the output of "ls -l /var/log/packages/alsa*"?
This is the list of soundcards you posted up before.
Code:
CONFIG_SND_AC97_CODEC=m
# CONFIG_SND_ALI5451 is not set
# CONFIG_SND_ATIIXP is not set
# CONFIG_SND_ATIIXP_MODEM is not set
# CONFIG_SND_AU8810 is not set
# CONFIG_SND_AU8820 is not set
# CONFIG_SND_AU8830 is not set
# CONFIG_SND_AZT3328 is not set
# CONFIG_SND_BT87X is not set
# CONFIG_SND_CS46XX is not set
# CONFIG_SND_CS4281 is not set
#CONFIG_SND_EMU10K1 is not set
# CONFIG_SND_EMU10K1X is not set
# CONFIG_SND_CA0106 is not set
# CONFIG_SND_KORG1212 is not set
# CONFIG_SND_MIXART is not set
# CONFIG_SND_NM256 is not set
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_HDSP is not set
# CONFIG_SND_TRIDENT is not set
# CONFIG_SND_YMFPCI is not set
# CONFIG_SND_ALS4000 is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_ENS1370 is not set
# CONFIG_SND_ENS1371 is not set
# CONFIG_SND_ES1938 is not set
# CONFIG_SND_ES1968 is not set
# CONFIG_SND_MAESTRO3 is not set
# CONFIG_SND_FM801 is not set
# CONFIG_SND_ICE1712 is not set
# CONFIG_SND_ICE1724 is not set
# CONFIG_SND_INTEL8X0 is not set
# CONFIG_SND_INTEL8X0M is not set
# CONFIG_SND_SONICVIBES is not set
# CONFIG_SND_VIA82XX=m
# CONFIG_SND_VIA82XX_MODEM is not set
# CONFIG_SND_VX222 is not set
# CONFIG_SND_HDA_INTEL is not set
That's what it probably looks like, since I don't know how to get to that in the terminal to copy. But make gconfig and make menuconfig both show that they're selected.
I think I see the problem...you don't have the soundcore module. Look in my post again...you must start with the modules in the section titled # Sound, and also those under ALSA:
Code:
mingdao@james:~/build/linux-2.6.12.3$ less .config
<snip, snip>
# Sound
#
CONFIG_SOUND=m
#
# Advanced Linux Sound Architecture
#
CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_HWDEP=m
CONFIG_SND_RAWMIDI=m
# CONFIG_SND_SEQUENCER is not set
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=m
CONFIG_SND_PCM_OSS=m
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set
Without that first one up there, you'll have no sound. I think that's your only problem.
To get that output from the terminal to here, you just open a terminal and maximize it...I like xterm. Then find where your kernel is located, hopefully somewhere under your home directory. Then issue "less /path/to/.config" and it will display it in the term. Then use the PageDown key and arrow keys to scroll to it, then highlight what you want to paste with the left mouse button, then immediately come here and click the middle mouse button and that will paste it. Or do it the Windoze way, in an editor and use copy and paste. So, issue something like this:
Code:
mingdao@james:~/build/linux-2.6.12.3$ less .config
and that will fill your screen with output. The "less" command causes it to stop when the terminal is full, and you can scroll back and forth with the arrow keys, and PageUp and PageDown.
You have the correct ALSA packages...I think you just need those modules listed above and you're set.
These are the modules I have for sound...different chipset, but about the same as you'll need:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.