How to use squeezelite (with bitperfect) with USB DAC?

as above.

some test I've tried
1. when I setup the default sound device to my USB DAC and run various commands (example: beep), I can hear sound coming out of the audio chain connected to the DAC.

2. If I enable bitperfect (in /etc/sysctl.conf), squeezelite exits and I see some errors in the log.
Code:
dev.pcm.4.bitperfect=1
dev.pcm.4.play.vchans=0
hw.snd.default_unit=4
hw.snd.verbose=2
hw.snd.vpc_0db=100

This is the command I'm trying to use
squeezelite -o 5 -d all=debug -f /home/user/squeezelite.log -s 192.168.1.11

This is what I get in the logs
Code:
[10:06:02.115267] stream_init:466 init stream
[10:06:02.115479] stream_init:467 streambuf size: 2097152
[10:06:02.120465] output_init_pa:574 init output
[10:06:02.120567] output_init_pa:594 requested latency: 0
[10:06:02.136324] output_init_common:360 outputbuf size: 3528000
[10:06:02.136425] output_init_common:384 idle timeout: 0
[10:06:02.136457] test_open:217 sample rate 1536000 not supported
[10:06:02.136468] test_open:217 sample rate 1411200 not supported
[10:06:02.136477] test_open:217 sample rate 768000 not supported
[10:06:02.136494] test_open:217 sample rate 705600 not supported
Expression 'GetAvailableFormats( component, &availableFormats )' failed in 'src/hostapi/oss/pa_unix_oss.c', line: 1022
Expression 'PaOssStreamComponent_Configure( component, sampleRate, framesPerBuffer, StreamMode_Out, master )' failed in 'src/hostapi/oss/pa_unix_oss.c', line: 1145
Expression 'PaOssStream_Configure( stream, sampleRate, framesPerBuffer, &inLatency, &outLatency )' failed in 'src/hostapi/oss/pa_unix_oss.c', line: 1251
[10:06:02.136789] test_open:238 error opening portaudio stream: Sample format not supported
[10:06:02.136803] output_init_common:401 unable to open output device: 5

3. if I disable bitprefect, I can hear music through logitechmediaserver.
Code:
dev.pcm.4.bitperfect=0
dev.pcm.4.play.vchans=2
dev.pcm.4.play.vchanrate=44100
hw.snd.default_unit=4
hw.snd.verbose=2
hw.snd.vpc_0db=100

-------------------------------

some info on my setup:

Code:
> cat /dev/sndstat

pcm4: <USB audio> at ? kld snd_uaudio (1p:0v/0r:0v) default
        snddev flags=0x1e7<SIMPLEX,AUTOVCHAN,SOFTPCMVOL,BUSY,MPSAFE,REGISTERED,BITPERFECT>
        [pcm4:play:dsp4.p0]: spd 44100, fmt 0x00201000, flags 0x20000000, 0x00000001
        interrupts 0, underruns 0, feed 0, ready 0 [b:5648/2824/2|bs:16384/2048/8]
        channel flags=0x20000000<BITPERFECT>
        {userland} -> feeder_root(0x00201000) -> {hardware}

Code:
cat /etc/sysctl.conf
security.bsd.see_other_uids=0
security.bsd.see_other_gids=0
security.bsd.see_jail_proc=0
security.bsd.unprivileged_read_msgbuf=0
security.bsd.unprivileged_proc_debug=0
kern.randompid=1
dev.pcm.4.bitperfect=1
dev.pcm.4.play.vchans=0
hw.snd.default_unit=4
hw.snd.verbose=2
hw.snd.vpc_0db=100

Code:
> squeezelite -l

squeezelite -l
Output devices:
  0 - /dev/dsp [OSS]
  1 - /dev/dsp0 [OSS]
  2 - /dev/dsp1 [OSS]
  3 - /dev/dsp2 [OSS]
  4 - /dev/dsp3 [OSS]
  5 - /dev/dsp4 [OSS]
(I am 100% output-device=5 is my USB DAC as it's the only one that's missing when I ran the same command if I had the device turned off)
 
as it's the only one that's missing when I ran the same command if I had the device turned off
Devices are simply numbered in the order they are detected. So if the device that has dsp1 is turned off everything just move down. It simply counts from 0 to 4, output 5 would be missing. Doesn't mean it was device 5 that was turned off.
 
Back
Top