找回密码
 注册
查看: 563|回复: 6

kernel编译问题

[复制链接]
发表于 2004-9-1 15:45:35 | 显示全部楼层 |阅读模式
昨晚下了一个kernel-source-2.6.8编译,是按照Debian Kernel 2.6 How To来做的,.config文件也是用它的。但在编译过程中遇到一处编译错误以及一大堆警告。错误如下:
driver/scsi/cpqfcTSconftrol.c:610:2: #error This is too much stack
driver/scsi/cpqfcTSconftrol.c:722:2: #error This is too much stack
于是我把scsi low-level driver都去掉了,编译通过,但那些警告依旧存在(请问这些警告对内核有影响吗?)。我这样做有没有什么不妥的地方?

安装完毕后我用alsaconf找到了我的声卡但在后面的配置中出现如下错误:
alsactl: load_state:1134:No soundcards found... :
cry:
这声卡该怎么弄啊?
发表于 2004-9-2 14:03:47 | 显示全部楼层
警告可以不理会.

是什么声卡? KERNEL里有没有?
回复

使用道具 举报

 楼主| 发表于 2004-9-2 20:16:40 | 显示全部楼层
intel8x0 Intel Corp. 82801BA/BAM AC'97 Audio (rev 05)
回复

使用道具 举报

发表于 2004-9-3 19:06:48 | 显示全部楼层
给你参考一下,以我的au8820为例,你的也就是名字不一样,多一个步骤
有不清楚可以问我。 特别注意里面debian那段(这篇我在系统安装区贴过,不过看的人不多)
Make a directory to store the alsa source code in.

cd /usr/src
mkdir alsa
cd alsa
cp /downloads/alsa-* .

Now unzip and install the alsa-driver package

bunzip2 alsa-driver-xxx
tar -xf alsa-driver-xxx
cd alsa-driver-xxx
./configure --with-cards=au8820 --with-sequencer=yes;make;make install

NB. If you are using drivers before 0.9.4 then you need to run

./snddevices

If you use devfs then you should not run the snddevices script

The snddevices script sets the permissions for the devices it creates to root. You should

chmod a+rw /dev/dsp /dev/mixer /dev/sequencer /dev/midi

Now unzip and install the alsa-lib package

cd ..
bunzip2 alsa-lib-xxx
tar -xf alsa-lib-xxx
cd alsa-lib-xxx
./configure;make;make install

Now unzip and install the alsa-utils package

cd ..
bunzip2 alsa-utils-xxx
tar -xf alsa-utils-xxx
cd alsa-utils-xxx
./configure;make;make install

Now insert the modules into the kernel.

modprobe snd-au8820;modprobe snd-pcm-oss;modprobe snd-mixer-oss;modprobe snd-seq-oss

NB. For drivers older than 0.9.0beta11 use:

modprobe snd-card-au8820

Now adjust your soundcards volume levels. All mixer channels are muted by default. You must use a native mixer program to unmute appropriate channels, for example alsamixer from the alsa-utils package. Note that some usb-audio devices do not have internal mixer controls.

alsamixer

You can also look at the utils/alsasound file. This script is designed for the RedHat distribution, but it can be used with other distributions which use System V style rc init scripts. This will allow you to load your modules at boot time. If you want to do this you could just compile them into the kernel instead and save yourself the hassle of coming to terms with the rc init scripts.

Setting up modprobe and kmod support

Before you send a mail complaining that "I don't have /etc/modules.conf, where do I find it ....." ,The /etc/conf.modules has been deprecated with a few distro's so in your case, it may still be /etc/conf.modules. Basically they are both the same, but recent version of modutils uses /etc/modules.conf instead. Nothing to worry about as such, optionally please update to latest version of modutils. This should solve your problem.

Here's the example for this card. Copy and paste this to the bottom of your /etc/modules.conf file.

Note to debian users: You need to save this information into a file in the /etc/modutils/ directory (Eg. /etc/modutils/alsa) and run update-modules

# ALSA portion
alias char-major-116 snd
alias snd-card-0 snd-au8820
# module options should go here

# OSS/Free portion
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0

# card #1
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss


NB. For drivers older than 0.9.0beta11 use:

snd-card-au8820

To copy and paste the above to your /etc/modules.conf file follow these instructions.

A short explanation of what happens in the /etc/modules.conf file

Native Devices

After the main multiplexer is loaded, its code requests top level sound card module. String snd-card-%i is requested for native devices where %i is sound card number from zero to seven. String sound-slot-%i is requested for native devices where %i is slot number for ALSA owner this means sound card number. The options line allows you to set various config options before the module is loaded. String snd_id lets you set the name of the card which is returned in the /proc/asound/cards file. Other options may be available which are card specific. The options for these are found in the INSTALL file or above.

xyz@localhost#pico /etc/modules.conf

# ALSA portion
alias snd-card-0 snd-interwave
alias snd-card-1 snd-cmipci
options snd-cmipci id="first" enable_midi="1"

# OSS/Free portion
alias sound-slot-0 snd-card-0
alias sound-slot-1 snd-card-1


NB. For drivers older than 0.9.0rc5 use:

options snd-cmipci snd_id="first" snd_enable_midi="1"

The "snd_" prefix has been removed from the "module options" to fit with the kernel standard.

Autoloading OSS/free emulation

We are finished at this point with the configuration for ALSA native devices, but you may also need autoloading for ALSA add-on OSS/Free emulation modules. At this time only one module does not depend on any others, thus must be loaded separately, snd-pcm1-oss.o. String sound-service-%i-%i is requested for OSS/Free service where first %i means slot number e.g. card number and second %i means service number.

xyz@localhost#pico
/etc/modules.conf

# OSS/Free portion - card #1
alias sound-slot-0 snd-card-0
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss

# OSS/Free portion - card #2 (cmipci)
alias sound-slot-1 snd-card-1
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-12 snd-pcm-oss

The alias for snd-seq-oss is not necessary on the second device, because there is only one /dev/sequencer, regardless how many devices you have.

The .asoundrc file

Find out more about this file here.

This file allows the you to have more advanced control over your card/device. Some very useful applications will not work without it. The .asoundrc file consists of definitions of the various cards available in your system. It also gives you access to the pcm plugins in alsa-lib. These allow you to do tricky things like combine your cards into one or access multiple i/o's on your mulitchannel card.

Below is the most basic definition.

Make a file called .asoundrc in your home and/or root directory.

vi /home/xxx/.asoundrc

copy and paste the following into the file then save it.

pcm.au8820 {
type hw
card 0
}

ctl.au8820 {
type hw
card 0
}
回复

使用道具 举报

 楼主| 发表于 2004-9-5 10:27:25 | 显示全部楼层
用你给的那个beep-media-player可以播放音乐了,可gnome自带的volumn controler还是不能调节音量,奇怪~~
回复

使用道具 举报

发表于 2004-9-5 11:51:38 | 显示全部楼层
gnome我从接触linux以来就没怎么用过,以前用kde,有段时候用twm,现在一直用xfce4,呵呵,以后估计不大会改了,感觉kde附加的东西太多,启动比较慢,twm是快,可惜太破烂了点.可以发到论坛里看看,有gnome的高手的
回复

使用道具 举报

 楼主| 发表于 2004-9-5 12:40:49 | 显示全部楼层
我也只是尝试各种桌面环境,最后我想应该是用最快的,可能也是xfce4吧
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2025-2-13 00:41 , Processed in 0.040794 second(s), 16 queries .

© 2001-2025 Discuz! Team. Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表