Hi,
to save same time of inexperienced people as I am.
For any reason, my RPi 3 and IQaudioDAC+ is running well only with perfect runeaudio 0.4 beta (that is nowadays hidden under download latest version button for RPi3 with old description 0.3 beta).
Anyhow, I wanted to enable rotary encoder for volume control.
-Using putty to connect via SSH. User:root passw rune
- installing midnight commander for easy handling and editing files:
pacman -S mc
- getting C++ compiler:
pacman -S gcc
-following wiringPi instructions:
sudo apt-get install git-core
git clone git://git.drogon.net/wiringPi
cd wiringPi
./build
gpio -v
cd ..
-getting IQ_rot files from IQ audio git:
git clone git://www.github.com/iqaudio/tools
-the pre-compiled file is not working due to wrong card name. After couple of tries I found that working card name is hw:1.
So modifying file IQ_rot.c
removing lines 40 and 41 with define of TRUE and FALSE as they were defined already in wiringPI and changing
line 6 from
const char *card = "default";
to
const char *card = "hw:1";
Compiling using command:
gcc IQ_rot.c -oIQ_rot -lwiringPi -lasound
Then running
sudo ./IQ_rot &
enabled the rotary encoder, finally .
Anyhow, to keep it running after every reboot, I created file /etc/systemd/system/IQ_rot.service with content:
[Unit]
Description=IQ rotary encoder
[Service]
ExecStart=/root/tools/IQ_rot &
[Install]
WantedBy=multi-user.target
and enabled the service by command:
systemctl enable IQ_rot.service
So finally Rotary encoder working well , even after reboots.
dm72sk.