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 5th July 2020 09:57 PM

Quote:

Originally Posted by HenrikEnquist (https://www.diyaudio.com/forums/pc-based/349818-camilladsp-cross-platform-iir-fir-engine-crossovers-correction-etc-post6265206.html#post6265206)
I have no idea why they decided to map to I16, seems like a weird decision..

Right, F32 -> asioI32 would make more sense, all DACs/ADCs will use only 24bits of the 32bits, i.e. basically lossless F32 conversion.

NicoB 6th July 2020 04:05 PM

May be it have been already told but it's now possible to have not the same device between stdin and sdtout?

Like, in a Raspberry, enter thanks to GPIO (IS IN) then out on a USB DAC ?

Thanks

HenrikEnquist 6th July 2020 04:22 PM

Quote:

Originally Posted by NicoB (https://www.diyaudio.com/forums/pc-based/349818-camilladsp-cross-platform-iir-fir-engine-crossovers-correction-etc-post6266134.html#post6266134)
May be it have been already told but it's now possible to have not the same device between stdin and sdtout?

Like, in a Raspberry, enter thanks to GPIO (IS IN) then out on a USB DAC ?

Thanks

Yes you can use different devices for in and out. Spdif in on a hat and then out on a USB dac for example. But what do you mean with stdin/stdout?
If you use two independent devices you probably want to enable the asynchronous resampler to keep them from drifting apart.

wineds 10th July 2020 01:47 AM

Quote:

Originally Posted by lykkedk (https://www.diyaudio.com/forums/pc-based/349818-camilladsp-cross-platform-iir-fir-engine-crossovers-correction-etc-post6215420.html#post6215420)
Allright, my "hack" is working eventhrough the start parameters on squeezelite has to be tweaked for it to do "clicks and pops" as little as possible when samplerate is switching :)

I was looking in the sourcecode for squeezelite and it tells me i can do whatever i like so i put my work here for someone else to try it, and perhaps modify it to be right! (My hack is not coded the right way, but it's just working for me :o)

Code:

*  Squeezelite - lightweight headless squeezebox emulator
 *
 *  (c) Adrian Smith 2012-2015, triode1@btinternet.com
 *      Ralph Irving 2015-2017, ralph_irving@hotmail.com
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Additions (c) Paul Hermann, 2015-2017 under the same license terms
 *  -Control of Raspberry pi GPIO for amplifier power
 *  -Launch script on power status change from LMS

The version i was compiling is Squeezelite v1.9.7-1218
I changed some in output_alsa.c, and set the Makefile.rpi so that it would compile proberly.

Code:

        /*
        *        CamillaDSP engine integration START
        */

        LOG_INFO("Player detected sample rate change ! %u", sample_rate);

        UNLOCK;

        if(sample_rate == 44100) system("python3 /home/tc/DSP_Engine/filters/exec_44100.py");
        if(sample_rate == 96000) system("python3 /home/tc/DSP_Engine/filters/exec_96000.py");
        if(sample_rate == 48000) system("python3 /home/tc/DSP_Engine/filters/exec_48000.py");
        if(sample_rate == 88200) system("python3 /home/tc/DSP_Engine/filters/exec_88200.py");
        if(sample_rate == 176400) system("python3 /home/tc/DSP_Engine/filters/exec_176400.py");
        if(sample_rate == 192000) system("python3 /home/tc/DSP_Engine/filters/exec_192000.py");
        if(sample_rate == 352800) system("python3 /home/tc/DSP_Engine/filters/exec_352800.py");
        if(sample_rate == 384000) system("python3 /home/tc/DSP_Engine/filters/exec_384000.py");


        LOG_INFO("Sample rate filter changed ! %u", sample_rate);

        /*
        *        CamillaDSP engine integration STOP
        */

And close to the end i also changed the "dual" opening of alsa, i just put in an "!" in the code.
Code:

                        // FIXME - some alsa hardware requires opening twice for a new sample rate to work
                        // this is a workaround which should be removed
                        if (!alsa.reopen) {
#if DSD
                                alsa_open(output.device, output.current_sample_rate, output.buffer, output.period, output.outfmt);
#else
                                alsa_open(output.device, output.current_sample_rate, output.buffer, output.period);
#endif
                        }

The OS distribution i use is piCoreplayer on my RPI4, and python 3 has to be installed for it to work. The piCoreplayer is based on TinyCore Linux, which load everything in RAM at boot; so plugging the wallswitch when it's running don't harm anything because the SD card is not used after booting is done!!!.

I attached the files here i use, including the compiled squeezelite which runs on RPI4.

I will make a post at the slimserver forum, where squeezelite/piCoreplayer lives and link to this post.
LINK is here :: Digital signal processing is possible with piCoreplayer & squeezelite

Please feel free to delete/remove or burn whatever this post :)

Jesper.

Thanks for this Jesper. I am interested in giving Camilla a try on a RPI4. I have been using ConvoFS for a while running on my NAS for DRC. It works great but it doesn't support streaming. Like you I run LMS on the NAS. I am also currently using a RPI4 running PiCoreplayer but only using the Squeezelite portion of it to my USB DAC.

I have read many of your posts but what is the final flow of your system? Is it remote LMS > PiCoreplayer+Camilla > DAC? Does you custom Squeezelite replace the Squeezelite PiCoreplayer installs? Camilla can be installed and configured by SSH into the RPI4?

lykkedk 10th July 2020 04:36 AM

Quote:

I have read many of your posts but what is the final flow of your system? Is it remote LMS > PiCoreplayer+Camilla > DAC? Does you custom Squeezelite replace the Squeezelite PiCoreplayer installs? Camilla can be installed and configured by SSH into the RPI4?
Hi.

Yes the flow is like this.
I compiled the CamillaDSP on another RPI4 with the Raspbian distro installed on it, mostly because i don't want to have all the compilestuff installed on my player rpi :p
And yes everything can be installed and configured by SSH.

If you need to have Camilla / Squeezelite switching samplerate on the fly like i do you also need some other stuff installed onto the piCoreplayer (websocket, python3 etc... etc...)
Let me know if you need this.


EDIT : Henrik have precompiled CamillaDSP for us here Release v0.3.1-alpha: Merge pull request #55 from HEnquist/cpaladjust * HEnquist/camilladsp * GitHub

Jesper.

bambadoo 10th July 2020 06:00 AM

Possible to make a bit more "step by step" description in how to make it work with rpi/picoreplayer?

lykkedk 10th July 2020 06:24 AM

Bambadoo...

I am in progress writing a simple howto :)

Jesper.

wineds 10th July 2020 07:19 AM

Quote:

Originally Posted by lykkedk (https://www.diyaudio.com/forums/pc-based/349818-camilladsp-cross-platform-iir-fir-engine-crossovers-correction-etc-post6270345.html#post6270345)
Hi.

Yes the flow is like this.
I compiled the CamillaDSP on another RPI4 with the Raspbian distro installed on it, mostly because i don't want to have all the compilestuff installed on my player rpi :p
And yes everything can be installed and configured by SSH.

If you need to have Camilla / Squeezelite switching samplerate on the fly like i do you also need some other stuff installed onto the piCoreplayer (websocket, python3 etc... etc...)
Let me know if you need this.


EDIT : Henrik have precompiled CamillaDSP for us here Release v0.3.1-alpha: Merge pull request #55 from HEnquist/cpaladjust * HEnquist/camilladsp * GitHub

Jesper.

Thanks jesper! So is that pre complied version for rpi4? As an alternative to sample rate switching could all input content be upscaled to 192k?

lykkedk 10th July 2020 07:48 AM

wineds.

The ArmV7 version should be the version for the RPI(4).
I am writing as i wrote before a simple howto to setup CamillaDSP with piCorePlayer, without samplerate switching as this is more complicated thrust me ;)

Regarding the resampling to 192k is a great idea, and you can do it directly with CamillaDSP i'am sure (didn't try it through as mine CamillaDSP compiled version is one of the first one's Henrik released without these options)

Jesper.

lykkedk 10th July 2020 10:05 AM

1 Attachment(s)
Hello.

I have tried to write this simple howto, but it's not so easy :)
Anyway i think it's usefull for people which would like to try camilladsp on an RaspberryPi.

The file is in .docx but i renamed it to .docx.txt to upload it here, please rename to only contain .docx.

The startupscript CamillaDSP.sh i have provided among some other files in the .zip file here compressed
i changed this startup script, and i could not test it, but i think it should work.

Good luck :D

Jesper.


All times are GMT. The time now is 07:32 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