Schiit modi+ DAC for improved sound

Hi forum
I'm trying to enjoy improved sound quality by using a small usb audio DAC with FreeBSD.
dmesg seems able to correctly recognise the usb device.
When testing the sound for the "USB audio" device in KDE settings, I get this response :
Error trying to play a test sound. The system said: "No such driver"

Is it possible to help the new device connect correctly ?

Code:
# dmesg | grep audio
uaudio0 on uhub4
uaudio0: <Schiit Audio Schiit Modi+, class 239/2, rev 2.00/1.00, addr 2> on usbus1
uaudio0: Play[0]: 192000 Hz, 2 ch, 32-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Play[0]: 176400 Hz, 2 ch, 32-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Play[0]: 96000 Hz, 2 ch, 32-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Play[0]: 88200 Hz, 2 ch, 32-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Play[0]: 48000 Hz, 2 ch, 32-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Play[0]: 44100 Hz, 2 ch, 32-bit S-LE PCM format, 2x8ms buffer.
uaudio0: No recording.
uaudio0: No MIDI sequencer.
pcm6: <USB audio> on uaudio0
uaudio0: No HID volume keys found.

# kldstat | grep audio
20    1 0xffffffff833aa000     e538 snd_uaudio.ko

Thanks for any tips or clues to help make the audio magic happen.
 
In case that helps: I'm successfully using a FiiO USB DAC under FreeBSD:
Code:
ugen0.13: <FiiO DigiHug USB Audio> at usbus0
usbhid8 on uhub4
usbhid8: <FiiO DigiHug USB Audio, class 0/0, rev 1.10/0.01, addr 12> on usbus0
hidbus8: <HID bus> on usbhid8
hcons4: <FiiO DigiHug USB Audio Consumer Control> on hidbus8
uaudio1 on uhub4
uaudio1: <FiiO USB DAC-E10> on usbus0
uaudio1: Play[0]: 96000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio1: Play[0]: 48000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio1: Play[0]: 44100 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio1: Play[0]: 32000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio1: Record[0]: 96000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio1: Record[0]: 48000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio1: Record[0]: 44100 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio1: Record[0]: 32000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio1: Record[0]: 16000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio1: Record[0]: 8000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio1: No MIDI sequencer.
pcm8: <USB audio> on uaudio1
uaudio1: HID volume keys found.

What is the output of cat /dev/sndstat?
 
Code:
# cat /dev/sndstat  
Installed devices:
pcm0: <NVIDIA (0x0051) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x0051) (HDMI/DP 8ch)> (play)
pcm2: <Realtek ALC892 (Rear Analog 5.1/2.0)> (play/rec) default
pcm3: <Realtek ALC892 (Front Analog)> (play/rec)
pcm4: <Realtek ALC892 (Rear Digital)> (play)
pcm5: <Realtek ALC892 (Rear Digital)> (play)
pcm6: <USB audio> (play)
No devices installed from userspace. [\CODE]
 
Looks good so far.
I'd recommend trying setting pcm6 as a default device and then playing some audio to see whether things work "outside of KDE":
Code:
sysctl hw.snd.default_unit=6
cat /dev/random > /dev/dsp
 
Code:
# sysctl hw.snd.default_unit=6

#cat /dev/sndstat
Installed devices:
pcm0: <NVIDIA (0x0051) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x0051) (HDMI/DP 8ch)> (play)
pcm2: <Realtek ALC892 (Rear Analog 5.1/2.0)> (play/rec)
pcm3: <Realtek ALC892 (Front Analog)> (play/rec)
pcm4: <Realtek ALC892 (Rear Digital)> (play)
pcm5: <Realtek ALC892 (Rear Digital)> (play)
pcm6: <USB audio> (play) default
No devices installed from userspace.

#cat /dev/random > /dev/dsp

Hmmm. I've tried that too, but so far only silence.
I'll move this new kit to another host (OSX or Linux) and make sure the signal path from usb -> modi DAC -> amplifier -> speakers is not causing the unwanted silence.
Meanwhile, thanks for all your suggestions.
 
