So steps taken for this module to run MPD_OLED on a x86
Install all dependencies:
sudo apt-get update
sudo apt-get install build-essential autoconf make libtool libfftw3-dev libiniparser-dev libmpdclient-dev libi2c-dev lm-sensors libasound2-dev autoconf-archive i2c-tools dkms
Get headers to perform make (will break ATO):
wget https://github.com/volumio/x86-kernel-headers/blob/master/linux-headers-5.10.139-volumio_5.10.139-volumio-1_amd64.deb
sudo dpkg -i linux-headers-5.10.139-volumio_5.10.139-volumio-1_amd64.deb
sudo ln -s /usr/src/linux-headers-5.10.139-volumio /lib/modules/5.10.139-volumio/build
reboot
Get driver:
git clone https://github.com/gschorcht/i2c-ch341-usb.git
cd i2c-ch341-usb
make
sudo make install
Check if loaded:
dmesg | grep i2c-ch341-usb
Add volumio to group:
sudo addgroup volumio i2c
newgrp - i2c
Build and install cava:
git clone https://github.com/karlstav/cava
cd cava
./autogen.sh
./configure --disable-input-portaudio --disable-input-sndio --disable-output-ncurses --disable-input-pulse --program-prefix=mpd_oled_
make
sudo make install-strip
cd .. # leave cava directory
Build and install mpd_oled:
git clone https://github.com/antiprism/libu8g2arm.git
cd libu8g2arm
./bootstrap
mkdir build
cd build
CPPFLAGS="-W -Wall -Wno-psabi" ../configure --prefix=/usr/local
make
cd ../.. # leave libu8g2arm/build directory
git clone https://github.com/antiprism/mpd_oled_dev
cd mpd_oled_dev
./bootstrap
LIBU8G2_DIR=../libu8g2arm CPPFLAGS="-W -Wall -Wno-psabi" ./configure --prefix=/usr/local
make
sudo make install-strip
Configure MPD to copy its audio output to a named pipe
(Ignore the errors)
wget -N http://pitastic.com/mpd_oled/packages/mpd_oled_volumio_install_latest.sh
sudo bash mpd_oled_volumio_install_latest.sh
sudo mpd_oled_volumio_mpd_conf_install
Run MPD_OLED:
Check for the correct bus:
volumio@volumiox86:~$ dmesg | grep i2c-ch341-usb
[ 4125.761992] i2c-ch341-usb 1-1:1.0: ch341_i2c_probe: created i2c device /dev/i2c-14
Use correct bus number:
mpd_oled -o SSD1306,128X64,I2C,bus_number=14 -f 50
or:
/usr/local/bin/mpd_oled -o SSD1306,128X64,I2C,bus_number=$(dmesg | grep -iE "ch341_i2c_probe: created i2c device" | sed 's/^.*[/]//' | sed 's/.*-//') -f 50