Compile the driver for ViaAc97 in Linux

Source: Internet
Author: User
Article title: compile the ViaAc97 audio card driver in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
I finally integrated My Via Ac97 into the sound card and played normally except MIDI. The following are some of my experiences and I hope it will be helpful to you.
First, you must download the driver and support library files:
1. alsa-driver-0.5.9c.tar.bz2
2. alsa-lib-0.5.9.tar.bz2
3. alsa-utils-0.5.9b.tar.bz2
4. alsaconf-0.4.3b.tar.gz
  
You can download the latest license driver file at http://www.alsa-project.org.
  
The installation process is as follows:
1 It is best to re-compile the kernel first. In most cases, you need:
1) go to the/usr/src/linux/directory, run the command make menuconfig to enter the compilation status, but do not make any changes. Simply exit, the system will ask you if you do not save the disk, answer YES. Save the disk and exit.
2) run the rm-rf/lib/modules/command to delete the previous modules file.
3) run the command make dep, make clean, and make install consecutively. this process takes a long time.
4) run the make modules command to re-compile the module. this step will take a long time for compilation.
5) run the command make modules_install to install modules.
  
2. log on with the root user
1. import the downloaded Directory, copy alsa-driver-0.5.9c.tar.bz2 and the other three files to a subdirectory, and enter the following command:
Cp alsa-driver-0.5.9 */root
2) decompress the file.
Enter the following command:
Bzip2-dv alsa-driver-0.5.9c.tar.bz2
When using the “ls”command, only alsa-driver-0.5.9c.tar is available in the front Directory, indicating that bzip compression has been removed.
Enter the following command:
Tar vfx alsa-driver-0.5.9c.tar
The program automatically generates a subdirectory named alsa-driver-0.5.9c.
Repeat this step on the other two packages to uncompress. Use the ls command to view the directory.
If you are not familiar with the command line, you can view help information and books. You can also start the X-Window environment, select the corresponding compressed file in the file management program, and select the decompression command in the File menu.
3. install the driver file. (Alsa-driver-0.5.9.tar.bz2)
1) enable sound card support in the kernel
In most cases, this step can be ignored, because the default status of all Linux distributions supports sound card devices.
2) run the script.
Enter the following command:
./Configure
If your sound card belongs to the ISA Plug-and-play type, enter the following command:
./Configure -- with-isapnp = yes
Run the following command:
Make install
Note: This step takes a long time. please wait. If everything is normal, the program will finally prompt that the module has been compiled successfully! It also warns that the default sound card status is mute. you need to use utilities such as amixer to adjust the volume.
The amixerequivalent command is included with alsa-utils-0.5.9a.tar.bz2 and can be used only after compilation.
If the make command cannot be executed, you need to find the Linux installation disk and install the file packages related to development and compilation into the system. For more information, see the software manual.
Enter the following command:
./Snddevices
The script automatically creates a sound card device in the/dev directory.
  
3) install the library files and utilities.
The corresponding library file can be compiled only when the agent detects the corresponding library file. Therefore, alsa-lib-0.5.9.tar.bz2 is first installed.
Go to the appropriate subdirectory alsa-lib-0.5.9 and enter the command:
./Configure
Enter the following command:
Make install
After these two steps are done, return to the upper Directory, enter the alsa-utils-0.5.9b subdirectory, enter the command:
./Configure
Enter the following command:
Make install
4)set the sound card (alsaconf-0.4.3b.tar.gz)
To the alsaconf-0.4.3b Directory, run the command:
./Alsaconf
Select your own sound card, set the Mpu Port (usually 0X300), set playback_frame_size (generally KB), capture_frame_size (usually 64 kB), and complete the settings, but after exiting, alsaconf will tell you that the sound card has not been detected. after self-exploration, the reasons are as follows:
Add the following content to the/etc/conf. modules file:
# --- BEGIN: Generated by ALSACONF, do not edit .---
# --- ALSACONF verion 0.4.3b ---
Alias char-major-116 snd
Alias snd-card-0 snd-card-x
Alias char-major-14 soundcore
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
Options snd snd_major = 116 snd_cards_limit = 1 snd_device_mode = 0666
(Link) snd_device_gid = 0 snd_device_uid = 0
Options snd-card-x snd_index = 0 snd_id = CARD_0 snd_mpu_port = 0x300
(Link) snd_joystick = 0x300 snd_pbk_frame_size = 128 snd_cap_frame_size = 64
# --- END: Generated by ALSACONF, do not edit .---
After the system is restarted, the system fails to start the sound card and prompts that The snd-card-x module does not exist because I modified the above content as follows:
# --- BEGIN: Generated by ALSACONF, do not edit .---
# --- ALSACONF verion 0.4.3b ---
Alias char-major-116 snd
Alias snd-card-0 snd-card-via686a
Alias char-major-14 soundcore
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
Options snd snd_major = 116 snd_cards_limit = 1 snd_device_mode = 0666
(Link) snd_device_gid = 0 snd_device_uid = 0
Options snd-card-via686a snd_index = 0 snd_id = CARD_0 snd_mpu_port = 0x300
Options snd_joystick = 0x300 snd_pbk_frame_size = 128 snd_cap_frame_size = 64
# --- END: Generated by ALSACONF, do not edit .---
After the system is restarted, the sound card starts normally, and you may not be able to hear the sound, because the sound card defaults to 0, and starts the taskbar mixed speaker (kmid) to adjust the volume, enable X11Amp to play Mp3 and adjust the volume appropriately (the volume is also 0 by default in X11Amp). you have heard beautiful music.
The above is successfully compiled in Bluepoint 2.0, and I hope it will be helpful to you.
However, every time you start the system, you need to adjust the volume. as I am a newbie, I hope you can tell me how to save the volume settings. thank you.
  
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.