Gentoo Archives: gentoo-dev

From: Brad House <brad_mssw@g.o>
To: Kevin <gentoo-dev@××××××.biz>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] ALSA and kernel 2.6.1-gentoo-r1 and /etc/init.d/alsasound
Date: Tue, 17 Feb 2004 18:24:35
Message-Id: 33575.209.251.159.140.1077042265.squirrel@mail.mainstreetsoftworks.com
In Reply to: [gentoo-dev] ALSA and kernel 2.6.1-gentoo-r1 and /etc/init.d/alsasound by Kevin
1 This should NOT have been posted to gentoo-dev.
2 This should go to gentoo-users.
3
4 do NOT use alsa-driver for 2.6 kernels!
5 Use ONLY the in-kernel sound drivers, unmerge
6 alsa-driver!
7 The in-kernel alsa is much more up to date anyhow,
8 and gentoo-dev-sources has later Alsa pulls.
9 Just compile all sound drivers as modules, emerge hotplug,
10 and rc-update add hotplug default
11 It will auto-load whatever module is appropriate for your
12 soundcard on boot.
13
14 It should just work, you can use alsasound if you wish, but
15 all it will accomplish is saving your volume settings, hotplug
16 should take care of the module loading.
17
18 -Brad
19
20 > Hi All-
21 >
22 > (To the developers, though this may be a long post and it may initially
23 > appear to be appropriate for strictly the user list, I'm pretty sure
24 > there is an important point for you near the bottom (about the
25 > script /etc/init.d/alsasound). I'm not a developer, so I'm not certain
26 > that you'll find it noteworthy, and so if I'm wrong, my apologies for
27 > sending this cc to the developer's list. Also, is there a list archive?
28 > I considered searching for this subject in a list archive, but didn't see
29 > one listed on http://www.gentoo.org/main/en/lists.xml)
30 >
31 > I'm following the thread "Alsa & 2.6.1" on gentoo-user since it seems to
32 > be related, but my issues are slightly different---or maybe I just have
33 > more detail than I see described in that thread, not sure. This may be a
34 > long post, so I offer apologies for that in advance.
35 >
36 > Anyway, I've been using the Gentoo Linux ALSA Guide, but it clearly
37 > distinguishes between the kernel versions 2.4 and 2.5/2.6. I see (from
38 > the Gentoo Guide) that much of the ALSA code is already in 2.6.x.
39 >
40 > I've noted that the Guide describes setting up ALSA with a 2.4.x kernel,
41 > and it seems to be that the instructions for doing so with a 2.6.x kernel
42 > would probably be different, in light of the presence of ALSA in the 2.6
43 > kernel, but I'm not sure exactly how they should differ.
44 >
45 > Anyway, my first specific problem comes when following the "ALSA modules"
46 > section of the guide. I've grep'd my /proc/pci file and also done lspci
47 > with the following relevant output:
48 > ======================================
49 > # grep audio /proc/pci
50 > Multimedia audio controller: PCI device 10de:006a (nVidia Corporation
51 > (rev 161).
52 >
53 > # lspci | grep audio
54 > 00:06.0 Multimedia audio controller: nVidia Corporation nForce2 AC97 Audio
55 > Controler (MCP) (rev a1)
56 > ======================================
57 >
58 > This is an Asus A7N8X motherboard, with onboard 6 channel audio that the
59 > motherboard docs describe as a "Realtek ALC650 6CH with built-in HP
60 > amplifier". I didn't find such a device in the ALSA Soundcard Matrix
61 > linked to from the Gentoo Guide, but I did find in the Matrix
62 > what /proc/pci and lspci show. There's only one Nvidia device ("nForce")
63 > in the Matrix, and since I seem to have nForce2 (output from lspci), I
64 > thought it would be the appropriate entry for me to use. The Matrix
65 > mentions the module: snd-intel8x0 as being associated with this device.
66 >
67 > So, following the Gentoo Guide, I did a:
68 > # env ALSA_CARDS='intel8x0' emerge alsa-driver
69 >
70 > Now, I'm not really sure if this step is required since I did build
71 > modular ALSA support with my 2.6.1 kernel build, but I tried it anyway
72 > and it failed with error listed here:
73 >
74 > =============================================
75 > In file included from
76 > /var/tmp/portage/alsa-driver-0.9.8/work/alsa-driver-0.9.8/include/sound/driver.h:42,
77 > from
78 > /var/tmp/portage/alsa-driver-0.9.8/work/alsa-driver-0.9.8/alsa-kernel/core/oss/rate.c:22,
79 > from rate.c:2:
80 > /var/tmp/portage/alsa-driver-0.9.8/work/alsa-driver-0.9.8/include/adriver.h:42:31:
81 > linux/modversions.h: No such file or directory
82 > make[3]: *** [fastdep] Error 1
83 > make[3]: Leaving directory
84 > `/var/tmp/portage/alsa-driver-0.9.8/work/alsa-driver-0.9.8/acore/oss'
85 > make[2]: *** [_sfdep_oss] Error 2
86 > make[2]: Leaving directory
87 > `/var/tmp/portage/alsa-driver-0.9.8/work/alsa-driver-0.9.8/acore'
88 > make[1]: *** [dep] Error 1
89 > make[1]: Leaving directory
90 > `/var/tmp/portage/alsa-driver-0.9.8/work/alsa-driver-0.9.8'
91 > make: *** [include/sndversions.h] Error 2
92 >
93 > !!! ERROR: media-sound/alsa-driver-0.9.8 failed.
94 > !!! Function src_compile, Line 64, Exitcode 2
95 > !!! Parallel Make Failed
96 >
97 > =============================================
98 >
99 > As is clear here, I do seem to have the file, but apparently the make is
100 > not finding it where it resides:
101 > # locate modversions.h
102 > /usr/src/linux-2.6.1-gentoo-r1/include/config/modversions.h
103 >
104 > FWIW:
105 > # cat /usr/src/linux-2.6.1-gentoo-r1/include/config/modversions.h
106 > #define CONFIG_MODVERSIONS 1
107 >
108 > The following is the relevant portion of my kernel .config file. I was
109 > being lazy when I built it and didn't look up the particular sound
110 > hardware that I had and instead just built all likely devices as modules,
111 > thinking that I'd only insmod the one that I needed. This detail may be
112 > important because when I do an lsmod now (after following the steps in
113 > the Gentoo Guide), I see what looks like ALL of the sound device modules
114 > (that I built) loaded into the kernel. Perhaps not surprisingly, this
115 > seems to be causing lots of problems in and of itself. So, my
116 > kernel .config file (Sound portions):
117 >
118 > =============================================
119 >
120 > #
121 > # Sound
122 > #
123 > CONFIG_SOUND=y
124 >
125 > #
126 > # Advanced Linux Sound Architecture
127 > #
128 > CONFIG_SND=m
129 > CONFIG_SND_SEQUENCER=m
130 > CONFIG_SND_SEQ_DUMMY=m
131 > CONFIG_SND_OSSEMUL=y
132 > CONFIG_SND_MIXER_OSS=m
133 > CONFIG_SND_PCM_OSS=m
134 > CONFIG_SND_SEQUENCER_OSS=y
135 > CONFIG_SND_RTCTIMER=m
136 > # CONFIG_SND_VERBOSE_PRINTK is not set
137 > # CONFIG_SND_DEBUG is not set
138 >
139 > #
140 > # Generic devices
141 > #
142 > CONFIG_SND_DUMMY=m
143 > CONFIG_SND_VIRMIDI=m
144 > CONFIG_SND_MTPAV=m
145 > CONFIG_SND_SERIAL_U16550=m
146 > CONFIG_SND_MPU401=m
147 >
148 > #
149 > # PCI devices
150 > #
151 > CONFIG_SND_ALI5451=m
152 > CONFIG_SND_AZT3328=m
153 > CONFIG_SND_CS46XX=m
154 > # CONFIG_SND_CS46XX_NEW_DSP is not set
155 > CONFIG_SND_CS4281=m
156 > CONFIG_SND_EMU10K1=m
157 > CONFIG_SND_KORG1212=m
158 > CONFIG_SND_NM256=m
159 > CONFIG_SND_RME32=m
160 > CONFIG_SND_RME96=m
161 > CONFIG_SND_RME9652=m
162 > CONFIG_SND_HDSP=m
163 > CONFIG_SND_TRIDENT=m
164 > CONFIG_SND_YMFPCI=m
165 > CONFIG_SND_ALS4000=m
166 > CONFIG_SND_CMIPCI=m
167 > CONFIG_SND_ENS1370=m
168 > CONFIG_SND_ENS1371=m
169 > CONFIG_SND_ES1938=m
170 > CONFIG_SND_ES1968=m
171 > CONFIG_SND_MAESTRO3=m
172 > CONFIG_SND_FM801=m
173 > CONFIG_SND_ICE1712=m
174 > CONFIG_SND_ICE1724=m
175 > CONFIG_SND_INTEL8X0=m
176 > CONFIG_SND_SONICVIBES=m
177 > CONFIG_SND_VIA82XX=m
178 > CONFIG_SND_VX222=m
179 >
180 > #
181 > # ALSA USB devices
182 > #
183 > CONFIG_SND_USB_AUDIO=m
184 >
185 > #
186 > # Open Sound System
187 > #
188 > CONFIG_SOUND_PRIME=m
189 > CONFIG_SOUND_BT878=m
190 > CONFIG_SOUND_CMPCI=m
191 > # CONFIG_SOUND_CMPCI_FM is not set
192 > # CONFIG_SOUND_CMPCI_MIDI is not set
193 > # CONFIG_SOUND_CMPCI_JOYSTICK is not set
194 > # CONFIG_SOUND_CMPCI_CM8738 is not set
195 > CONFIG_SOUND_EMU10K1=m
196 > # CONFIG_MIDI_EMU10K1 is not set
197 > CONFIG_SOUND_FUSION=m
198 > CONFIG_SOUND_CS4281=m
199 > CONFIG_SOUND_ES1370=m
200 > CONFIG_SOUND_ES1371=m
201 > CONFIG_SOUND_ESSSOLO1=m
202 > CONFIG_SOUND_MAESTRO=m
203 > # CONFIG_SOUND_MAESTRO3 is not set
204 > CONFIG_SOUND_ICH=m
205 > CONFIG_SOUND_SONICVIBES=m
206 > CONFIG_SOUND_TRIDENT=m
207 > CONFIG_SOUND_MSNDCLAS=m
208 > CONFIG_MSNDCLAS_INIT_FILE="/etc/sound/msndinit.bin"
209 > CONFIG_MSNDCLAS_PERM_FILE="/etc/sound/msndperm.bin"
210 > CONFIG_SOUND_MSNDPIN=m
211 > CONFIG_MSNDPIN_INIT_FILE="/etc/sound/pndspini.bin"
212 > CONFIG_MSNDPIN_PERM_FILE="/etc/sound/pndsperm.bin"
213 > CONFIG_SOUND_VIA82CXXX=m
214 > # CONFIG_MIDI_VIA82CXXX is not set
215 > CONFIG_SOUND_OSS=m
216 > CONFIG_SOUND_TRACEINIT=y
217 > # CONFIG_SOUND_DMAP is not set
218 > # CONFIG_SOUND_AD1816 is not set
219 > # CONFIG_SOUND_AD1889 is not set
220 > CONFIG_SOUND_SGALAXY=m
221 > CONFIG_SOUND_ADLIB=m
222 > CONFIG_SOUND_ACI_MIXER=m
223 > CONFIG_SOUND_CS4232=m
224 > CONFIG_SOUND_SSCAPE=m
225 > CONFIG_SOUND_GUS=m
226 > CONFIG_SOUND_GUS16=y
227 > CONFIG_SOUND_GUSMAX=y
228 > CONFIG_SOUND_VMIDI=m
229 > CONFIG_SOUND_TRIX=m
230 > CONFIG_SOUND_MSS=m
231 > CONFIG_SOUND_MPU401=m
232 > CONFIG_SOUND_NM256=m
233 > CONFIG_SOUND_MAD16=m
234 > # CONFIG_MAD16_OLDCARD is not set
235 > CONFIG_SOUND_PAS=m
236 > CONFIG_SOUND_PSS=m
237 > # CONFIG_PSS_MIXER is not set
238 > CONFIG_SOUND_SB=m
239 > CONFIG_SOUND_AWE32_SYNTH=m
240 > CONFIG_SOUND_WAVEFRONT=m
241 > CONFIG_SOUND_MAUI=m
242 > CONFIG_SOUND_YM3812=m
243 > CONFIG_SOUND_OPL3SA1=m
244 > CONFIG_SOUND_OPL3SA2=m
245 > CONFIG_SOUND_YMFPCI=m
246 > # CONFIG_SOUND_YMFPCI_LEGACY is not set
247 > CONFIG_SOUND_UART6850=m
248 > CONFIG_SOUND_AEDSP16=m
249 > # CONFIG_SC6600 is not set
250 > # CONFIG_AEDSP16_MSS is not set
251 > # CONFIG_AEDSP16_SBPRO is not set
252 > # CONFIG_AEDSP16_MPU401 is not set
253 > CONFIG_SOUND_TVMIXER=m
254 > CONFIG_SOUND_KAHLUA=m
255 > CONFIG_SOUND_ALI5455=m
256 > CONFIG_SOUND_FORTE=m
257 > CONFIG_SOUND_RME96XX=m
258 > CONFIG_SOUND_AD1980=m
259 >
260 > =============================================
261 >
262 > So, continuing with this saga, the very first part of the instructions in
263 > the Gentoo Guide (energe alsa-driver) fail for me. Maybe it's not
264 > necessary?
265 >
266 > But as I mentioned above, I now have other problems too.
267 >
268 > What I did to get where I am now was simply follow the Gentoo Guide,
269 > specifically:
270 >
271 > "ALSA modules"
272 > env ALSA_CARDS='intel8x0' emerge alsa-driver
273 > (I also edited my /etc/make.conf and added ALSA_CARDS="intel8x0" in case
274 > this would influence the loading of modules, but no help there)
275 >
276 >
277 > "Configuration of ALSA"
278 > # emerge alsa-utils (no apparent problems here)
279 >
280 > modified the file "/etc/modules.d/alsa" as directed in the Guide (with
281 > changes for my soundcard module of course)
282 >
283 > # modules-update (no apparent problems here, though it took a long time)
284 >
285 > Verified that /etc/devfsd.conf looked as described in the Guide.
286 >
287 > "Starting ALSA"
288 > # rc-update add alsasound boot
289 >
290 > Although the next step in the Guide is to run
291 > # /etc/init.d/alsasound start
292 > I never did that manually. Instead, I rebooted (for various reasons that
293 > I won't bother listing here) which apparently ran that script
294 > automatically because of my previous rc-update add alsasound boot
295 > command.
296 >
297 > # /etc/init.d/alsasound status
298 > status: started
299 >
300 > I stopped following the Guide here because of this problem with about 50
301 > sound modules being loaded into my kernel. Clearly, this is a problem
302 > and I'm not sure how to solve it.
303 >
304 > It looks to me like the script /etc/init.d/alsa automatically loads all
305 > modules that it finds in the output of "modprobe -c | grep snd.* | grep
306 > pci:" (see line 50-59 from that script quoted below) and that's quite
307 > alot in my case because of all the modules that I built.
308 >
309 > ================================================
310 > 50 ebegin "Loading ALSA drivers"
311 > 51
312 > 52 # I really dislike this and would like to tidy it up.
313 > 53 # Anyone running 2.4 + alsa-driver willing to help me?
314 > 54
315 > 55 DRIVERS="$(modprobe -c | grep snd.* | grep pci: | awk '{ print $3 }'
316 > | uniq)"
317 > 56 if [ -z "${DRIVERS}" ] ; then
318 > 57 # Fallback on older modprobe syntax
319 > 58 DRIVERS="$(/sbin/modprobe -c | grep -E
320 > "^[[:space:]]*alias[[:space:]]+snd-card-[[:digit:]]" | awk '{print $3}')"
321 > 59 fi
322 >
323 > ================================================
324 >
325 > So, my real issues I think are just these two:
326 > 1) How to configure ALSA while using 2.6.1 kernel (Gentoo Guide doesn't
327 > seem to work in my case)
328 > 2) How to get only one PCI sound device module loaded via the
329 > script /etc/init.d/alsasound even though I have many available to load.
330 > Must I rebuild my kernel and just not build modules for any sound devices
331 > except those that I have installed?
332 >
333 > Maybe this last is a question for developers.
334 >
335 > Thanks in advance for any suggestions.
336 >
337 > -Kevin
338 >
339 > --
340 > gentoo-dev@g.o mailing list
341 >
342 >
343 >
344
345
346 --
347 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] ALSA and kernel 2.6.1-gentoo-r1 and /etc/init.d/alsasound Jeremy Huddleston <jeremy@×××××××××××.org>