Sound Cards in MythTV
I imagine most of you reading this are aware of what sound cards do, so I won't bother explaining it ;) I'll just go through what you can expect to need and use.
The first hurdle is knowing how many sound cards we're going to need. We're going to need at least one sound device in our frontend machine to play back the TV. If you're using software capture such as with a bttv-based TV card, you will also need to capture sound with the line-in feed in order to record the audio - bttv cards do not mux the audio stream in with the video. Hence, if you have multiple bttv/software capture cards, you will also need multiple soundcards in order to capture the separate audio streams. At least one of these cards will also need to be "full duplex", in that it is capable of recording from the TV card and playing back a different audio stream at the same time.
Users of hardware TV encoders will only need the one device; cards such as the PVR-2/350's encapsulate the audio and data streams into an MPEG2 stream, so no extra audio devices are required.
Sound cards under Linux are supported either through OSS (the Open Sound System, an older audio standard which is deprecated in the newer 2.6 Linux kernels) or through ALSA (the Advanced Linux Sound Architecture), a more modern sound system which is becoming standard, especially since its drivers provide functionality for much of the extra features of soundcards such as SPDIF. Your soundcard will need to be supported by one or both of these standards. Full soundcard compatibility in ALSA can be found here http://www.alsa-project.org/alsa-doc/, and supported soundcards under OSS are listed here http://www.opensound.com/osshw.html. In the meantime, I'll list some of the more common audio cards and chipsets that are well supported under Linux. ALSA provides emulation for the OSS subsystem, so it's possible to run ALSA and OSS at the same time. Most modern distros ship with ALSA as default.
Most modern motherboards will come supplied with onboard audio, which typically come in two flavours:
- AC97 audio is the most common, and there are a variety of different chipsets available. Almost all motherboards use AC97 audio chips, and they are typically well supported under Linux. Modern AC97 audio can offer up to 8 discrete audio channels (7.1). AC97 audio can use up a noticeable amount of CPU during playback, although this is rarely a problem.
- nVidia Corporation CK804 AC'97 Audio Controller (rev a2) (snd_intel8x0) : Set max sampling rate to 48000kHz to remove high pitch noise
- nVidia Sound Storm is commonly found on the up-market motherboards using nForce2 chipsets (many nForce2 boards also use AC97 audio). The Sound Storm has a great many advanced features, but these require the use of a binary-only driver from nVidia, and at the time of writing this sound chip is not fully supported under ALSA. Specifically, the inbuilt hardware mixer doesn't work, although this isn't much of a problem for MythTV boxes. Sound quality is reportedly very good indeed!
Most onboard audio is more than adequate for TV, film and music playback, so most users won't need to consider purchasing separate PCI soundcards.
Again, a great many common soundcards are supported under Linux. They are usually regarded as a "prosumer" product because, for most people, onboard sound is fine. However they are worth considering if you're a bit of an audiophile, and essential if you simply need more than one soundcard for your software TV card.
- Creative make a very popular range of cards utilising the emu10k1 chipset which is well supported under Linux. Sound cards using this chipset include the Soundblaster Live 5.1 and the Audigy and Audigy 2 range. All of these cards can support up to 6 channel audio, or 8 in the case of some variants of the Audigy 2. Please note that there are a few variants of the Audigy range that have only recently become supported under Linux. The emu10k1 cards are some of the few cards that have a hardware mixer supported under Linux.
Most (external) USB sound 'cards' (or rather, devices) will work with the snd-usb-audio driver.
A great many soundcards come with lots of extra bells and whistles added on, some of which are highly useful.
- SPDIF (the Sony Philips Digital Interface Format) is a high quality digital output system that can be found on most modern high-end sound chips and in many AC97 motherboards. It comes in either a co-axial or optical outputs, and can be used to pass a pure digital signal to your SPDIF-enabled amplifier. A lot of users also use SPDIF to enable AC3 passthrough to their AC3 decoders. The advantage of SPDIF is that it allows you to bypass the sound card entirely and use your hideously expensive home theatre setup instead. However, you are usually unable to change the volume from within MythTV, and will have to use the volume control on your amplifier instead.
- SPDIF external brackets are useful accessories if your motherboard or sound card provides an SPDIF header but no external SPDIF connector. An SPDIF header is usually a 3-pin connector to which you can connect an internal cable with an RCA/coaxial or optical connector on the other end, typically mounted on a bracket. You then run an appropriate cable from that to a receiver with appropriate RCA/coaxial or optical inputs. The trouble is that SPDIF brackets are hard to find, and without them, internal SPDIF headers are useless. Two sources are Vidabox and Atacom. The former product's RCA/coaxial output has been tested on a Biostar PT880 Pro-A7C motherboard's SPDIF header and works fine. Note that some motherboards' SPDIF headers are positioned such that using them will block a PCI slot.
- Most modern soundcards provide multiple audio channels in the form of 5.1 or 7.1 sound, or similar. This allows you to utilise surround sound for watching DVD's, playing Doom3 and other multichannel audio. It's not much use for regular TV, which is stereo only, and of course requires a surround sound speaker setup.
- A few sound cards have inbuilt remote control interfaces that can be convinced to work in Linux and can be used as substitutes for the remote controls packaged with TV cards. For instance, my Audigy Platinum eX is supplied with an IR receiver in a breakout box, which is supported by ALSA and recent CVS builds of LIRC.
- Hardware mixers allow you to play multiple audio streams at the same time without offloading the mixing of these channels onto the CPU. Hardware mixers mean you don't need to have a software mixing daemon like KDE's arts running in the background. However, most MythTV boxes are only going to be using one audio stream at a time so a hardware mixer is unnecessary.,