USB DAC : bad sound

Hello,

The sound quality is bad with my HRT Music Streamer II (http://www.hirestech.com/product/?pid=122) USB DAC : lot of small interruptions/crackles.

Playing a .flac file (ripped from CD) with mplayer : AUDIO: 44100 Hz, 2 ch, s16le, 0.0 kbit/0.00% (ratio: 0->176400)

Here are my settings :

Code:
# uname -a
FreeBSD freebsd110 11.0-RELEASE-p12 FreeBSD 11.0-RELEASE-p12 #0: Wed Aug  9 09:43:35 UTC 2017
root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386

Code:
# cat /dev/sndstat
Installed devices:
pcm0: <Intel ICH7 (82801GB)> (play/rec) default
pcm1: <USB audio> (play)
No devices installed from userspace.

Code:
# sysctl dev.pcm.1
dev.pcm.1.feedback_rate: 44500
dev.pcm.1.mixer.mute_0.desc:
dev.pcm.1.mixer.mute_0.max: 1
dev.pcm.1.mixer.mute_0.min: 0
dev.pcm.1.mixer.mute_0.val: 0
dev.pcm.1.bitperfect: 0
dev.pcm.1.buffersize: 0
dev.pcm.1.play.vchanformat: s16le:2.0
dev.pcm.1.play.vchanrate: 44100
dev.pcm.1.play.vchanmode: fixed
dev.pcm.1.play.vchans: 1
dev.pcm.1.hwvol_mixer: vol
dev.pcm.1.hwvol_step: 5
dev.pcm.1.%parent: uaudio0
dev.pcm.1.%pnpinfo:
dev.pcm.1.%location:
dev.pcm.1.%driver: pcm
dev.pcm.1.%desc: USB audio

Code:
# sysctl hw.usb.uaudio
hw.usb.uaudio.default_channels: 2
hw.usb.uaudio.default_bits: 16
hw.usb.uaudio.default_rate: 44100
hw.usb.uaudio.debug: 16

I observed that dev.pcm.1.feedback_rate is very coarse, varying from 44000 to 44500 to 45000 when playing.

Tried to disable vchan : no change.

Any advice ?

Thanks for your help.

Steph
 
Hei Steph,

I have a Music Streamer II+ which also uses the snd_uaudio driver and it works well, though I had also trouble with cracking sound with it earlier, when I was on FreeBSD 10.x. It works without tweaking since 11.0.

I really can't remember what exactly I tweaked with sysctl but it was hints from snd(4).
From what you write I qould try to set sysctl hw.snd.feeder_eq_exact_rate=1 to stop it from switching to unsupported sample rates.
If that does not, help read the man page and try some other tweaks, there are a lot.

What I still notice is that, when both
Code:
mixer vol/pcm
are set to 100 some audio tracks crackle, so I keep them at 80 max.

Here is my sysctl output from my Music Streamer II+ for you to compare:
Code:
% sysctl dev.pcm.1
dev.pcm.1.feedback_rate: 48000
dev.pcm.1.mixer.mute_0.desc:
dev.pcm.1.mixer.mute_0.max: 1
dev.pcm.1.mixer.mute_0.min: 0
dev.pcm.1.mixer.mute_0.val: 0
dev.pcm.1.bitperfect: 0
dev.pcm.1.buffersize: 0
dev.pcm.1.play.vchanformat: s16le:2.0
dev.pcm.1.play.vchanrate: 48000
dev.pcm.1.play.vchanmode: fixed
dev.pcm.1.play.vchans: 1
dev.pcm.1.hwvol_mixer: vol
dev.pcm.1.hwvol_step: 5
dev.pcm.1.%parent: uaudio0
dev.pcm.1.%pnpinfo:
dev.pcm.1.%location:
dev.pcm.1.%driver: pcm
dev.pcm.1.%desc: USB audio

% sysctl hw.snd
hw.snd.maxautovchans: 16
hw.snd.default_unit: 1
hw.snd.version: 2009061500/amd64
hw.snd.default_auto: 0
hw.snd.verbose: 2
hw.snd.vpc_mixer_bypass: 1
hw.snd.feeder_rate_quality: 1
hw.snd.feeder_rate_round: 25
hw.snd.feeder_rate_max: 2016000
hw.snd.feeder_rate_min: 1
hw.snd.feeder_rate_polyphase_max: 183040
hw.snd.feeder_rate_presets: 100:8:0.85 100:36:0.92 100:164:0.97
hw.snd.feeder_eq_exact_rate: 1
hw.snd.feeder_eq_presets: PEQ:16000,0.2500,62,0.2500:-9,9,1.0:44100,48000,88200,96000,176400,192000
hw.snd.basename_clone: 1
hw.snd.compat_linux_mmap: 0
hw.snd.syncdelay: -1
hw.snd.usefrags: 0
hw.snd.vpc_reset: 0
hw.snd.vpc_0db: 45
hw.snd.vpc_autoreset: 1
hw.snd.timeout: 5
hw.snd.latency_profile: 1
hw.snd.latency: 5
hw.snd.report_soft_matrix: 1
hw.snd.report_soft_formats: 1

Greetings
Matthias
 
Hello Matthias,

Thanks for your help.

Unfortunately, problem is always here with same settings as yours. And lot of other tests.

Anyway, re-installed my system with 11.1 and... works OK 'out of the box'.

My goal is to replace Voyage MPD on my PC Engines ALIX + HRT DAC with nanoBSD. Still work to do...

Regards.

Steph
 
Back
Top