Matrix:Module-emu10k1
Card specific information
E-MU Digital Audio System Cards
Last updated: 2024-01-08 for Linux kernel v6.6
The whole range of PCI, PCIe, and CardBus cards is fundamentally supported. The USB cards are not subject to this driver.
What should work:
- 44.1kHz and 48kHz word clocks are supported (switchable using the mixer). The default devices (hw:x,0) support hardware resampling, so (almost) arbitrary sample rates can be chosen, with some quality degradation.
- Playback to ALSA devices at 16bit:
- front
- rear
- center_lfe
- side
- surround40
- surround51
- surround71
- That playback or ALSA devices arrives in DSP channels 0-7. One can then select with alsamixer which actual physical output one wishes the sound to come from. It loads with mostly sensible defaults.
- Stereo 16bit sound capture with the default device
- 16-channel 24bit (S32_LE) in-phase capture (hw:x,2) suitable for use with jackd/ardour.
- 16-channel 16bit (S16_LE) in-phase playback (hw:x,3) suitable for use with jackd/ardour.
- A switch to select the clock source. (Note that the 02 CardBus card has one dead option due to lack of documentation/testing; please report your findings.)
- Switches to enable PADS (attenuation) on the inputs and outputs.
- ADAT/SPDIF switching on the TOSLINK (optical) ports (unavailable on 0404 cards)
What is not supported (by upstream kernels):
- High sample rates (non-1x word clock multipliers).
- The "sync" LED is not to be trusted.
- Almost anything else not mentioned above. :-)
Downstream Patch
A large patchset with extended features is available on GitHub. Differences to upstream:
- full support for native 88.2/96/176.4/192 kHz sample rates
- 16-channel 24bit (S32_LE) in-phase playback suitable for use with jackd/ardour.
- not everything is tested due to lack of hardware; a call for testing was posted on Reddit.
Details can be found in the documentation.
The patch is based on Linux v6.6. You can/should merge the latest (stable) kernel tree that works (v6.6.10 and v6.7-rc0+ are tested) and follow whatever build instructions are appropriate for your distribution.
Upstream refuses to merge the patch, because they deem features that might crash poorly programmed mixer applications unacceptable, even as an opt-in. Go figure.
Audigy 2 Platinum EX
Infrared remote control and MIDI in/out on Audigy 2 ZS pro and Audigy 4 pro.
There is an issue with the Audigy 2 Platinum Ex soundcard and the Audigy 4 pro (and probably some other Audigy 2 cards as well), whereas the IR sensor, MIDI and the buttons on the LiveDrive do NOT work at all until the LiveDrive is initialized by sending the sequence of '0xf0, 0x00, 0x20, 0x21, 0x61, 0x0, 0x00, 0x00, 0x7f, 0x0, 0xf7' to the MIDI port. Before doing this, even the LED on the LiveDrive won't blink, as it usually does when a button on the remote is pressed. As far as I know, this behaviour is different than with most LiveDrives manufactured by Creative. For more information see this link. The easiest workaround to this is to add the following line to /etc/modules.conf
post-install snd-emu10k1
echo -e '\360\000\040\041\141\000\000\000\177\000\367' > /dev/snd/midiC0D1
If it doesn't work, try
echo -en "\xf0\x00\x20\x21\x61\x00\x00\x00\x7f\x00\xf7" > /dev/snd/midiC0D1
It works for me and it should be distribution-independent (with exception to Debian, where you change /etc/modutils/alsa and run update-modules afterwards, Debian users will know anyway).
Audigy 2
The soundcard has a hardware bug (the address bus is only 31 Bit wide, instead of 32 Bit) that makes it impossible to load and address large soundfont2 files on an 64 Bit Kernel and more than 4 GB RAM above the 2 GB Address memory space. But a workaround does exist:
First, one needs to identify one's sound card. Open a terminal windows and type:
cat /proc/asound/cards
This has been tested with the following cards:
0 [Audigy2 ]: Audigy2 - SB Audigy 2 Platinum [SB0240P] SB Audigy 2 Platinum [SB0240P] (rev.4, serial:0x10021102)
Then reboot the OS and press "e" when grub is loading. In grub's edit menu search for the word "splash" and then add after this word the following option
memmap=2048M\\$6144M
Then continue booting the kernel. This kernel option will limit your Hardware RAM for this session your OS can use to about 2-4 GB which leads to a solution for the Audigy 2 which now will be able to load large soundfont files in the now limited 2 GB address space of your RAM. This setting will be lost after reboot. To add a permanent solution edit your grub menu config file.
An alternative to this solution would be using a 32 Bit Kernel, instead of a 64 Bit Kernel.
Finally, an even better alternative to using a 32 Bit Kernel or limiting your system RAM is to apply the following small patch to the kernel:
diff --git a/arch/x86/include/asm/dma.h b/arch/x86/include/asm/dma.h index 0bdb0c5..0dccbc6 100644 --- a/arch/x86/include/asm/dma.h +++ b/arch/x86/include/asm/dma.h @@ -73,7 +73,7 @@ #define MAX_DMA_PFN ((16 * 1024 * 1024) >> PAGE_SHIFT) /* 4GB broken PCI/AGP hardware bus master zone */ -#define MAX_DMA32_PFN ((4UL * 1024 * 1024 * 1024) >> PAGE_SHIFT) +#define MAX_DMA32_PFN ((2UL * 1024 * 1024 * 1024) >> PAGE_SHIFT) #ifdef CONFIG_X86_32 /* The maximum address that we can perform a DMA transfer to on this platform */
For more info about the MAX_DMA32_PFN DMA zone read this LWN article. And the solution provided here explains the technical background for why the loading of the soundfont fails.
Audigy 2 ZS Notebook.
Status of current ALSA hg repository support: changeset: 4743:5282de1ad7ef (or alsa-driver 1.0.14)
Supported:
- 7.1 Sound analog playback
- Sound capture from Mic/Line in. (newly added)
- Digital PCM out
Not yet supported:
- Digital AC3 out (requires implementation of the p17v PCMs)
- Digital input
For older alsa-driver 1.0.13
Supported:
- 7.1 Sound analog playback
- Digital PCM out
Not supported:
- Digital AC3 out
- Digital input
- Sound capture from Mic/Line in.
Audigy4 capture
First, one needs to identify one's sound card. Open a terminal windows and type:
cat /proc/asound/cards
This has been tested with the following cards:
0 [Audigy2 ]: Audigy2 - Audigy 4 [SB0610] Audigy 4 [SB0610] (rev.0, serial:0x10211102) at 0x9400, irq 201
This note applies only to the SB0610 and may or may not work for other Audigy 4 cards.
The controls that have been tested and verified are: Mic and Line-in. In order to get sound capture working, set the following controls as they affect both Mic and Line-in: On the alsamixer Capture display:
- Master -> 100% or 0dB (affects both analog and digital capture sources)
- Analog Mix -> 100% or 0dB (affects only analog sources)
Controls that affect Mic input: On the alsamixer Playback display: (these will eventually appear on the capture display once developers add the feature):
- Mic boost (If you need +20dB boost)
- Mic Select -> Mic1
On the alsamixer Capture display:
- Mic -> 100%
Controls that affect Line-in input: 1) Line -> 100% or +12dB
The module options for snd-emu10k1
description: | EMU10K1 | |
author: | Jaroslav Kysela | |
license: | GPL | |
parm: | index:Index value for the EMU10K1 soundcard. (array of int) | |
parm: | id:ID string for the EMU10K1 soundcard. (array of charp) | |
parm: | enable:Enable the EMU10K1 soundcard. (array of bool) | |
parm: | seq_ports:Allocated sequencer ports for internal synthesizer. (array of int) | |
parm: | max_synth_voices:Maximum number of voices for WaveTable. (array of int) | |
parm: | max_buffer_size:Maximum sample buffer size in MB. (array of int) | |
parm: | enable_ir:Enable IR. (array of bool) | |
parm: | subsystem:Force card subsystem model. (array of uint) |
Introduction for Creative EMU based soundcard
There are two ways of getting Linux drivers to work, you can either compile them into the kernel or build them separately as modules. Read the Kernel-HOWTO for details of how to compile a kernel.
You must turn on the sound support soundcore module. This is in the kernel. Look in the sound drivers directory and it should be the first option. Most people enable the module setting. That way you can load and unload the module manually if you have multiple soundcards/devices or if you intend to debug or use cutting edge software which may cause your drivers to halt sometimes. Of course it also means you have more control of your system.
Most modern distros come with soundcore compiled as a module. You can check this in numerous ways. The easiest way is to type:
modinfo soundcore
If this command returns that you have this module, then you don't need to recompile your kernel.
Quick installation
This explains how to build from source tarballs. See GIT_Server for instructions on getting and using the latest source from git repositories.
Type the following commands in the shell of your choice.
Make a directory to store the alsa source code in:
cd /usr/src mkdir alsa cd alsa cp /downloads/alsa-* .
Now unzip and install the alsa-driver package:
bunzip2 alsa-driver-xxx tar -xf alsa-driver-xxx cd alsa-driver-xxx ./configure --with-cards=emu10k1 --with-sequencer=yes ; make ; make install
Now unzip and install the alsa-lib package:
cd .. bunzip2 alsa-lib-xxx tar -xf alsa-lib-xxx cd alsa-lib-xxx ./configure ; make ; make install
Now unzip and install the alsa-firmware package:
cd .. bunzip2 alsa-firmware-xxx tar -xf alsa-firmware-xxx cd alsa-firmware-xxx ./configure ; make ; make install
Now unzip and install the alsa-utils package:
cd .. bunzip2 alsa-utils-xxx tar -xf alsa-utils-xxx cd alsa-utils-xxx ./configure ; make ; make install
Now insert the modules into the kernel:
modprobe snd-emu10k1 ; modprobe snd-pcm-oss ; modprobe snd-mixer-oss ; modprobe snd-seq-oss
Now adjust your soundcard's volume levels. All mixer channels are muted by default. You must use a native mixer program to unmute appropriate channels, for example alsamixer from the alsa-utils package. Note that some usb-audio devices do not have internal mixer controls. Run:
alsamixer
You can also look at the utils/alsasound file. This script is designed for the RedHat Linux distribution, but it can also be used with other distributions which use System V style rc init scripts. This will allow you to load your modules at boot time. If you don't want to do this you can of course compile them into the kernel instead and save yourself the hassle of coming to terms with the rc init scripts.
Setting up modprobe and kmod support
Before you send a mail complaining that "I don't have /etc/modules.conf, where do I find it ……" ‒ the /etc/conf.modules has been deprecated with a few distro's, but in your case it may still be /etc/conf.modules. Basically they are both the same, but recent version of modutils use /etc/modules.conf instead. Nothing to worry about as such, optionally please update to the latest version of modutils. This should solve your problem.
Here's the example for this card. Copy and paste this to the bottom of your /etc/modules.conf file.
Note: |
Debian GNU/Linux users need to save this information into a file in the /etc/modutils/ directory (eg. /etc/modutils/alsa) and run update-modules. Note also that the kernel module soundcore has been renamed in Debian kernels >2.6.23 into snd. A workaround is to put a symlink at /lib/modules/x.x.xx/kernel/sound/soundcore.ko pointing to snd.ko |
---|
Note: |
Systemd users need to save this information into a file in the /etc/modprobe.d/ directory terminating with .conf (eg. /etc/modprobe.d/alsa.conf). In case of modules auto-loading instead, the module name must be inserted in a file in the/etc/modules-load.d/ directory terminating with .conf (eg. /etc/modules-load.d/alsa.conf). |
---|
# ALSA portion alias char-major-116 snd alias snd-card-0 snd-emu10k1 # 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
To copy and paste the above to your /etc/modules.conf file follow these instructions.
modules.conf
This is a short explanation of what happens in the /etc/modules.conf file.
Native devices
After the main multiplexer is loaded, its code automatically requests the top level sound card module. String snd-card-%i is requested for native devices where %i is the sound card number, counted from zero (the first sound card) to seven (the eighth sound card). String sound-slot-%i is requested for native devices where %i is slot number for the corresponding ALSA owner (which is basically the sound card number). The options line allows you to set various configuration options before the module is loaded. String id (or snd_id) lets you set the name of the card which is then returned in the /proc/asound/cards file, i.e. to user space applications. Other options may be available depending on the specific card. Options for these cards are found in the INSTALL file or above.
username@hostname# pico /etc/modules.conf # ALSA portion alias snd-card-0 snd-hda-intel alias snd-card-1 snd-cmipci options snd-cmipci id="first" mpu_port=0x330 # OSS/Free portion alias sound-slot-0 snd-card-0 alias sound-slot-1 snd-card-1
NB: |
For drivers older than 0.9.0rc5 use: options snd-cmipci snd_id="first" snd_mpu_port=0x330 |
---|
NB: |
The "snd_" prefix has been removed from the module options to fit with the kernel standard. |
---|
Autoloading OSS/free emulation
At this point we are finished with the configuration for ALSA native devices, but you may also need autoloading for the OSS/Free emulation modules, an ALSA add-on. At this time only one module does not depend on any others, thus must be loaded separately: snd-pcm1-oss. String sound-service-%i-%i is required for OSS/Free service where the first %i is the slot number/sound card number and the second %i is the service number.
username@hostname# pico /etc/modules.conf # OSS/Free portion - card #1 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 # OSS/Free portion - card #2 (cmipci) alias sound-slot-1 snd-card-1 alias sound-service-1-0 snd-mixer-oss alias sound-service-1-3 snd-pcm-oss alias sound-service-1-12 snd-pcm-oss
The alias for snd-seq-oss is not necessary on the second device, because there is only one /dev/sequencer regardless how many devices you have.
The .asoundrc file
This file allows you to have more advanced control over your card/device. For most setups the default, system-wide configuration is sufficient. You may change this file only for special setup. The .asoundrc file consists of definitions for the various sound devices available in your system. It also provides access to the pcm plugins in alsa-lib. These allow you to do tricky things like combine your cards into one or access multiple I/O streams on your multi-channel card.
Below is the most basic definition (only example - not required to define at all).
Make a file called .asoundrc in your home and/or root directory:
vi ~/.asoundrc
Copy and paste the following into the file, then save it:
pcm.emu10k1 { type hw card 0 } ctl.emu10k1 { type hw card 0 }
Software volume control
If your card doesn't have hardware volume control (e. g. Asus Xonar XD/XDG), you might want to create software Master control. Edit .asoundrc as follows.
pcm.softvol { type softvol slave { pcm "dmix" } control { name "Master" card 0 } } pcm.!default { type plug slave.pcm "softvol" }
Restart alsa, then open a music player, play a file and close the player. Then check alsamixer, as you should have a Master volume control. Note that this control doesn't have a mute option.
Links
Generic
- For professional quality, low latency audio routing use JACK ‒ the “Jack Audio Connection Kit”.
Specific