diyAudio

diyAudio (https://www.diyaudio.com/forums/index.php)
-   PC Based (https://www.diyaudio.com/forums/pc-based/)
-   -   CamillaDSP - Cross-platform IIR and FIR engine for crossovers, room correction etc. (https://www.diyaudio.com/forums/pc-based/349818-camilladsp-cross-platform-iir-fir-engine-crossovers-correction-etc.html)

phofman 21st April 2021 05:44 AM

raptorlightning: Please post output of lsusb -v when USBStreamer is connected (as an attached txt file) and your kernel version (uname -a)

HenrikEnquist 21st April 2021 12:40 PM

Quote:

Originally Posted by pelanj (https://www.diyaudio.com/forums/pc-based/349818-camilladsp-cross-platform-iir-fir-engine-crossovers-correction-etc-post6625404.html#post6625404)
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 (https://www.diyaudio.com/forums/pc-based/349818-camilladsp-cross-platform-iir-fir-engine-crossovers-correction-etc-post6625382.html#post6625382)
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.

phofman 21st April 2021 01:06 PM

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.

HenrikEnquist 21st April 2021 06:39 PM

Quote:

Originally Posted by jrubins (https://www.diyaudio.com/forums/pc-based/349818-camilladsp-cross-platform-iir-fir-engine-crossovers-correction-etc-post6623860.html#post6623860)
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"]...

raptorlightning 22nd April 2021 12:38 AM

1 Attachment(s)
Quote:

Originally Posted by phofman (https://www.diyaudio.com/forums/pc-based/349818-camilladsp-cross-platform-iir-fir-engine-crossovers-correction-etc-post6625649.html#post6625649)
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 (https://www.diyaudio.com/forums/pc-based/349818-camilladsp-cross-platform-iir-fir-engine-crossovers-correction-etc-post6625953.html#post6625953)
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.

raptorlightning 22nd April 2021 04:34 AM

2 Attachment(s)
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

raptorlightning 22nd April 2021 06:07 AM

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 :rolleyes:, 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


phofman 22nd April 2021 06:57 AM

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)?

raptorlightning 22nd April 2021 08:57 PM

phofman:

"Stereo" firmware, I/O is strictly TOSLINK with the boxed version of the USBStreamer. Sample rates from 44.1kHZ-192kHz.

phofman 23rd April 2021 12:42 AM

Does it run duplex (incl. playback), or do you use it only for the TOSLINK input?


All times are GMT. The time now is 04:39 AM.


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

Wiki