Installing drivers on ultra++ on Arch linux [resolved]

Hello hello
I m setting up the ultra++ with my pi zero streaming software.
When I try to install I get some errors (see below)
Do you think this is because I’m running Arch?
In that case, is there a workaround?
Thank you!
Grant

WM8960-Audio-HAT]$ sudo ./install.sh
./install.sh: line 21: apt: command not found
./install.sh: line 22: apt-get: command not found
./install.sh: line 23: apt-get: command not found
./install.sh: line 39: dkms: command not found
./install.sh: line 44: dkms: command not found
./install.sh: line 45: dkms: command not found
mkdir: cannot create directory ‘/etc/wm8960-soundcard’: File exists
Job for wm8960-soundcard.service failed because the control process exited with error code.
See “systemctl status wm8960-soundcard.service” and “journalctl -xe” for details.

Please reboot your raspberry pi to apply all settings
Enjoy!

I see this is a bit tricky. It looks like dkms needs to be installed… and some other things… I ll try some experiments and update shortly - thx

I found this thread:

Hi jca,

jca wrote:Is any way to use this damn soundcard ?
Again I don’t know if this will work, but you can give it a try.
Run this:
Code: Select all
pacman -Sy dkms git libasound2-pluginspacman -Sy autoconf automake clang make libtool fftw alsa-lib llvm-libs glibc gcc i2c-tools
Then comment out the lines 21, 22 and 23 from install.sh, it should look like this:
Code: Select all
...# apt update# apt-get -y install raspberrypi-kernel-headers raspberrypi-kernel # apt-get -y install dkms git i2c-tools libasound2-plugins...
Then run install.sh again.
janui

This addresses my issue.
I tried that but didn’t quite get there.
I got this:

cd WM8960-Audio-HAT
[locusonus@streambox WM8960-Audio-HAT]$ sudo ./install.sh
[sudo] password for locusonus:
Error! The module/version combo: wm8960-soundcard-1.0
is not located in the DKMS tree.

Creating symlink /var/lib/dkms/wm8960-soundcard/1.0/source →
/usr/src/wm8960-soundcard-1.0

DKMS: add completed.
Error! echo
Your kernel headers for kernel 5.10.17-2-ARCH cannot be found at
/usr/lib/modules/5.10.17-2-ARCH/build or /usr/lib/modules/5.10.17-2-ARCH/source.
You can use the --kernelsourcedir option to tell DKMS where it’s located.
mkdir: cannot create directory ‘/etc/wm8960-soundcard’: File exists
Job for wm8960-soundcard.service failed because the control process exited with error code.
See “systemctl status wm8960-soundcard.service” and “journalctl -xe” for details.

Please reboot your raspberry pi to apply all settings
Enjoy!

I there are suggestions about what I should try, that would be very helpful
Thanks
Grant

It seems from here:
https://aur.archlinux.org/packages/seeed-voicecard-4mic-dkms-git/
that the WM8960 is now supported in the main distros for the Pi4
It would be great to confirm if this is the case and / or if it applies to the Pi Zero

Hi Grant,
-Everything that works on the RPI4 is also working on the Zero
-Never tried Arch with the ULTRA++
but the source you are mentionning is saying it recently supported:

robertfoster commented on 2021-01-22 23:38

seeed-voicecard with 2mic (based on WM8960 sound codec) is now officially supported upstream with this commit

overlays: add wm8960-soundcard overlay · raspberrypi/linux@1f085de · GitHub.

On Arch Linux ARM is officially supported since this commit

core/linux-raspberrypi4 to 5.4.83-7 · archlinuxarm/PKGBUILDs@585dc76 · GitHub

You have to insert this entry in /boot/config.txt:

dtoverlay=wm8960-soundcard

and snd-soc-wm8960 will be loaded by udev

You will find other info in /boot/overlays/README

A workaround is to do not install the drivers of the WM8960 and just send the I2C initilization commands when you boot the system, this is what we are doing for Volumio, this will also be applicable to Arch:

thx

Hi
Thanks
It seems the drivers are indeed installed now with an update.
Good news for sure.
So I am thinking driver installation is no longer necessary for many users…

My ongoing issue is to enable plug in power on the mic input.
This is my main interest in the card, and I have silence in both channels (with interference in the L).
Any advice on enabling macbias would be a big help
Thanks
Grant

great to read that the support for Arch is working :sunglasses:

For the bias this is another thread I’m working on see here :

ok nice - thanks a lot - i ll listen out - g

I followed robertfoster’s comment on AUR (en) - seeed-voicecard-dkms-git as mentioned by Grant above added the dtoverlay in the config.txt on an Arch linux. Sounds like the system recognized the sound card as aplay listed it below.

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: vc4hdmi [vc4-hdmi], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: wm8960soundcard [wm8960-soundcard], device 0: 3f203000.i2s-wm8960-hifi wm8960-hifi-0 [3f203000.i2s-wm8960-hifi wm8960-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0

I got following message when I tried to use aplay to open a wav file. I didn’t hear anything from the speaker although I didn’t try a headphone. I think it’s an error.

$ aplay -D hw:1,0 test.wav
Playing WAVE ‘test.wav’ : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
aplay: set_params:1456: Unable to install hw params:
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (125011 125012)
PERIOD_SIZE: 5513
PERIOD_BYTES: 22052
PERIODS: 4
BUFFER_TIME: (500045 500046)
BUFFER_SIZE: 22052
BUFFER_BYTES: 88208
TICK_TIME: 0

Here is the Arch Linux information. Anyone has any idea please help?

$ uname -srm
Linux 6.6.45-8-rpi armv7l