Giter VIP home page Giter VIP logo

mpd_oled's Introduction

Antiprism
=========

Notes for Antiprism 0.32
------------------------

Minor release with bug fixes and small improvements. Changes by Roger
Kaufman and Adrian Rossiter. See the NEWS file for more details.

Please look out for bugs and other issues, and report them on the
Antiprism discussion group

   https://groups.google.com/g/antiprism

Adrian.

Adrian Rossiter <[email protected]>
http://antiprism.com/adrian


General
-------

Antiprism is a collection of programs for generating, manipulating,
transforming and viewing polyhedra

   http://www.antiprism.com/

This is a beta release. The programs have not had wide use
and probably contain a number of bugs. Please let me know
if you come across any bugs, or anything not working as
documented.

Antiprism is available as source code

   http://www.antiprism.com/files/antiprism-0.27.tar.gz

Ubuntu packages

   https://launchpad.net/~antiprism/+archive/ubuntu/ppa

Windows 64-bit and 32-bit installers

   http://www.antiprism.com/files/antiprism-0.27_w64_install.exe
   http://www.antiprism.com/files/antiprism-0.27_w32_install.exe

In Windows, the DOS Box started from the Antiprism Shell menu
item is configured and ready to run the Antiprism programs.

If required, the ANTIPRISM_DATA environment variable may be
set to the path of the 'data' directory in the install directory.


Building
--------

These are instructions for building from a source tarball (see
README.git for building fron the Antiprism Git Repository). They
are not needed to run the Windows executables.

Antiprism uses the Autotools build system. The programs can be
built with

   ./configure
   make

and installed with

   sudo make install-strip

See the INSTALL file for more details.

If there are errors relating to shared libraries when the
installed programs are run, it may be necessary to run

   sudo ldconfig

The Antiview viewer depends on GLUT. A GLUT package suitable for
developing against must be installed in order to build Antiview,
otherwise the build and install will not include this program.

On a Debian-based system you could install Freeglut

   sudo apt-get install freeglut3-dev

If building against a locally installed GLUT package, ensure that
the headers are in a GL subdirectory. If building against OpenGLUT
or Freeglut but using their own names for headers and libraries
(rather than the usual GLUT names) run configure with --with-openglut
or --with-freeglut. To build against FLTK with GLUT compatibility, run
configure with --with-fltkglut.

Cygwin
------
For a non-X version of Antiview (only tested on a system without
X development packages installed), first build and install Freeglut
from source, then set LDFLAGS="-L/usr/local/lib" when running the
Antiprism configure script. For an X version of Antiview, install
the X development packages and run configure with "--with-x=yes".
It should be possible to build native Windows binaries by cross-
compiling using the tools provided by Cygwin, otherwise, use the
MSYS build environment.

Mac OS X
--------
Run configure with "--with-x=no".


Git Code Repository
-------------------

The Git repository contains the latest development code

   https://github.com/antiprism/antiprism

See README.git for further details.


Note to Developers
------------------

README.git contains information for developers.

All the Antiprism source code is supplied under a permissive licence.

The aim of using permissive licensing is to promote the development of
new polyhedron software by making it convenient to reuse the Antiprism
source code in other projects.

Please, support this aim. If you incorporate Antiprism source code
into your own project and make any improvements that could reasonably
be incorporated back into the Antiprism project, like bug fixes,
optimisations or new features, then please contribute your changes
for inclusion back into Antiprism under a permissive (preferably
MIT) licence.

mpd_oled's People

Contributors

antiprism avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mpd_oled's Issues

New feature implemented: disable equaliser when paused

Hi Adrian,

I've implemented a new feature whereby you can disable the equaliser when the player is paused with the -e parameter This is useful if you're using the mic input as the audio source of the equaliser with -c alsa,hw:5,0 When the player is paused, CAVA takes the noise from the input and slowly normalises the data so that it fits the entire graph, even though there is nothing playing. I simply clear the array that holds the spectrum data when the player is paused.

Main.cpp attached:

main.cpp.txt

RaspDAC Mini with moOde 5.x install

Just wondering if there is a chance to make this working on the latest RaspDAC Mini running moOde?
Display used in this kit is an SPI OLED but not sure what make or model.
I may take it apart and check if needed

Thanks in advance

Spectrum bars doesn't work

I want to thank you for you great work with oled screen ;)
I have one problem and I don't know how to fix this. Spectrum bars doesn't work:/ I attached photo how it looks now. Can you help me?

IMG_20190923_175935

Edit: ok spectrum bars doen't work only with Volumio spotify plugin. With radio stations it works fine.
Any solution?

Is MPD_Oled compatible to Volumio snapcast plugin?

Dear Adrian, is MPD_Oled compatible to Volumio snapcast plugin for multi room solution?
Currently my Raspi pops up failure while activating the plugin and later on the volumio player has malfunction.
Thanx for your support
Benjamin

arm64

I'm trying to compile on a gentoo aarh64 (arm64) system.

but it gives me this error, does it depend on the 64bit system?

