LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 02-05-2008, 09:45 AM   #1
Raymond C. Glassford
Member
 
Registered: Mar 2007
Location: USA
Distribution: Slitaz 4.0
Posts: 30

Rep: Reputation: 16
switching from OSS to ALSA


I am running Mandriva 2007.0, kernel 2.6.17-5mdv. My KDE sound system is currently set-up to use the OSS driver for my on-board audio. With this audio set-up, I have some sound skipping when playing MP3 files using Amarok, regardless of buffer settings, and I am unable to play MIDI files. Also, when I start DOSBox 0.72 (self-compiled) I see the following Konsole output:

[me@mycomputer]$ dosbox
DOSBox version 0.72
Copyright 2002-2007 DOSBox Team, published under GNU GPL.
---
ALSA lib confmisc.c:670snd_func_card_driver) cannot find card '0'
ALSA lib conf.c:3479_snd_config_evaluate) function snd_func_card_driver returned error: No such device
ALSA lib confmisc.c:391snd_func_concat) error evaluating strings
ALSA lib conf.c:3479_snd_config_evaluate) function snd_func_concat returned error: No such device
ALSA lib confmisc.c:1070snd_func_refer) error evaluating name
ALSA lib conf.c:3479_snd_config_evaluate) function snd_func_refer returned error: No such device
ALSA lib conf.c:3947snd_config_expand) Evaluate error: No such device
ALSA lib pcm.c:2143snd_pcm_open_noupdate) Unknown PCM default
CONFIG:Loading primary settings from config file /home/myuserID/.dosboxrc
CONFIG:Loading additional settings from config file dosbox.conf
ALSA lib seq_hw.c:457snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory
ALSA:Can't open sequencer
MIDI:Opened device:none
MAPPER: Loading mapper settings from /home/myuserID/mapper.txt

Obviously, DOSBox would prefer having ALSA installed, and the sound I hear when running it confirms that fact. So, I have decided to switch to the ALSA driver, but before doing so, I have two initial questions.

1. Switching to the ALSA driver is easily done using MCC:

MCC/Hardware/Look at and configure the hardware/Soundcard ICH2 810 Chipset AC'97 Audio Controller/Run config tool/...

i810_audio [OSS]
snd-intel8x0 [ALSA]

but I would like to know the corresponding CLI method for changing the soundcard driver.

2. After the ALSA driver has been selected and loaded, the ALSA documentation recommends:

Copy and paste this [script] to the bottom of your /etc/modules.conf file:

# ALSA portion
alias char-major-116 snd
alias snd-card-0 snd-intel8x0
# 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

For Mandriva 2007.0, the correct path is /etc/modprobe.conf; there is no /etc/modules.conf file. The above script, by the way, is specific to the i810 chipset.

The ALSA documentation also recommends: "If you get an 'init_module: No such device' error when you run this <modprobe> command [referring to initial module insertion tests, not the execution of the above script, which serves to automate the module loading], make sure that you uninstall all the sound related modules first."

I do not anticipate any module removal, but should it be necessary I do not want to do anything permanently; I want the option to be able to easily revert back to the OSS sound system if something is not to my liking. I am a complete newbie as far as the <modprobe -r> command is concerned, but I understand that only modules that are not in use can be removed, and I assume that any modules removed using <modprobe -r> are only removed from memory, not permanently from the kernel stored on HDD.

All this sets up my second question: if I need to prevent specific modules from being loaded at boot-up, how can I do so, again by using the CLI method? At this moment I am assuming that appropriate lines, such as "remove ... etc. ... etc.", added to modprobe.conf will do the job.

I should have more questions concerning ALSA configuration in the near future, particularly when I tackle MIDI functionality. Doing that will require adding more lines of script to /etc/modprobe.conf, among other things. I have already installed almost every ALSA-related package for Mandriva 2007.0, so whatever I might need is readily at-hand.

