alsa-driver</uri> as their configuration is in sync with the one shown below by

383

default.

384

</note>

385

386

<ol>

387

<li>

388

<c>CONFIG_SOUND</c> is set. (Basic Sound support enabled)

389

</li>

390

<li>

391

<c>CONFIG_SOUND_PRIME</c> is not set. (In-built OSS support disabled)

392

</li>

393

<li>

394

<c>CONFIG_SND</c> is not set. (In-built ALSA support disabled)

395

</li>

396

<li>

397

<path>/usr/src/linux</path> points to the kernel you want ALSA working on.

398

</li>

399

</ol>

400

401

<pre caption=".config checks">

402

<comment>(Assuming the linux symlink points to the correct kernel)</comment>

403

# <i>cd /usr/src/linux</i>

404

# <i>grep SOUND .config</i>

405

<comment>(1. is true)</comment>

406

CONFIG_SOUND=y

407

<comment>(2. is true)</comment>

408

CONFIG_SOUND_PRIME is not set

409

# <i>grep SND .config</i>

410

<comment>(and 3. is true)</comment>

411

CONFIG_SND is not set

412

</pre>

413

414

<p>

415

Now all you have to do is type the magic words... and no, it's not abracadabra.

416

</p>

417

418

<pre caption="Installing alsa-driver">

419

# <i>emerge alsa-driver</i>

420

</pre>

421

422

<impo>

423

Please note that you will have to run <c>emerge alsa-driver</c> after every

424

kernel (re)compile, as the earlier drivers are deleted. To make this task

425

easier, you may want to emerge the <c>module-rebuild</c> package, which will

426

keep track of module packages and rebuild them for you. First run

427

<c>module-rebuild populate</c> to create the list, and then after every kernel

428

(re)compile, you just run <c>module-rebuild rebuild</c>, and your external

429

modules will be rebuilt.

430

</impo>

431

82

</body>

432

</body>

83

</section>

433

</section>

84

</chapter>

434

</chapter>

85

435

86

<chapter>

436

<chapter>

87

<title>Installation</title>

437

<title>Configuring/Testing ALSA</title>

88

<section>

438

<section id="alsa-utilities">

89

<title>Kernel modules</title>

439

<title>ALSA Utilities</title>

90

<body>

440

<body>

91

<p>

441

92

Since we're still using 2.4.x kernel sources, we'll have to compile kernel modules and ALSA modules separately. People who are using a 2.5.x kernel can do this from within their kernel configuration, since the ALSA modules are included in the kernel sources and should be built there.

93

</p>

442

<p>

443

<c>alsa-utils</c> forms an integral part of ALSA as it has a truckload of

444

programs that are highly useful, including the ALSA Initscripts. Hence we

445

strongly recommend that you install <c>alsa-utils</c>

94

<p>

446

</p>

95

First we'll make sure that our kernel configuration is ready for use with ALSA.

447

96

All you need in your kernel configuration is having Sound Card Support set to be built as a module (M).

448

<pre caption="Install alsa-utils">

97

This will build <c>soundcore.o</c>.

449

# <i>emerge alsa-utils</i>

98

</p>

450

</pre>

99

<p>

451

100

<note>

452

<note>

101

Possibly, this will also work when you built Sound Card Support in the kernel (Y) instead of building it as a module (M).

453

If you activated ALSA in your <uri link="#kernel">kernel</uri> <e>and</e> did

102

However, the official ALSA documentation suggests building it as a module, since ALSA will try loading it.

454

not compile ALSA as modules, please proceed to the

455

<uri link="#initscript">ALSA Initscript</uri> section. The rest of you need

456

to configure ALSA. This is made very easy by the existence of the

457

<c>alsaconf</c> tool provided by <c>alsa-utils</c>.

103

</note>

458

</note>

459

460

</body>

461

</section>

462

<section id="alsa-config">

463

<title>Configuration</title>

464

<body>

465

104

</p>

466

<p>

105

<p>If you already have a working kernel configuration, make sure you remove all sound drivers (except for Sound Card Support).

467

Recent versions of <c>udev</c> (<c>>=udev-103</c>) provide some degree of

106

If you wish to do this without having to reboot, you could do like this:

468

kernel-level autoconfiguration of your sound card. If possible, try to rely on