PLAYER=MPD make
c++ -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD -c -o main.o main.cpp
c++ -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD -c -o timer.o timer.cpp
c++ -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD -c -o status.o status.cpp
c++ -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD -c -o status_msg.o status_msg.cpp
c++ -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD -c -o utils.o utils.cpp
c++ -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD -c -o display.o display.cpp
c++ -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD -c -o programopts.o programopts.cpp
c++ -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD -c -o ultragetopt.o ultragetopt.cpp
c++ -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD -c -o ArduiPi_OLED.o ArduiPi_OLED.cpp
c++ -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD -c -o Adafruit_GFX.o Adafruit_GFX.cpp
cc -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD -c -o bcm2835.o bcm2835.c
bcm2835.c: In function ‘bcm2835_gpio_pad’:
bcm2835.c:487:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
487 | if (bcm2835_pads == MAP_FAILED)
| ^~
bcm2835.c:490:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
490 | volatile uint32_t* paddr = bcm2835_pads + BCM2835_PADS_GPIO_0_27/4 + group;
| ^~~~~~~~
bcm2835.c: In function ‘bcm2835_gpio_set_pad’:
bcm2835.c:500:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
500 | if (bcm2835_pads == MAP_FAILED)
| ^~
bcm2835.c:503:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
503 | volatile uint32_t* paddr = bcm2835_pads + BCM2835_PADS_GPIO_0_27/4 + group;
| ^~~~~~~~
cc -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD -c -o bcm2835_i2c.o bcm2835_i2c.c
bcm2835_i2c.c: In function ‘bcm2835_i2c_alt_write’:
bcm2835_i2c.c:89:14: warning: implicit declaration of function ‘i2c_smbus_write_byte_data’ [-Wimplicit-function-declaration]
89 | reason = i2c_smbus_write_byte_data(i2c_fd, buf[0], buf[1]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
bcm2835_i2c.c:92:14: warning: implicit declaration of function ‘i2c_smbus_write_word_data’ [-Wimplicit-function-declaration]
92 | reason = i2c_smbus_write_word_data(i2c_fd, buf[0], (buf[2] << 8) | buf[1]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
bcm2835_i2c.c:95:14: warning: implicit declaration of function ‘i2c_smbus_write_i2c_block_data’ [-Wimplicit-function-declaration]
95 | reason = i2c_smbus_write_i2c_block_data(i2c_fd, buf[0], len - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c++ -o mpd_oled main.o timer.o status.o status_msg.o utils.o display.o programopts.o ultragetopt.o ArduiPi_OLED.o Adafruit_GFX.o bcm2835.o bcm2835_i2c.o -lmpdclient -lpthread
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.3.0/../../../../aarch64-unknown-linux-gnu/bin/ld: bcm2835_i2c.o: in function bcm2835_i2c_alt_write': bcm2835_i2c.c:(.text+0x13c): undefined reference to i2c_smbus_write_i2c_block_data'
/usr/lib/gcc/aarch64-unknown-linux-gnu/9.3.0/../../../../aarch64-unknown-linux-gnu/bin/ld: bcm2835_i2c.c:(.text+0x160): undefined reference to i2c_smbus_write_word_data' /usr/lib/gcc/aarch64-unknown-linux-gnu/9.3.0/../../../../aarch64-unknown-linux-gnu/bin/ld: bcm2835_i2c.c:(.text+0x170): undefined reference to i2c_smbus_write_byte_data'
collect2: error: ld returned 1 exit status
make: *** [Makefile:30: mpd_oled] Error 1

error compiling on volumio (community build) orangepi-pc

volumio@volumio:~/mpd_oled$ PLAYER=VOLUMIO make
g++  -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DVOLUMIO  -c -o status.o status.cpp
status.cpp: In function 'std::string secs_to_time(int)':
status.cpp:400:10: error: 'abs' is not a member of 'std'
   secs = std::abs(secs);
          ^
status.cpp:400:10: note: suggested alternative:
In file included from status.cpp:41:0:
/usr/include/stdlib.h:775:12: note:   'abs'
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^
status.cpp: In member function 'std::string mpd_info::get_kbitrate_str() const':
status.cpp:432:23: error: 'abs' is not a member of 'std'
   int rate = std::min(std::abs(kbitrate), 9999);
                       ^
status.cpp:432:23: note: suggested alternative:
In file included from status.cpp:41:0:
/usr/include/stdlib.h:775:12: note:   'abs'
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^
<builtin>: recipe for target 'status.o' failed
make: *** [status.o] Error 1
volumio@volumio:~/mpd_oled$
volumio@volumio:~/mpd_oled$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.9/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.2-10+deb8u1' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.9.2 (Debian 4.9.2-10+deb8u1)

Spotify an Airplay

Hello dear developer,
man thanks for your code 👍
Have you planed to integrate Spotify and Airplay?
thanks

wynniphu

Is it possible to implement aPeak Hold

Hi,
advance thanks for the great application. My compliment !
Now my two concerns.
Is it possible to switch Spectrum analyzer in full screen mode, or to change over a little change of the source code.

Furthermore, my question is it possible to implement a peak hold.

Best Regards
Peter

OLED SSD1309 Display will not work on Volumio

Dear Adrian, I use an Raspi 4 with Volumio. All is working on the latest software. Now I found your really cool project. Unfortunately I am not so deep into Linux, but copy and paste is working well :-). I bought the following Display: 1,54 ZOLL OLED128X64 SSD1309 which should be compatible with SSD1306
https://www.ebay.de/itm/253369133648
The display will not work, after several days of work. I think I need your help.
I read all forum content in the different platforms, but without success.
I cannot use I2S because the port is already booked and running with a RTC. I checked the 1.54 SSD1309 OLED Display function with an Arduino project from my coffee machine and the display is working there when I exchanged it from its old 0.96 SSD1306 OLED from the first moment.
Ok, back to the Volumio DAC:
I activated the SPI function in the config.
I configured the display as following on the Raspi GPIO (Pin No is mentioned not GPIO No.)

OLED Pin - Raspi Pin
1: GND - 14: GND
2: VCC - 9: 3,3V
3: SCL - 23: SPI SCLK
4: SDA - 19: SPI MOSI
5: RES - 22: GPIO 25
6: DC - 18: GPIO 24
7: CS - 24: SPI CS0

I set your code to Adafruit SPI 128x64.
"sudo ./mpd_oled -o 3 -b 10 -g 1 -f 20
The Installation guide from you did work fine until the following lines:

"If you have a reset pin connected, specify the GPIO number with mpd_oled -r, e.g. mpd_oled -o6 -r 24 .... (For, SPI OLEDs, edit display.cpp to include your connection details, if this works out I will provide options for these parameters.)"

Please can you support me?
I have no clue how to configure the last needed settings.
Your manual is wonderfull for a rooky like me until the last lines. Please, can you write on the end of your manual clear commands?
Is my Pin setting on the GPIO wrong?
Where and How can I configure these settings in your code?
Did you try out the SPI display or did anyone tried this out with success?
What further data do you need for support?

Currently my display is completely blank and there is not poping up only one pixel :-)

Thank you in advance and best regards
Benjamin from Frankfurt

try to compile error

PLAYER=MOODE make
g++ -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMOODE -c -o main.o main.cpp
main.cpp:28:25: fatal error: programopts.h: Datei oder Verzeichnis nicht gefunden
#include "programopts.h"
^
compilation terminated.
: die Regel für Ziel „main.o“ scheiterte
make: *** [main.o] Fehler 1

regards Peter

Support for SSD1306 6-Pin SPI OLED Display

Hi @antiprism

thank's for your work already.

I need to tell that I some how stuck before I got things running. I made a fresh install of moode 6.5.2 to have a clean start but still my display doesn't light up. I followed your setup instructions exactly and there were no errors at all which leads me to the last possible reason: my display is not supported?

I have this type of display
image

Found this link online (my version is only single colored): https://www.rhydolabz.com/displays-c-88/096-oled-bicolor-display-spii2c-128x64-6-pin-blueyellow-p-2262.html

The thing with this display (which supported I2C and SPI) is that it is shipped as SPI (4SPI?). I have no equipment to change it to I2C and also want to profit from the higher refresh rate for SPI.

The display has only 6 pins and is missing CS pin. Otherwise I wired exactly like you describe.

I tried various display settings (most importantly -o 1 and -o 7 I guess).

Is there any hope to get this display running in "stock" setting?

clear Display on shutdown

During a reboot or shutdown the display remains on, it is possible to respond to the sigterm and display a reboot system instead of the clock, or simply reset the display

show the IP adress of the device

Hey, first of all thanks for the great work.
For a lot of use cases in a home network it would be very handy if one could read the ip adress of the device on the screen. It could be shown very small in one of the corners.

I will fork this project later and work on this. Any tipps how to implement this?

Display compatibility

Is it possible to run your program with the following display?
https://www.waveshare.com/wiki/1.5inch_OLED_Module

Another question for a possible perfection of your software. Switch over the display via an mpc trigger so that you can see the songs in the current playlist and then scroll through them to select one of them.
Like for example on the console with ncmpc

Regards Peter

Compilation failing and compiler warning and state not defined

Weird one: I'm receiving this warning whilst compiling warning: 'auto' changes meaning in C++11; please remove it [-Wc++0x-compat]

and the build fails due to the use of auto keyword for defining state in main.cpp:444

This was building fine last week :|

g++  -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DVOLUMIO  -c -o main.o main.cpp
main.cpp: In function 'void draw_display(ArduiPi_OLED&, const display_info&)':
main.cpp:444:3: warning: 'auto' changes meaning in C++11; please remove it [-Wc++0x-compat]
   auto state = disp_info.status.get_state();
   ^
main.cpp:444:8: error: 'state' does not name a type
   auto state = disp_info.status.get_state();
        ^
main.cpp:445:7: error: 'state' was not declared in this scope
   if (state == MPD_STATE_UNKNOWN || state == MPD_STATE_STOP ```

SH1106 SPI support

hi,

have tried getting mpd_oled to run with an sh1106 spi. seems like more work is required to make it work correctly. to sanity check have used luma.oled's example apps. this does work, so the wiring and other setup is correct.

have checked that the basics (RESET, DC, chip select) is correct. have also updated oled_is_spi_proto accordingly.

do you have any specific idea on what needs to update?

RPi 3B Volumio compilation problems

Hello antiprism,
I have problem with installing Cava on my Volumio.
Can you help me, please?

some months ago, it was working well, I have updated Volumio to latest 2.692 ant i have ended on the command below:

volumio@volumio:~/cava$ sudo make install
[sudo] password for volumio:
Making install in iniparser
make[1]: Entering directory '/home/volumio/cava/iniparser'
make[2]: Entering directory '/home/volumio/cava/iniparser'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/volumio/cava/iniparser'
make[1]: Leaving directory '/home/volumio/cava/iniparser'
make[1]: Entering directory '/home/volumio/cava'
/bin/bash ./libtool  --tag=CC   --mode=link gcc -std=gnu99 -std=c99 -Wall -Wextr                               a -Wno-unused-result -Wno-maybe-uninitialized  -g -O2 -L/usr/local/lib -Wl,-rpat                               h /usr/local/lib  -o cava cava-cava.o cava-config.o input/cava-common.o input/ca                               va-fifo.o output/cava-terminal_noncurses.o output/cava-raw.o input/cava-alsa.o                                     -liniparser -Liniparser/.libs -lpthread -lasound -lm -lfftw3
libtool: link: gcc -std=gnu99 -std=c99 -Wall -Wextra -Wno-unused-result -Wno-may                               be-uninitialized -g -O2 -Wl,-rpath /usr/local/lib -o cava cava-cava.o cava-confi                               g.o input/cava-common.o input/cava-fifo.o output/cava-terminal_noncurses.o outpu                               t/cava-raw.o input/cava-alsa.o  -L/usr/local/lib /home/volumio/cava/iniparser/.l                               ibs/libiniparser.a -Liniparser/.libs -lpthread -lasound -lm -lfftw3
input/cava-alsa.o: In function `initialize_audio_parameters':
/home/volumio/cava/input/alsa.c:24: undefined reference to `alloca'
collect2: error: ld returned 1 exit status
Makefile:534: recipe for target 'cava' failed
make[1]: *** [cava] Error 1
make[1]: Leaving directory '/home/volumio/cava'
Makefile:787: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1

moode_mpd_fifo.patch not found

pi@moode:~/mpd_oled $ patch -d/ -p0 -N < moode_mpd_fifo.patch
-bash: moode_mpd_fifo.patch: Datei oder Verzeichnis nicht gefunden

Could you please fix this

regads Peter

Volumio no audio after installing Cava

Using Cava to drive mpd_oled as instructed here: https://github.com/antiprism/mpd_oled/blob/master/INSTALL_VOLUMIO.md
Had two working raspi volumio environments, did fresh install to ver 2.502. Audio is lost after running make statement.
Bug report at: http://logs.volumio.org/volumio/o1cRaUm.html
This is the output when it breaks:
volumio@volumio:/cava$ make
Making all in iniparser
make[1]: Entering directory '/home/volumio/cava/iniparser'
depbase=echo src/iniparser.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||';
/bin/bash ../libtool --tag=CC --mode=compile gcc -std=gnu99 -DPACKAGE_NAME="cava" -DPACKAGE_TARNAME="cava" -DPACKAGE_VERSION="0.6.1-13-gc3d75c1" -DPACKAGE_STRING="cava\ 0.6.1-13-gc3d75c1" -DPACKAGE_BUGREPORT="[email protected]" -DPACKAGE_URL="" -DPACKAGE="cava" -DVERSION="0.6.1-13-gc3d75c1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -DHAVE_PTHREAD_H=1 -I. -DHAVE_ALLOCA_H -DALSA -g -O2 -MT src/iniparser.lo -MD -MP -MF $depbase.Tpo -c -o src/iniparser.lo src/iniparser.c &&
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: gcc -std=gnu99 -DPACKAGE_NAME="cava" -DPACKAGE_TARNAME="cava" -DPACKAGE_VERSION="0.6.1-13-gc3d75c1" "-DPACKAGE_STRING="cava 0.6.1-13-gc3d75c1"" -DPACKAGE_BUGREPORT="[email protected]" -DPACKAGE_URL="" -DPACKAGE="cava" -DVERSION="0.6.1-13-gc3d75c1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -DHAVE_PTHREAD_H=1 -I. -DHAVE_ALLOCA_H -DALSA -g -O2 -MT src/iniparser.lo -MD -MP -MF src/.deps/iniparser.Tpo -c src/iniparser.c -fPIC -DPIC -o src/.libs/iniparser.o
libtool: compile: gcc -std=gnu99 -DPACKAGE_NAME="cava" -DPACKAGE_TARNAME="cava" -DPACKAGE_VERSION="0.6.1-13-gc3d75c1" "-DPACKAGE_STRING="cava 0.6.1-13-gc3d75c1"" -DPACKAGE_BUGREPORT="[email protected]" -DPACKAGE_URL="" -DPACKAGE="cava" -DVERSION="0.6.1-13-gc3d75c1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -DHAVE_PTHREAD_H=1 -I. -DHAVE_ALLOCA_H -DALSA -g -O2 -MT src/iniparser.lo -MD -MP -MF src/.deps/iniparser.Tpo -c src/iniparser.c -o src/iniparser.o >/dev/null 2>&1
depbase=echo src/dictionary.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||';
/bin/bash ../libtool --tag=CC --mode=compile gcc -std=gnu99 -DPACKAGE_NAME="cava" -DPACKAGE_TARNAME="cava" -DPACKAGE_VERSION="0.6.1-13-gc3d75c1" -DPACKAGE_STRING="cava\ 0.6.1-13-gc3d75c1" -DPACKAGE_BUGREPORT="[email protected]" -DPACKAGE_URL="" -DPACKAGE="cava" -DVERSION="0.6.1-13-gc3d75c1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -DHAVE_PTHREAD_H=1 -I. -DHAVE_ALLOCA_H -DALSA -g -O2 -MT src/dictionary.lo -MD -MP -MF $depbase.Tpo -c -o src/dictionary.lo src/dictionary.c &&
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: gcc -std=gnu99 -DPACKAGE_NAME="cava" -DPACKAGE_TARNAME="cava" -DPACKAGE_VERSION="0.6.1-13-gc3d75c1" "-DPACKAGE_STRING="cava 0.6.1-13-gc3d75c1"" -DPACKAGE_BUGREPORT="[email protected]" -DPACKAGE_URL="" -DPACKAGE="cava" -DVERSION="0.6.1-13-gc3d75c1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -DHAVE_PTHREAD_H=1 -I. -DHAVE_ALLOCA_H -DALSA -g -O2 -MT src/dictionary.lo -MD -MP -MF src/.deps/dictionary.Tpo -c src/dictionary.c -fPIC -DPIC -o src/.libs/dictionary.o
libtool: compile: gcc -std=gnu99 -DPACKAGE_NAME="cava" -DPACKAGE_TARNAME="cava" -DPACKAGE_VERSION="0.6.1-13-gc3d75c1" "-DPACKAGE_STRING="cava 0.6.1-13-gc3d75c1"" -DPACKAGE_BUGREPORT="[email protected]" -DPACKAGE_URL="" -DPACKAGE="cava" -DVERSION="0.6.1-13-gc3d75c1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -DHAVE_PTHREAD_H=1 -I. -DHAVE_ALLOCA_H -DALSA -g -O2 -MT src/dictionary.lo -MD -MP -MF src/.deps/dictionary.Tpo -c src/dictionary.c -o src/dictionary.o >/dev/null 2>&1
/bin/bash ../libtool --tag=CC --mode=link gcc -std=gnu99 -g -O2 -version-info 4 -o libiniparser.la -rpath /usr/local/lib src/iniparser.lo src/dictionary.lo -lpthread -lasound -lm -lfftw3
libtool: link: gcc -shared -fPIC -DPIC src/.libs/iniparser.o src/.libs/dictionary.o -lpthread -lasound -lm -lfftw3 -O2 -Wl,-soname -Wl,libiniparser.so.4 -o .libs/libiniparser.so.4.0.0
libtool: link: (cd ".libs" && rm -f "libiniparser.so.4" && ln -s "libiniparser.so.4.0.0" "libiniparser.so.4")
libtool: link: (cd ".libs" && rm -f "libiniparser.so" && ln -s "libiniparser.so.4.0.0" "libiniparser.so")
libtool: link: ar cru .libs/libiniparser.a src/iniparser.o src/dictionary.o
libtool: link: ranlib .libs/libiniparser.a
libtool: link: ( cd ".libs" && rm -f "libiniparser.la" && ln -s "../libiniparser.la" "libiniparser.la" )
make[1]: Leaving directory '/home/volumio/cava/iniparser'
make[1]: Entering directory '/home/volumio/cava'
gcc -std=gnu99 -DPACKAGE_NAME="cava" -DPACKAGE_TARNAME="cava" -DPACKAGE_VERSION="0.6.1-13-gc3d75c1" -DPACKAGE_STRING="cava\ 0.6.1-13-gc3d75c1" -DPACKAGE_BUGREPORT="[email protected]" -DPACKAGE_URL="" -DPACKAGE="cava" -DVERSION="0.6.1-13-gc3d75c1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -DHAVE_PTHREAD_H=1 -I. -DPACKAGE="cava" -DVERSION="0.6.1-13-gc3d75c1" -D_POSIX_SOURCE -D _POSIX_C_SOURCE=200809L -Iiniparser/src -DHAVE_ALLOCA_H -DALSA -std=c99 -Wall -Wextra -Wno-unused-result -Wno-maybe-uninitialized -g -O2 -MT cava-cava.o -MD -MP -MF .deps/cava-cava.Tpo -c -o cava-cava.o test -f 'cava.c' || echo './'cava.c
In file included from cava.c:69:0:
config.c: In function 'load_config':
config.c:337:25: warning: initialization from incompatible pointer type
struct error_s *error = (struct error *)err;
^
mv -f .deps/cava-cava.Tpo .deps/cava-cava.Po
/bin/bash ./libtool --tag=CC --mode=link gcc -std=gnu99 -std=c99 -Wall -Wextra -Wno-unused-result -Wno-maybe-uninitialized -g -O2 -L/usr/local/lib -Wl,-rpath /usr/local/lib -o cava cava-cava.o -liniparser -Liniparser/.libs -lpthread -lasound -lm -lfftw3
libtool: link: gcc -std=gnu99 -std=c99 -Wall -Wextra -Wno-unused-result -Wno-maybe-uninitialized -g -O2 -Wl,-rpath /usr/local/lib -o .libs/cava cava-cava.o -L/usr/local/lib /home/volumio/cava/iniparser/.libs/libiniparser.so -Liniparser/.libs -lpthread -lasound -lm -lfftw3
make[1]: Leaving directory '/home/volumio/cava'
volumio@volumio:
/cava$ sudo make install
[sudo] password for volumio:
Making install in iniparser
make[1]: Entering directory '/home/volumio/cava/iniparser'
make[2]: Entering directory '/home/volumio/cava/iniparser'
/bin/mkdir -p '/usr/local/lib'
/bin/bash ../libtool --mode=install /usr/bin/install -c libiniparser.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libiniparser.so.4.0.0 /usr/local/lib/libiniparser.so.4.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libiniparser.so.4.0.0 libiniparser.so.4 || { rm -f libiniparser.so.4 && ln -s libiniparser.so.4.0.0 libiniparser.so.4; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libiniparser.so.4.0.0 libiniparser.so || { rm -f libiniparser.so && ln -s libiniparser.so.4.0.0 libiniparser.so; }; })
libtool: install: /usr/bin/install -c .libs/libiniparser.lai /usr/local/lib/libiniparser.la
libtool: install: /usr/bin/install -c .libs/libiniparser.a /usr/local/lib/libiniparser.a
libtool: install: chmod 644 /usr/local/lib/libiniparser.a
libtool: install: ranlib /usr/local/lib/libiniparser.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/local/lib

Libraries have been installed in:
/usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:

  • add LIBDIR to the `LD_LIBRARY_PATH' environment variable
    during execution
  • add LIBDIR to the `LD_RUN_PATH' environment variable
    during linking
  • use the `-Wl,-rpath -Wl,LIBDIR' linker flag
  • have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.

make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/volumio/cava/iniparser'
make[1]: Leaving directory '/home/volumio/cava/iniparser'
make[1]: Entering directory '/home/volumio/cava'
make[2]: Entering directory '/home/volumio/cava'
/bin/mkdir -p '/usr/local/bin'
/bin/bash ./libtool --mode=install /usr/bin/install -c cava '/usr/local/bin'
libtool: install: /usr/bin/install -c .libs/cava /usr/local/bin/cava
/bin/mkdir -p '/usr/share/consolefonts'
/usr/bin/install -c -m 644 cava.psf '/usr/share/consolefonts'
make[2]: Leaving directory '/home/volumio/cava'
make[1]: Leaving directory '/home/volumio/cava'

Cannot build Cava

Cava used to bundle a copy of the iniparser library, which was used when following the build instructions provided with mpd_oled.

This library is no longer bundled with Cava, and the mpd_oled instructions to build Cava will fail unless the iniparser library is installed. This was reported through #28

For now, the OS instructions are as follows

MOODE (DEBIAN BUSTER)

sudo apt-get update
sudo apt-get install libfftw3-dev libasound2-dev libiniparser-dev
git clone https://github.com/karlstav/cava
cd cava
./autogen.sh
CPPFLAGS=-I/usr/include/iniparser ./configure
make
sudo make install

VOLUMIO (DEBIAN VERSION BEFORE BUSTER)

sudo apt-get update
sudo apt-get install git-core autoconf make libtool libfftw3-dev libasound2-dev
git clone https://github.com/karlstav/cava
cd cava
git checkout -b pre_iniparser_removal 3cc2f9f
./autogen.sh
./configure
make
sudo make install

RUNEAUDIO
I cannot test, but try the following to install the current version of Cava.
Install the iniparser library package:
pacman -Sy iniparser
When configuring the Cava build, If the usual plain './configure' fails then try:
CPPFLAGS=-I/usr/include/iniparser ./configure

Alternatively, install an older version of Cava

cd ~
git clone https://github.com/karlstav/cava
cd cava
git checkout -b pre_iniparser_removal 3cc2f9f
./autogen.sh
CC=clang ./configure
make
make install

Adrian.

Not compiling on buster

Able to compile on Stretch but not Buster. Output at make stage on buster :

`pi@quattro:~/mpd_oled $ PLAYER=MPD make
g++ -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD -c -o main.o main.cpp
In file included from /usr/include/c++/8/vector:69,
from display_info.h:29,
from display.h:32,
from main.cpp:25:
/usr/include/c++/8/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const double&}; _Tp = double; _Alloc = std::allocator]':
/usr/include/c++/8/bits/vector.tcc:413:7: note: parameter passing for argument of type 'std::vector::iterator' {aka '__gnu_cxx::__normal_iterator<double*, std::vector >'} changed in GCC 7.1
vector<_Tp, _Alloc>::
^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/vector:64,
from display_info.h:29,
from display.h:32,
from main.cpp:25:
/usr/include/c++/8/bits/stl_vector.h: In constructor 'OledOpts::OledOpts()':
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<double*, std::vector >' changed in GCC 7.1
_M_realloc_insert(end(), __x);
^~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<double*, std::vector >' changed in GCC 7.1
_M_realloc_insert(end(), __x);
^~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<double*, std::vector >' changed in GCC 7.1
_M_realloc_insert(end(), __x);
^~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<double*, std::vector >' changed in GCC 7.1
_M_realloc_insert(end(), __x);
^~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_vector.h: In member function 'virtual void OledOpts::process_command_line(int, char**)':
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<double*, std::vector >' changed in GCC 7.1
_M_realloc_insert(end(), __x);
^~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<double*, std::vector >' changed in GCC 7.1
_M_realloc_insert(end(), __x);
^~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<double*, std::vector >' changed in GCC 7.1
_M_realloc_insert(end(), __x);
^~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<double*, std::vector >' changed in GCC 7.1
_M_realloc_insert(end(), __x);
^~~~~~~~~~~~~~~~~
g++ -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD -c -o timer.o timer.cpp
g++ -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD -c -o status.o status.cpp
status.cpp: In member function 'std::__cxx11::string mpd_info::get_elapsed_time() const':
status.cpp:410:36: warning: '%02d' directive output may be truncated writing between 2 and 3 bytes into a region of size between 1 and 6 [-Wformat-truncation=]
snprintf(time_str, time_str_len, "%02d:%02d:%02d", hours, mins, secs);
^~~~~~~~~~~~~~~~
status.cpp:410:36: note: directive argument in the range [-59, 59]
status.cpp:410:36: note: directive argument in the range [-59, 59]
status.cpp:410:11: note: 'snprintf' output between 9 and 16 bytes into a destination of size 9
snprintf(time_str, time_str_len, "%02d:%02d:%02d", hours, mins, secs);

status.cpp: In member function 'std::__cxx11::string mpd_info::get_total_time() const':
status.cpp:410:36: warning: '%02d' directive output may be truncated writing between 2 and 3 bytes into a region of size between 1 and 6 [-Wformat-truncation=]
snprintf(time_str, time_str_len, "%02d:%02d:%02d", hours, mins, secs);
                                 ^~~~~~~~~~~~~~~~
status.cpp:410:36: note: directive argument in the range [-59, 59]
status.cpp:410:36: note: directive argument in the range [-59, 59]
status.cpp:410:11: note: 'snprintf' output between 9 and 16 bytes into a destination of size 9
snprintf(time_str, time_str_len, "%02d:%02d:%02d", hours, mins, secs);
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
status.cpp: In member function 'std::__cxx11::string mpd_info::get_kbitrate_str() const':
status.cpp:434:26: warning: '%4d' directive output may be truncated writing between 4 and 11 bytes into a region of size 5 [-Wformat-truncation=]
snprintf(str, str_len, "%4d", rate);
                       ^~~~~
status.cpp:434:26: note: directive argument in the range [-2147483648, 9999]
status.cpp:434:11: note: 'snprintf' output between 5 and 12 bytes into a destination of size 5
snprintf(str, str_len, "%4d", rate);
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
g++  -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD  -c -o status_msg.o status_msg.cpp
g++  -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD  -c -o utils.o utils.cpp
In file included from /usr/include/c++/8/vector:69,
              from utils.h:38,
              from utils.cpp:29:
/usr/include/c++/8/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const double&}; _Tp = double; _Alloc = std::allocator<double>]':
/usr/include/c++/8/bits/vector.tcc:413:7: note: parameter passing for argument of type 'std::vector<double>::iterator' {aka '__gnu_cxx::__normal_iterator<double*, std::vector<double> >'} changed in GCC 7.1
    vector<_Tp, _Alloc>::
    ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/vector:64,
              from utils.h:38,
              from utils.cpp:29:
/usr/include/c++/8/bits/stl_vector.h: In function 'Status read_double_list(char*, std::vector<double>&, int, const char*)':
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<double*, std::vector<double> >' changed in GCC 7.1
 _M_realloc_insert(end(), __x);
 ^~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_vector.h: In function 'Status read_double_list(std::vector<char*>&, std::vector<double>&)':
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type '__gnu_cxx::__normal_iterator<double*, std::vector<double> >' changed in GCC 7.1
 _M_realloc_insert(end(), __x);
 ^~~~~~~~~~~~~~~~~
g++  -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD  -c -o display.o display.cpp
g++  -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD  -c -o programopts.o programopts.cpp
g++  -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD  -c -o ultragetopt.o ultragetopt.cpp
g++  -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD  -c -o ArduiPi_OLED.o ArduiPi_OLED.cpp
g++  -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD  -c -o Adafruit_GFX.o Adafruit_GFX.cpp
cc  -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD  -c -o bcm2835.o bcm2835.c
bcm2835.c: In function 'bcm2835_i2c_write':
bcm2835.c:877:12: warning: implicit declaration of function 'i2c_smbus_write_byte_data' [-Wimplicit-function-declaratio]
reason = i2c_smbus_write_byte_data(i2c_fd, buf[0], buf[1]);
         ^~~~~~~~~~~~~~~~~~~~~~~~~
bcm2835.c:880:12: warning: implicit declaration of function 'i2c_smbus_write_word_data' [-Wimplicit-function-declaratio]
reason = i2c_smbus_write_word_data(i2c_fd, buf[0], (buf[2]<<8) | buf[1] );
         ^~~~~~~~~~~~~~~~~~~~~~~~~
bcm2835.c:883:12: warning: implicit declaration of function 'i2c_smbus_write_i2c_block_data' [-Wimplicit-function-declaration]
reason = i2c_smbus_write_i2c_block_data(i2c_fd, buf[0], len-1, (const __u8 *) &buf[1]);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++  -o mpd_oled main.o timer.o status.o status_msg.o utils.o display.o programopts.o ultragetopt.o ArduiPi_OLED.o Adafruit_GFX.o bcm2835.o -lmpdclient -lpthread 
/usr/bin/ld: bcm2835.o: in function `bcm2835_i2c_write':
bcm2835.c:(.text+0x27d0): undefined reference to `i2c_smbus_write_i2c_block_data'
/usr/bin/ld: bcm2835.c:(.text+0x27ec): undefined reference to `i2c_smbus_write_word_data'
/usr/bin/ld: bcm2835.c:(.text+0x27fc): undefined reference to `i2c_smbus_write_byte_data'
collect2: error: ld returned 1 exit status
make: *** [Makefile:28: mpd_oled] Error 1`

Posible to use multiple displays

could this great piece of software be modified to display only selected information?

My idea is to support more displays. I would like to use

  • left dispay for left channel spectrum analyzer
  • center display for song, artist, clock and other text info
  • right display for right channel spectrum analyzer

Idea of using cheap displays is great, but those displays are so cheap, that using more of them can provide much more comfort and fanciness :-)

Sorry for placing this to "isssues", I did not found better place for feature suggestion.

SSD1322 Support

Hi!
At first, great work!!!
I want to use mpd_oled with a 256x64 SPI SSD1322 Oled.
I got the driver File with all adresses ready, but im not sure how to implement it.
In your tutorial for Volumio you have made this quote: "(For, SPI OLEDs, edit display.cc to include your connection details, if this works out I will provide options for these parameters.)"
When installed, there are 4 Files named "display", ending on: .cpp .h .o and display-info.h .
I think that i'm able to fill the adresses and parameters, but i don't know the dependencies, or in other words: i don't know in which files i've to change what....
I hope you could help me to solve this problem,
best ragards!

Elapsed song time

Thank you for excellent plug in. Easy installation, works grate on moodeaudio.
Is it possible to replace current time on main screen with elapsed song time ?
Thank you.

Moode- not compiling

Hi thanks for this nice piece of software. Unfortunately there is similar error like in runeaudio

g++ -o mpd_oled main.o timer.o status.o status_msg.o utils.o display.o programopts.o ultragetopt.o ArduiPi_OLED.o Adafruit_GFX.o bcm2835.o -lmpdclient -lpthread
/usr/bin/ld: bcm2835.o: in function bcm2835_i2c_write': bcm2835.c:(.text+0x27d0): undefined reference to i2c_smbus_write_i2c_block_data'
/usr/bin/ld: bcm2835.c:(.text+0x27ec): undefined reference to i2c_smbus_write_word_data' /usr/bin/ld: bcm2835.c:(.text+0x27fc): undefined reference to i2c_smbus_write_byte_data'
collect2: error: ld returned 1 exit status
make: *** [Makefile:28: mpd_oled] Error 1

is there any chance to compile mpd_oled correctly?

Take care!

Switch between 12hr and 24hr format

Is there a way to switch between 12hr and 24hr format? Tried changing the code in display.cpp, line 79 to
strftime(str, STR_SZ, "%l:%M:%P", now);
and reran install.sh but there where no changes. This is in Volumio.

Delay and Refresh

i'd follow all steps and working almost fime...
so.. i have a slow refresh on oled display (ssd1309) , expecially if i use GPIO2 and GPIO3
after moved to GPIO 5 and GPIO6 (overlay of i2c) run more smooth but not perfectly..
and another issue is delay of spectrum from music... it doesn't match and display delay about 2 sec.

my config is Moode audio with RP 3b+ without Dac board

MPD Info without CAVA?

Hello!

Is it possible to install the service as it is without the spectrum visualiser? On rpi 0 w the installing of mpd_oled makes the device respond laggy, and I believe is from the spectrum part.
I think the older versions were without the spectrum. I only need song info and clock screensaver when nothing is playing. It's doable?

Thank you for your support on volumio community

Best regards,
Catalin

None-English characters display

This plugin is great, I already made it works.
But seems it does not support none-English song name display, like Chinese/Japanese. Is that possible to support it?

Thanks.
Harry

Cava slow to respond

It took me quite a while to get this working but I was able to, but when I click play the graphic EQ starts up and seems to be working (sometimes I have around a 9 second delay before it starts), click pause, bars keep moving for about 12 seconds... I have tried 2 versions of volumio and both do it (latest and 2.413)

do you have any idea what might be causing this?

display line overflow

Hi again,
I just notticed that in iddle state, network icon next to IP address is overflowing - far right 1px column is rendered far left, row just below the first.

Everything else works normally, so this is just a small cosmetic glitch.
IMG_20190724_221643_HHT

Spectrum delay / error in mpd_oled.service

Successfully installed for Volumio, with the following issues

  1. I'm unable to sync the spectrum with the sound. I've changed the #buffer_time in /volumio/app/plugins/music_service/mpd/mpd.conf.tmpl significantly higher and lower, and resaved audio, and it seems to make no difference?

  2. Seems to be a missing linebreak in mpd_oled.service after [Service] which prevented the service from working, gave "Failed to execute operation: Bad message" error. Fixed with manual editing!

make error - fiel mpd/client.h missing

Hi, I try to install mpd_oled on a raspberry pi with mpd running (internet-radio).
When starting make with 'PLAYER=MPD make', I get the following error:
In file included from display_info.h:28:0,
from display.h:32,
from main.cpp:25:
status.h:28:24: fatal error: mpd/client.h: Datei oder Verzeichnis nicht gefunden
#include <mpd/client.h>
compilation terminated.

I have no idea, where to find the missing file?

Rune Audio Error

[root@RuneAudio cava]# ./autogen.sh
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
[root@RuneAudio cava]# CC=clang ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking whether make supports nested variables... no
checking for style of include used by make... none
checking for gcc... clang
checking whether the C compiler works... no
configure: error: in /root/cava': configure: error: C compiler cannot create executables See config.log' for more details
[root@RuneAudio cava]# make
make: error while loading shared libraries: libguile-2.2.so.1: cannot open shared object file: No such file or directory

Any Idea
Regards Peter

CAVA make fails

Hello,
I'm getting an error as I try to make CAVA.
I'm building this up on top of the Volumio installed on a Pi zero W.
With very little knowledge about programming, I'm at a loss how to solve this.
What should I do?

Following is the message I got.

===========================================================================
cava.c: In function 'main':
cava.c:399:36: error: 'M_PI' undeclared (first use in this function)
0.5 * (1 - cos(2 * M_PI * i / (audio.FFTbassbufferSize - 1)));
^
cava.c:399:36: note: each undeclared identifier is reported only once for each function it appears in
cava.c: At top level:
cc1: error: unrecognized command line option "-Wno-unknown-warning-option" [-Werror]
cc1: all warnings being treated as errors
Makefile:588: recipe for target 'cava-cava.o' failed
make[1]: *** [cava-cava.o] Error 1
make[1]: Leaving directory '/home/volumio/cava'
Makefile:792: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1

Runeaudio+R e4 enabling mpd_oled on boot

to get the mpd_oled to be enabled on power on in Runeaudio+R rather than putting an entry for i2c-dev in /etc/modules you need to create a file in /etc/modules-load.d. eg. i2c.conf, with the entry i2c-dev.

Which font is base for your Display

I would have the following question: which tff do you use as the basis for your excellent code. I have a script that let me IR remote control the current IP address show us sysinfos. For this I stop via a script the mpd_oled service and show 10 seconds the info. Thereafter, the mpd_oled service is restarted. That works quite well so far, but unfortunately the fonts do not match yours.
Many thanks in advance

Peter

Please repost connection diagrams

Please repost the connection diagrams or include a test file that states how to connect the wires from the display to the Pi.
Original links in guide are not working (at least not from Poland)

Thanks

screensaver option

Hello again,
I tried to implement screensaver by entering -S parameter to mpd_oled. I had a partial success, but now, I'm stuck and kindly asking for help

Basic idea was simple - if player is stopped, paused (or unknown) and -S parameter provided, mpd_oled should draw "draw_screensaver" function instead of "draw_clock".

-S parmeter should toggle "screensaver" variable to "true", which initialy set to "false"

My problem is - it does not switch it. When I compile it with "true", it works as expected, but I cannot get switching by parameter working. I think this will only need some small tweak, but this is my first try to programming and I still do not understand all syntaxes fully.

main.cpp:
main.txt

Maybe you can find this usefull too. It willl save OLED display life, and also provide darkness for sleeping if you have your player in a bedroom.

Integration to Volumio as plugin, system integrity check failed

Hello,
I am using this plugin since I my first Raspberry - 3B+ with volumio on it. I have installed display at the beginning too! I love your work.
The only problem is, I must reinstall it everytime after Volumio get update, as Volumio is checking system integrity.
Is it possible to make your plugin an official Volumio plugin to install it simply from repository?

Thank you,
Michal, Slovakia

Radio station name

Is it possible to show the web station radio name on the display.
Using a 4 pin I2C SSH1106 display.

New build on upto date pi4 creates random jitter on bar display

Firstly - I recreated a new build as old sd card was getting a bit messy and introducing audio dropout on mpd. This said the output of bars was clean and perfect.

Move forward to this week, reinstalled everything on a fresh build and getting this jitter effect. Cava seems to build cleanly, output of make on mpd_oled :

pi@quattro:~/mpd_oled $ PLAYER=MPD LDLIBS="-li2c" make
g++  -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD  -c -o main.o main.cpp
In file included from /usr/include/c++/8/vector:69,
                 from display_info.h:29,
                 from display.h:32,
                 from main.cpp:25:
/usr/include/c++/8/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const double&}; _Tp = double; _Alloc = std::allocator<double>]’:
/usr/include/c++/8/bits/vector.tcc:413:7: note: parameter passing for argument of type ‘std::vector<double>::iterator’ {aka ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’} changed in GCC 7.1
       vector<_Tp, _Alloc>::
       ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/vector:64,
                 from display_info.h:29,
                 from display.h:32,
                 from main.cpp:25:
