Menu

#3 ASIO2 compatible with foo_dsd_asio?

1.0
open
nobody
2017-04-19
2016-03-03
Jacko
No

Hi Didier

Thanks for your work, I hear a lot of improvement on pcm already!

But if I want to play native dsd through my iFi iDSD Micro usb dac, I have to use the foo_dsd_asio as a proxy. If I do, I get this error and it doesn't play:
Unrecoverable playback error: create_asio_buffers failed: cr = -998
Should it be possible to use it in combination with foo_dsd_asio?

See also the attached screenshot for my config.

Kind regards,
Jacko

1 Attachments

Discussion

  • Didier Galardon

    Didier Galardon - 2016-03-04

    Hello Jacko,

    I am not familiar with DSD format but I don't think you can use Asio2 component for native dsd. Asio2 expects PCM input. By now, I own a PCM only DAC, so there is no way for me to test the necessary changes for DSD support in Asio2.

    Kind regards,

    Didier

     
  • Jacko

    Jacko - 2016-03-05

    Hi Didier,

    Thanks for your answer.
    I'll keep checking your project because I like it.
    It makes me very curious to hear the improvement of ASIO2 on dsd but maybe something will change in the future. You never know.

    FYI: Here's the source of the dsd component:
    https://sourceforge.net/projects/sacddecoder/files/foo_dsd_asio/
    Maxime Anisiutkin is the designer/programmer behind this project.

    Lots of luck!

    Jacko

     

    Last edit: Jacko 2016-03-05
  • Didier Galardon

    Didier Galardon - 2016-03-05

    Hi Jacko,

    As far as I understand when looking at sacd decoder source code, dsd data stream, when kept native and not converted to PCM, is sent directly (through a sort of mapped data file) to the DSD asio proxy (foo_dsd_asio) by the sacd input decoder component, instead of using the standard foobar chunks of data. Perhaps I'm wrong, but Asio2 should work in that case. When trying to read a dsf file on my config with sacd decoder and foo_dsd_asio installed, I don't have any error. (Of course, I don't hear any sound, because my soundcard is PCM only). May be your asio2 advanced config is not consistent with your dac capabilities. Could you send me a screenshot of your asio2 advanced config, and tell me what you see in the foobar console when starting playback with Asio2 trace level set to 1 ? The following lines may be useful for me:
    Renderer::init_asio_static_data - ASIOGetChannels ....
    Renderer::init_asio_static_data - ASIOGetBufferSize ....
    Renderer::init_asio_static_data - ASIOGetSampleRate....

    kind regards

    Didier

     
  • Jacko

    Jacko - 2016-03-09

    Hi Didier,

    I collected some test data for you, see the attached log files.

    The jpg's show my ASIO2 advanced config and my output settings. If you test the SACD plugin, be aware to set your output device to "ASIO2: foo_dsd_asio". At my config it doesn't matter if I set the SACD decoder plugin to native DSD or let it convert to PCM. Both ways (and playback of PCM out of a FLAC file too) generate the error.

    Hope you can find anything.

    Kind regards,
    Jacko

     
  • Jacko

    Jacko - 2016-03-10

    Note: the sample cache factors are just out of the dialog but all four are set to 0=auto.

     
  • Didier Galardon

    Didier Galardon - 2016-03-11

    Hi Jacko,

    something seems strange to me in the following playback log:
    Renderer::init_asio_static_data - ASIOGetBufferSize (min:-2147483648, max:-2147483648, preferred:-2147483648, granularity:-2147483648)

    In theory, when this API is called, the ASIO driver should return the range of possible values for the asio buffer size in samples (e.g min=64 and max=8096) and the current buffer size configured for your asio driver (e.g preferred=512).
    If not overloaded in the advanced configuration (I mean Endpoint buffer sizes <>0 in Driver Endpoint config), Asio2 plugin uses preferred size returned by the driver, which in your case has a wrong value (2 ^ 32)

    may you check these 2 following options ?

    1) Is it possible for you to explicitely configure the current Asio buffer size at your device level ? If the answer is yes , try to do it and check again the asio2 log (ASIOGetBufferSize return values)
    or
    2) set "Endpoint buffer size (samples) for 44,1Khz tracks" asio2 parameter to e.g. 512 or 1024, in order to force the asio buffer size to this specific value. retry the PCM playback.

    if the second option is OK, I will provide you a patch allowing you to set explicitely the asio buffer size for sample rates greater than 192Khz (e.g. 352800 as for your dsd playback).

    Kind regards,

    Didier

     
  • Jacko

    Jacko - 2016-03-11

    Hi Didier,

    Don't understand exactly what you are doing but up to 24/96 it works when setting the buffers manually!
    I set all sample cache factors to 2, the buffer in the driver of the dac to 512 and all endpoint buffers in the advanced setting to 512 too.
    24/192 plays too but sounds like ppprrrrrrrrrrr. And guess what, DSD64 runs fine, but sometimes small stops after a minute or so. Even DSD256 plays well, however I had a hangup one time after switching to another track.

    This is very promising because also with DSD I hear more focus and clarity...

    I am very grateful for your effort!

    Please find the attached files. If I need to do more, please feel free to ask me.

    Thanks!
    Jacko

     
  • Jacko

    Jacko - 2016-03-11

    Just before I saw your latest reply, I updated both the firmware and the driver version of the dac but I think it didn't have any effect because when I started playback with the updated dac but with the old ASIO settings, immediately the same error appeared. After that I started testing with your fixed buffer sizes which solved the error.

     
  • Jacko

    Jacko - 2016-03-12

    Hi Didier,

    This morning (after restarting pc) a different situation. DSD resulted in a hangup everytime. So no crash but it stayed at playback of 0:00 seconds and never came out. I did a couple of new tests:
    I set the iFi driver buffer to 2048 samples
    Set the advanced settings of asio2 accordingly
    tested with hires PCM and DSD.
    Up to 192KHz it runs fine. No problems, sound is perfect
    PCM above 192KHz gives the old error message
    DSD ends in a loop

    At least, this behaviour is more consistent imo. Of all three tests I made logs, please find them attached, together with the new advanced settings.

    Hope this will give you more clear info.

    Good luck!
    Jacko

     
  • Jacko

    Jacko - 2016-03-12

    Hi Didier,

    Extra info: 176400Hz gives the error too... All other PCM frequencies have no errors including 88200Hz and 192000Hz. It's only 176400Hz and 352800Hz that give the error and do not play.

    Attached you will find the log.

    Jacko

     
  • Didier Galardon

    Didier Galardon - 2016-03-12

    Hi Jacko,
    you will find attached a patch fixing the 2 following problems:
    - error with 176400 or 192Khz + playback: I have change the code in order to set explicitely the endpoint buffer size when the sample rate is in a range of values instead of discrete values.
    - loop when playing DSD: bug occuring when asio buffers allocated by the driver are not 16 bytes aligned --> it can explain that DSD was playing the first time, because allocated asio buffer may be sometimes 16 bytes aligned.

    Do you still have the problem with 24/192Khz PCM (ppprrrrrrrrrrr noise) ?

    Kind regards,

    Didier

     
  • Jacko

    Jacko - 2016-03-12

    Hi Didier,

    All formats run fine now!

    Yes, also 192KHz PCM sounds great. And even better: switching between PCM and DSD goes without any clicks/plops. You must really know what you are doing. It's like magic to me....

    To test, I just switched off all selections on te library and shuffled through it by pressing next, next, next, next. In about 30 tracks, I got only one error message:

    Unrecoverable playback error: Input Audio format ou used DSP is not compatible with the current chunk Alignment policy : uncheck 'Use Chunk Alignment Optimization' checkbox in advanced config and restart playback

    Just pressing stop and play made the same track run without problem. I could switch of the chunk alignment setting in the advanced settings. For your info I'll attach the log.

    I've already set all four sample cache factors back to 0=auto without problem.
    I have manual settings now and actually don't know what I am doing. If I don't bother you, would you please have a last look at them from a sound quality point of view? Are they okay this way? Screenshots are attached.

    Here's another big THANKS from my side!

    Kind regards,
    Jacko

     
  • Didier Galardon

    Didier Galardon - 2016-03-12

    Hi Jacko,

    happy that everything is working fine !
    I will upload a new release including the patch within the next days.

    The purpose of the "Chunk alignment optimization" is to have a shorter processing path and to optimize the samples cache management in asio2, which could in some case results in a better SQ.

    I don't think I can avoid the error you have when mixing formats in playlist with "Chunk alignment optimization" set. The reason is that when receiving chunks of audio data from the foobar framework, it's not possible, in a synchronous way, to detect, when the the chunk size changes, wether it is because a new track is starting (with may be a different chunk size than the previous track if input format differs), or wether change occurs while playing a track. The later may occur with specific input formats (e.g. MP3, streaming) or when using some specific DSP (e.g. Sox Resampler DSP). Asio2 could in theory restart automatically the driver in order to change the chunk processing handlers in the former situation, but not in the latter situation.

    Anyway, if you always use tracks with the same format in your playlist, if you don't use sox resampler DSP, and don't listen to MP3 , you can keep "Chunk alignment optimization" set, if ever you think it improves SQ.

    Concerning your configuration, from a sound quality point of view, here are my remarks:

    you could try to decrease the endpoint buffer size, in order to reduce playback latency, even if I don't think that it matters for an USB device. For my personal configuration (Intel Core i5-6500, DDR4 RAM, Lynx AES 16e sound card + Audio Research DAC 7) I have set the endpoint buffer size to 32 for 44,1Khz, 64 for 96Khz and 128 for 192khz, which are the lowest buffer sizes I can use with no crack/glitches. With such low buffer sizes, may be you will need to increase the sample cache factor (see attached screenshot of my configuration).

    The default foobar buffer length (your 2nd screenshot) is not used by Asio2.

    The device asio size (your 3rd screenshot) should in theory be overloaded by the endpoint buffer size you specify in asio2 advanced configuration, but may be it is device dependent.

    Another big SQ improvement could come, in your config (but I understand that it is not so easy), from an hardware upgrade (Processor/motherboard/RAM type), in order to take benefits from the SIMD AVX2 instruction set. Most significant code optimisation in Asio2 plugin have been done for recent (2013+) processors supporting the AVX2 instructions: Haswell or Skylake Intel processor , like I3, I5,I7 4xxx or 6xxxx.

    I hope it will help you

    Kind regards,

    Didier

     
  • Jacko

    Jacko - 2016-03-13

    Hi Didier,

    Many thanks for your clear explanation.
    As soon as I lower the buffers, I hear cracks/glitches or Foobar gets unstable. I guess it has to do with my Celeron 1007U @ 1.50GHz running on W10 home. Latency isn't a big issue for me and maybe asynchonous USB dacs aren't that sensitive to latency. However, it's good to know that upgrading to a new processor would be profitable.

    Anyway, I hear a huge improvement now over the regular ASIO driver so I am still very pleased.
    Everything runs smoothly now so let's enyoy the music!

    And a big hand for your perfect support on this issue. I'll keep watching closely for any news on your project.

    Kind regards, bye,
    Jacko

     
  • Tomas Vakrman

    Tomas Vakrman - 2017-04-18

    Hello, does Wasap2 allow for native dsd decoding or just asio2?
    Thank you.
    Tomas

     
  • Didier Galardon

    Didier Galardon - 2017-04-19

    Hello,

    No, wasap2 doesn’t allow for native dsd. My current DAC supports PCM only so I cannot make any test with DSD playback. When I will change my DAC I will certainly take a look at this .

    Regards

    Didier

     

Log in to post a comment.