Chord 2qute and my DOP challenge

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
OK, but we need the files/numbers from same software chain, to make them comparable.

LMS probably uses different period/buffer sizes, we would see that in hw_params file. Also please make sure you are not playing through pulseaudio to your usb dac - your alsa-info.sh output shows pulseaudio is your default alsa device.

Yes I have only posted through LMS , not MPD.

Squeezelite is using alsa here is my settings.

Code:
/usr/bin/squeezelite -o front:CARD=D2Qute,DEV=0 -n michael -a 80 4   -b 100000 80000 -s 172.16.0.93

As you can see I'm using the -a parameter.

Code:
Squeezelite v1.8.6-987, Copyright 2012-2015 Adrian Smith, 2015-2017 Ralph Irving. See -t for license terms
Usage: squeezelite [options]
  -s <server>[:<port>]  Connect to specified server, otherwise uses autodiscovery to find server
  -o <output device>    Specify output device, default "default", - = output to stdout
  -l                    List output devices
[b]  -a <b>:<p>:<f>:<m>    Specify ALSA params to open output device, b = buffer time in ms or size in bytes, p = period count or size in bytes, f sample format (16|24|24_3|32), m = use mmap (0|1)[/b]
  -a <f>                Specify sample format (16|24|32) of output file when using -o - to output samples to stdout (interleaved little endian only)
  -b <stream>:<output>  Specify internal Stream and Output buffer sizes in Kbytes
  -c <codec1>,<codec2>  Restrict codecs to those specified, otherwise load all available codecs; known codecs: flac,pcm,mp3,ogg,aac,wma,alac,dsd (mad,mpg for specific mp3 codec)
                        Codecs reported to LMS in order listed, allowing codec priority refinement.
  -C <timeout>          Close output device when idle after timeout seconds, default is to keep it open while player is 'on'
  -d <log>=<level>      Set logging level, logs: all|slimproto|stream|decode|output, level: info|debug|sdebug
  -e <codec1>,<codec2>  Explicitly exclude native support of one or more codecs; known codecs: flac,pcm,mp3,ogg,aac,wma,alac,dsd (mad,mpg for specific mp3 codec)
  -f <logfile>          Write debug to logfile
  -m <mac addr>         Set mac address, format: ab:cd:ef:12:34:56
  -M <modelname>        Set the squeezelite player model name sent to the server (default: SqueezeLite)
  -n <name>             Set the player name
  -N <filename>         Store player name in filename to allow server defined name changes to be shared between servers (not supported with -n)
  -W                    Read wave and aiff format from header, ignore server parameters
  -p <priority>         Set real time priority of output thread (1-99)
  -P <filename>         Store the process id (PID) in filename
  -r <rates>[:<delay>]  Sample rates supported, allows output to be off when squeezelite is started; rates = <maxrate>|<minrate>-<maxrate>|<rate1>,<rate2>,<rate3>; delay = optional delay switching rates in ms
  -R -u [params]        Resample, params = <recipe>:<flags>:<attenuation>:<precision>:<passband_end>:<stopband_start>:<phase_response>,
                         recipe = (v|h|m|l|q)(L|I|M)(s) [E|X], E = exception - resample only if native rate not supported, X = async - resample to max rate for device, otherwise to max sync rate
                         flags = num in hex,
                         attenuation = attenuation in dB to apply (default is -1db if not explicitly set),
                         precision = number of bits precision (NB. HQ = 20. VHQ = 28),
                         passband_end = number in percent (0dB pt. bandwidth to preserve. nyquist = 100%),
                         stopband_start = number in percent (Aliasing/imaging control. > passband_end),
                         phase_response = 0-100 (0 = minimum / 50 = linear / 100 = maximum)
  -D [delay]            Output device supports DSD over PCM (DoP), delay = optional delay switching between PCM and DoP in ms
  -O <mixer device>     Specify mixer device, defaults to 'output device'
  -L                    List volume controls for output device
  -U <control>          Unmute ALSA control and set to full volume (not supported with -V)
  -V <control>          Use ALSA control for volume adjustment, otherwise use software volume adjustment
  -X                    Use linear volume adjustments instead of in terms of dB (only for hardware volume control)
  -z                    Daemonize
  -Z <rate>             Report rate to server in helo as the maximum sample rate we can support
  -t                    License terms
  -?                    Display this help text

