LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-01-2004, 04:03 PM   #1
michapma
Member
 
Registered: Oct 2003
Location: Zürich
Distribution: Debian
Posts: 537

Rep: Reputation: 39
Time to tackle my sound


Well. After having done quite a bit of poking about to come to grips with the problem, I've found out what I believe to be the relevant points necessary for me to get sound going on my system. Relevant system info is provided below at one point or another. I hope.

I have installed sndconfig (apt-get, as always), and when I it, I get the following (probably familiar) message:
Quote:
You don't seem to be running a kernel with modular sound enabled. (soundcore.o was not found in the module search path). To use sndconfig, you must be running a kernel with modular sound, such as the kernel images shipped with Debian Linux or a 2.2 or greater kernel.
I did some reading but wasn't too sure what to make of that. There are plenty of sound modules running (see below). I may or may not have to come back to that later. I don't know how essential sndconfig is.

It would help to know that I have onboard sound and a sound card. Both seem to want to be supported at present, going by the loaded modules. Onboard sound is a Realtek ALC650 chip with AC '97 sound. The PCI soundcard is a Creative Labs Audigy LS. The Debian Audio/Video wiki didn't help me,but a Google search revealed this very recent thread:
http://www.linuxcompatible.org/thread28166-1.html

Great news, my card will work! Since about August, so it would seem. So I followed links to these threads:
http://opensource.creative.com/soundcard.html
http://www.alsa-project.org/ (obviously, yet I am not yet very familiar with ALSA)

The relevant info from opensource.creative.com is obviously: " The Audigy LS -- The retail Audigy LS card is not based on the same chip as other Audigy boards, so the EMU10K1 driver available at SourceForge won't work with it. Fortunately, there are drivers available from two sources -- ALSA (1.0.6 release) and 4FrontTechnologies."

Now as I understand it, I will need to install ALSA 1.0.6. I prefer to use the APT system, so let's see what APT says.

Code:
# apt-cache showpkg alsa
Package: alsa
Versions:

