-
Notifications
You must be signed in to change notification settings - Fork 692
Cannot install aiy-voicebonnet-soundcard-dkms on latest Raspbian #697
Comments
It appears that https://github.com/torvalds/linux/blob/0ecfebd2b52404ae0c54a878c872bb93363ada36/include/sound/soc.h#L930 |
This was a red-herring for me, as I have a voice-hat, not the bonnet - D'oh. Though for those with the bonnet, the issue remains, so I wont close the issue. There have also been changes in I was able to get it to compile with these changes, though, as I have the hat, not the bonnet, I can't test: diff ./rt5645.c /home/pi/aiy-voicebonnet-soundcard-dkms_2.0-1_all/usr/src/aiy-voicebonnet-soundcard-2.0/rt5645.c
3577,3578c3577
< .use_single_read = true,
< .use_single_write = true,
---
> .use_single_rw = true,
3594,3595c3593
< .use_single_read = true,
< .use_single_write = true,
---
> .use_single_rw = true,
3612,3613c3610
< .use_single_read = true,
< .use_single_write = true,
---
> .use_single_rw = true,
diff ./snd-aiy-voicebonnet.c /home/pi/aiy-voicebonnet-soundcard-dkms_2.0-1_all/usr/src/aiy-voicebonnet-soundcard-2.0/snd-aiy-voicebonnet.c
101,105d100
< static struct snd_soc_dai_link_component snd_rpi_aiy_voicebonnet_codec = {
< .name = "rt5645",
< .dai_name = "rt5645-aif1",
< };
<
110c105
< .codecs = &snd_rpi_aiy_voicebonnet_codec,
---
> .codec_dai_name = "rt5645-aif1",
166,167c161,162
< dai->codecs->name = NULL;
< dai->codecs->of_node = of_parse_phandle(dev->of_node,
---
> dai->codec_name = NULL;
> dai->codec_of_node = of_parse_phandle(dev->of_node,
169c164
< if (!dai->codecs->of_node) {
---
> if (!dai->codec_of_node) {
176,179c171,174
< dai->cpus->dai_name = NULL;
< dai->cpus->of_node = i2s_node;
< dai->platforms->name = NULL;
< dai->platforms->of_node = i2s_node;
---
> dai->cpu_dai_name = NULL;
> dai->cpu_of_node = i2s_node;
> dai->platform_name = NULL;
> dai->platform_of_node = i2s_node; |
I am having a similar issue however my errors are slightly different. Did you ever resolve the issue with your Voice Bonnet? This has been driving me mad lol
|
@nmilenko those errors are identical to mine after a quick look. The changes in the diff should get it to at least compile. As I mentioned though - I was barking up the wrong tree - I had a Voice Hat, not Bonnet, so I have no idea if my changes actually work as I can't test them. Try something like sudo mkdir /usr/src/aiy-voicebonnet-soundcard-2.0fixed/
sudo cp /var/lib/dkms/aiy-voicebonnet-soundcard/2.0/source/* /usr/src/aiy-voicebonnet-soundcard-2.0fixed/
sudo apt remove aiy-voicebonnet-soundcard-dkms Then apply the changes in the diff in #697 (comment) to the files in
Can't really help you beyond that I'm afraid, as I'm not particularly familiar with the code, and I don't have the hardware to test with. |
Unfortunately I tried your steps and I still received the "Error! Bad return status for module build on kernel: 5.4.51+ (armv7l)" I have the Voice Hat as well and I'm trying to decide if its a lost cause. The only other solution I've seen online is use the most recent image and don't update/upgrade. |
Same issue for me on the Voice Hat using the packages in apt. I haven't tried compiling from source yet. |
I followed keyz182's instructions and got the modules to at least compile. Note that his diffs are from new version to original, so the arrows seems to point the wrong way. Find the green lines in the code and replace them with the red versions. The dkms build and install commands then ran smoothly, but following the HACKING.md instructions as far as the verify audio, the Voice hat still did not work, and no audio devices were shown by aplay -L or arecord -L. Adding a line to /boot/config.txt and rebooting made sure the modules were loaded and running properly: |
@Squeack could you please go into more detail on how you fixed this? I'm a total noob, but basically I've been going into these files and changing the green lines of code mentioned with the red lines of code (editing using nano). No clue if this is the right way of going about this, but would love any help you might be able to provide. |
@keyz182 I have both voicehat and voicebonnet. The changes are working for voicehat, but even though the modules get compiled for voicebonnet, it gives null pointer exception when its getting loaded. I am not a kernel developer so it might take some time for me to solve it. Still trying to solve it though. I have pasted the backtrace of the exception here. |
After trying tons of different things, finally got it to work on the voicebonnet too. Download the fixed deb file from here. If you have the aiy-voicebonnet-soundcard-dkms already installed or you are not sure if its installed, run the following commands to make sure previous version of the package is uninstalled.
The system will reboot and once its booted back up run the following commands to installed the downloaded deb file
If you have voicehat, make sure you have added Feel free to see the modifications that I have done here. |
I tried your solution @viraniac unfortunately no luck, still, I cannot find the card by aplay -l. |
@gogus I tried my deb file thrice before posting it here, so I know for sure it works and unfortunately your post didn't had enough information for me to deduce what went wrong on your device. I am not being rude or anything, just am confused about why it didn't worked for you and disappointed in the lack of information in your post. Could you please give me more information to deduce why it didn't worked for you? Following points will be helpful.
|
Thanks for your answer and help. Answers for your questions:
|
Thanks for sharing those outputs. Your dmesg output shows that the system never tried to load any of the aiy card drivers. As you have Voice Hat, could you please confirm if you have If the entry is not there in your /boot/config.txt file, either you have to add the entry to /boot/config.txt yourself or you have to manually load the dtoverlay on every reboot using |
@viraniac Thanks, the entry wasn't existing there. I added that and it seems it's working. Thank you very much for your help! |
I have noticed that sometimes on voicebonnet, the rt5645 module was not able to identify the device, hence I have replaced the code for rt5645.* and rl6231.* with their corresponding code from the official raspberrypi kernel hoping that will resolve the issue. So far I didn't got the issue again even though I cold booted and rebooted my voice kit v2 multiple times, but if anyone faces that issue do let me know. Also remember that the issue goes away by doing a reboot, so its nothing really that critical. Also I have hosted my modifications on github now and have bumped up the deb file's version number to denote it is a nmu release. I am going to update the link to the file above in my previous post. |
@viraniac I just have another issue right now that if I record the sound from mic using arecord it's only recording for the first 5 seconds. When I will say something after this first 5 seconds and then I will use aplay I cannot hear anything. Do you know maybe what's can be the issue of that? |
No idea, let me try that out. BTW I just found out, voice hat doesnt really uses that aiy-voicebonnet-soundcard-dkms drivers. All it requires to work is that dtoverlay line. I have raised a issue so that google can update their hacking.md file or probably I will raise a pull request for that too :) |
@viraniac thanks for your help on this! I followed your instructions and it worked perfectly. Can't wait to finally use my voice kit! |
@gogus I figured out my low volume issue and I believe the solution will help you too with that 5 second recording issue Try creating
Also try adding these entries in your
|
@viraniac You are my hero! It works ... have been waiting for this for 3 months now and I can't believe Google did not fix such a basic capability of the bonnet. Thank you!! |
First, thanks a lot for your work @viraniac . I have a RPi 4 with a AIY Voice Kit v2 (Voice Bonnet). I'm able to install your patched aiy-voicebonnet-soundcard-dkms_2.0-1+nmu1_all.deb package in the latest Raspbian Buster Desktop image. However, on booting, I get the following:
LEDs and button work but the speaker and mic won't work. If I unload and load again the modules, it starts working:
Any idea? |
@tanty This was the exact same issue I was talking about where I said that sometimes rt5645 was not able to identify the device. But for me that was gone since I pulled the updated files from upstream kernel sources. Can you try removing and reinstalling the aiy-voicebonnet-soundcard-dkms package? Can you share some information about your setup? Your kernel version? Also what power supply are you using, is it the official raspberrypi power supply for pi4? I am not sure if that is the issue, but maybe the pi might not be getting enough power? Also can you try updating all the packages and pi4 eeprom? |
I can confirm this resolved this same issue for me on raspbian kernel 5.4.72 |
Driver is fixed now, please try the new SD card image or install |
Thanks a lot, @dmitriykovalev . However, with this new version, I'm still experiencing what's described at #697 (comment) |
@tanty I did test on Pi 4 and didn't notice any issues. Can you try our SD card image instead of package installation? You can also try to run |
Has the problem been solved with the kernel released on January 8th? |
Nope, still a problem. Amazing. |
@aandroide and @xamindar, I have created updated drivers that you can get from my repository. You can install these until google updates their own drivers. |
I know this is old, but I have 3 voicebonnets and would love to put them to use. OS: latest RPiOS lite (bullseye) https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit
|
Following instructions here,
aiy-voicebonnet-soundcard-dkms
fails to install.System is up to date.
The text was updated successfully, but these errors were encountered: