Go Back   Home > Forums > >

PC Based Computer music servers, crossovers, and equalization

CamillaDSP - Cross-platform IIR and FIR engine for crossovers, room correction etc.
CamillaDSP - Cross-platform IIR and FIR engine for crossovers, room correction etc.
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools
Old 21st April 2021, 05:44 AM   #1911
phofman is online now phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
raptorlightning: Please post output of lsusb -v when USBStreamer is connected (as an attached txt file) and your kernel version (uname -a)
  Reply With Quote
Old 21st April 2021, 12:40 PM   #1912
HenrikEnquist is offline HenrikEnquist  Sweden
diyAudio Member
 
Join Date: Apr 2016
Location: Lund
Quote:
Originally Posted by pelanj View Post
I finally managed to compile. So I copy only camilladsp, not the whole content of the folder? Thanks for the advice!
Just that one files yes!


Quote:
Originally Posted by raptorlightning View Post
Top is the recorded waveform, bottom is the original. It just zero fills ~32 samples occasionally, and then picks up where it left off, for some reason...

This happens every 10-15 seconds or so - the emulation of somewhat clean vinyl (quiet pops/cracks) is pretty spot on.
This could maybe be a two-different-clocks-problem. Are you feeding data to the USBStreamer on the spdif input? If yes, and it's not using the clock recovered from the spdif, then you could get something like this. 32 samples every 10 seconds means 32/441000 off, which is about 0.007%. The gaps would then mean that the source clock runs 0.007% slower than the USBStreamer clock.
Can you select clock source on the USBStreamer? It looks like you can on Windows. On linux it might be exposed as a mixer control.
__________________
CamillaDSP - cross platform dsp engine
Reporting an issue with CamillaDSP? Please attach the config file and the log from a run with "debug" log level.
  Reply With Quote
Old 21st April 2021, 01:06 PM   #1913
phofman is online now phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
USB-audio driver in linux had problems with duplex operation and implicit async feedback. Recently that part of the driver was completely overhauled, to satisfy the standard... and the devs are still solving unexpected issues with some devices slightly deviating from the standard since then.
  Reply With Quote
Old 21st April 2021, 06:39 PM   #1914
HenrikEnquist is offline HenrikEnquist  Sweden
diyAudio Member
 
Join Date: Apr 2016
Location: Lund
Quote:
Originally Posted by jrubins View Post
No filter where I put in a1, a2, b0, b1, b2 looks anything like I expect it to. That could be because the visualization is not working as intended
I looked into this now, and there was a typo in the function that calculates the frequency response. It ignored the given value for a2, and used the a1 value for both a1 and a2. No wonder the results were nonsense!
I fixed it now, and this will be included in the next gui release.
If you want, you can fix it by patching the "filters.py" file of pycamilladsp-plot.
On line 299, it should look like this:
Code:
 
class Biquad(object): 
    def __init__(self, conf, fs): 
        ftype = conf["type"] 
        if ftype == "Free": 
            a0 = 1.0 
            a1 = conf["a1"] 
            a2 = conf["a2"]
and not a2 = conf["a1"]...
__________________
CamillaDSP - cross platform dsp engine
Reporting an issue with CamillaDSP? Please attach the config file and the log from a run with "debug" log level.
  Reply With Quote
Old 22nd April 2021, 12:38 AM   #1915
raptorlightning is offline raptorlightning  United States
diyAudio Member
 
raptorlightning's Avatar
 
Join Date: Jul 2009
Location: The luminiferous ether
Quote:
Originally Posted by phofman View Post
raptorlightning: Please post output of lsusb -v when USBStreamer is connected (as an attached txt file) and your kernel version (uname -a)
lsusb output file is attached and the output of uname -a is:

Code:
Linux pidsp 5.4.0-1034-raspi #37-Ubuntu SMP PREEMPT Mon Apr 12 23:14:49 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
Quote:
Originally Posted by HenrikEnquist View Post
This could maybe be a two-different-clocks-problem. Are you feeding data to the USBStreamer on the spdif input? If yes, and it's not using the clock recovered from the spdif, then you could get something like this. 32 samples every 10 seconds means 32/441000 off, which is about 0.007%. The gaps would then mean that the source clock runs 0.007% slower than the USBStreamer clock.
Can you select clock source on the USBStreamer? It looks like you can on Windows. On linux it might be exposed as a mixer control.
I didn't even think that it might not be using the SPDIF recovered clock... I'm not sure how I would go about changing the clock source or checking this with terminal commands.
Attached Files
File Type: txt lsusb.txt (38.5 KB, 3 views)

Last edited by raptorlightning; 22nd April 2021 at 12:41 AM.
  Reply With Quote
Old 22nd April 2021, 04:34 AM   #1916
raptorlightning is offline raptorlightning  United States
diyAudio Member
 