Reverse Depends:
Dependencies:
Provides:
Reverse Provides:
alsa-base 1.0.5a-3
No huge surprises there. So I would need to download it from Sarge, presumably. (Still working out the details on that one from the APT How-To.

The thing is, I am wondering about a few steps. The ALSA documentation is VERY involved, can be heavy and doesn't assume anything about Debian and its wonderful packaging system. I surely should go for the new support offered to my PCI card, get rid of the traces of the older OSS, get rid of the useless emu10k1 drivers the kernel auto-detected (see below), and make sure things are going right with ALSA. Probably there is a meta package for an important and extensive program such as ALSA.

I realize I have yet more reading to do, but any general guidelines or comments would be very much valued here.


Here is some more necessary system info.

Running off of testing/Sarge, using the net for updates.

# uname -ra
Linux nathan 2.6.8-1-686-smp #1 SMP Mon Sep 13 23:02:39 EDT 2004 i686 GNU/Linux

# lspci
blahblahblah...
0000:00:0a.0 Multimedia audio controller: Creative Labs SB Audigy (rev 03)
0000:00:0a.1 Input device controller: Creative Labs SB Audigy MIDI/Game port (rev 03)
etc......

In the following, I was tempted to but didn't remove any of the modules to save space, for fear of creating confusion.
Code:
# lsmod
Module                  Size  Used by
snd_pcm_oss            55880  0
ipv6                  281636  6
snd_mixer_oss          20384  1 snd_pcm_oss
lp                     11496  0
af_packet              23976  2
ipt_state               2304  19
ipt_REJECT              7232  4
ipt_limit               2848  6
ipt_LOG                 6848  6
ip_conntrack_ftp       72560  0
ip_conntrack           37004  2 ipt_state,ip_conntrack_ftp
iptable_filter          3104  1
ip_tables              19360  5 ipt_state,ipt_REJECT,
    ipt_limit,ipt_LOG,iptable_filter
emu10k1                89796  0
sound                  87880  1 emu10k1
ac97_codec             19212  1 emu10k1
ehci_hcd               33156  0
shpchp                102956  0
pciehp                 99820  0
pci_hotplug            35708  2 shpchp,pciehp
sis_agp                 8420  1
agpgart                35436  1 sis_agp
floppy                 62608  0
parport_pc             36288  1
parport                43272  2 lp,parport_pc
pcspkr                  3884  0
b44                    23460  0
mii                     5344  1 b44
emu10k1_gp              3808  0
gameport                5120  1 emu10k1_gp
tsdev                   7616  0
mousedev               10736  1
joydev                 10240  0
usbtest                18412  0
evdev                   9824  0
usbhid                 32736  0
ohci_hcd               22596  0
usbcore               122148  6 ehci_hcd,usbtest,usbhid,ohci_hcd
snd_emu10k1           102056  0
snd_rawmidi            26084  1 snd_emu10k1
snd_pcm               102948  2 snd_pcm_oss,snd_emu10k1
snd_timer              27428  1 snd_pcm
snd_seq_device          8456  2 snd_emu10k1,snd_rawmidi
snd_ac97_codec         70884  1 snd_emu10k1
snd_page_alloc         12008  2 snd_emu10k1,snd_pcm
snd_util_mem            4832  1 snd_emu10k1
snd_hwdep               9764  1 snd_emu10k1
snd                    59652  10 snd_pcm_oss,snd_mixer_oss,snd_emu10k1,snd_rawmidi,snd_pcm,
     snd_timer,snd_seq_device,snd_ac97_codec,snd_util_mem,snd_hwdep
     <I broke the above line to prevent an overly wide text column.>
soundcore              10880  3 emu10k1,sound,snd
capability              4744  0
commoncap               7552  1 capability
ide_cd                 43232  0
cdrom                  41148  1 ide_cd
rtc                    14184  0
ext3                  129640  6
jbd                    70520  1 ext3
mbcache                10340  1 ext3
ide_generic             1632  0
sis5513                17224  1
ide_disk               19648  8
ide_core              142556  4 ide_cd,ide_generic,sis5513,ide_disk
unix                   31092  522
font                    8544  0
vesafb                  6880  0
cfbcopyarea             4064  1 vesafb
cfbimgblt               3264  1 vesafb
cfbfillrect             4000  1 vesafb
Thanks very much for any tips,
Mike
 
Old 10-01-2004, 05:13 PM   #2
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
Did you try alsaconf,with the 2.6.8 kernel your sound might work now?Also did you disable onboard sound in bios?
 
Old 10-01-2004, 05:52 PM   #3
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Re: Time to tackle my sound

Quote:
Originally posted by michapma
Well. After having done quite a bit of poking about to come to grips with the problem, I've found out what I believe to be the relevant points necessary for me to get sound going on my system. Relevant system info is provided below at one point or another. I hope.

I have installed sndconfig (apt-get, as always), and when I it, I get the following (probably familiar) message:


I did some reading but wasn't too sure what to make of that. There are plenty of sound modules running (see below). I may or may not have to come back to that later. I don't know how essential sndconfig is.
That only works with the OSS I believe and the 2.6 kernel you have installed will be using ALSA.
Quote:
It would help to know that I have onboard sound and a sound card. Both seem to want to be supported at present, going by the loaded modules. Onboard sound is a Realtek ALC650 chip with AC '97 sound.
You will want to go into your BIOS and disable the onboard sound if the option is there.

Quote:
The PCI soundcard is a Creative Labs Audigy LS. The Debian Audio/Video wiki didn't help me,but a Google search revealed this very recent thread:
http://www.linuxcompatible.org/thread28166-1.html

Great news, my card will work! Since about August, so it would seem. So I followed links to these threads:
http://opensource.creative.com/soundcard.html
http://www.alsa-project.org/ (obviously, yet I am not yet very familiar with ALSA)

The relevant info from opensource.creative.com is obviously: " The Audigy LS -- The retail Audigy LS card is not based on the same chip as other Audigy boards, so the EMU10K1 driver available at SourceForge won't work with it. Fortunately, there are drivers available from two sources -- ALSA (1.0.6 release) and 4FrontTechnologies."

Now as I understand it, I will need to install ALSA 1.0.6. I prefer to use the APT system, so let's see what APT says.

Code:
# apt-cache showpkg alsa
Package: alsa
Versions:

Reverse Depends:
Dependencies:
Provides:
Reverse Provides:
alsa-base 1.0.5a-3
No huge surprises there. So I would need to download it from Sarge, presumably. (Still working out the details on that one from the APT How-To.
You will get it from unstable.

Code:
[HappyTux:/home/stephen/archives/tar]# acp alsa-base
alsa-base:
  Installed: 1.0.5a-3
  Candidate: 1.0.5a-3
  Version Table:
     1.0.6a-3 0
        600 http://ftp.de.debian.org unstable/main Packages
 *** 1.0.5a-3 0
        990 http://ftp.de.debian.org testing/main Packages
        100 /var/lib/dpkg/status
And besides the alsa-base you will want the alsa-utils. Then once they are installed you run alsaconf to run the setup program.
Quote:
The thing is, I am wondering about a few steps. The ALSA documentation is VERY involved, can be heavy and doesn't assume anything about Debian and its wonderful packaging system. I surely should go for the new support offered to my PCI card, get rid of the traces of the older OSS, get rid of the useless emu10k1 drivers the kernel auto-detected (see below), and make sure things are going right with ALSA. Probably there is a meta package for an important and extensive program such as ALSA.

I realize I have yet more reading to do, but any general guidelines or comments would be very much valued here.

See above and you definitely want to get rid of the OSS modules otherwise the ALSA will not load properly. If you are running a testing only system and want to stay with mostly a testing base then you will need apt pinning to set it up you need something like this.

Code:
[HappyTux:/home/stephen/archives/tar]# cat /etc/apt/apt.conf
APT::Default-Release "testing";
APT::Get::Show-Versions "true";
APT::Cache-Limit 10000000;
APT::Get::Purge;
APT::Clean-Installed;
And
Code:
[HappyTux:/home/stephen/archives/tar]# cat /etc/apt/preferences
Package: *
Pin: release testing
Pin-Priority: 900

Package: *
Pin: release unstable
Pin-Priority: 600
You will have to create both files most likely the first tells the system your default release and increases the cache so that your can have sources for both branches available in your /etc/apt/sources.list which you should also edit to put a source for the unstable branch in there then apt-get update. The second the prefernces sets the prority for the testing branch above the unstable so the packages will always come from there when installing/upgrading. Now you would install the ALSA by using apt-get -t unstable alsa-base alsa-utils and adding as few packages as possible to the end of the line if/when apt complians about a package(s) being missing and it will not install them. Now after having installed and ran the alsaconf then you will need to run the alsamixer in a console/console window and unmute and raise the volumes on both the Master and PCM channels to have the default volumes set and saved when you shutdown/reboot this should be done as normal user that will be using the sound, all other steps as root of course.
 
Old 10-02-2004, 06:51 AM   #4
michapma
Member
 
Registered: Oct 2003
Location: Zürich
Distribution: Debian
Posts: 537

Original Poster
Rep: Reputation: 39
comprookie2000, the 2.6.8 kernel was installed along with the rest of the system, so I must have had ALSA from the start. Looks like I didn't really have OSS modules, the only one seems to be related to a mixer. The onboard sound was disabled in the BIOS from before the Debian installation. I have had it like that ever since I installed the card under Windows.

HappyTux, thanks very much for your reply -- this is getting me on track now. I have uninstalled/purged sndconfig, since it probably works together with OSS. (This helps me understand why it says I didn't have the soundcore module loaded when it was.)

Since the onboard sound has been disabled in the BIOS since before the installation, it must be that the installer detected the hardware and simply added the AC '97 module regardless.

I don't know how to disable all of these modules. I don't know how to get rid of the emu10k1 modules. Where can I read up on how to do this? For instance, are they in a configuration file, or do I need to recompile the kernel before installing ALSA?

"You will get it from unstable."

Oops, I typed Sarge when I meant Sid. Of course you're right. Thanks to the information you've provided on how to fetch from Sid while running Sarge (which expands for me on what the APT How-To advises), I should be able to get the 1.0.6+ package with apt pinning. I won't install ALSA until I am sure the system is ready for it though.

Just a note: My su terminal didn't recognize "acp." I had to look it up on the forums -- shorthand for "apt-cache policy". Wonder why the terminal doesn't know it?

"And besides the alsa-base you will want the alsa-utils. Then once they are installed you run alsaconf to run the setup program."

Again, what I am not sure of is how to

1) make sure that there are no OSS modules (and programs?) installed that will interfere with ALSA, and
2) get rid of the emu10k1 and AC '97 modules that are currently installed.

Once I can read up on how to take of this, or else find out whether ALSA can take care of it on its own, I can fetch the 1.0.6 alsa-base with alsa-utils and also alsaconf. (Does the version of alsaconf need to correspond to the newest 1.0.6 alsa-base and alsa-utils, or can I get it from testing?)

Thanks so much for your advice. I won't have time to fool with this stuff until later on tonight, sort of a drag but that's the way it goes...

Cheers,
Mike
 
Old 10-02-2004, 07:39 AM   #5
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
The "modconf" utility is probably the easiest way to get rid of OSS modules. But you don't need to get rid of programs that use OSS -- install the "alsa-oss" package and they should work just fine using ALSA instead.

http://packages.debian.org/cgi-bin/s...ll&release=all
 
Old 10-02-2004, 08:54 AM   #6
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally posted by michapma
[B]comprookie2000, the 2.6.8 kernel was installed along with the rest of the system, so I must have had ALSA from the start. Looks like I didn't really have OSS modules, the only one seems to be related to a mixer. The onboard sound was disabled in the BIOS from before the Debian installation. I have had it like that ever since I installed the card under Windows.

HappyTux, thanks very much for your reply -- this is getting me on track now. I have uninstalled/purged sndconfig, since it probably works together with OSS. (This helps me understand why it says I didn't have the soundcore module loaded when it was.)

Since the onboard sound has been disabled in the BIOS since before the installation, it must be that the installer detected the hardware and simply added the AC '97 module regardless.

I don't know how to disable all of these modules. I don't know how to get rid of the emu10k1 modules. Where can I read up on how to do this? For instance, are they in a configuration file, or do I need to recompile the kernel before installing ALSA?
Should be no need to recompile just ensure that discover does not load the modules if it does you need to put them in /etc/discover/blacklist in the Skip line.
Quote:

Just a note: My su terminal didn't recognize "acp." I had to look it up on the forums -- shorthand for "apt-cache policy". Wonder why the terminal doesn't know it?
Sorry I usually edit my /root/.bashrc aliases by hand before I commit the post so your shell would have no way to recognize it. An alias is a shortcut to save you all the typing in the shell here are the ones I use in the file you may want to put them in there or make your own.
Code:
>$ cat /root/.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.

#export PS1='\h:\w\$ '

## Red prompt for root
export PS1='\[\033[01;31m\][\h:\w]\$\[\033[00m\] '

umask 022

# You may uncomment the following lines if you want `ls' to be colorized:
export LS_OPTIONS='--color=auto -h'
eval `dircolors`
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
#
# Some more alias to avoid making mistakes:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# Allows me to run an X program as root
export XAUTHORITY=/home/stephen/.Xauthority

# Stops bash from overwriting file
#i.e. bob@sonic:~> cat > todo-list.txt
#     bash: todo-list.txt: cannot overwrite existing file
set -o noclobber

# Some aliases added by me for convenience
alias afl="apt-file list"
alias afs="apt-file search"
alias afu="apt-file update"
alias agi="apt-get install"
alias agis="apt-get -s install"
alias agit="apt-get install -t unstable"
alias agits="apt-get install -s -t unstable"
alias acp="apt-cache policy"
alias acs="apt-cache search"
alias acsh="apt-cache show"
alias acsp="apt-cache showpkg"
alias agr="apt-get remove --purge"
alias agrs="apt-get -s remove"
alias agu="apt-get upgrade"
alias agus="apt-get -s upgrade"
alias agd="apt-get dist-upgrade"
alias agds="apt-get -s dist-upgrade"
alias ag="apt-get update"
alias asv="apt-show-versions"
alias asva="apt-show-versions -a"
alias dpg="dpkg -l | grep"
alias dpi="dpkg -i"
alias dpif="dpkg -i --force-overwrite"
alias dpp="dpkg -p"
alias dpl="dpkg -L"
alias dps="dpkg -S"
alias dpsc="dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz"
alias dpgc="COLUMNS=125 dpkg -l | grep"
alias ds="dselect update"


# Set pager to most for color man pages
PAGER=most ; export $PAGER

#Added to let less view .gz doc files
eval `lesspipe`
Quote:
"And besides the alsa-base you will want the alsa-utils. Then once they are installed you run alsaconf to run the setup program."

Again, what I am not sure of is how to

1) make sure that there are no OSS modules (and programs?) installed that will interfere with ALSA, and
2) get rid of the emu10k1 and AC '97 modules that are currently installed.
I do not mean delete them or anything like that just make sure that they do not get loaded by discover and sometimes hotplug now that I think of it, it has a blacklist as well that you can put modules in so it will not load them.
Quote:
Once I can read up on how to take of this, or else find out whether ALSA can take care of it on its own, I can fetch the 1.0.6 alsa-base with alsa-utils and also alsaconf. (Does the version of alsaconf need to correspond to the newest 1.0.6 alsa-base and alsa-utils, or can I get it from testing?)
Alsaconf is included in the alsa-utils package along with other things like alsamixer.
Quote:
Thanks so much for your advice. I won't have time to fool with this stuff until later on tonight, sort of a drag but that's the way it goes...