/usr/include/c++/8/bits/stl_vector.h: In constructor ‘OledOpts::OledOpts()’:
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1
    _M_realloc_insert(end(), __x);
    ^~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1
    _M_realloc_insert(end(), __x);
    ^~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1
    _M_realloc_insert(end(), __x);
    ^~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1
    _M_realloc_insert(end(), __x);
    ^~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_vector.h: In member function ‘virtual void OledOpts::process_command_line(int, char**)’:
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1
    _M_realloc_insert(end(), __x);
    ^~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1
    _M_realloc_insert(end(), __x);
    ^~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1
    _M_realloc_insert(end(), __x);
    ^~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1
    _M_realloc_insert(end(), __x);
    ^~~~~~~~~~~~~~~~~
g++  -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD  -c -o timer.o timer.cpp
g++  -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD  -c -o status.o status.cpp
g++  -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD  -c -o status_msg.o status_msg.cpp
g++  -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD  -c -o utils.o utils.cpp
In file included from /usr/include/c++/8/vector:69,
                 from utils.h:38,
                 from utils.cpp:29:
/usr/include/c++/8/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const double&}; _Tp = double; _Alloc = std::allocator<double>]’:
/usr/include/c++/8/bits/vector.tcc:413:7: note: parameter passing for argument of type ‘std::vector<double>::iterator’ {aka ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’} changed in GCC 7.1
       vector<_Tp, _Alloc>::
       ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/vector:64,
                 from utils.h:38,
                 from utils.cpp:29:
/usr/include/c++/8/bits/stl_vector.h: In function ‘Status read_double_list(char*, std::vector<double>&, int, const char*)’:
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1
    _M_realloc_insert(end(), __x);
    ^~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_vector.h: In function ‘Status read_double_list(std::vector<char*>&, std::vector<double>&)’:
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1
    _M_realloc_insert(end(), __x);
    ^~~~~~~~~~~~~~~~~
g++  -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD  -c -o display.o display.cpp
g++  -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD  -c -o programopts.o programopts.cpp
g++  -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD  -c -o ultragetopt.o ultragetopt.cpp
g++  -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD  -c -o ArduiPi_OLED.o ArduiPi_OLED.cpp
g++  -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD  -c -o Adafruit_GFX.o Adafruit_GFX.cpp
cc  -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD  -c -o bcm2835.o bcm2835.c
bcm2835.c: In function ‘bcm2835_gpio_pad’:
bcm2835.c:487:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
   if (bcm2835_pads == MAP_FAILED)
   ^~
bcm2835.c:490:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
     volatile uint32_t* paddr = bcm2835_pads + BCM2835_PADS_GPIO_0_27/4 + group;
     ^~~~~~~~
bcm2835.c: In function ‘bcm2835_gpio_set_pad’:
bcm2835.c:500:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
   if (bcm2835_pads == MAP_FAILED)
   ^~
