+ Reply to Thread
Results 1 to 8 of 8

Thread: RBP/Squeezelite/IQaudIO DAC+ resampling in Max2play and Picoreplayer

  1. #1
    Join Date: Apr 2011

    Location: Kingston, Surrey, UK

    Posts: 774
    I'm Alex.

    Default RBP/Squeezelite/IQaudIO DAC+ resampling in Max2play and Picoreplayer

    Quick question rather than fold it into the IQA DAC+ mega thread..

    I was playing with resampling options in Max2Play and after some manual configuration I got squeezelite to upsample to 32/384 (according to the debug log), but got no audio output. CPU utilisation was suspiciously low, so I'm not sure whether it was actually working at that bitrate.

    I also tried PiCoreplayer with -u mL upsampling option. I got some sound out, and the debug log confirmed upsampling to 176Khz or 192Khz if I used -u mLX to enable asynchronous upsampling.

    My questions are a) does squeezelite support 384Khz upsampling with the Dac+ b) how do I make it work with Max2play and c) how does PiCoreplayer know what the maximum sample rate is: configuration file, driver or something else?.

    Any help would be appreciated.

    Cheers,
    Alex
    Technics SL1210| Jelco SA-750| Benz Micro ACE SM MC| Squeezebox Touch/MCRU linear PSU | Cambridge Audio 851C | High Resolution Music Streamer II+ / Linestreamer+ | Raspberry Pi 2/IQ-Audio DAC+ / Max2Play | Conrad-Johnson ET3 Control Amplifier| Conrad-Johnson LP125sa KT120 Power Amplifier| Avalon NP Evo 2.0 Speakers| Cardas Audio Quadlink-5C Speaker Cables and Interconnects| Finite Elemente Pagode Signature E-14 equipment support

  2. #2
    Join Date: Feb 2008

    Location: Down South

    Posts: 2,413
    I'm Neal.

    Default

    Hi Alex, I think the highest you can go with squeezelite is 192K. I tried 384K with piCorePlayer and it really screwed it up...it got stuck in an unresponsive loop and wouldn't play, the only way I could gain access to the RPi was to re-write the SD card!

    To see what the rate is ssh into the RPi, play some music and paste this into the command line:

    sudo cat /proc/asound/card1/pcm0p/sub0/hw_params

    Changes only take affect after piCorePlayer has been restarted or rebooted....
    Listening in a Foo free Zone...

    Only a Sith deals in absolutes.

  3. #3
    Join Date: Mar 2009

    Location: London UK

    Posts: 529
    I'm Chris.

    Default

    Quote Originally Posted by AlexM View Post
    Quick question rather than fold it into the IQA DAC+ mega thread..

    I was playing with resampling options in Max2Play and after some manual configuration I got squeezelite to upsample to 32/384 (according to the debug log), but got no audio output. CPU utilisation was suspiciously low, so I'm not sure whether it was actually working at that bitrate.

    I also tried PiCoreplayer with -u mL upsampling option. I got some sound out, and the debug log confirmed upsampling to 176Khz or 192Khz if I used -u mLX to enable asynchronous upsampling.

    My questions are a) does squeezelite support 384Khz upsampling with the Dac+ b) how do I make it work with Max2play and c) how does PiCoreplayer know what the maximum sample rate is: configuration file, driver or something else?.

    Any help would be appreciated.

    Cheers,
    Alex
    Don't have an IQAUDIO DAC + , but product features say:

    IQaudIO Pi-DAC+ Features

    Raspberry Pi HAT (A+/B+/2) compliant accessory; EEPROM, mounting holes, WITH camera & screen flat flex cut outs
    Full-HD audio – up to 24-bit/192kHz playback
    Integrated hardware volume control (via ALSA), full 2v RMS
    Built in High quality audio headphone amplifier (TI TPA6133A)
    Class leading audio; 112db SNR, and -93db THD
    Audiophile TI Burr Brown 32-bit/384kHz DAC (TI PCM5122)
    Advanced ESD protection
    Uses the digital I2S audio signals to reduce CPU load over USB audio solutions
    Raspberry Pi powered, no external power requirements
    Industry standard audio quality Phono/RCA connectors
    Built in IR header to take optional Vishay TSOP4838
    Fully built and tested Raspberry Pi accessory (Additional I/O pin headers are user soldered)
    Designed and manufactured in the UK

    So the max rate supported by IQUAIOD DAC+ is not matched by its max playback rate.

    Squeezelite gets the rates supported by your audio hardware via ALSA's API, as you know how to get debug output from squeezelite, you should see a line something like this:

    Code:
    [17:39:19.918002] output_init_common:394 supported rates: 384000 352800 192000 176400 96000 88200 48000 44100 32000 24000 22500 16000 12000 11025 8000
    or this:
    Code:
    [17:39:19.918002] output_init_common:394 supported rates: 192000 176400 96000 88200 48000 44100 32000 24000 22500 16000 12000 11025 8000
    The supported rates are for your hardware, obviously if the IQAUDIO DAC+ is limited to 24/192 then trying to upsample to a higher rate makes no sense.

    The max rate supported by squeezelite is a separate question, I don't know if Triode's squeezelite supports anything higher than 32/384.
    Chris

    Stuff

    1. Linux PC with onboard HDA SB/ALC892 24/192 optical S/PDIF and/or USB > TC-7520 (Gator + LM4562NA) > Quad 306 > AVI Neutron 3
    2. Rotel RCD 965BX > TC-7520 ( Gator + LM4562NA) > Hd595
    3. Rpi B+/HifiDigi B+ (with isolation transformer) Running "SqueezeOnArch" - https://github.com/SqueezeOnArch
    Nonsense
    1. Belkin Pure AV (white) phono, Belkin Pure AV (silver) USB, QEd 79-strand speaker cable.
    2. MG belden digital co-ax

  4. #4
    Join Date: Apr 2011

    Location: Kingston, Surrey, UK

    Posts: 774
    I'm Alex.

    Default

    Hi Both, thanks for your replies.

    Debug log under picoreplayer contains the following:

    Code:
    [21:34:56.225539] output_init_common:402 supported rates: 192000 176400 96000 88200 48000 44100 32000 16000 11025 8000
    sudo cat /proc/asound/card1/pcm0p/sub0/hw_params just returns:

    Code:
    sudo cat hw_params
    access: RW_INTERLEAVED
    format: S32_LE
    subformat: STD
    channels: 2
    rate: 192000 (192000/1)
    period_size: 3840
    buffer_size: 15360
    Both of which support the statement that 192k is the maximum supported rate under piCorePlayer with the IQaudIO DAC+

    but the debug log under max2play shows:

    Code:
     output_init_common:410 supported rates: 384000 352800 192000 176400 96000 88200 48000 44100 32000 24000 22500 16000 12000 11025 8000
    cat /proc/asound/card1/pcm0p/sub0/hw_params returns 'no config' with the upsampling option -u mLX, and the following without (as expected):

    Code:
    access: RW_INTERLEAVED
    format: S32_LE
    subformat: STD
    channels: 2
    rate: 44100 (44100/1)
    period_size: 882
    buffer_size: 3528
    I'm lost now.. it looks like the device driver is telling squeezelite that it supports up to 384k playback, but cant initialize the card at that bitrate. A bug in max2play probably? any other troubleshooting suggestions would be welcome. I will try limiting max bitrate to 192k and then advance through the list of higher bitrates to see where it stops working.

    Cheers,
    Alex
    Technics SL1210| Jelco SA-750| Benz Micro ACE SM MC| Squeezebox Touch/MCRU linear PSU | Cambridge Audio 851C | High Resolution Music Streamer II+ / Linestreamer+ | Raspberry Pi 2/IQ-Audio DAC+ / Max2Play | Conrad-Johnson ET3 Control Amplifier| Conrad-Johnson LP125sa KT120 Power Amplifier| Avalon NP Evo 2.0 Speakers| Cardas Audio Quadlink-5C Speaker Cables and Interconnects| Finite Elemente Pagode Signature E-14 equipment support

  5. #5
    Join Date: Feb 2008

    Location: Down South

    Posts: 2,413
    I'm Neal.

    Default

    Quote Originally Posted by AlexM View Post

    cat /proc/asound/card1/pcm0p/sub0/hw_params returns 'no config' with the upsampling option -u mLX, and the following without (as expected):

    Code:
    access: RW_INTERLEAVED
    format: S32_LE
    subformat: STD
    channels: 2
    rate: 44100 (44100/1)
    period_size: 882
    buffer_size: 3528
    I'm lost now.. it looks like the device driver is telling squeezelite that it supports up to 384k playback, but cant initialize the card at that bitrate. A bug in max2play probably? any other troubleshooting suggestions would be welcome. I will try limiting max bitrate to 192k and then advance through the list of higher bitrates to see where it stops working.

    Cheers,
    Alex
    Alex, I think you may need to set the max sample rate with the -r option IE: -r 19600
    Listening in a Foo free Zone...

    Only a Sith deals in absolutes.

  6. #6
    Join Date: Apr 2011

    Location: Kingston, Surrey, UK

    Posts: 774
    I'm Alex.

    Default

    Hi Neal,

    Yes, can confirm that Max2play is happy resampling when I limit the maximum rate to 192k. Not totally sure I like the outcome after all of that though, will listen some more before deciding. It is definitely different, but not sure if I prefer it. I'm still curious why ALSA is reporting the 384k rate as available, and I have read that MPD players (Volumio) are using upsampling to 384k, so maybe it is do-able by the card after all. CPU utilisation for the Squeezelite process is about 16-20% on the core it is using, although the system stays responsive as this is only about 5% across all four cores.

    For reference, my squeezelite command line is as follows (delete the -f and -d parameters if you don't need the logging)

    Code:
    ./squeezelite -o default:CARD=IQaudIODAC -a 80:4:: -f /home/pi/sldebug.log -d all=debug -r 192000 -u mL:::28
    Thanks for your help.

    Regards,
    Alex
    Technics SL1210| Jelco SA-750| Benz Micro ACE SM MC| Squeezebox Touch/MCRU linear PSU | Cambridge Audio 851C | High Resolution Music Streamer II+ / Linestreamer+ | Raspberry Pi 2/IQ-Audio DAC+ / Max2Play | Conrad-Johnson ET3 Control Amplifier| Conrad-Johnson LP125sa KT120 Power Amplifier| Avalon NP Evo 2.0 Speakers| Cardas Audio Quadlink-5C Speaker Cables and Interconnects| Finite Elemente Pagode Signature E-14 equipment support

  7. #7
    Join Date: Feb 2008

    Location: Down South

    Posts: 2,413
    I'm Neal.

    Default

    I found quite a difference in presentation between the Linear, Minimum and Intermediate phase filters. I've settled on the Intermediate setting as Linear was a little too forward for me and Minimum made the sound stage shrink back towards the 'speakers and widen. As all of my material is 44.1 I stuck with Integer up sampling to 176400 and found it has a smidge bit more clarity...as ever YMMV...
    Listening in a Foo free Zone...

    Only a Sith deals in absolutes.

  8. #8
    Join Date: Apr 2011

    Location: Kingston, Surrey, UK

    Posts: 774
    I'm Alex.

    Default

    Thanks Neal.

    I have noticed that because the upsampling reduces the volume level by 1Db by default to prevent clipping, you need to compensate for the reduced output by increasing gain. I'm still experimenting with different filters, but for the moment I'm sticking with medium linear phase. The effects are quite subtle, but seem to improve resolution of fine detail slightly, and broaden the acoustic slightly compared to non-upsampled. It does seem to reduce bass impact slightly though.. not sure why that would be.

    Alex
    Technics SL1210| Jelco SA-750| Benz Micro ACE SM MC| Squeezebox Touch/MCRU linear PSU | Cambridge Audio 851C | High Resolution Music Streamer II+ / Linestreamer+ | Raspberry Pi 2/IQ-Audio DAC+ / Max2Play | Conrad-Johnson ET3 Control Amplifier| Conrad-Johnson LP125sa KT120 Power Amplifier| Avalon NP Evo 2.0 Speakers| Cardas Audio Quadlink-5C Speaker Cables and Interconnects| Finite Elemente Pagode Signature E-14 equipment support

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •