Tiny Core Base > Raspberry Pi

piCore and Wolfson Audio Card

<< < (9/9)

bmarkus:
piCore kernel configuration is practically the same as Raspbian except few difference related to ZRAM, compressed swap, etc. but nothing for sound. The main difference is that piCore base do not contain all kernel modules and you must install them from the repo or if it is not there, extract from the archive of all built modules. Best way is to check on a system where it works like Raspbian ot PCP which modules loaded for your card than install them on piCore. If moduels are available most likely they will be loaded automatically. If still not workking, check dmesg, module dependencies, ... But in general it is a basix Linux staff, no piCore specific tricks.

M-H:
Thanks Bela,
This confirms the knowledge I have so far.
I (we)  know the modules and have them set on a system and am able to load them successfully to get the card working repeatedly.
However the loading part is not automatic, and it halts somewhere, where I am unable to see what is actually causing this halt.
dmesg output does not hint me what is the cause, but I have found by accident that plugging in a USB mouse does complete the process.
It shows the alsa device from
--- Code: ---aplay -l
--- End code ---
and probably gets the mouse working too  .
Repeating the boot with the mouse connected throughout, does come to the same incomplete state. And unplugging and reconnecting the mouse does load the modules successfully.

Replicating the the setup on a fresh and fully updated raspbian jessie installation shows it is working without human intervention.
I used this as baseline test, and stil keep it available for comparison.

So I think the late usb new device discovery does trigger something that is needed for the Cirrus logic Audio card ( wolfson ) drivers to complete their initialisation, and probably this is a timing issue where a timeout caused it to fail initially and a later retry does complete things. But this is speculation as I do not know why they do not load , and what happens when the routines do after a new usb device event.

'Hias' who created the the kernel modules mentioned :
"  .. using modprobe from busybox which doesn't support softdep  (only alias, options, include and blacklist are supported):
see https://git.busybox.net/busybox/tree/modutils/modprobe.c#n282  "

So now I need to find the specifics in picore and or busybox to complete the module loading automatically at boot time.
As picore is a toolbox and not a full distri, it is possible just not a paved road. So there is some work involved.
Unfortunately I do not have the needed experience jet to find it , and reverse engineering the boot process to debug this is time consuming. Therefore tips, shortcuts and workarounds are welcome too as a temporary measure.
F.I. a script that would emulate parts of the USB actions I now do manually, could be a first step.

BTW, all was tested on a Bplus, I need to recheck all on a 2B and 3B to see if a faster Pi does alter the results and give me more insight on the possible timing issue.

I feel we will be able to solve all this in the future, and present a way to use the cards with picore and thus PCP, for other people
Hias did a great job on creating the modules and the needed parts in the kernel. They just do not work work flawlessly in PCP atm.
Regards M-H


bmarkus:
You can try an udev trigger, maybe it helps.

M-H:
To all,

Is there a way to replicate the event of an inserted USB device from a script or command line ?

Manually loading the modules does work , but it still does not initialise the board or driver.
Tricks like :"  sudo udevadm trigger arizona_ldo1 " do not trigger the right event either.


Thanks in advance , M-H

M-H:
I found a way to complete the driver initialisation from a script after the boot process.

--- Code: ---sudo modprobe -r arizona_spi
sleep 1
sudo modprobe arizona_spi
sleep 3

--- End code ---
This is crude but at least does the job and allows me to use the card .
The sleeps are needed to make the next commands not to be executed to early as it led to instability in my setup.
The previous question on the USB event is no longer valid.

Regards M-H

Navigation

[0] Message Index

[*] Previous page

Go to full version