Cheers,
Mike
Your Welcome.
 
Old 10-02-2004, 10:26 AM   #7
michapma
Member
 
Registered: Oct 2003
Location: Zürich
Distribution: Debian
Posts: 537

Original Poster
Rep: Reputation: 39
Actually, I hadn't planned on using discover. This brings up an interesting point; discover, although it is more confusing to use than using apt-get directly (yes, I realize that discover uses apt-get), is probably often better than apt-get, because of the way it installs recommended packages in addition to dependent packages.

We've discussed how to use apt pinning to retrieve the unstable version of alsa-base and alsa-utils that I need for my card, but if I use discover instead, don't I need a way to tell it to use the unstable version?

Well, in any case, I've a decent idea of what to do now, and with a good session of sitting and reading docs I should be able to figure it out. I'm still confused as to why I don't need to "uninstall" (not the right term I think) the modules that are currently being loaded -- probably ALSA will know how to get rid of them. Hopefully things will become clear in the doing.

Thanks again,
Mike
 
Old 10-02-2004, 11:07 AM   #8
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally posted by michapma
Actually, I hadn't planned on using discover. This brings up an interesting point; discover, although it is more confusing to use than using apt-get directly (yes, I realize that discover uses apt-get), is probably often better than apt-get, because of the way it installs recommended packages in addition to dependent packages.


You are confused on this part discover does not use apt-get it is a package that uses a database of pci id's and during boot it runs then loads the module(s) for the devices it finds.
Quote:
We've discussed how to use apt pinning to retrieve the unstable version of alsa-base and alsa-utils that I need for my card, but if I use discover instead, don't I need a way to tell it to use the unstable version?
No you still the alsa packages from unstable to try to get your card to work.
Quote:
Well, in any case, I've a decent idea of what to do now, and with a good session of sitting and reading docs I should be able to figure it out. I'm still confused as to why I don't need to "uninstall" (not the right term I think) the modules that are currently being loaded -- probably ALSA will know how to get rid of them. Hopefully things will become clear in the doing.

Thanks again,
Mike
You may still have to use modconf to unselect the modules or if they are in the /etc/modules then edit that file by hand and remove them of course you may still have to blacklist as well it all depends on how it goes, I removed both the discover and hotplug packages a long time ago so am not entirely certain how it will play out.. One thing for certain though ALSA knows nothing about the OSS idea it will happily configure and load its modules even though they will be in conflict with the OSS that may be loaded at the same time it is up to you the sysadmin to make sure that does not happen.
 
Old 10-03-2004, 01:11 PM   #9
michapma
Member
 
Registered: Oct 2003
Location: Zürich
Distribution: Debian
Posts: 537

Original Poster
Rep: Reputation: 39
"You are confused on this part discover does not use apt-get it is a package that uses a database of pci id's and during boot it runs then loads the module(s) for the devices it finds."

Right you are, I read discover and thought dselect.


"No you still the alsa packages from unstable to try to get your card to work."

Done, I used an apt-get update and then with the -t option and got 1.0.6+. Unfortuately, when I rand alsaconf it detected the card as simply "Audigy" and loaded the emu10k1 driver again.


"You may still have to use modconf to unselect the modules or if they are in the /etc/modules then edit that file by hand and remove them of course you may still have to blacklist as well it all depends on how it goes, I removed both the discover and hotplug packages a long time ago so am not entirely certain how it will play out.. One thing for certain though ALSA knows nothing about the OSS idea it will happily configure and load its modules even though they will be in conflict with the OSS that may be loaded at the same time it is up to you the sysadmin to make sure that does not happen."

When I used modconf, I could only see how to select packages, not deselect. Time to hit the books again.
 
Old 10-03-2004, 01:18 PM   #10
michapma
Member
 
Registered: Oct 2003
Location: Zürich
Distribution: Debian
Posts: 537

Original Poster
Rep: Reputation: 39
Quote:
Originally posted by michapma
When I used modconf, I could only see how to select packages, not deselect. Time to hit the books again.
Duh. Wasn't hard, just had to dare to select one.
 
Old 10-03-2004, 04:45 PM   #11
michapma
Member
 
Registered: Oct 2003
Location: Zürich
Distribution: Debian
Posts: 537

Original Poster
Rep: Reputation: 39
I have tried, and there are a few things I don't get. First, let's look at how to blacklist discover and hotplug. I tried to do it, but it doesn't seem to work.

/etc/hotplug/blacklist exists, so I added these lines:
# these are my own additions
emu10k1_gp
snd_emu10k1
snd_ac97_codec

/etc/discover/blacklist does not exist. In fact, /etc/discover does not exist. On the other hand, /etc/discover.conf and /etc/discover-modprobe.conf do exist. The file discover.conf is an xml-type document with a list of things to scan (ata, pci, usb, etc.). But discover-modprobe.conf has the following content:
Code:
/etc# cat discover-modprobe.conf
# $Progeny: discover-modprobe.conf 4108 2004-02-23 21:56:41Z imurdock $

# Load modules for the following device types.
types="audio bridge broadband display fixeddisk \
       humaninput imaging miscellaneous modem network \
       optical printer removabledisk tape video"

# Don't ever load the foo, bar, or baz modules.
#skip="foo bar baz"
skip="snd_emu10k1 emu10k1_gp snd_ac97_codec"

# Lines below this point have been automatically added by
# discover-modprobe(8) to disable the loading of modules that have
# previously crashed the machine:
Now the line skip="snd_emu10k1 emu10k1_gp snd_ac97_codec" I added myself.

Of course I backed the originals up first. Now I have the problem that when I restart the system, these modules show up anyway. So either I am not blacklisting them properly, or else Gnome or xdm is starting them up and the blacklists can do nothing about it.

When I try for example to do a "#modprobe -r snd_emu10k1" while in the X server, it tells me this: FATAL: Module snd_emu10k1 is in use. In order to use a modprobe -r on them, I have to exit the X server and do it from the console. In this way I was able to use both modprobe -r to kill them and modconf to remove them (or so I believed). If I re-open the X server, there they are again already. Rebooting again does nothing. So these things are pretty persistent. I'm not certain what I have to do to get rid of them.

The cool thing that I have discovered is this:
http://alsa.opensrc.org/index.php?page=audigyls

Sadly, although I have updated alsa-base to version 1.0.6a-3, I get the following:
# modprobe snd-audigyls
FATAL: Module snd_audigyls not found.


I just don't know what to do with myself here.
 
Old 10-03-2004, 05:18 PM   #12
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
Index: alsa-driver/pci/emu10k1/audigyls.c
===================================================================
RCS file: /cvsroot/alsa/alsa-driver/pci/emu10k1/audigyls.c,v
retrieving revision 1.8
diff -u -r1.8 audigyls.c
--- alsa-driver/pci/emu10k1/audigyls.c 5 Jul 2004 15:07:21 -0000 1.8
+++ alsa-driver/pci/emu10k1/audigyls.c 6 Jul 2004 17:11:33 -0000
@@ -1,7 +1,7 @@
/*
* Copyright (c) by James Courtier-Dutton <James@superbug.demon.co.uk>
* Driver AUDIGYLS chips
- * Version: 0.8
+ * Version: 0.0.11
*
* FEATURES currently supported:
* Front, Rear and Center/LFE.
@@ -46,6 +46,13 @@
* Change remove and rename ctrls into lists.
* 0.0.8
* Try to fix capture sources.
+ * 0.0.9
+ * Fix AC3 output.
+ * Enable S32_LE format support.
+ * 0.0.10
+ * Enable 48000 and 96000 rates. (Rates other that these do not work, even with "plug:front".)
+ * 0.0.11
+ * Add Model name recognition.
*
* BUGS:
* Some stability problems when unloading the snd-audigyls kernel module.
@@ -57,6 +64,7 @@
* MIDI
* --
* GENERAL INFO:
+ * Model: SB0310
* P17 Chip: CA0106-DAT
* AC97 Codec: STAC 9721
* ADC: Philips 1361T (Stereo 24bit)
@@ -135,7 +143,10 @@

#define UNKNOWN14 0x10 /* Unknown ??. Defaults to 0 */
#define HCFG 0x14 /* Hardware config register */
+ /* 0x1000 causes AC3 to fails. Maybe it effects 24 bit output. */

+#define HCFG_8_CHANNEL 0x00000200 /* 1 = 8 channels, 0 = 2 channels per substream. */
+#define HCFG_S32_LE 0x00000800 /* 1 = S32_LE, 0 = S16_LE */
#define HCFG_LOCKSOUNDCACHE 0x00000008 /* 1 = Cancel bustmaster accesses to soundcache */
/* NOTE: This should generally never be used. */
#define HCFG_AUDIOENABLE 0x00000001 /* 0 = CODECs transmit zero-valued samples */
@@ -317,6 +328,16 @@
unsigned short running;
};

+typedef struct {
+ u32 serial;
+ char * name;
+} audigyls_names_t;
+
+static audigyls_names_t audigyls_chip_names[] = {
+ { 0x10021102, "AudigyLS [SB0310]"} ,
+ { 0, "AudigyLS [Unknown]" }
+};
+
// definition of the chip-specific record
struct snd_audigyls {
snd_card_t *card;
@@ -353,10 +374,10 @@
SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
SNDRV_PCM_INFO_MMAP_VALID),
- .formats = SNDRV_PCM_FMTBIT_S16_LE,
- .rates = SNDRV_PCM_RATE_48000,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE,
+ .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_96000,
.rate_min = 48000,
- .rate_max = 48000,
+ .rate_max = 96000,
.channels_min = 2, //1,
.channels_max = 2, //6,
.buffer_bytes_max = (32*1024),
@@ -685,11 +706,46 @@
int voice = voice=epcm->channel_id;
u32 *table_base = (u32 *)(emu->buffer.area+(8*16*voice));
u32 period_size_bytes = frames_to_bytes(runtime, runtime->period_size);
+ u32 hcfg_mask = 0x00000800; /* We only know what bits 17 and 19 do. */
+ u32 hcfg_set = 0x00000000;
+ u32 hcfg;
+ u32 reg40_mask = 0x30000;
+ u32 reg40_set = 0;
+ u32 reg40;
int i;

- //snd_printk("prepare:voice_number=%d, rate=%d, format=0x%x, channels=%d, buffer_size=%ld, period_size=%ld, periods=%u, frames_to_bytes=%d\n",voice, runtime->rate, runtime->format, runtime->channels, runtime->buffer_size, runtime->period_size, runtime->periods, frames_to_bytes(runtime, 1));
+ snd_printk("prepare:voice_number=%d, rate=%d, format=0x%x, channels=%d, buffer_size=%ld, period_size=%ld, periods=%u, frames_to_bytes=%d\n",voice, runtime->rate, runtime->format, runtime->channels, runtime->buffer_size, runtime->period_size, runtime->periods, frames_to_bytes(runtime, 1));
//snd_printk("dma_addr=%x, dma_area=%p, table_base=%p\n",runtime->dma_addr, runtime->dma_area, table_base);
//snd_printk("dma_addr=%x, dma_area=%p, dma_bytes(size)=%x\n",emu->buffer.addr, emu->buffer.area, emu->buffer.bytes);
+ switch (runtime->rate) {
+ case 48000:
+ reg40_set = 0;
+ break;
+ case 96000:
+ reg40_set = 0x20000;
+ break;
+ default:
+ reg40_set = 0;
+ break;
+ }
+ switch (runtime->format) {
+ case SNDRV_PCM_FORMAT_S16_LE:
+ hcfg_set=0;
+ break;
+ case SNDRV_PCM_FORMAT_S32_LE:
+ hcfg_set=0x800;
+ break;
+ default:
+ hcfg_set=0;
+ break;
+ }
+ hcfg = inl(emu->port + HCFG) ;
+ hcfg = (hcfg & ~hcfg_mask) | hcfg_set;
+ outl(hcfg, emu->port + HCFG);
+ reg40 = snd_audigyls_ptr_read(emu, 0x40, 0);
+ reg40 = (reg40 & ~reg40_mask) | reg40_set;
+ snd_audigyls_ptr_write(emu, 0x40, 0, reg40);
+
/* FIXME: Check emu->buffer.size before actually writing to it. */
for(i=0; i < runtime->periods; i++) {
table_base[i*2]=runtime->dma_addr+(i*period_size_bytes);
@@ -1154,7 +1210,7 @@
}

if (request_irq(pci->irq, snd_audigyls_interrupt,
- SA_INTERRUPT|SA_SHIRQ, "AUDIGYLS",
+ SA_INTERRUPT|SA_SHIRQ, "snd_audigyls",
(void *)chip)) {
snd_audigyls_free(chip);
printk(KERN_ERR "cannot grab irq\n");
@@ -1176,7 +1232,7 @@
pci_read_config_byte(pci, PCI_REVISION_ID, (char *)&chip->revision);
pci_read_config_dword(pci, PCI_SUBSYSTEM_VENDOR_ID, &chip->serial);
pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &chip->model);
-#if 0
+#if 1
printk(KERN_INFO "Model %04x Rev %08x Serial %08x\n", chip->model,
chip->revision, chip->serial);
#endif
@@ -1273,8 +1329,9 @@
snd_audigyls_intr_enable(chip, 0x105); /* Win2000 uses 0x1e0 */

//outl(HCFG_LOCKSOUNDCACHE|HCFG_AUDIOENABLE, chip->port+HCFG);
- outl(0x00001409, chip->port+HCFG);
-
+ //outl(0x00001409, chip->port+HCFG); /* 0x1000 causes AC3 to fails. Maybe it effects 24 bit output. */
+ outl(0x00000009, chip->port+HCFG);
+
if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL,
chip, &ops)) < 0) {
snd_audigyls_free(chip);
@@ -1284,6 +1341,24 @@
return 0;
}