raptorlightning's Avatar
 
Join Date: Jul 2009
Location: The luminiferous ether
Here are the outputs of the following commands as well:

Code:
cat /proc/asound/card1/usbmixer
cat /proc/asound/card1/stream0
It's interesting that the usbmixer file contains an instance of the "miniDSP Clock Selector Clock Source" control. I have no idea how to use this information though...

Edit: And there's this thread on alsa-devel from back in 2013 that seems to be a similar issue: [alsa-devel] M-Audio Delta 1010LT: S/PDIF clock source not working
Attached Files
File Type: txt catusbmixer.txt (2.0 KB, 3 views)
File Type: txt catstream0.txt (688 Bytes, 1 views)
  Reply With Quote
Old 22nd April 2021, 06:07 AM   #1917
raptorlightning is offline raptorlightning  United States
diyAudio Member
 
raptorlightning's Avatar
 
Join Date: Jul 2009
Location: The luminiferous ether
Well it seems I have fixed it using alsamixer to select the "miniDSP TOSLINK Clock Source" instead of the "miniDSP Internal Clock Source"! Thank you Henrik for suggesting this might be the issue! And I really appreciate your willingness to help with my Linux ignorance phofman.

Unfortunately, this setting has broken my sample rate switching script. I probably need to switch it back to the internal clock, restart camillaDSP, then switch it to the toslink clock source. I will try this tomorrow (if I can figure out the alsamixer command line) and, if this doesn't break anything else , all will be perfect!

Here's the journalctl output when the script tries to switch from 44.1kHZ (playing fine) to 48kHz (errors out), then it picks up fine going back to 44.1kHz:

Code:
Apr 21 22:40:21 pidsp python3[2330]: Frequency Changed to: 44.1kHz
Apr 21 22:40:21 pidsp python3[2331]: Apr 21 22:40:21.721 INFO Starting playback from Prepared state, module: camillalib::alsadevice
Apr 21 22:40:37 pidsp python3[2336]: Frequency Changed to: 48kHz
Apr 21 22:40:37 pidsp python3[2337]: Apr 21 22:40:37.245 ERRO Playback error: ALSA function 'snd_pcm_hw_params' failed with error 'ENXIO: No such device or address', module: camilladsp
Apr 21 22:40:37 pidsp python3[2337]: thread 'Apr 21 22:40:37.246<unnamed>' panicked at ' called `Result::unwrap()` on an `Err` value: "SendError(..)"ERRO',  src/processing.rsMessage channel error: receiving on a closed channel:, 40module::37
Apr 21 22:40:37 pidsp python3[2337]: camillalib::processingnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Apr 21 22:40:51 pidsp python3[2342]: Frequency Changed to: 44.1kHz
Apr 21 22:40:51 pidsp python3[2343]: Apr 21 22:40:51.188 INFO Starting playback from Prepared state, module: camillalib::alsadevice
  Reply With Quote
Old 22nd April 2021, 06:57 AM   #1918
phofman is online now phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
raptorlightning: Thanks.

Which firmware do you use (as described in https://www.minidsp.com/images/docum...r%20Manual.pdf ) ?

How is your USBStreamer connected (inputs, outputs, requirements)?
  Reply With Quote
Old 22nd April 2021, 08:57 PM   #1919
raptorlightning is offline raptorlightning  United States
diyAudio Member
 
raptorlightning's Avatar
 
Join Date: Jul 2009
Location: The luminiferous ether
phofman:

"Stereo" firmware, I/O is strictly TOSLINK with the boxed version of the USBStreamer. Sample rates from 44.1kHZ-192kHz.
  Reply With Quote
Old 23rd April 2021, 12:42 AM   #1920
phofman is online now phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
Does it run duplex (incl. playback), or do you use it only for the TOSLINK input?
  Reply With Quote

Reply


CamillaDSP - Cross-platform IIR and FIR engine for crossovers, room correction etc.Hide this!Advertise here!
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The room correction or speaker correction? What can we do with dsp power now availabl Raimonds Full Range 233 28th January 2017 07:51 AM
Introducing OpenDRC, Open Digital Room Correction engine minidsp miniDSP 20 20th January 2016 05:37 PM
What the difference between dsp room correction eq and software correction erez1012 PC Based 0 10th March 2014 07:07 PM
Writing a Cross-Platform, Free Software Modeling Tool and TS-Parameter DB justinzane Software Tools 6 31st December 2013 06:55 AM
FS: DAC, room-correction, active crossovers, amp, speakers! taloyd Swap Meet 4 14th April 2009 03:16 PM


New To Site? Need Help?

All times are GMT. The time now is 07:01 AM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 14.29%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
Copyright ©1999-2021 diyAudio
Wiki