I'll move this new kit to another host (OSX or Linux) and make sure the signal path from usb -> modi DAC -> amplifier -> speakers is not causing the unwanted silence.
That is reasonable!
Before that: Make sure that the volume is actually turned up using mixer(8).

Meanwhile, thanks for all your suggestions.
You're very welcome.
You can also "thank" a post properly on the bottom right hand corner of a post :)
 
I plugged the modi into a MacBook Air, selected the new audio device, and it streams beautifully.
usb -> modi DAC -> amplifier -> speakers is all good, so my challenge remains with FreeBSD.
I give more thanks.
 
Yep, I did check that too.

Code:
# mixer
Mixer vol      is currently set to  75:75
Mixer pcm      is currently set to  75:75

On another note (sic), should BOTH drivers snd_driver and snd_uaudio be loaded ?
Or will they cause interference (more sic) ?
 
I've given up struggling with the usb, despite the appeal of single cable for power and data.
The modi+ is now working beautifully with a simple optical (aka toslink) connection, and usb power from a separate plug.
usb power from this intel motherboard is way too noisy.
I can now enjoy the glorious clear sounds of Radio Paradise (in flac format) streamed and amplified into floorstanding speakers.
Logitech Media Server (aka LMS) delivers these same (and synchronised) audio delights to multiple rooms.
Happy daze.

Edit.
I'm confused by the FreeBSD sound setting for the S/PDIF (optical, toslink) connection.
I was expecting this to be a Digital connection (pcm3 or pcm4), rather than Analog (pcm2), as below.
pcm2 works, so no complaints.
Code:
# cat /dev/sndstat
Installed devices:
pcm0: <NVIDIA (0x0051) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x0051) (HDMI/DP 8ch)> (play)
pcm2: <Realtek ALC892 (Rear Analog 5.1/2.0)> (play/rec) default
pcm3: <Realtek ALC892 (Rear Digital)> (play)
pcm4: <Realtek ALC892 (Rear Digital)> (play)
No devices installed from userspace.
 
I don't think there is a problem with have both loaded.

You need both. I don't know about shiit, but snd_uaudio usually works for usb/DAC. Maybe some other device has taken up the output. I usually make sure no other audio driver attaches if I'm using snd_uaudio.
 
  • Like
Reactions: mer
Some applications need to be restarted to use a new sound device - e.g. deadbeef. Firefox tabs sometimes need to be reloaded if they already played sound over one device and you changed the default (and remember to set media.cubeb.backend = oss so it actually uses oss).

also make sure there's no pulseaudio running in the background which also often blocks audio devices - that crap starts a demon even if not enabled and it ignores any settings that according to their manpages should prevent it from being started. simply nuke that junk from the system or (in case of hard dependencies) 'rm -rf' the binary and replace it with a link to /usr/bin/true.

To automatically set the volume and default device when that DAC is connected/switched on, you can use a devd script. I'm using the following with my Fiio DAC:

/usr/local/etc/devd/fiio_setsysctls.sh
Code:
#!/bin/sh

uaudionum=`sysctl dev.uaudio | grep "FiiO USB DAC-E10" | cut -d'.' -f3`

pcmnum=`sysctl dev.pcm | grep uaudio$uaudionum | cut -d'.' -f3`

sysctl dev.pcm.$pcmnum.play.vchanformat=s32le:2.0
sysctl dev.pcm.$pcmnum.play.vchanrate=192000
sysctl dev.pcm.$pcmnum.play.vchanmode=adaptive
sysctl dev.pcm.$pcmnum.bitperfect=1

mixer -f /dev/mixer$pcmnum vol 100 pcm 100 

sysctl hw.snd.default_unit=$pcmnum

Regarding bitperfect you'd have to test if all applications (especially audio players) can deal with that - i.e. if they correctly resample to the sampling rate of the DAC.
 
Back
Top