Build options: LINUX ALSA EVENTFD RESAMPLE FFMPEG DSD LINKALL
 
OK, we have to make a system in the output data. Please we need two sets of files hw_params, stream0 + irqs/second for:

a) 176.4/24 track nonDOP straight to alsa, no pulseaudio (
Code:
device hw:D2Qute
), LMS

b) DSD DOP straight to alsa, no pulseaudio (
Code:
device hw:D2Qute
), LMS

Do you have to specify the 4byte format in squeezelite params (-a 80 4)? What happens if you do not specify that and play regular 24bit file?

Can you change the alsa device specification in -o to
Code:
hw:D2Qute
? There may be some conversions within the 'front' definition, I want to make your playback chain as short as possible.
Thanks.
 
Okay this is the most simple I think i can do in squuezelite
Code:
/usr/bin/squeezelite -o hw:D2Qute -n michael -a -D -s 172.16.0.93

1) LMS DSD DOP straight to alsa, no pulseaudio

Code:
122:    1968128      70176   44281095     128907  IR-PCI-MSI 327680-edge      xhci_hcd
122:    1969950      70474   44518051     130001  IR-PCI-MSI 327680-edge      xhci_hcd

(1969950+70474+44518051+130001)-(1968128+70176+44281095+128907) = 240170/30 = 8005 irq/ secs.

cat /proc/asound/card1/pcm0p/sub0/hw_params
Code:
access: MMAP_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 352800 (352800/1)
period_size: 45
buffer_size: 180

As you can see something messed up the squeezelite ability to play DOP , I'm not on 176400 anymore. So if I do the
Code:
-o hw:D2Qute
i can not play DOP...
 
okay.

This is when playing DOP , white light on the 2qute.
Code:
/usr/bin/squeezelite -o hw:D2Qute -n michael -a    0 -b 2000 2000 -D  -s 172.16.0.93

cat /proc/asound/card1/stream0
Code:
Chord Electronics Ltd 2Qute at usb-0000:00:14.0-2, high speed : USB Audio

Playback:
  Status: Running
    Interface = 2
    Altset = 1
    Packet Size = 224
    Momentary freq = 176401 Hz (0x16.0cd8)
    Feedback Format = 16.16
  Interface 2
    Altset 1
    Format: S32_LE
    Channels: 2
    Endpoint: 5 OUT (ASYNC)
    Rates: 32000, 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000
    Data packet interval: 125 us

This is when not playing DOP (disable the -D in squeezelite) , purple light on the 2qute.

Code:
/usr/bin/squeezelite -o hw:D2Qute -n michael -a    0 -b 2000 2000  -s 172.16.0.93

cat /proc/asound/card1/stream0
Code:
Chord Electronics Ltd 2Qute at usb-0000:00:14.0-2, high speed : USB Audio
Playback:
  Status: Running
    Interface = 2
    Altset = 1
    Packet Size = 448
    Momentary freq = 352805 Hz (0x2c.19c0)
    Feedback Format = 16.16
  Interface 2
    Altset 1
    Format: S32_LE
    Channels: 2
    Endpoint: 5 OUT (ASYNC)
    Rates: 32000, 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000
    Data packet interval: 125 us

Irqs is the same ca 8000/sec in both modes...
 
Last edited:
Good. The stream0 shows your DAC supports 176400. Do you have any idea why the PCM mode shows momentary freq 352.8kHz? Are you really playing 176.4kHz PCM track?

I'm playing an DSF file right now in both cases , I don't have any 176.4 Khz materiale.

I can play some 192Khz 24 bit if It is of any interest, but it's only when playing DOP there is issues with the Chord 2qute DAC..
 
OK, we have to be on the same track, otherwise we cannot do remote troubleshooting. I assumed you were playing 174.6/24 as specified in case a).

One of my previous posts shows how to convert any audio to 176.4/24 using sox. Please do so, play and post the stream0, hw_params files and irq rate for case a), i.e. 176.4/24 PCM. We will need this information for the alsa-devel report. Comparing different sample rates for PCM and DoP will not yield any useful information.
 
OK, we have to be on the same track, otherwise we cannot do remote troubleshooting. I assumed you were playing 174.6/24 as specified in case a).

