After installing PiTFT kernel HifiBerry stops working

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
Kotatsu
 
Posts: 8
Joined: Thu Jan 30, 2014 4:21 pm

After installing PiTFT kernel HifiBerry stops working

Post by Kotatsu »

Hi,
I've installed on my Raspberry the HifiBerry DAC module and Adafruit PiTFT 2.8" display. Before update my kernel with yours, HifiBerry worked well. After that it stopped. It seems that adafruit kernel has something wrong with hifiberry modules.
I've used raspberrypi-bootloader-adafruit-20140227-1.deb since HiFiBerry modules are present starting from kernel version 3.10.23.

HiFiBerry is configured as following:

sudo rpi-update
sync
sudo reboot

And after I've added to /etc/modules the following lines:

snd_soc_bcm2708
snd_soc_bcm2708_i2s
bcm2708_dmaengine
snd_soc_pcm5102a
snd_soc_hifiberry_dac

Thanks a lot
Marco

User avatar
notro
 
Posts: 93
Joined: Tue Sep 11, 2012 9:59 am

Re: After installing PiTFT kernel HifiBerry stops working

Post by notro »

Probably because the modules are not built for this kernel:

Code: Select all

$ cat /proc/version
Linux version 3.10.32+ (xobs@crash-novena) (gcc version 4.6.3 (Debian 4.6.3-14) ) #3 PREEMPT Fri Feb 28 01:41:33 SGT 2014
$ zgrep HIFIBERRY /proc/config.gz
$
$ find /lib/modules/ -name "*hifi*"
$
It is included in the default config: https://github.com/raspberrypi/linux/bl ... onfig#L743

I encourage Adafruit to use that as a base when they build their kernel.

This is how I have scripted that process:

Code: Select all

make bcmrpi_defconfig

# enable all FBTFT drivers as modules
scripts/config --module FB_TFT
yes m | make oldconfig

# enable touch
scripts/config --enable INPUT_TOUCHSCREEN
yes n | make oldconfig
scripts/config --enable MFD_STMPE
yes "" | make oldconfig
scripts/config --enable STMPE_SPI
scripts/config --enable GPIO_STMPE
scripts/config --module TOUCHSCREEN_STMPE

make oldconfig

Kotatsu
 
Posts: 8
Joined: Thu Jan 30, 2014 4:21 pm

Re: After installing PiTFT kernel HifiBerry stops working

Post by Kotatsu »

Hi Notro,
thank you for your quick reply! Following there' s my Pi's output:

Code: Select all

$ cat /proc/version
Linux version 3.10.32+ (xobs@crash-novena) (gcc version 4.6.3 (Debian 4.6.3-14) ) #3 PREEMPT Fri Feb 28 01:41:33 SGT 2014

$  zgrep HIFIBERRY /proc/config.gz


$ find /lib/modules/ -name "*hifi*"
/lib/modules/3.10.32+/kernel/sound/soc/bcm/snd-soc-hifiberry-digi.ko
/lib/modules/3.10.32+/kernel/sound/soc/bcm/snd-soc-hifiberry-dac.ko
It seems that there's a strange situation: modules are present in path but they're not present into the config. Is it a possible configuration? Can I do something to fix this problem?

Thanks
Marco

User avatar
notro
 
Posts: 93
Joined: Tue Sep 11, 2012 9:59 am

Re: After installing PiTFT kernel HifiBerry stops working

Post by notro »

The modules are there because rpi-update installed them I guess.
You could try and force load them using the f flag to modprobe.
But I don't think it will work after looking at the prerequisites for bcm2708_dmaengine in the kernel source:

https://github.com/raspberrypi/linux/bl ... ma/Kconfig

Code: Select all

config DMA_BCM2708
	tristate "BCM2708 DMA engine support"
	depends on MACH_BCM2708
	select DMA_ENGINE
	select DMA_VIRTUAL_CHANNELS

config DMA_ENGINE
	bool

https://github.com/raspberrypi/linux/bl ... a/Makefile

Code: Select all

obj-$(CONFIG_DMA_ENGINE) += dmaengine.o
This means that DMA_ENGINE (bool) can only be built into the kernel proper (not as a loadable module), but it's not:

Code: Select all

$ zgrep DMA_ENGINE /proc/config.gz
$
You can try my kernel: https://github.com/notro/fbtft/issues/8 ... t-36920153
But be aware of my touch problems: http://forums.adafruit.com/viewtopic.php?f=50&t=51432

Kotatsu
 
Posts: 8
Joined: Thu Jan 30, 2014 4:21 pm

Re: After installing PiTFT kernel HifiBerry stops working

Post by Kotatsu »

You could try and force load them using the f flag to modprobe.
Ok tomorrow I'll try to force although you think probably it will not work.

I've seen that Adafruit gives a zip file containing the patch that can be applied to a personal kernel. Are both display and touch included in this patch?
Since they don't give any support on how apply this patch to a standard kernel :shock:, is there a tutorial that explain how to do it?

As an alternative I'll try your kernel, but I would use the display as a media selector, so I would use it :wink:

I agree with you that Ada team should start with a standard raspbian kernel, also because they don't give any support on how to apply their patch to a standard kernel...

Aren't you using their touch driver?
I've seen they've used your your framebuffer... my compliments to you!

User avatar
notro
 
Posts: 93
Joined: Tue Sep 11, 2012 9:59 am

Re: After installing PiTFT kernel HifiBerry stops working

Post by notro »

