LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 07-18-2005, 09:38 PM   #1
Matt.Ramos
Member
 
Registered: Jul 2004
Location: Hopatcong, New Jersey
Posts: 70

Rep: Reputation: 15
Compiling something as a module AND question about my sound


First Question - How can I compile something as a module?
Quote:
You need to have these modules included in your kernel:

* IEEE 1394 (FireWire) support
* OHCI-1394 support
* SBP-2 support

and SBP-2 must be compiled as a module because loading and unloading this is what enables you to "mount" and "unmount" your iPod.
How would I go about doing that? I'm very confused.

Second Question - I don't have sound anymore. When I run alsamixer
Code:
root@Internets:~# alsamixer

alsamixer: function snd_ctl_open failed for default: No such device
I searched online for that but couldn't find a clear answer. alsaconf behaves the way it always has.

Thank you very much, any help is greatly appreciated.
 
Old 07-18-2005, 09:52 PM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL
Distribution: Funtoo
Posts: 6,926

Rep: Reputation: 128Reputation: 128
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 09:56 PM.
 
Old 07-18-2005, 10:07 PM   #3
Matt.Ramos
Member
 
Registered: Jul 2004
Location: Hopatcong, New Jersey
Posts: 70

Original Poster
Rep: Reputation: 15
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.
 
Old 07-18-2005, 10:30 PM   #4
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL
Distribution: Funtoo
Posts: 6,926

Rep: Reputation: 128Reputation: 128
Matt,

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.
 
Old 07-18-2005, 10:51 PM   #5
Matt.Ramos
Member
 
Registered: Jul 2004
Location: Hopatcong, New Jersey
Posts: 70

Original Poster
Rep: Reputation: 15
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)
I got that when I did /sbin/lspci/

Thanks again
 
Old 07-18-2005, 11:34 PM   #6
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL
Distribution: Funtoo
Posts: 6,926

Rep: Reputation: 128Reputation: 128
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.
 
Old 07-18-2005, 11:41 PM   #7
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL
Distribution: Funtoo
Posts: 6,926

Rep: Reputation: 128Reputation: 128
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.
 
Old 07-18-2005, 11:52 PM   #8
Matt.Ramos
Member
 
Registered: Jul 2004
Location: Hopatcong, New Jersey
Posts: 70

Original Poster
Rep: Reputation: 15
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.
 
Old 07-19-2005, 12:01 AM   #9
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL
Distribution: Funtoo
Posts: 6,926

Rep: Reputation: 128Reputation: 128
You'll have to compile for your NIC, also. What is it? Same "/sbin/lspci" but look
for something like this
Code:
02:05.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5702 Gigabit Ethernet (rev 02)
02:0a.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
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. ;)
 
Old 07-19-2005, 12:16 AM   #10
Matt.Ramos
Member
 
Registered: Jul 2004
Location: Hopatcong, New Jersey
Posts: 70

Original Poster
Rep: Reputation: 15
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]

Thanks, once again
 
Old 07-19-2005, 12:29 AM   #11
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL
Distribution: Funtoo
Posts: 6,926

Rep: Reputation: 128Reputation: 128
Quote:
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.
 
Old 07-19-2005, 01:05 AM   #12
Matt.Ramos
Member
 
Registered: Jul 2004
Location: Hopatcong, New Jersey
Posts: 70

Original Poster
Rep: Reputation: 15
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.

Thanks again!
 
Old 07-19-2005, 04:52 AM   #13
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL
Distribution: Funtoo
Posts: 6,926

Rep: Reputation: 128Reputation: 128
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*"?
 
Old 07-19-2005, 10:51 AM   #14
Matt.Ramos
Member
 
Registered: Jul 2004
Location: Hopatcong, New Jersey
Posts: 70

Original Poster
Rep: Reputation: 15
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.

Code:
root@Internets:/home/matt# lsmod
Module                  Size  Used by
sbp2                   21576  -
ohci1394               31764  -
ieee1394               89940  -
snd_via82xx            22656  -
snd_ac97_codec         78360  -
snd_mpu401_uart         6048  -
snd_rawmidi            20192  -
via_rhine              20292  -
I've restarted my machine a decent amount of times after recompilling, but it still doesn't work.

And finally, the output of "ls -l /var/log/packages/alsa*" is
Code:
root@Internets:/home/matt# ls -l /var/log/packages/alsa*
-rw-r--r--  1 root root 16296 2005-07-16 11:29 /var/log/packages/alsa-driver-1.0.9b_2.4.31-i486-1
-rw-r--r--  1 root root  4559 2005-07-16 11:29 /var/log/packages/alsa-lib-1.0.9-i486-1
-rw-r--r--  1 root root  1064 2005-07-16 11:29 /var/log/packages/alsa-oss-1.0.9-i486-1
-rw-r--r--  1 root root  2472 2005-07-16 11:29 /var/log/packages/alsa-utils-1.0.9a-i486-1
Hopefully I'll tackle this problem soon. Thanks again
 
Old 07-19-2005, 11:08 AM   #15
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL
Distribution: Funtoo
Posts: 6,926

Rep: Reputation: 128Reputation: 128
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:
Code:
mingdao@james:~/build/linux-2.6.12.3$ lsmod
<snip, snip>
snd_pcm_oss            47392  0 
snd_mixer_oss          17024  2 snd_pcm_oss
usbhid                 24644  0 
snd_emu10k1           111684  1 
snd_rawmidi            20064  1 snd_emu10k1
snd_ac97_codec         78392  1 snd_emu10k1
snd_pcm                82120  3 snd_pcm_oss,snd_emu10k1,snd_ac97_codec
snd_timer              21124  2 snd_emu10k1,snd_pcm
snd_page_alloc          7620  2 snd_emu10k1,snd_pcm
snd_util_mem            3328  1 snd_emu10k1
snd_hwdep               7072  1 snd_emu10k1
snd                    45476  8 snd_pcm_oss,snd_mixer_oss,snd_emu10k1,snd_rawmidi,snd_ac97_codec,snd_pcm,snd_timer,snd_hwdep
soundcore               7456  2 snd
I'm turning in, so please don't play it too loud and wake me ;)

Last edited by Bruce Hill; 07-19-2005 at 11:13 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
compiling a module eltn Programming 5 04-01-2006 08:30 PM
module related question when compiling kernel taoweijia Linux - Newbie 1 02-10-2004 05:31 PM
Problems with the function key, sound quality, and a module question. redkazan Linux - Laptop and Netbook 1 01-12-2004 06:29 AM
Sound Blaster PCI 16 / Ensoniq module question. Cecil Linux - Software 2 06-23-2003 06:52 PM
Kernel compiling and module compiling tarballed Linux - General 1 12-22-2002 06:31 PM


All times are GMT -5. The time now is 02:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration