Sound Cards: Introduction

From the ALSA wiki

Jump to: navigation, search
Image:Merge-arrows.gif There is another article called Soundcard with a very similar content. Please be bold an merge the two pages!

The 'Sound Card' unit, which is often part of a motherboard, usually consists of three sets of components. The first are the jacks, which connect the card to speakers, microphones and other units. The second set are the audio circuits which amplify and mix the audio signals and convert between analogue and digital audio signals. Finally there is an interface, which connects the 'Sound Card' to one of the main computer buses.

Contents

[edit] Motherboard Audio Cards

In modern home computers and laptops, the audio circuits are usually found on a single audio chip mounted on the motherboard. The interface, to the computer's PCI bus, is usually contained within the multi-purpose southbridge chip. In such cases the name given to the Sound Card is usually that of the southbridge chip.

The program alsamixer reports the names of both the 'sound card' and the 'audio chip'. As a result with a motherboard based on a NVidia chipset the output may be:

Card: NVidia CK804
Chip: Realtek ALC850 Rev 0

On another motherboard using a Via chipset, one might find:

Card: Via Via8235
Chip: Realtek ALC850 Rev 0

The audio chip, a Realtek ACL850, being the same in both cases. The low level command cat /proc/asound/cards provides the card name and chip number but leaves out the vendor name 'Realtek'. Unfortunately most high level programs only provide the card name.

[edit] Drivers

The audio cards used in most home computers are based on the Intel AC'97 standard (see below). This defines a set of standard controls on the audio chip and is sufficient for high level programs to find out what controls are available on each card and to then issue the correct commands.

Unfortunately PCI interface is not fully specified by AC'97 and so different alsa drivers are needed for each type of PCI interface. As a result in a running system, the command lsmod | grep snd will show the module snd_ac97_codec which handles the AC'97 standard. It will show that this is calling a second module to handle the PCI interface. For the Via8235 above this would be the module snd_via82xx. For the Nvidia CK804 it will be snd_intel8x0, as Nvidia and Intel use the same interface standard.

The AC'97 standard is in the process of being replaced by the Intel 'High Definition Audio' standard. This defines both the circuits and the PCI interface and so needs only a single set of alsa drivers.

[edit] AC'97

The Intel 'Audio Codec '97' standard specifies audio components to be found in a mainstream PC, a standard way of connecting the components and a set of registers for controlling the components. It also defines related features such as voltages and timing characteristics.

Input can be analogue audio signals from a microphone, telephone, video, CD and other devices. Some will be mono, some stereo. Input also includes sound from the computer which is converted from digital to analogue before further processing. On input each of these signals passes through an amplifier and a mute switch, both of which can be controlled by the mixer software on the computer.

Analogue output can be to stereo speakers and additional surroundsound speakers. Output of sound to the computer is provided by an analogue to digital converter. Again all output streams can by amplified or muted on command from the computer. Later versions of the standard allow input and output using the Sony/Phillips Digital Interface (S/P DIF) to connect additional audio equipment.

Between input and output the standard defines two main pathways, one providing analogue output to the main stereo speakers, the other leading to the computer input. In the first, the different input streams can be combined and passed through an optional surroundsound filter, before being sent via a tone filter to the output. Digital input (PCM - Pulse Coded Modulation) can be added before or after the surroundsound step. The telephone signal is added after the surroundsound step.

For computer output the standard is somewhat different. Output to the computer is allowed from just one of the analogue inputs or from the main stereo output after the tone filter, or from a mono version of the main output. In alsa the latter are often called the 'MIX' and 'MONO MIX' channels. Note that the digital input signal can only be captured using one of the two latter channels.

As well as the above outputs there is also a mono output channel and surroundsound channels. The mono output can be driven from from the microphone input. Alternatively it can be a mono copy of the main output channel, tapped before the telephone input is added. This allows mono output to be used for telephone output without feedback developing.

The surroundsound channels can be driven by the surroundsound filter in the main pathway. Alternatively they can be driven by their own digital input stream from the computer. Additional switches are often available, for example to allow input from more than one microphone or to allow additional links between the audio channels.

[edit] High Definition Audio

This is a recent Intel specification for defining and controlling a much more sophisticated audio system. In this case the audio system is connected to a PCI or other system bus via a well specified 'High Definition Audio Controller'. This is then connected to one or more audio chips via a serial bus, the 'High Definition Audio Link'. Each audio chip (or codec to use Intel's terminology) can then contain a number of widgets. Typical widgets are:

  • A computer audio output converter (DAC) widget
  • A computer audio input converted (ADC) widget
  • A mixer widget (including input and output amplifiers and mutes)
  • A selector (multiplexor widget)
  • A pin widget (detecting input/output devices)
  • A volume widget

On startup, each codec sends the controller information on which widgets are present and how they connected. This allows very complex systems to be developed and controlled.

[edit] External Links

[edit] See also

Personal tools