Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Error with Kernel 5.10.11-v7+ (armv7l) on PI4 #287

Closed
MaBauMeBad opened this issue Feb 7, 2021 · 20 comments
Closed

Build Error with Kernel 5.10.11-v7+ (armv7l) on PI4 #287

MaBauMeBad opened this issue Feb 7, 2021 · 20 comments

Comments

@MaBauMeBad
Copy link

MaBauMeBad commented Feb 7, 2021

root@raspberrypi:/home/pi/seeed-voicecard# ./install.sh

will compile with the latest kernel...

Install required tool packages

Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:3 http://packages.microsoft.com/repos/code stable InRelease
Hit:4 https://download.docker.com/linux/raspbian buster InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree
Reading state information... Done
dkms is already the newest version (2.6.1-4).
git is already the newest version (1:2.20.1-2+deb10u3).
i2c-tools is already the newest version (4.1-1).
libasound2-plugins is already the newest version (1.1.8-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Uninstall previous dkms module


Deleting module version: 0.3
completely from the DKMS tree.

Done.

Install required kernel package

Reading package lists... Done
Building dependency tree
Reading state information... Done
raspberrypi-kernel is already the newest version (1.20210201-1).
raspberrypi-kernel-headers is already the newest version (1.20210201-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
W: --force-yes is deprecated, use one of the options starting with --allow instead.

Install sound card driver

Creating symlink /var/lib/dkms/seeed-voicecard/0.3/source ->
/usr/src/seeed-voicecard-0.3

DKMS: add completed.

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.10.11-v7+ -C /lib/modules/5.10.11-v7+/build M=/var/lib/dkms/seeed-voicecard/0.3/build.....(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.10.11-v7+ (armv7l)
Consult /var/lib/dkms/seeed-voicecard/0.3/build/make.log for more information.
Can't compile with this kernel, aborting
Please try to compile with the option --compat-kernel

make.log
DKMS make.log for seeed-voicecard-0.3 for kernel 5.10.11-v7+ (armv7l) Sun 7 Feb 16:01:37 GMT 2021 make: Entering directory '/usr/src/linux-headers-5.10.11-v7+' CC [M] /var/lib/dkms/seeed-voicecard/0.3/build/wm8960.o CC [M] /var/lib/dkms/seeed-voicecard/0.3/build/ac108.o CC [M] /var/lib/dkms/seeed-voicecard/0.3/build/ac101.o CC [M] /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.o /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c: In function ‘seeed_voice_card_startup’: /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:99:9: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’ if (rtd->cpu_dai->driver->playback.channels_min) { ^~ /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:100:40: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’ priv->channels_playback_default = rtd->cpu_dai->driver->playback.channels_min; ^~ /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:102:9: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’ if (rtd->cpu_dai->driver->capture.channels_min) { ^~ /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:103:39: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’ priv->channels_capture_default = rtd->cpu_dai->driver->capture.channels_min; ^~ /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:105:5: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’ rtd->cpu_dai->driver->playback.channels_min = priv->channels_playback_override; ^~ /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:106:5: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’ rtd->cpu_dai->driver->playback.channels_max = priv->channels_playback_override; ^~ /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:107:5: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’ rtd->cpu_dai->driver->capture.channels_min = priv->channels_capture_override; ^~ /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:108:5: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’ rtd->cpu_dai->driver->capture.channels_max = priv->channels_capture_override; ^~ /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c: In function ‘seeed_voice_card_shutdown’: /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:120:5: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’ rtd->cpu_dai->driver->playback.channels_min = priv->channels_playback_default; ^~ /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:121:5: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’ rtd->cpu_dai->driver->playback.channels_max = priv->channels_playback_default; ^~ /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:122:5: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’ rtd->cpu_dai->driver->capture.channels_min = priv->channels_capture_default; ^~ /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:123:5: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’ rtd->cpu_dai->driver->capture.channels_max = priv->channels_capture_default; ^~ /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c: In function ‘seeed_voice_card_hw_params’: /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:134:37: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘codec_dai’ struct snd_soc_dai *codec_dai = rtd->codec_dai; ^~ /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:135:35: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; ^~ /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c: In function ‘seeed_voice_card_trigger’: /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:199:31: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘codec_dai’ struct snd_soc_dai *dai = rtd->codec_dai; ^~ In file included from ./include/linux/device.h:15, from /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:19: /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:208:8: error: ‘struct snd_soc_dai’ has no member named ‘playback_active’; did you mean ‘playback_widget’? dai->playback_active, dai->capture_active); ^~~~~~~~~~~~~~~ ./include/linux/dev_printk.h:131:47: note: in definition of macro ‘dev_dbg’ dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \ ^~~~~~~~~~~ /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:208:30: error: ‘struct snd_soc_dai’ has no member named ‘capture_active’; did you mean ‘stream_active’? dai->playback_active, dai->capture_active); ^~~~~~~~~~~~~~ ./include/linux/dev_printk.h:131:47: note: in definition of macro ‘dev_dbg’ dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \ ^~~~~~~~~~~ /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:230:12: error: ‘struct snd_soc_dai’ has no member named ‘capture_active’; did you mean ‘stream_active’? if (dai->capture_active && substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { ^~~~~~~~~~~~~~ stream_active /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c: In function ‘seeed_voice_card_dai_init’: /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:340:33: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘codec_dai’ struct snd_soc_dai *codec = rtd->codec_dai; ^~ /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.c:341:31: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘cpu_dai’ struct snd_soc_dai *cpu = rtd->cpu_dai; ^~ In file included from ./include/linux/device.h:15, from ./include/linux/acpi.h:15, from ./include/linux/i2c.h:13, from /var/lib/dkms/seeed-voicecard/0.3/build/ac108.c:21: /var/lib/dkms/seeed-voicecard/0.3/build/ac108.c: In function ‘ac108_hw_params’: /var/lib/dkms/seeed-voicecard/0.3/build/ac108.c:656:9: error: ‘struct snd_soc_dai’ has no member named ‘playback_active’; did you mean ‘playback_widget’? dai->playback_active, dai->capture_active); ^~~~~~~~~~~~~~~ ./include/linux/dev_printk.h:131:47: note: in definition of macro ‘dev_dbg’ dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \ ^~~~~~~~~~~ /var/lib/dkms/seeed-voicecard/0.3/build/ac108.c:656:31: error: ‘struct snd_soc_dai’ has no member named ‘capture_active’; did you mean ‘stream_active’? dai->playback_active, dai->capture_active); ^~~~~~~~~~~~~~ ./include/linux/dev_printk.h:131:47: note: in definition of macro ‘dev_dbg’ dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \ ^~~~~~~~~~~ /var/lib/dkms/seeed-voicecard/0.3/build/ac108.c:667:61: error: ‘struct snd_soc_dai’ has no member named ‘playback_active’; did you mean ‘playback_widget’? if ((substream->stream == SNDRV_PCM_STREAM_CAPTURE && dai->playback_active) ^~~~~~~~~~~~~~~ playback_widget /var/lib/dkms/seeed-voicecard/0.3/build/ac108.c:668:62: error: ‘struct snd_soc_dai’ has no member named ‘capture_active’; did you mean ‘stream_active’? || (substream->stream == SNDRV_PCM_STREAM_PLAYBACK && dai->capture_active)) { ^~~~~~~~~~~~~~ stream_active /var/lib/dkms/seeed-voicecard/0.3/build/ac108.c: At top level: /var/lib/dkms/seeed-voicecard/0.3/build/ac108.c:1148:3: error: ‘const struct snd_soc_dai_ops’ has no member named ‘digital_mute’ .digital_mute = ac108_aif_mute, ^~~~~~~~~~~~ /var/lib/dkms/seeed-voicecard/0.3/build/ac108.c:1148:18: error: initialization of ‘int (*)(struct snd_pcm_substream *, int, struct snd_soc_dai *)’ from incompatible pointer type ‘int (*)(struct snd_soc_dai *, int)’ [-Werror=incompatible-pointer-types] .digital_mute = ac108_aif_mute, ^~~~~~~~~~~~~~ /var/lib/dkms/seeed-voicecard/0.3/build/ac108.c:1148:18: note: (near initialization for ‘ac108_dai_ops.bespoke_trigger’) /var/lib/dkms/seeed-voicecard/0.3/build/ac101.c: In function ‘ac101_aif_shutdown’: /var/lib/dkms/seeed-voicecard/0.3/build/ac101.c:963:16: error: ‘struct snd_soc_dai’ has no member named ‘active’ if (!codec_dai->active) { ^~ /var/lib/dkms/seeed-voicecard/0.3/build/ac101.c: In function ‘ac101_hw_params’: /var/lib/dkms/seeed-voicecard/0.3/build/ac101.c:1085:19: error: ‘struct snd_soc_dai’ has no member named ‘capture_active’; did you mean ‘stream_active’? if (codec_dai->capture_active && dmic_used && codec_aif1_fs[i].samp_rate == 44100) { ^~~~~~~~~~~~~~ stream_active In file included from /var/lib/dkms/seeed-voicecard/0.3/build/wm8960.c:28: /var/lib/dkms/seeed-voicecard/0.3/build/wm8960.c: In function ‘wm8960_configure_clocking’: /var/lib/dkms/seeed-voicecard/0.3/build/sound-compatible-4.18.h:34:36: error: implicit declaration of function ‘snd_soc_component_read32’; did you mean ‘snd_soc_component_read’? [-Werror=implicit-function-declaration] #define snd_soc_read snd_soc_component_read32 ^~~~~~~~~~~~~~~~~~~~~~~~ /var/lib/dkms/seeed-voicecard/0.3/build/wm8960.c:619:15: note: in expansion of macro ‘snd_soc_read’ u16 iface1 = snd_soc_read(codec, WM8960_IFACE1); ^~~~~~~~~~~~ cc1: some warnings being treated as errors /var/lib/dkms/seeed-voicecard/0.3/build/wm8960.c: At top level: /var/lib/dkms/seeed-voicecard/0.3/build/wm8960.c:1239:3: error: ‘const struct snd_soc_dai_ops’ has no member named ‘digital_mute’ .digital_mute = wm8960_mute, ^~~~~~~~~~~~ /var/lib/dkms/seeed-voicecard/0.3/build/wm8960.c:1239:18: error: initialization of ‘int (*)(struct snd_pcm_substream *, struct snd_soc_dai *)’ from incompatible pointer type ‘int (*)(struct snd_soc_dai *, int)’ [-Werror=incompatible-pointer-types] .digital_mute = wm8960_mute, ^~~~~~~~~~~ /var/lib/dkms/seeed-voicecard/0.3/build/wm8960.c:1239:18: note: (near initialization for ‘wm8960_dai_ops.prepare’) cc1: some warnings being treated as errors make[1]: *** [scripts/Makefile.build:279: /var/lib/dkms/seeed-voicecard/0.3/build/wm8960.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [scripts/Makefile.build:279: /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.o] Error 1 make[1]: *** [scripts/Makefile.build:279: /var/lib/dkms/seeed-voicecard/0.3/build/ac101.o] Error 1 make[1]: *** [scripts/Makefile.build:279: /var/lib/dkms/seeed-voicecard/0.3/build/ac108.o] Error 1 make: *** [Makefile:1808: /var/lib/dkms/seeed-voicecard/0.3/build] Error 2 make: Leaving directory '/usr/src/linux-headers-5.10.11-v7+'

System got just new Updates. Did also a fresh clone of the repo - still failing

@HinTak
Copy link
Contributor

HinTak commented Feb 7, 2021

See the other issue #285 about v5.10 support . Basically you need my repo. Click donate if you feel generous.

@uselessgames
Copy link

uselessgames commented Feb 12, 2021

I was having the same issue and running the install with --compat-kernel fixed it all. Though I noticed this downgrades the kernel and likely will break again if the system is upgraded

@HinTak
Copy link
Contributor

HinTak commented Feb 12, 2021

--compat-kernel is dependent on what /when you downloaded your pi image, and should be now broken for most cases. Count yourself lucky if it works for you, for now.

@MaBauMeBad
Copy link
Author

Hi,

Thanks will try #285 . Maybe tomorrow, will see if i got the time

@janiluuk
Copy link

So the official company does not seem to care much about their products working on new kernels?

@Napsty
Copy link

Napsty commented Jun 15, 2021

Can confirm, this isn't working anymore. Brand new Raspberry Pi Zero with Raspbian GNU/Linux 10 (buster) (Kernel 5.10.17+).

Building module:
cleaning build area.....
make -j1 KERNELRELEASE=5.10.17+ -C /lib/modules/5.10.17+/build M=/var/lib/dkms/seeed-voicecard/0.3/build...............(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.10.17+ (armv6l)
Consult /var/lib/dkms/seeed-voicecard/0.3/build/make.log for more information.
Can't compile with this kernel, aborting
Please try to compile with the option --compat-kernel

@HinTak
Copy link
Contributor

HinTak commented Jun 15, 2021 via email

@HinTak
Copy link
Contributor

HinTak commented Jun 15, 2021

@Napsty Btw, since you mentioned pi zero, be aware that there is a power supply issue using the pi zero w with some respeaker devices: #292

@ericfont
Copy link

I've got the same issue on RPi4 building on patchbox 5.10.17-v7l+ armv7l

I will try HinTak's repo.

@Napsty
Copy link

Napsty commented Jun 16, 2021

It works with @HinTak 's repo. Thanks for this.
At ReSpeaker: You should really act on this, people are buying your hardware and expecting it to work on current Raspberry Pi's.

@uselessgames
Copy link

The company i work for is in contact with the engineers at Seeed as we are going to be purchasing a large amount of their microphones. With the condition that they fix the kernel issue.

From what I know they stated to use HinTak's repo, as the official code to use (also reference seeed wiki). The question remains why hasnt seeed officially merged the code.

It seems to me that HinTak wants to be compensated (based on all the responses asking for donations). @HinTak care to weigh in on this? why haven't you created a PR to merge your fix for current kernels? Having it from the source would cure everyone's problems.

@Napsty
Copy link

Napsty commented Jun 16, 2021

It seems to me that HinTak wants to be compensated

If he's not related or involved in Seeed, then I understand this fully. Why do all the work a company is supposed to do and not get compensated? I totally get it.

But yes, a PR would make most sense.

@HinTak
Copy link
Contributor

HinTak commented Jun 16, 2021

@Napsty @uselessgames I wrote the 5.10 update (in fact I did the 4.19->5.4 change too, which have indeed been merged) and spent about 2 weeks solid on it; I don't work for Seeed Studio, just another regular user. The code is there for others to use. It is not my responsibility to do anything more than I am happy to. I am still waiting on seeed studio staffer to fix #251 myself. Yes, being compensated would be good, but the code is posted in the open and free for others to use.

@HinTak
Copy link
Contributor

HinTak commented Jun 16, 2021

@Napsty @uselessgames you should scroll back the commit history
https://github.com/respeaker/seeed-voicecard/commits/master and see two pages of updates from me the last time I did 4.19->5.4... To be honest seeed studio staff are quite absent .

@HinTak
Copy link
Contributor

HinTak commented Jun 16, 2021

@Napsty @uselessgames , to be fair, after the last bunch of 4.19->5.4 update, I got a $50 US dollar voucher from Seeed Studio as a "thank you" - which I used to get two other seeed studio devices I don't have. (hence they all work well with my branch). But what would be really helpful would be to just send me the documentation for the ac101/ac108 privately "off-the-record" too, besides actually compensating for my time properly.

The ac101/ac108 documentation requires registration and a declaration statement of what product it would be used, etc at their suppliers' web site to obtain.

I'd rather give seeed studio staff $50 US to get at the official supplier's documents/code samples instead.

@HinTak
Copy link
Contributor

HinTak commented Jun 16, 2021

See also the closed #213 and #203 about the chip supplier's.

@HinTak
Copy link
Contributor

HinTak commented Jun 16, 2021

@uselessgames btw, the seeed studio folks say they were going to have a v2 hardware with different chips (I think it was mentioned in #251 ?), so you might want to take that into consideration for large purchase and also if your company wants to depend on it...

I didn't know my repo is referenced in the wiki :) . The effort after 5.4 was quite substantial, and included some filing upstream at the raspberrypi folks and alsa-devel... Anyway, it now works okay across the different devices against current 32-bit raspbian. If you are using 64-bit or ubuntu, you need to read #251 . (I gave a workaround for ubuntu there too)

@HinTak HinTak mentioned this issue Jun 18, 2021
@AIWintermuteAI
Copy link
Contributor

After merging commits from Hintak's branch, driver installation can be successfully completed on latest Raspberry Pi OS image:
5.10.17-v7l+
image
Closing the issue. Feel free to re-open if issue persists.

@farnoosh22
Copy link

build error with kernel 5.10.103+ armv7l on pi4 :(
How can I fix that? Please help.

@HinTak
Copy link
Contributor

HinTak commented Oct 2, 2023

For 5.10.x, there is a v5.12 branch - https://github.com/HinTak/seeed-voicecard/tree/v5.12 - if that doesn't work, probably try the v5.9 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants