• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

RPi4 + CamillaDSP Tutorial

danhilu

Member
Joined
Jan 7, 2023
Messages
7
Likes
0
Location
Switzerland
For info, as I've reported on Henrik's thread on diyaudio.com, I have successfully installed camilladsp on an my "reference x86-64" machine (mini pc with intel celeron cpu) running Ubuntu server 22.04, redoing install from scratch, following Michael's tutorial.
I am reporting this here since, initially, attempting to start "camilladsp" caused the error below:
error while loading shared libraries: libpulse-simple.so.0: cannot open shared object file: No such file or directory
I do not remember having had this issue on the desktop version of the same Ubuntu 22.04 on the same PC.
As suggested by Henrik, installing the package "libpulse-dev" has solved my problem (details on the thread linked above):
sudo apt-get install libpulse-dev
[edit ] Henrik has just explained this behaviour: camilladsp's public amd64 build has pulseaudio activated, while camilladsp's aarch64 build has not.
And Ubuntu's Desktop edition comes with Pulseaudio activated, not Ubuntu server.

The rest of Michael's tutorial for RPI4 has worked - although I have not attempted to install "linux-modules-extra-raspi" which is dedicated for the Raspberry Pi.
[edit] no actually I spoke too soon, alsa seemed not to be installed properly. Just added

sudo apt-get install alsa alsa-tools
sudo adduser daniel audio
sudo reboot
Now alsa seems to see the USB audio interface. Still some glitches but this may be my config.
Thank you Michael & Henrik & all for this cool techno & community.
 
Last edited:

Frunse

Active Member
Joined
Feb 21, 2024
Messages
132
Likes
20
So i can't get it run with moode and HDMI Out, i gaved up!

Now i have installed PCorePlayer on that RPI4 and it works now 30 min. and all fine.

Setup HDMI Out and Upsampling all to 96khz
with this Upsampling Settings i found on this webpage:
http://archimago.blogspot.com/2017/12/howto-musings-playing-with-digital_23.html

Upsampling: "vX::4:28:99:100:50" changed it to 32Bit "vX::4:32:99:100:50"

Works also \o/

May be anyone has advice for "the" best sounding Settings there i am not realy sure.

for now.

I will let it runn for longer Time to loock how Stable it will go.

Still not sure how to play Multichannel Files.
Best way Probably thrue my Camebridge CXU with SACD and DVD Audio converted to PCM Stream.
for my orig. Disc's

Since Installation absolutly Stable on HDMI, realy nice!!! No Issues at all.

moode has an Problem by sure, may be Kernel relatet or what ever Reason, depends not on RPI4 and all my other Stuff i use in that Chain ;)

Robert
 

Attachments

  • PCoreplayer Settings.jpg
    PCoreplayer Settings.jpg
    239.9 KB · Views: 20
Last edited:

Dinesh V

Member
Joined
Dec 5, 2021
Messages
13
Likes
6
@mdsimon2 I am in awe at your commitment and dedication to supporting this community. This is by far the best supported project, great high quality documentation kept up to date with great expertise. Thank you so much.

I have been following this for over 2 years, when by minidsp died and was forced to redo things to drive my actively driven Earl Geddes Abbeys. Last piece fell into place a couple days back, which was the display. I would like to keep the display on twice as long, what changes do I need to make. I know you have mentioned the risk of burn in. Would it help if we drove the display less bright? Searched this thread looking for these answers did not find any.

Thanks again
Of course I can never thank @amirm enough for everything he has done for this community
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,371
Location
Detroit, MI
@Dinesh V I appreciate the kind words.

After looking at the oled python routine I realized there was some dumb stuff in there around display timeout. I made a new version (attached to this post) that I have tested a little bit but not extensively. It has a single variable named "timeout" which defines the approximate display timeout in seconds, you can change this to whatever you like (default is 10 seconds). I'll add it to the main post once I've tested a bit more.

Brightness can be adjusted by changing the variable "master_contrast_control" in the function "oled_init". This has 16 brightness levels, ranging from 0 to 15, see table below for hex values to use in defining this variable. There are other ways to adjust brightness further but this is the most straight forward.

1709776280546.png


Michael
 

Attachments

  • oled-rpi.gpio_03062024.py.zip
    11.3 KB · Views: 19
Last edited:

Alex7777

Member
Joined
Feb 8, 2024
Messages
10
Likes
1
@mdsimon2 I am in awe at your commitment and dedication to supporting this community. This is by far the best supported project, great high quality documentation kept up to date with great expertise. Thank you so much.
I totally agree! That was the reason why I decided to implement this project myself.
 

Frunse

Active Member
Joined
Feb 21, 2024
Messages
132
Likes
20
@Dinesh V I appreciate the kind words.

After looking at the oled python routine I realized there was some dumb stuff in there around display timeout. I made a new version (attached to this post) that I have tested a little bit but not extensively. It has a single variable named "timeout" which defines the approximate display timeout in seconds, you can change this to whatever you like (default is 10 seconds). I'll add it to the main post once I've tested a bit more.

Brightness can be adjusted by changing the variable "master_contrast_control" in the function "oled_init". This has 16 brightness levels, ranging from 0 to 15, see table below for hex values to use in defining this variable. There are other ways to adjust brightness further but this is the most straight forward.

View attachment 354671

Michael
May be we could use an other style of pixeldisplay instead of Oled for this, with the same Communication Protocol. I am not sure but i guess there are other Display out there, may be dont look so nice but works also Monochrome and didnt Burn in, like Character Dsiplays or VFD ???

The Motu UL has also OLED and they use an Screensaver like an Ping Pong Ball ;) for that reason

I didnt implement this Display for now, but i want it also to use.
So i will watch for an alternative Display.

Something like this i mean:

https://www.winstar.com.tw/products/graphic-lcd-display-module/240x64-lcd-display.html
It has the 8080 Protokoll :(

This has 6800 8Bit but resolution is different:
https://www.winstar.com.tw/products/graphic-lcd-display-module/lcd-202x32.html


Robert
 
Last edited:
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,371
Location
Detroit, MI
May be we could use an other style of pixeldisplay instead of Oled for this, with the same Communication Protocol. I am not sure but i guess there are other Display out there, may be dont look so nice but works also Monochrome and didnt Burn in, like Character Dsiplays or VFD ???

The Motu UL has also OLED and they use an Screensaver like an Ping Pong Ball ;) for that reason

I didnt implement this Display for now, but i want it also to use.
So i will watch for an alternative Display.

Something like this i mean:

https://www.winstar.com.tw/products/graphic-lcd-display-module/240x64-lcd-display.html
It has the 8080 Protokoll :(

This has 6800 8Bit but resolution is different:
https://www.winstar.com.tw/products/graphic-lcd-display-module/lcd-202x32.html


Robert

You are more than welcome to adopt the project to a different display. I should warn that even if the communication protocol is the same, how the display is initialized will be different and you need to be careful of displays with different pixel counts. I've even found displays which use the same controller (SSD1322) require slightly different configurations.

I've been using the OLED display for about two years now and don't notice any burn in.

My MOTU UL Mk5 does have some burn in as the ping pong ball screensaver is a relatively recent addition and before it was always on. I've been using the ping pong ball ever since they released it, and it seems to have evened out some of the burn in but there are still a few pixels that are brighter than others.

Michael
 

Dinesh V

Member
Joined
Dec 5, 2021
Messages
13
Likes
6
I made a new version (attached to this post) that I have tested a little bit
Awesome commitment as always. Thanks a lot. I apologize for not mentioning that I was on RPI5, so I am using LGPIO.
Perhaps, if the performance difference between the 2 are small, it might be time to drop support for rpigpio?
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,371
Location
Detroit, MI
Awesome commitment as always. Thanks a lot. I apologize for not mentioning that I was on RPI5, so I am using LGPIO.
Perhaps, if the performance difference between the 2 are small, it might be time to drop support for rpigpio?

See attached for lgpio.

The performance is so much worse on lgpio that I am inclined to keep offering rpigpio.

I think the ultimate solution is to switch to a C based program which will offer much better performance, but I am not a programmer and haven't touched C in about 15 years.

Michael
 

Attachments

  • oled-lgpio_03062024.py.zip
    11.3 KB · Views: 21

MCH

Major Contributor
Joined
Apr 10, 2021
Messages
2,659
Likes
2,274
See attached for lgpio.

The performance is so much worse on lgpio that I am inclined to keep offering rpigpio.

I think the ultimate solution is to switch to a C based program which will offer much better performance, but I am not a programmer and haven't touched C in about 15 years.

Michael
If someone is starting from scratch with a new display script, i would suggest to go for a spi or i2c version that would free a lot of gpios. I bet it can be done so that it is fast enough.
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,371
Location
Detroit, MI
Maybe compiling the phyton script make it slightly quicker?

I didn't even know that was an option :). I just tried it and it is the same. I've read a few places that lgpio (gpiochip) is inherently slower than rpi.gpio (sysfs), so I didn't expect much of a difference. Although it would be interesting to see if SPI on lgpio is any better.

Michael
 

melomane13

Member
Joined
Jul 24, 2023
Messages
99
Likes
70
Location
France
I have made a new display script from "near" scratch:

Display is very fast. it is a simply 6 digit led display, crude but effective, show volume, mute, config, bass & treble values, with adjustable brightness on remote. Using 0.56 inch leds, it is readable at 10 meters and it is allways on, no burning problems. i have mounted it on 2 layers of 50% grey plexyglass, 10cm x 3.5 cm and connect to rpi with usb cable ( only 4 wires are necessary) .

IMG_20240307_142322.jpg


On the script also remote control with new functions ( bass treble control, bypass tone, play stop next previous for squeezelite) and auto trigger output ( bobwire not necessary) using gpio with manual forced off with power key on remote. of course, you do some diy with relay board...

if someone is interested, I can explain.

IMG_20240307_143116.jpg
 

MCH

Major Contributor
Joined
Apr 10, 2021
Messages
2,659
Likes
2,274
I have made a new display script from "near" scratch:

Display is very fast. it is a simply 6 digit led display, crude but effective, show volume, mute, config, bass & treble values, with adjustable brightness on remote. Using 0.56 inch leds, it is readable at 10 meters and it is allways on, no burning problems. i have mounted it on 2 layers of 50% grey plexyglass, 10cm x 3.5 cm and connect to rpi with usb cable ( only 4 wires are necessary) .

View attachment 354831

On the script also remote control with new functions ( bass treble control, bypass tone, play stop next previous for squeezelite) and auto trigger output ( bobwire not necessary) using gpio with manual forced off with power key on remote. of course, you do some diy with relay board...

if someone is interested, I can explain.

View attachment 354832
Great! The concept of the plexiglass is pretty similar to mine, I use a darker one and made the screws not visible. I also hided the remote received behind and added a small led to indicate when the system is in standby.
1709831351637.png

I am sure people (me included) will be interested in your 4 wire approach, please share it!
 

melomane13

Member
Joined
Jul 24, 2023
Messages
99
Likes
70
Location
France
Great! The concept of the plexiglass is pretty similar to mine, I use a darker one and made the screws not visible. I also hided the remote received behind and added a small led to indicate when the system is in standby.
View attachment 354836
I am sure people (me included) will be interested in your 4 wire approach, please share it!
the concept of plexiglass is the same because I took it from you... :)

I think it's better to start a new thread, so as not to disturb here.
 
  • Like
Reactions: MCH

Wirrunna

Member
Joined
May 27, 2021
Messages
93
Likes
45
Location
South Coast, NSW, Australia
See attached for lgpio.

The performance is so much worse on lgpio that I am inclined to keep offering rpigpio.

I think the ultimate solution is to switch to a C based program which will offer much better performance, but I am not a programmer and haven't touched C in about 15 years.

Michael
Thank you for this Michael, I had hacked your code to keep the display alight for 30 seconds and had thought about a "screensaver" function where the "-nndb" volume would be displayed at low brightness and march around the screen, moving every 30 seconds or so until the remote was pressed again.

You keep saying that "performance is so much worse on lgpio", how does that show ? Like Danesh I run a RPi5 that is much faster than the RPi4 so maybe the performance is not as noticeable.
 
Last edited:

glc650

Active Member
Joined
Jun 30, 2021
Messages
190
Likes
68
@Dinesh V I appreciate the kind words.

After looking at the oled python routine I realized there was some dumb stuff in there around display timeout. I made a new version (attached to this post) that I have tested a little bit but not extensively. It has a single variable named "timeout" which defines the approximate display timeout in seconds, you can change this to whatever you like (default is 10 seconds). I'll add it to the main post once I've tested a bit more.

Brightness can be adjusted by changing the variable "master_contrast_control" in the function "oled_init". This has 16 brightness levels, ranging from 0 to 15, see table below for hex values to use in defining this variable. There are other ways to adjust brightness further but this is the most straight forward.

View attachment 354671

Michael
I'm testing this as well as the brightness. So far, so good.
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,371
Location
Detroit, MI
The new version is not working for me. No errors in journalctl for oled. If I replace it with the older version it works fine. I will be off for a 2 weeks and won't be able to test.

Hmm, odd, I was using it without issue. I’m also away for a few days but I’ll check it when I return, it is possible I uploaded the incorrect version.

I also made a version with libgpiod which should also work on the rpi5 but speed was the same as lgpio.

Michael
 
Top Bottom