Teac UD-503 / UD-501 – snd-usb-audio patch

=== update Jan 26 ===
Patch accepted in upstream sound, should be in next 4.5-rc2 and next stable vanilla kernel starting from 4.5.
===/===

I bought a fresh Teac UD-503 yesterday and it was driving me crazy last evening, always disconnecting/freezing when switching from S16 to S32 format, or simply changing file rate.
I was also getting the same “clock source 41 is not valid, cannot use” as the UD-501. Error i never took time to check because it was working.

So, here is a patch i have make this morning to correct these bugs with these high-end/high-rec dacs and allow bit-perfect mode.
It is a simple delay to append. After my tests, it seems quite similar to the patch for the “Playback Design” products.

Now everything works perfectly:
– no clock error anymore
– no freeze with the dac usb interface
– seamless switch between format/rate or PCM/DSD mode.

The patch is small and generic, tested on kernel 4.3.0 and current mainline 4.4, should work on every >=3.x with some ajustement in lines.

snd-usb-quirks-patch-teac.patch

Under debian, you will only need to recompile the kernel module:


---- NEEDED PACKAGES (replace x.y.z-n in context and switch between amd64 or i386 if needed)
# apt-get install build-essential linux-source-x.y linux-headers-amd64

---- PREPARE THE SOURCE
# cd /usr/src/
# tar xf linux-source-x.y.tar.xz
# cd linux-source-x.y
# wget -qO- http://guillaumeplayground.net/wp-content/uploads/2016/01/snd-usb-quirks-patch-teac.patch_.gz | gunzip | patch -p0


---- PREPARE TO COMPILE
# cp /boot/config-x.y.z-n .config
# make oldconfig
# cp /usr/src/linux-headers-x.y.z-n/Module.symvers .
# make prepare


---- DEP problems - just run this shortly to get scripts/recordmcount compiled and once passed, CTRL-C
# make


---- Compile the module
# make M=sound/usb


---- Load the patched module
# rmmod snd-usb-audio
# insmod sound/usb/snd-usb-audio.ko


---- Test, enjoy
---- Make it permanent
# cp -a sound/usb/snd-usb-audio.ko /lib/modules/x.y.z-n/kernel/sound/usb/
# depmod -a
# rmmod snd-usb-audio
# modprobe snd-usb-audio

Bye!

5 thoughts on “Teac UD-503 / UD-501 – snd-usb-audio patch

  • Happy find :). Similar issue shows up with MOTU USB AVB interfaces. It takes a few attempts to set the correct rate and the same message in the logs about clock source being invalid. How did you arrive at the delay amounts? Trial and error or is there a way to measure it? I would like to see if your fix would work for MOTU too.

  • Hello Simon,
    Yes it is a common issue with USB Dac interfaces, needing some delay between the usb interface start and the playback, and between bitrate/frequency msg and the playback.
    You can add your device usb idVendor and idProduct where I added my Teac UD-503 and test it. The compilation procedure is in this post.
    If all is fine, you can submit the patch to the kernel tree to make it available to the community.

Leave a Reply

Your email address will not be published. Required fields are marked *