+static void snd_audigyls_proc_reg_write32(snd_info_entry_t *entry,
+ snd_info_buffer_t * buffer)
+{
+ audigyls_t *emu = entry->private_data;
+ unsigned long flags;
+ char line[64];
+ u32 reg, val;
+ while (!snd_info_get_line(buffer, line, sizeof(line))) {
+ if (sscanf(line, "%x %x", &reg, &val) != 2)
+ continue;
+ if ((reg < 0x40) && (reg >=0) && (val <= 0xffffffff) ) {
+ spin_lock_irqsave(&emu->emu_lock, flags);
+ outl(val, emu->port + (reg & 0xfffffffc));
+ spin_unlock_irqrestore(&emu->emu_lock, flags);
+ }
+ }
+}
+
static void snd_audigyls_proc_reg_read32(snd_info_entry_t *entry,
snd_info_buffer_t * buffer)
{
@@ -1387,8 +1462,11 @@
{
snd_info_entry_t *entry;

- if(! snd_card_proc_new(emu->card, "audigyls_reg32", &entry))
+ if(! snd_card_proc_new(emu->card, "audigyls_reg32", &entry)) {
snd_info_set_text_ops(entry, emu, 1024, snd_audigyls_proc_reg_read32);
+ entry->c.text.write_size = 64;
+ entry->c.text.write = snd_audigyls_proc_reg_write32;
+ }
if(! snd_card_proc_new(emu->card, "audigyls_reg16", &entry))
snd_info_set_text_ops(entry, emu, 1024, snd_audigyls_proc_reg_read16);
if(! snd_card_proc_new(emu->card, "audigyls_reg8", &entry))
@@ -1972,6 +2050,7 @@
static int dev;
snd_card_t *card;
audigyls_t *chip;
+ audigyls_names_t *c;
int err;

if (dev >= SNDRV_CARDS)
@@ -2021,8 +2100,12 @@

strcpy(card->driver, "AudigyLS");
strcpy(card->shortname, "AUDIGYLS");
+
+ for (c=audigyls_chip_names; c->serial; c++) {
+ if (c->serial == chip->serial) break;
+ }
sprintf(card->longname, "%s at 0x%lx irq %i",
- card->shortname, chip->port, chip->irq);
+ c->name, chip->port, chip->irq);

if ((err = snd_card_register(card)) < 0) {
snd_card_free(card);

Looks like that is the driver for your card?
 
Old 10-03-2004, 05:57 PM   #13
michapma
Member
 
Registered: Oct 2003
Location: Zürich
Distribution: Debian
Posts: 537

Original Poster
Rep: Reputation: 39
Hi comprookie2000,

Yes, that looks very much like a C file that I could compile and use if I had any idea how to. (You could have just linked to it.) I realize that compiling code is no big deal if done in a standard way, but then you do have to know what you're doing. In this case, I don't. The ALSA docs are either all very outdated or scattered, and I haven't learned how to compile my own drivers yet. Please bear in mind that I effectively have been a Linux user for under two weeks, some past experiments with installing SUSE aside. Anyway, there are plenty of betas:
http://www.alsa-project.org/~james/alsa-driver/

According to the site I linked:
http://alsa.opensrc.org/index.php?page=audigyls
Quote:
The driver for the Audigy LS is now included in alsa-driver 1.0.6a.

To build it, use:
./configure --with-cards=audigyls

The kernel module that is used is called "snd-audigyls"
1) alsaconf detects my card as an Audigy and installs/installed the standard emu10k1 modules.
2) I don't know how to prevent the ALSA emu10k1 modules from being loaded; blacklisting doesn't seem to help me.
3) If the driver is already in version 1.0.6+, which I have installed, why can't I simply load it as a module from there?
4) I don't know what to do with ./configure --with-cards=audigyls
5) I am, however, still trying to understand.
6) Even when the driver is properly installed, Gnome sound will probably block me from realizing it works.

Thanks though,
Mike
 
Old 10-03-2004, 06:15 PM   #14
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
That is the same driver you are tring to get rid of I think.I would uninstall then reinstall alsa with apt and then go ahead and set the sound up with alsaconf and unmute your sound and it should work without a lot other stuff,that driver is from
--- alsa-driver/pci/emu10k1/audigyls.c 5 Jul 2004 15:07:21 -0000 1.8 and it is the emu10k1 and supports audigyls.c I could never code a driver in a million years,but I have started from the begining and followed all the directions because most times I mess up and make things harder than they have to be!
After you get it set up you should be able to modprobe "snd-audigyls" to see if it is loaded. hope this helps,I will keep looking around and see if I can find something that is clear as I don't have that card but I'm sure someone has it working.

Last edited by comprookie2000; 10-03-2004 at 06:29 PM.
 
Old 10-03-2004, 06:26 PM   #15
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
I don't quite follow why you want to stop Debian from loading ALSA modules -- I thought it was only OSS modules you needed to stop from loading in /etc/hotplug/blacklist and /etc/discover.conf. But I guess you know what you're doing.

The usual method of loading kernel modules in Debian during boot-time is to add them either to /etc/modules or to some file in /etc/modprobe.d/ or /etc/modutils/. Then you run (as root) "update-modules" so that a new /etc/modules.conf is created.

So maybe you should check if the modules you want to prevent from being loaded appear in some of these files.

BTW, after doing "alsaconf" and unmuting sound channels in alsamixer, I first got only screeching noises from sound apps. Then I added a skip line for my soundcard (skip maestro3) to /etc/discover.conf, rebooted, and ALSA sound started to work OK. But I guess I'm just lucky.
 
  


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
Sound Issues - Only one program can use sound at a time MrPeaches Fedora 1 04-23-2005 03:05 AM
Can't play more than one sound at a time boyakasha Linux - Software 3 04-18-2005 05:40 PM
ATIIXP sound / Only one sound at a time fredgt Linux - Hardware 1 12-09-2004 06:24 PM
Several sound-applications at the same time atlesn Linux - General 2 04-27-2004 01:36 PM
How to get more than one sound at the same time???? Seiya Slackware 3 02-25-2004 02:12 PM

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

All times are GMT -5. The time now is 04:30 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