Check out my first novel, midnight's simulacra!

Sound Software: Difference between revisions

From dankwiki
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
Sound on Linux is the absolute biggest bunch of bullshit ever, closely trailing sound on computers and sound itself.
Sound on Linux is the absolute biggest bunch of bullshit ever, closely trailed by sound on computers and sound itself.
 
[[File:Pcm1792a.jpeg|thumb|right|Burr Brown PCM 1792A block diagram]]
==Terminology==
==Terminology==
[[File:Burrbrown1792a.jpeg|right|thumb|Burr Brown PCM 1792A DAC]]
* HDA: Intel High Definition Audio specification
* HDA: Intel High Definition Audio specification
* ELD: [[EDID]]-Like Data. Structured capability data returned by graphics-oriented devices.
* ELD: [[EDID]]-Like Data. Structured capability data returned by graphics-oriented devices.
Line 18: Line 19:
* DAT: Digital Audio Tape, a 48k/44.1k/32k medium using 4mm magnetic tape
* DAT: Digital Audio Tape, a 48k/44.1k/32k medium using 4mm magnetic tape


==Hardware==
I recommend the [http://www.guru3d.com/article/asus-xonar-essence-st-deluxe-review/ Xonar Essence ST] PCI card, making use of the [[#File:Pcm1792a.pdf|Burr Brown PCM 1792A]] DAC and Cirrus CS5381 ADC, for an in-machine solution.
* You'll need the <tt>snd-virtuoso</tt> ALSA driver (C-Media CMI8788 Oxygen HD Audio).
===USB DACs===
* Watch for true USB Audio Class 2.0 and solid asynchronous solutions
* "[http://www.eetimes.com/design/audio-design/4009467/The-D-A-diaries-A-personal-memoir-of-engineering-heartache-and-triumph The D-A Diaries]" is an excellent article regarding the difficulties of producing accurate sound via USB output.
** Essentially: USB has a clockless wire, thus there must be clocks on each side, which *will* drift
** If the USB device doesn't have its own crystal, it might even time based off AC power
* USB Audio Class 1 is limited to the 24bit, 96KHz maximum supported by USB 1.x (12Mbps)


== Kernel ==
== Kernel ==
Line 73: Line 83:
* The (somewhat outdated) [http://lau.linuxaudio.org/audio_quality_howto.htm Linux High-Quality Audio HOWTO]
* The (somewhat outdated) [http://lau.linuxaudio.org/audio_quality_howto.htm Linux High-Quality Audio HOWTO]
* The computeraudiophile.com [http://www.computeraudiophile.com/faq Computer Audiophile FAQs]
* The computeraudiophile.com [http://www.computeraudiophile.com/faq Computer Audiophile FAQs]
* "[http://www.head-fi.org/t/160612/pros-cons-of-usb-dac-against-sound-card Pros and Cons of USB DACs]" on head-fi.org
* "[http://www.mythtv.org/wiki/Configuring_Digital_Sound Configuring Digital Sound]" on the MythTV wiki
* "[http://www.mythtv.org/wiki/Configuring_Digital_Sound Configuring Digital Sound]" on the MythTV wiki
* [http://www.thewelltemperedcomputer.com/index.html The Well-Tempered Computer] and the [http://www.digitalaudioblog.com Digital Audio Blog]
* [http://www.thewelltemperedcomputer.com/index.html The Well-Tempered Computer] and the [http://www.digitalaudioblog.com Digital Audio Blog]
* ...and, of course, [http://www.stereophile.com/ stereophile.com]
* ...and, of course, [http://www.stereophile.com/ stereophile.com]

Latest revision as of 01:42, 30 December 2011

Sound on Linux is the absolute biggest bunch of bullshit ever, closely trailed by sound on computers and sound itself.

Burr Brown PCM 1792A block diagram

Terminology

Burr Brown PCM 1792A DAC
  • HDA: Intel High Definition Audio specification
  • ELD: EDID-Like Data. Structured capability data returned by graphics-oriented devices.
    • ELD can also mean Enhanced Low Delay (in for instance AAC-ELD)
  • PD/ELDV: Presence Detect/ELD-Valid bits aka "Unsolicited Responses".
    • PD indicates a change in presence or the ELDV bit
    • ELDV indicates new ELD information
  • EAX: Environmental audio eXtensions
  • S/PDIF: Sony/Phillips Digital Interconnect Format (IEC 60958 type II / IEC 958)
    • 10m max cable distance
    • TOSLINK F05 / EIAJ-Optical and coax RCA connections
    • Carries DTS and Dolby Digital compressed audio for >2 PCM (IEC 61937)
  • AES3: commercial-grade
    • 3-pin XLR (balanced) and BNC (unbalanced) connections
  • CDDA: CD Digital Audio, 2-channel 44.1k PCM
  • DAT: Digital Audio Tape, a 48k/44.1k/32k medium using 4mm magnetic tape

Hardware

I recommend the Xonar Essence ST PCI card, making use of the Burr Brown PCM 1792A DAC and Cirrus CS5381 ADC, for an in-machine solution.

  • You'll need the snd-virtuoso ALSA driver (C-Media CMI8788 Oxygen HD Audio).

USB DACs

  • Watch for true USB Audio Class 2.0 and solid asynchronous solutions
  • "The D-A Diaries" is an excellent article regarding the difficulties of producing accurate sound via USB output.
    • Essentially: USB has a clockless wire, thus there must be clocks on each side, which *will* drift
    • If the USB device doesn't have its own crystal, it might even time based off AC power
  • USB Audio Class 1 is limited to the 24bit, 96KHz maximum supported by USB 1.x (12Mbps)

Kernel

  • Determine: are there still ALSA hardware drivers inferior to their OSS equivalents? Assuming no...
  • OSS emulation: kernel, library, or neither?
    • Kernel: snd_pcm_oss, snd_mixer_oss, snd_seq_oss provide /dev/dsp, /dev/seq, /dev/mixer
    • Library: aoss sets LD_PRELOAD to include libaoss.so
    • Neither: force fail on attempts to use OSS
      • Might be better if OSS-only code is old and crappy, as suggested by OSS-only nature, as it'll eliminate such code. Might also be better if OSS compatability introduces any kinds of issues. Might be worse if OSS code is better-written than ALSA code alternatives, and OSS compatability introduces no problems.

/proc/asound

  • /proc/asound/cards: Maps physical devices to ALSA card numbers
[eschatomatic](0) $ cat /proc/asound/cards
 0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xe8260000 irq 43
 1 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xe3080000 irq 17
[eschatomatic](0) $ 
  • /proc/asound/cardX: Device details indexed by ALSA card number, including codec and ELD dumps
    • NOTE: X being loaded is typically required for ELD detection!
  • /proc/asound/devices: Maps functional devices to ALSA card:dev number pairs and describes function
  • /proc/asound/modules: Maps kernel modules to ALSA card numbers
  • /proc/asound/pcm: Maps card:dev numbers to allocated PCM streams

ALSA configuration

  • What ought go in /etc/asoundrc? It's a complete enigma.
    • FIXME

HDMI

  • FIXME

Sound Servers

  • pulseaudio -- crashes mpd every time I try to use it (no longer true as of Fall 2008)
  • To drive ALSA through pulseaudio by default:
pcm.!default {
	type pulse
}

ctl.!default {
	type pulse
}
  • jack -- low-latency, professional software; it frightens me
  • esd -- deprecated, replaced by pulseaudio's esd-compat module

Hardware

  • PulseAudio can supposedly use a plugin together with HAL to drive dynamic devices

See Also