bcm2835.c:503:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
     volatile uint32_t* paddr = bcm2835_pads + BCM2835_PADS_GPIO_0_27/4 + group;
     ^~~~~~~~
cc  -W -Wall -Wno-unused-variable -Wno-unused-parameter -Wno-strict-aliasing -Ofast -DMPD  -c -o bcm2835_i2c.o bcm2835_i2c.c
bcm2835_i2c.c: In function ‘bcm2835_i2c_alt_write’:
bcm2835_i2c.c:89:14: warning: implicit declaration of function ‘i2c_smbus_write_byte_data’ [-Wimplicit-function-declaration]
     reason = i2c_smbus_write_byte_data(i2c_fd, buf[0], buf[1]);
              ^~~~~~~~~~~~~~~~~~~~~~~~~
bcm2835_i2c.c:92:14: warning: implicit declaration of function ‘i2c_smbus_write_word_data’ [-Wimplicit-function-declaration]
     reason = i2c_smbus_write_word_data(i2c_fd, buf[0], (buf[2] << 8) | buf[1]);
              ^~~~~~~~~~~~~~~~~~~~~~~~~
bcm2835_i2c.c:95:14: warning: implicit declaration of function ‘i2c_smbus_write_i2c_block_data’ [-Wimplicit-function-declaration]
     reason = i2c_smbus_write_i2c_block_data(i2c_fd, buf[0], len - 1,
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++  -o mpd_oled main.o timer.o status.o status_msg.o utils.o display.o programopts.o ultragetopt.o ArduiPi_OLED.o Adafruit_GFX.o bcm2835.o bcm2835_i2c.o -li2c -lmpdclient -lpthread

Don't know if the build characteristics have any bearing on this jitter, or whether something is carrying forward from cava. Any variables you need - point me in the direction to give them to you. The jitters are bars that dont represent audio but flick fully on (full amplitude) anywhere on the spectrum and generally in quiet spoken word (radio broadcast). The rest of the display is perfect. Tested on an option 6 SH1106 and option 3 Adafruit 1.3" and both the same - its not the displays and as I say - not evident on old SD card - all same hardware.

I have a video of the issue I can mail drop to you.

Display flicker and frame size issue

Firstly thank you for the nice work and the detailed installation. I have tried it on RPI Zero. The display was flickering. The upper part of the screen has some overlay of date and other data which I am not sure. Please see attached photo and video.

oled

vid.zip

Regards
Vijay

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.