a workaround for clean audio recording on emu10k1 audio devices

Background

I don’t like using onboard audio - the snd-hda-intel driver has had a history of quality issues due to the sheer number of devices using the codec. Maybe there’s other problems, but onboard audio is typically noisy and has no support for hardware mixing.

I bought a PCIe 1x Audigy ZS card in 2017 and every time I go to set it up with ALSA/PulseAudio, everything is a mess and I’ve got no idea why. I configured ~/.asoundrc like I’ve done in the past, to set plughw:0,2 as default input. This time, on kernel 4.20, things are different - it didn’t work!

  • When using the hw:0,2 device for recording, I can hear audio, but it’s low quality.
  • When using the plughw:0,2 device for recording, I can hear clear audio but there is an AWFUL high pitch whine in the background.

Trying to use arecord on hw:0,2 failed with “channel count non available”. Using arecord --dump-hw-params I was able to determine the device somehow exposes 16 channels for recording. Once I pass -c 16 to arecord, it also records the annoying high pitch tone directly from the hardware, without any asoundrc nonsense.

Opening this file in audacity shows us the waveform of each of its 16 tracks; in my case, the last one has nothing but noise.

The following .asoundrc works to eliminate the noise from this extra channel:

pcm.asym {
    type asym
    playback.pcm "plughw:0" 
    capture.pcm "micfix"
}

pcm.!default {
    type plug
    slave.pcm "asym"
}


pcm.micfix {
  type plug
  slave.pcm "hw:1,2"
  slave.channels 16
  slave.rate 48000
  ttable.15.3 1
  ttable.3.3 1
}

# this is for aoss
pcm.dsp0 {
    type plug
    slave.pcm "asym51"
}

ctl.mixer0 {
    type hw
    card 0
}

The end result will be very clean audio.