One of my previous posts shows how to convert any audio to 176.4/24 using sox. Please do so, play and post the stream0, hw_params files and irq rate for case a), i.e. 176.4/24 PCM. We will need this information for the alsa-devel report. Comparing different sample rates for PCM and DoP will not yield any useful information.

Okay sorry for the misunderstanding , I'll convert a track to 176Khz/24bit and do the same for it.
 
Super playing a 176.4Khz / 24 bit file now.

Code:
122:    3214198     199023   68650516    1572361  IR-PCI-MSI 327680-edge      xhci_hcd
122:    3218989     199574   68885345    1572459  IR-PCI-MSI 327680-edge      xhci_hcd

(3218989+199574+68885345+1572459)-(3214198+199023+68650516+1572361) = 240269/30 = 8009 irq/ secs.


cat /proc/asound/card1/pcm0p/sub0/hw_params
Code:
access: RW_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 176400 (176400/1)
period_size: 1764
buffer_size: 7056

cat /proc/asound/card1/stream0
Code:
Chord Electronics Ltd 2Qute at usb-0000:00:14.0-2, high speed : USB Audio

Playback:
  Status: Running
    Interface = 2
    Altset = 1
    Packet Size = 224
    Momentary freq = 176402 Hz (0x16.0ce0)
    Feedback Format = 16.16
  Interface 2
    Altset 1
    Format: S32_LE
    Channels: 2
    Endpoint: 5 OUT (ASYNC)
    Rates: 32000, 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000
    Data packet interval: 125 us
 
Now please post the very same report (hw_params, stream0, irq rate, squeezelite command) for DoP. We do not have the DoP hw_params yet and I would like to have all the info together so that we can compare. Thanks

this is for DOP using squeezelite.

Code:
/usr/bin/squeezelite -o hw:D2Qute -n michael -a    0 -D -s 172.16.0.93

irqs - you can see it's the same ca 240000 for 30 secs.
Code:
122:    3564147     211909   77079875    1577962  IR-PCI-MSI 327680-edge      xhci_hcd
122:    3577422     211991   77306761    1577980  IR-PCI-MSI 327680-edge      xhci_hcd
(3577422+211991+77306761+1577980)-(3564147+211909+77079875+1577962) = 240261

cat /proc/asound/card1/pcm0p/sub0/hw_params
Code:
access: RW_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 176400 (176400/1)
period_size: 1764
buffer_size: 7056

cat /proc/asound/card1/stream0
Code:
Chord Electronics Ltd 2Qute at usb-0000:00:14.0-2, high speed : USB Audio

Playback:
  Status: Running
    Interface = 2
    Altset = 1
    Packet Size = 224
    Momentary freq = 176401 Hz (0x16.0cd8)
    Feedback Format = 16.16
  Interface 2
    Altset 1
    Format: S32_LE
    Channels: 2
    Endpoint: 5 OUT (ASYNC)
    Rates: 32000, 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000
    Data packet interval: 125 us
 
Also please look and post your CPU utilization for PCM and DoP. What CPU do you use?

Intel(R) Pentium(R) CPU 4405U @ 2.10GHz

https://www.cpubenchmark.net/cpu.php?cpu=Intel+Pentium+4405U+@+2.10GHz

I have an idle time of more than 99% , if I take a look into /proc/uptime

12254.66 48633.91

It gives me

((48633.91/4)/12254.66)*100 = 99.21 % idle time, so the system is sleeping and it does not matter if I play DOP or not..

This is my current htop.

htop_dop_chord.png
 
No problem I'll try to describe as It's quite difficult but It might help.

1) For DOP there can be stutters for 1-2 secs every 30min to 1 hour normally.
2) For PCM there have never been any problems.

CPU load on this laptop Pentium(R) CPU 4405U if always < 1% so idle is >99%.

A funny thing is that before I started I did and upgrade so OS now is 4.9.39-1-MANJARO #1 SMP PREEMPT Fri Jul 21 08:25:24 UTC 2017 x86_64 GNU/Linux , I haven't tried a so new Arch before.

This is quite stable but I can not use MPD anymore, won't initialize alsa anymore, but anyway I have very very few hiccups when playing DOP on this compared to 1 week ago.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.