I've seen that Adafruit gives a zip file containing the patch that can be applied to a personal kernel. Are both display and touch included in this patch?
The patch set is for the 3.6 kernel and contains everything except one patch: http://forums.adafruit.com/viewtopic.php?f=50&t=51293
This patch set doesn't apply cleanly on a 3.10 kernel. Adafruit will probably provide a new set when their 3.10 kernel is out of beta.
Since they don't give any support on how apply this patch to a standard kernel :shock:, is there a tutorial that explain how to do it?
I understand why they don't make a tutorial. The kernel source is a moving target, and one minute the patches apply cleanly, and the next they don't because a source file has changed.
And should the tutorial be about building the kernel on the Raspberry Pi itself (which takes 8-9 hours), or should it be about cross compiling which adds another level of complexity and the need for a Linux machine?
This is the most referred to guide on kernel compilation for the Pi: http://elinux.org/RPi_Kernel_Compilation
I made this one when I was compiling the kernel on the Pi itself: https://github.com/notro/fbtft/wiki/Bui ... ft-drivers
As an alternative I'll try your kernel, but I would use the display as a media selector, so I would use it
I could be that you don't experience any problems. I would be nice for me to know :-)
I have a Plug'n Play image for the PiTFT on hold, because touch stops working on my display.
Aren't you using their touch driver?
Yes I am using the same driver (stmpe-ts), but one of the 3.6 patches doesn't apply to 3.10, so I have skipped it since the functionality already is in 3.10. But it is implemented a bit different from the Adafruit patch. I don't know what patches Adafruit uses on 3.10
Have you used X windows and touch a lot with the 3.10 Adafruit kernel? A couple of touches doesn't break it for me. It is with heavy use it stops working.
I've seen they've used your your framebuffer... my compliments to you!
Thanks!

Kotatsu
 
Posts: 8
Joined: Thu Jan 30, 2014 4:21 pm

Re: After installing PiTFT kernel HifiBerry stops working

Post by Kotatsu »

I've read only now your reply... I've found the eLinux link on my own and I've created on my laptop a virtual machine with a Debian ditro and I've downloaded all necessary files.
Since not all patches were able to apply on their own with

Code: Select all

patch -p1 < xxx-patch
command, I've manually tried to copy and past patches in the right (?) place :)
I've found some problems on fbtft_device.c substitutions and I'm returned here to say it to you where I've seen that probably there is a patch missing :? :?
So now I've stopped my substitution project :cry:

Is the HifiBerry module enabled on your kernel?
At the moment I only need to have both display (with touch) and audio enabled to perform some tests on my python app. After that I'll hope that Adafruit team will release a new kernel patch set to apply to the 3.10.32 kernel or that they aplly it on a standard kernel source to have natively hifiberry module inserted into the kernel.

In this WE I'll try also the Adafruit newer kernel to see if I'll have same problems as you with stress touch tests.

I'll keep you informed on both kernel tests.

User avatar
notro
 
Posts: 93
Joined: Tue Sep 11, 2012 9:59 am

Re: After installing PiTFT kernel HifiBerry stops working

Post by notro »

Is the HifiBerry module enabled on your kernel?
Yes

Code: Select all

$ cat /proc/version
Linux version 3.10.33+ (pi@raspi2) (gcc version 4.7.1 20120402 (prerelease) (crosstool-NG 1.15.2) ) #1 PREEMPT Sat Mar 8 18:51:35 CET 2014
$ zgrep HIFIBERRY /proc/config.gz
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m
CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m

Kotatsu
 
Posts: 8
Joined: Thu Jan 30, 2014 4:21 pm

Re: After installing PiTFT kernel HifiBerry stops working

Post by Kotatsu »

Hi notro,
I've installed your kernel. When I try to start X Adafruit display remains black. I've attached my X log. Do you know why it happens?
Attachments
Xorg.0.log
(13.3 KiB) Downloaded 142 times

User avatar
notro
 
Posts: 93
Joined: Tue Sep 11, 2012 9:59 am

Re: After installing PiTFT kernel HifiBerry stops working

Post by notro »

This is the reason:

Code: Select all

[   537.654] (**) FBTURBO(0): Option "fbdev" "/dev/fb0"
Change to /dev/fb1 in /usr/share/X11/xorg.conf.d/99-fbturbo.conf

OR

You can delete that file and use the FRAMEBUFFER variable

Details: https://github.com/notro/fbtft-spindle/ ... indows-use

Kotatsu
 
Posts: 8
Joined: Thu Jan 30, 2014 4:21 pm

Re: After installing PiTFT kernel HifiBerry stops working

Post by Kotatsu »

Thanks now the display is working with my X server. I've found the touchscreen wiki but I've not understood what guide should I follow to setup my touch. I'm sorry to seem so stupid, but I'm not autonomous at the moment as you can see :D

User avatar
notro
 
Posts: 93
Joined: Tue Sep 11, 2012 9:59 am

Re: After installing PiTFT kernel HifiBerry stops working

Post by notro »

You can use the Adafruit tutorial for everything except for the loading of kernel modules and their arguments.

OR

If you can start from scratch, you can use this image: http://forums.adafruit.com/viewtopic.php?f=50&t=51468

Kotatsu
 
Posts: 8
Joined: Thu Jan 30, 2014 4:21 pm

Re: After installing PiTFT kernel HifiBerry stops working

Post by Kotatsu »

Ah ok ;)
I'll follow them.

Thanks

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”