Driver for Audiophonics ESS9038Q2M

General discussion about RuneAudio. Do not post any support or feature requests here.

Driver for Audiophonics ESS9038Q2M

Postby Nocolo » 25 Apr 2019, 20:33

Hello. I am new to this forum and I use Runeaudio for several months now. I tasted it and I can not live without it! I have a first Raspberry pi 3B+ with Hifiberry-dac+, but I recently discovered audiophonics products that provide superior audio quality. I just bought a small system (Raspdac Mini) sold by audiophonics based on an audio card with ESS-9038Q2M component. This system is sold with Volumio or Moode, which did not suit me. So I installed Runeaudio on this product (version 0.5 beta) and I developed a Python software to manage the OLED screen that came with this product. Everything works fine but I have a question: the driver proposed by Runeaudio for the ESS-9038Q2M is actually the "rpi-dac" driver which does not offer (among others) the ability to control the volume by hardware. However, a driver for the 9038Q2M-based audiophonics card has recently been integrated into the Raspberry Linux kernel (V 4.19.34). I was wondering if it was possible to substitute this driver for the rpi-dac. And if it is possible, how should it proceed?
Thanks again to the team that continues to develop Runeaudio for our pleasure. Bravo!
Nocolo
 
Posts: 12
Joined: 25 Apr 2019, 19:51

Re: Driver for Audiophonics ESS9038Q2M

Postby janui » 28 Apr 2019, 10:52

Hi Nocolo,
You need to update the kernel to get the new ESS-9038Q2M device tree overlay and drivers. This is not easy because of the standard package interdependencies and the custom packages currently used in RuneAudio, I would not advise this route.
The other option it to try to build the driver with the existing Linux kernel. See here: https://github.com/search?l=C&q=9038&type=Repositories The drivers must be built for a specific kernel version, it is not possible to use a version which has been pre-built for another kernel.
If you get it to build and can use it, it will still needs some tweaks in the RuneAudio UI to enable the hardware volume control. Please get back to us if you need assistance.
We currently have a version of Rune working with these drivers, but we are still testing and it will be a while before we this version is released. At the moment the "rpi-dac" driver seems to be the best alternative for sound quality, but as you say it has no hardware volume support. The ‘Generic PMC510x’ driver will also work, again without hardware volume support.
janui
User avatar
janui
 
Posts: 674
Joined: 20 Dec 2014, 12:55
Location: Ollanda

Re: Driver for Audiophonics ESS9038Q2M

Postby Nocolo » 01 May 2019, 23:14

Hi Janui,
Thank you for your answer. I tried to update the kernel and as you explained Runeaudio did not work anymore. So I tried the route you recommend. For me who do not know Arch Linux, this road is more like climbing Everest! After a few hours searching the internet, I feel like I'm still at base camp ... I understand that the prerequisites before compiling the driver are to load the packages "device tree compiler" and "linux- headers". I think it is not necessary to load the package" base-devel" because the compiler "gcc" is already included in Runeaudio v0.5beta release.
I load and synchronise the Device Tree Compiler with success :
Code: Select all
pacman -Sy dtc

But when I try to load the Linux Headers,
Code: Select all
pacman -Sy linux-headers

it leads to this message :
Code: Select all
:: linux-armv7-headers and linux-raspberrypi-dsd-headers are in conflict (linux-headers). Remove linux-raspberrypi-dsd-headers? [y/N]

I answered "N" to not crash my configuration.
Would there be a mountain guide to help me to cross the icefall ?
Thanks
Nocolo
Nocolo
 
Posts: 12
Joined: 25 Apr 2019, 19:51

Re: Driver for Audiophonics ESS9038Q2M

Postby Nocolo » 01 May 2019, 23:18

I also tried :
Code: Select all
pacman -Sy linux-raspberrypi-headers

which leads to the same message...
Nocolo
 
Posts: 12
Joined: 25 Apr 2019, 19:51

Re: Driver for Audiophonics ESS9038Q2M

Postby janui » 02 May 2019, 17:00

Hi Nocolo,
You should be able to install it without upgrading any packages with pacman. Specifically the linux-raspberrypi-headers package should only be upgraded when upgrading the kernel.
I understand the feeling of "climbing Everest!"...
janui
User avatar
janui
 
Posts: 674
Joined: 20 Dec 2014, 12:55
Location: Ollanda

Re: Driver for Audiophonics ESS9038Q2M

Postby Nocolo » 02 May 2019, 20:51

Hi Janui,
Your answer plunges me into skepticism and I am a little lost. I just need some tips to put me on the right track. It would be great if you could help me.
1) I understand that it is necessary to compile the driver with the same kernel version as Runeaudio v0.5 beta (Linux kernel V4.14.34-1-ARCH). OK it's a first clue to put me on the right track.
2) I intend to compile the driver on the raspberry installed with Runeaudio v0.5 beta. Is it possible and is it the right way?
3) I also thought about compiling the driver on a more powerful machine with VirtualBox and ARCH LINUX kernel version 4.14.34-1-ARCH. The problem is that I did not find an iso image of such a version. Again, is it a good idea? or is it better to explore route n°2? And if it is a good idea, how to get this Arch linux kernel version ?
4) I understand from your last message that route n°2 is possible without the need to load packages with pacman. But I do not have the sources (/lib/modules/4.14.34-1-ARCH) nor the DTC directory (/lib/modules/4.14.34-1-ARCH/build/scripts/dtc) that seem to be needed to compile the driver. This is where I am a little lost.
If you have any advice to give me, I will thank you very much.
And I'm really sorry if I'm wasting your time.
Thanks !
Nocolo
Nocolo
 
Posts: 12
Joined: 25 Apr 2019, 19:51

Re: Driver for Audiophonics ESS9038Q2M

Postby Nocolo » 02 May 2019, 20:55

correction :
I don't have the source (/lib/modules/4.14.34-1-ARCH/source)
Nocolo
 
Posts: 12
Joined: 25 Apr 2019, 19:51

Re: Driver for Audiophonics ESS9038Q2M

Postby janui » 03 May 2019, 09:09

Hi Nocolo,
Nocolo wrote:I don't have the source (/lib/modules/4.14.34-1-ARCH/source)
You can use this link to download the Linux source for 4.14.34:
Code: Select all
https://github.com/raspberrypi/linux/archive/f70eae405b5d75f7c41ea300b9f790656f99a203.tar.gz
You should not need to use it all, a selection should be enough.
Nocolo wrote:I intend to compile the driver on the raspberry installed with Runeaudio v0.5 beta. Is it possible and is it the right way?
I would do it this way.
janui
User avatar
janui
 
Posts: 674
Joined: 20 Dec 2014, 12:55
Location: Ollanda

Re: Driver for Audiophonics ESS9038Q2M

Postby Nocolo » 06 May 2019, 01:18

Hello,
I am still struggling to compile the Audiophonics ESS9038Q2M driver on a Raspberry Pi 3B + with Runeaudio 0.5beta.
With Janui's advice, I did the following:
A) Copy source files of ARCH Linux ARM kernel version 4.14.34-1-ARCH, following this procedure :
Code: Select all
# cd /usr/lib/modules/4.14.34-1-ARCH/
# wget https://gitbub.com/raspberrypi/linux/archive/f70eae405b5d75f7c41ea300b9f790656f99a203.tar.gz
# mv linux-f70eae405b5d75f7c41ea300b9f790656f99a203 source
# cd source
# make clean
# make mrproper

B) Copy the driver source files (https://github.com/audiophonics/I-Sabre_9038Q2M) to /root/I-Sabre_9038Q2M-master/
This directory contains the followings files :
  1. INSTALL.md -> installation manual
  2. README.md
  3. Makefile
  4. i-sabre-codec.h -> driver "include" file
  5. i-sabre-codec.c -> driver source file
  6. i-sabre-q2m.c -> ASoC driver source file
  7. i-sabre-q2m-overlay.dts -> overlay source file for Device Tree Compiler (DTC)
C) Internet search and driver installation manual (for Raspbian distribution) lead me to think that I need the following prerequisites to compile the driver :
-> linux headers
-> base-devel package ? (perhaps not necessary because gcc is available with Runeaudio 0.5beta image)
-> dtc (device tree compiler)
-> bc (basic calculator)
But I understand from Janui that these prerequisites may be not necessary.
D) So I try to run a "make" which leads to the following warning and error :
Code: Select all
root@runeaudio(rw):~/I-Sabre_9038Q2M-master# make
make -C /lib/modules/4.14.34-1-ARCH/source SUBDIRS=/root/I-Sabre_9038Q2M-master KBUILD_VERBOSE=0 modules
make[1]: Entering directory '/usr/lib/modules/4.14.34-1-ARCH/source'

  WARNING: Symbol version dump ./Module.symvers
           is missing; modules will have no dependencies and modversions.

  CC [M]  /root/I-Sabre_9038Q2M-master/i-sabre-codec.o
In file included from ./include/linux/ktime.h:25:0,
                 from ./include/linux/timer.h:6,
                 from ./include/linux/workqueue.h:9,
                 from ./include/linux/srcu.h:34,
                 from ./include/linux/notifier.h:16,
                 from ./include/linux/memory_hotplug.h:7,
                 from ./include/linux/mmzone.h:781,
                 from ./include/linux/gfp.h:6,
                 from ./include/linux/umh.h:4,
                 from ./include/linux/kmod.h:22,
                 from ./include/linux/module.h:13,
                 from /root/I-Sabre_9038Q2M-master/i-sabre-codec.c:22:
./include/linux/jiffies.h:12:10: fatal error: generated/timeconst.h: No such file or directory
 #include <generated/timeconst.h>
          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:335: /root/I-Sabre_9038Q2M-master/i-sabre-codec.o] Error 1
make[1]: *** [Makefile:1528: _module_/root/I-Sabre_9038Q2M-master] Error 2
make[1]: Leaving directory '/usr/lib/modules/4.14.34-1-ARCH/source'
make: *** [Makefile:11: all] Error 2

E) I tried many operations following tutorial from several web-sites. But the main issues are that Arch Linux tutorials suppose an updated kernel version and other tutorials are made for Raspbian distribution. So I need advice to give me the important steps to follow. I do not need the details (I will make the effort to search) but I need at least the structuring steps to go in the right direction.

If anyone could help me, I would appreciate it very much.

Thanks

Nocolo
Nocolo
 
Posts: 12
Joined: 25 Apr 2019, 19:51

Re: Driver for Audiophonics ESS9038Q2M

Postby Nocolo » 06 May 2019, 01:23

Correction for A) procedure :
Code: Select all
# cd /usr/lib/modules/4.14.34-1-ARCH/
# wget https://gitbub.com/raspberrypi/linux/archive/f70eae405b5d75f7c41ea300b9f790656f99a203.tar.gz
# tar –zxvf f70eae405b5d75f7c41ea300b9f790656f99a203.tar.gz
# mv linux-f70eae405b5d75f7c41ea300b9f790656f99a203 source
# cd source
# make clean
# make mrproper
Nocolo
 
Posts: 12
Joined: 25 Apr 2019, 19:51

support RuneAudio Donate with PayPal

Next

Return to General discussion

Who is online

Users browsing this forum: No registered users and 1 guest