Thanks in advance for reading all this. I was educated in a scientific discipline, so I rapidly learned to rely in the time-trusted addage, "If you can't dazzle them with brilliance, then baffle them with ...", well, you know the last word ... I don't have to spell it out. Anyway, terse prose is not one of my talents.

Some additional Konsole output follows:

[me@mycomputer]# lsmod <-- This shows loaded modules
...
i810_audio 33684 0
ac97_codec 18316 1 i810_audio
soundcore 8096 1 i810_audio
...

[me@mycomputer]$ cat modprobe.conf <-- This shows current settings
alias eth0 eepro100
alias sound-slot-0 i810_audio
install usb-interface /sbin/modprobe uhci-hcd; /bin/true
alias net-pf-10 off

[me@mycomputer]# lspci | egrep audio
00:1f.5 Multimedia audio controller: Intel Corporation 82801BA/BAM AC'97 Audio (rev 02)

[me@mycomputer]# lspcidrake -v | grep -i audio
i810_audio : Intel Corp.|ICH2 810 Chipset AC'97 Audio Controller [MULTIMEDIA_AUDIO] (vendor:8086 device:2445 subv:0e11 subd:000b)

--------------------------------------------------
Compaq Deskpro EN, Pentium III 933 MHz, 256 MB RAM, Nvidia Riva TNT2 AGP Card, Canon BJC-610 Printer, Best Data 56SX92 External Serial Modem, Mandriva 2007.0, kernel 2.6.17-5mdv, KDE 3.5.4
--------------------------------------------------
 
Old 02-06-2008, 04:14 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,341

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
You have combined two different logic processes into one big ball.

You can install or remove sound drivers from the command line using rpm. oss and alsa can be installed or uninstalled separately. They can both be installed at the same time. To find out what rpm packages you currently have installed use the command:

rpm -qa | sort | less

Then you can install packages with:

rpm -i /path/packagename

You can remove packages with:

rpm -e packagename

See:

man rpm

If you add or remove modules then you need to run the depmod command. See:

man depmod

Which of the installed drivers you actually use is controlled by issuing modprobe commands. You already have a list of what you have to change in /etc/modprobe.conf in order to switch from using oss to using alsa. /etc/modprobe.conf is run at boot.

You can also load and unload drivers by hand from the CLI. You use the lsmod command to list what modules are currently loaded into memory. You can remove modules from memory with:

modprobe -r modulename

You can load modules into memory with:

modprobe modulename

See:

man modprobe

If you are experimenting with modprobe at the CLI and get everything messed up then reboot and /etc/modprobe.conf will set everything back to normal.

What I recommend that you do is install both oss and alsa. Then mess around on the CLI and try to switch from using oss to alsa following the instructions that you have for changing /etc/modporbe.conf. Once you are comfortable with the modprobe changes then change /etc/modprobe.conf.

As an alternative you could just back up /etc/modprobe.conf and just try the changes without pre-testing.

---------------------
Steve Stites
 
Old 02-07-2008, 12:23 AM   #3
ernie
Senior Member
 
Registered: Nov 2001
Location: Toledo, Ohio - USA
Distribution: Mageia 1
Posts: 1,079
Blog Entries: 4

Rep: Reputation: 70
I used the following procedure to set up my vintage sound card using ALSA:

First step: Stop the ALSA driver (if running). The least technical method with Mandriva 2008.0 is using MCC.

Open MCC (Tools > System Tools > Configure Your Computer in the menu system)

Select System in the Category bar (left).

Open the Manage system services by enabling or disabling them icon (main pane).

Click the Stop button to the right of the alsa entry in the Services and Daemons list.

Second step: configure alsa.

With the alsa service stopped, open a terminal window, su to root, and run alsaconf:
Code:
[user@localhost ~]$ su
Password: (enter root password here)
[root@localhost user]# alsaconf
Follow the prompts to configure ALSA for your system. alsaconf will restart the alsa service, but you should start it in MCC to save your configuration (at least I did, and sound works following reboot).

HTH,

Last edited by ernie; 02-07-2008 at 12:26 AM.
 
Old 02-07-2008, 09:50 AM   #4
Raymond C. Glassford
Member
 
Registered: Mar 2007
Location: USA
Distribution: Slitaz 4.0
Posts: 30

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by jailbait View Post
You have combined two different logic processes into one big ball.

You can install or remove sound drivers from the command line using rpm. oss and alsa can be installed or uninstalled separately. They can both be installed at the same time. To find out what rpm packages you currently have installed use the command:

rpm -qa | sort | less

Then you can install packages with:

rpm -i /path/packagename

You can remove packages with:

rpm -e packagename

See:

man rpm

If you add or remove modules then you need to run the depmod command. See:

man depmod

Which of the installed drivers you actually use is controlled by issuing modprobe commands. You already have a list of what you have to change in /etc/modprobe.conf in order to switch from using oss to using alsa. /etc/modprobe.conf is run at boot.

You can also load and unload drivers by hand from the CLI. You use the lsmod command to list what modules are currently loaded into memory. You can remove modules from memory with:

modprobe -r modulename

You can load modules into memory with:

modprobe modulename

See:

man modprobe

If you are experimenting with modprobe at the CLI and get everything messed up then reboot and /etc/modprobe.conf will set everything back to normal.

What I recommend that you do is install both oss and alsa. Then mess around on the CLI and try to switch from using oss to alsa following the instructions that you have for changing /etc/modporbe.conf. Once you are comfortable with the modprobe changes then change /etc/modprobe.conf.

As an alternative you could just back up /etc/modprobe.conf and just try the changes without pre-testing.

---------------------
Steve Stites

Thanks for the information. I have all necessary packages installed. ALSA is running at boot-up, but its driver has not yet been selected, nor is it configured. I just wanted to be sure I could revert back to OSS, if needed, by using the CLI. It is bad practice, in my opinion, to rely entirely on the GUI without knowing what is going on in the background. Modprobe commands alone will allow me to do what I want to do. I will pre-test first, before making changes to /etc/modprobe.conf, and I have a back-up copy.
 
Old 02-07-2008, 09:58 AM   #5
Raymond C. Glassford
Member
 
Registered: Mar 2007
Location: USA
Distribution: Slitaz 4.0
Posts: 30

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by ernie View Post
I used the following procedure to set up my vintage sound card using ALSA:

First step: Stop the ALSA driver (if running). The least technical method with Mandriva 2008.0 is using MCC.

Open MCC (Tools > System Tools > Configure Your Computer in the menu system)

Select System in the Category bar (left).

Open the Manage system services by enabling or disabling them icon (main pane).

Click the Stop button to the right of the alsa entry in the Services and Daemons list.

Second step: configure alsa.

With the alsa service stopped, open a terminal window, su to root, and run alsaconf:
Code:
[user@localhost ~]$ su
Password: (enter root password here)
[root@localhost user]# alsaconf
Follow the prompts to configure ALSA for your system. alsaconf will restart the alsa service, but you should start it in MCC to save your configuration (at least I did, and sound works following reboot).

HTH,
Very good advice, which I will follow. Anyone reading this might also want to exit their window manager GUI (KDE, Gnome, etc.) first, by going to <inittab: 3> first, so that the soundcard is not being used, and then changing the soundcard driver, doing modprobe commands, etc.

The changeover will not be difficult in my case, but getting MIDI functionality might be the most challenging part of the whole process. I just hope it is all worth the effort.
 
  


Reply



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
problem with ALSA, no sound through alsa, oss works SB Live! 5.1 Michalxo Linux - Hardware 2 01-21-2007 05:24 AM
Switching from ALSA to OSS Blargity Linux - General 5 08-06-2005 08:16 PM
ALSA-oss compatability works, but not programs intended for alsa ? qwijibow Linux - Software 5 03-14-2004 07:28 AM
alsa or oss chii-chan Linux - Newbie 2 01-18-2004 09:23 PM
Switching from alsa to oss macewan Linux - Hardware 0 12-27-2003 10:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 09:38 PM.

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
Open Source Consulting | Domain Registration