Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: Mucke on September 28, 2014, 01:47:48 AM

Title: piCore and Wolfson Audio Card
Post by: Mucke on September 28, 2014, 01:47:48 AM
Quote
For Wolfson wait a bit for piCore 6.0 with 3.16.3 kernel with Wolfson support.

May I kindly ask about the intended release date?
Or is there another way to get it running before piCore 6.0 ?
Title: Re: piCore and Wolfson Audio Card
Post by: bmarkus on September 28, 2014, 02:14:45 AM
If you dot need GUI, only the usual console tools, it is available:

http://www.tinycorelinux.net/6.x/armv6/test_releases/

Archive contains the kernel and initrd with config files, just copy them to /mnt/mmcblk0p1 overwriting existing files. After reboot install kernel module extensions from the repo and update system with tce-update.

Please note it is an alpha test.

Let me know your result.

Title: Re: piCore and Wolfson Audio Card
Post by: Mucke on September 28, 2014, 04:33:03 AM
If you dot need GUI, only the usual console tools, it is available:

http://www.tinycorelinux.net/6.x/armv6/test_releases/

Archive contains the kernel and initrd with config files, just copy them to /mnt/mmcblk0p1 overwriting existing files. After reboot install kernel module extensions from the repo and update system with tce-update.
Sorry for my dumb question but what do you exactly mean by "kernel module extensions". I understand you mean tcz extensions but which ones? Or which ones are not included in comparison to piCore5.3.1 ?
Title: Re: piCore and Wolfson Audio Card
Post by: bmarkus on September 28, 2014, 03:25:52 PM
alsa-modules-...tcz
Title: Re: piCore and Wolfson Audio Card
Post by: Mucke on October 02, 2014, 09:22:10 AM
Today I have got my Wolfson Audio Card.
In the meantime I have got the system running as intended with the onboard sound.

But the WAC is not recognized by piCore 6 alpha.
The driver logic seems to be quite different compared to usual ALSA drivers (it seems no modprobe of the driver)
So there is no corresonding snd-... module in alsa-modules...tcz
Unloading the onboard sound snd-bcm2835 results in 'no soundcard' with cat /proc/asound/cards

A parallel setup of a Raspbian system recognizes the WAC though. Also ALSA reports the soundcard capabilities e.g. by amixer controls.
cat /proc/asound/cards then reports
Quote
0 {sndrpiwsp     ]: snd_rpi_wsp - snd_rpi_wsp
                              snd_rpi_wsp

So piCore 6 alpha is not working properly with the WAC right now.
Can you check? Do you need some further information?
What can I further check on my side?
Title: Re: piCore and Wolfson Audio Card
Post by: bmarkus on October 02, 2014, 09:32:28 AM
Wait for sbp's comment.
Title: Re: piCore and Wolfson Audio Card
Post by: sbp on October 02, 2014, 01:25:50 PM
Hi Mucke.

We are in the same boat as I would also like to support the Wolfson audio card in the piCorePlayer.

However, as far as I understand the status it is not supported officially in the kernel yet. There seems even to be some uncertainty among the developer of the raspberry kernel whether it is merged into the 3.12.y kernel https://github.com/raspberrypi/linux/pull/672 . But I'm quite sure that it is not supported by the 3.16.y kernel which is the basis for the current piCore.

So  I think at the moment it is very difficult to get WAC running in a piCore environment as it is even not properly supported in the official raspberry kernels which are used by Bela to build piCore. So we/you will have to wait for Wolfson to develop their drivers so the can be properly incorporated.

I think that such a well known audio company should have done that from the very beginning. Look at the smaller companies like HiFiBerry or IQaudIO they managed to get their cards supported even before they release their actual hardware.

Steen

   
Title: Re: piCore and Wolfson Audio Card
Post by: bmarkus on October 08, 2014, 08:41:03 PM
Kernel 3.17.0 supports Wolfson. Will make a new alpha available if it works.
Title: Re: piCore and Wolfson Audio Card
Post by: bmarkus on October 09, 2014, 02:57:06 AM
Not suprized, 3.17.0 doesn't build due to error in Wolfson code. Usual issues with x.y.0 releases. Upstream ticket opened.
Title: Re: piCore and Wolfson Audio Card
Post by: bmarkus on October 11, 2014, 12:07:53 PM
6.0alpha501 built on kernel 3.17.0 uploaded to http://www.tinycorelinux.net/6.x/armv6/test_releases/ alsa and wireless modules are in the repo. Please try specially the Wolfson audio.

Let me know your findings.
Title: Re: piCore and Wolfson Audio Card
Post by: bmarkus on October 13, 2014, 04:44:10 AM
Updated to 6.0alpha502
Title: Re: piCore and Wolfson Audio Card
Post by: lykkedk on October 13, 2014, 07:56:03 AM
 :) Cool... Bleeding edge kernel all time piCore...

Regards ... Jesper
Title: Re: piCore and Wolfson Audio Card
Post by: sbp on November 02, 2014, 01:46:06 AM
Hi Bela

Sorry for the delay, but I have just started with looking into the wolfson card and kernel 3.17.1.

I have tried to load the needed modules, however, there seems to missing "arizona-spi" at least piCore complains that this module is not found in modules.dep. All the other modules needed for the wolfson card are there.

Maybe that is the reason for not being able to see the wolfson card using aplay -l.

I just noticed that you have updated to 3.17.2 - I'm not sure if support for the wolfson card has been removed from this version?
When looking at the commits at the raspberry github for 3.17.2 I can't find any info on the wolfson pull request.

regards
Steen
Title: Re: piCore and Wolfson Audio Card
Post by: bmarkus on November 02, 2014, 01:45:35 AM
Same in 3.17.2 It can be a kernel configuration issue. I have enabled all sound soc related modules, but there can be a problem with one of the Kconfigs in kernel source with dependencies. Made a fast search in kernel source but didn't find this module, but maybe I was not careful enough. Look around in kernel source.

BTW, which module is claiming for missing arizona-spi ?
Title: Re: piCore and Wolfson Audio Card
Post by: bmarkus on November 02, 2014, 01:49:30 AM
Found, it is in drivers/mfd

I will upload the new alpha510 with 3.17.2 and corrected alsa modules later today and PM when ready


Title: Re: piCore and Wolfson Audio Card
Post by: bmarkus on November 02, 2014, 02:16:44 AM
piCore-6.0alpha510.tar uploaded to http://tinycorelinux.net/6.x/armv6/test_releases/ and alsa modules updated with arizona mfd modules.  Hopefully it works now.
Title: Re: piCore and Wolfson Audio Card
Post by: sbp on November 02, 2014, 04:26:02 AM
Bela

Thanks for the try, but I'm afraid that the wolfson card is not supported in the 3.17.2 kernel. Now I could load the arizona-spi but instead the snd-soc-wm5102 and snd-soc-rpi-wsp are missing


In modules.dep for 3.17.1 I find:
kernel/sound/soc/codecs/snd-soc-wm5102.ko
and
kernel/sound/soc/bcm/snd-soc-rpi-wsp.ko

Code: [Select]
kernel/sound/soc/bcm/snd-soc-hifiberry-dac.ko: kernel/sound/soc/snd-soc-core.ko kernel/sound/core/snd-pcm-dmaengine.ko kernel/sound/core/snd-compress.ko kernel/sound/core/snd-pcm.ko kernel/sound/core/snd-timer.ko kernel/sound/core/snd.ko
kernel/sound/soc/bcm/snd-soc-hifiberry-dacplus.ko: kernel/sound/soc/snd-soc-core.ko kernel/sound/core/snd-pcm-dmaengine.ko kernel/sound/core/snd-pcm.ko kernel/sound/core/snd-timer.ko kernel/sound/core/snd-compress.ko kernel/sound/core/snd.ko
kernel/sound/soc/bcm/snd-soc-hifiberry-digi.ko: kernel/sound/soc/snd-soc-core.ko kernel/sound/core/snd-pcm-dmaengine.ko kernel/sound/core/snd-pcm.ko kernel/sound/core/snd-timer.ko kernel/sound/core/snd-compress.ko kernel/sound/core/snd.ko
kernel/sound/soc/bcm/snd-soc-hifiberry-amp.ko: kernel/sound/soc/snd-soc-core.ko kernel/sound/core/snd-pcm-dmaengine.ko kernel/sound/core/snd-pcm.ko kernel/sound/core/snd-timer.ko kernel/sound/core/snd-compress.ko kernel/sound/core/snd.ko
kernel/sound/soc/bcm/snd-soc-rpi-dac.ko: kernel/sound/soc/snd-soc-core.ko kernel/sound/core/snd-pcm-dmaengine.ko kernel/sound/core/snd-pcm.ko kernel/sound/core/snd-timer.ko kernel/sound/core/snd-compress.ko kernel/sound/core/snd.ko
kernel/sound/soc/bcm/snd-soc-iqaudio-dac.ko: kernel/sound/soc/snd-soc-core.ko kernel/sound/core/snd-pcm-dmaengine.ko kernel/sound/core/snd-compress.ko kernel/sound/core/snd-pcm.ko kernel/sound/core/snd-timer.ko kernel/sound/core/snd.ko
kernel/sound/soc/bcm/snd-soc-rpi-wsp.ko: kernel/sound/soc/snd-soc-core.ko kernel/sound/core/snd-pcm-dmaengine.ko kernel/sound/core/snd-compress.ko kernel/sound/core/snd-pcm.ko kernel/sound/core/snd-timer.ko kernel/sound/core/snd.ko
kernel/sound/soc/dwc/designware_i2s.ko: kernel/sound/soc/snd-soc-core.ko kernel/sound/core/snd-pcm-dmaengine.ko kernel/sound/core/snd-pcm.ko kernel/sound/core/snd-timer.ko kernel/sound/core/snd-compress.ko kernel/sound/core/snd.ko


But in the new 3.17.2 I can't find
snd-soc-wm5102.ko
snd-soc-rpi-wsp.ko
Title: Re: piCore and Wolfson Audio Card
Post by: bmarkus on November 02, 2014, 04:44:14 AM
Thanks. It looks better at least. I will check missing modules, stay tuned.
Title: Re: piCore and Wolfson Audio Card
Post by: sbp on November 02, 2014, 05:34:34 AM
Hi Bela

I think what happened is.
The pull request for support of the wolfson card was pulled into 3.17.1, but when they updated to 3.17.2 they decided not to pull in the wolfson support (or they forgot it) https://github.com/raspberrypi/linux/pull/705 .
Anyway I have asked at their github if it is included in 3.17.2 - but I suspect it is not included in the most recent version.

So you should not waste too much time on this for the time being
Steen
Title: Re: piCore and Wolfson Audio Card
Post by: bmarkus on November 02, 2014, 05:49:58 AM
On the other hand most of the Wolfsson modules are in 3.17.2 and not removed. Anyhow Wolfson is not my fovirite hw vendor
Title: Re: piCore and Wolfson Audio Card
Post by: sbp on November 02, 2014, 05:57:32 AM
I completely agree.
I think they produced a good audio card, however, because of their very poor software support it is of no use for most people.
So I would advice to find an alternative audio card, which by the way are coming from many different vendors.

So lets wait until the wolfson card is properly supported in the kernel.
Title: Re: piCore and Wolfson Audio Card
Post by: bmarkus on November 02, 2014, 06:51:26 AM
You can open a ticket at https://github.com/raspberrypi/linux/issues and ask the status and whether somene got it already working. Also the rafberrip forum may help.

If you can provide proper config parameters I will apply them in the kernel, otherwise keep actual one which looks ok in general and I do not spend time to investigate the Wolfson mess.

Title: Re: piCore and Wolfson Audio Card
Post by: sbp on November 04, 2014, 07:52:35 AM
Hi Bela

I got a response from the guys at Wolfson. In short the support for the wolfson card is not included in the most recent 3.17 version.

Code: [Select]
Hi, We haven't pushed this change in to the 3.17 kernel yet. The plan was to get this in to the 3.12 kernel which is what this pull
request is for and then we would start to look at the issue in 3.17 and forward porting this driver. There will be some of our code in the
3.17 kernel as this will have been picked up from the mainline kernel.

So maybe in the future this card will be supported, but at the time most users have moved on to a B+ or other small ARMs computers.

Steen
Title: Re: piCore and Wolfson Audio Card
Post by: bmarkus on November 04, 2014, 09:12:20 AM
Hi Steen

thanks fo the info. I do not understand how B+ is related to the kernel but never mind. It is not there. I will disable it in the config, recompile the final 3.17.2 kernel for piCore 6.0 When Wolffson will be really supported we can decide how to manage it.

Regards... Bela
Title: Re: piCore and Wolfson Audio Card
Post by: sbp on November 04, 2014, 09:37:22 AM
Hi Steen

thanks fo the info. I do not understand how B+ is related to the kernel but never mind. It is not there. I will disable it in the config, recompile

I think that you will find that there is nothing to disable as it is not available in the present config file. However, if you are reusing your config file from 3.17.1 than probably there will be some leftovers.

the final 3.17.2 kernel for piCore 6.0 When Wolffson will be really supported we can decide how to manage it.


Thats a good plan
Title: Re: piCore and Wolfson Audio Card
Post by: bmarkus on November 04, 2014, 09:54:38 AM
I have used 3.17.1 config for 3.17.2 with oldconfig so it is there with many modules including arizona modules used by wolfsson modules....
Title: Re: piCore and Wolfson Audio Card
Post by: bmarkus on November 05, 2014, 12:17:20 AM
3.17.2 rebuilt, Wolfsson/Arizona dropped. It is the final, no more kernel change. Will upload soon.
Title: Re: piCore and Wolfson Audio Card
Post by: lykkedk on November 05, 2014, 06:40:27 AM
Hi... Good work!

Will 3.17.2 then be the kernel, for next release (piCore 6) ?

Regards;
   Jesper.
Title: Re: piCore and Wolfson Audio Card
Post by: bmarkus on November 05, 2014, 07:09:00 AM

Will 3.17.2 then be the kernel, for next release (piCore 6) ?


Yes
Title: Re: piCore and Wolfson Audio Card
Post by: bmarkus on November 05, 2014, 09:54:34 AM
See http://tinycorelinux.net/6.x/armv6/test_releases/
Title: Re: piCore and Wolfson Audio Card
Post by: lykkedk on November 05, 2014, 11:08:46 AM
 Thank's

I will be working on this one, and try to test my sound -setup on this kernel.

Good job!

Maybe you could paste the kernel .config into the http://www.tinycorelinux.net/6.x/armv6/test_releases/ (http://www.tinycorelinux.net/6.x/armv6/test_releases/)... Would be nice i think  ;)

Regards;
   Jesper.
Title: Re: piCore and Wolfson Audio Card
Post by: bmarkus on November 05, 2014, 11:17:13 AM

Maybe you could paste the kernel .config into the http://www.tinycorelinux.net/6.x/armv6/test_releases/ (http://www.tinycorelinux.net/6.x/armv6/test_releases/)... Would be nice i think  ;)


Install and

Code: [Select]
zcat /proc/config.gz
Title: Re: piCore and Wolfson Audio Card
Post by: lykkedk on November 05, 2014, 12:50:01 PM
Thank's  :)

I knew it btw... just thought it was an idea to have it there, along with modules etc... ! - Just an idea.

BTW: my bootswitch is working fine now :

(http://i1312.photobucket.com/albums/t535/Jesperlykke/piCore/Bootswitch_zps29cf8d25.png)

Regards;
   Jesper.








Title: Re: piCore and Wolfson Audio Card
Post by: webb on September 14, 2016, 01:52:24 AM
By any chance has the Wolfson situation has improved with 8.0? (Or 7.0?)

Topic: piCore-8.0 released
bmarkus wrote:
> brought support for new hw, specially sound devices

Many thanks,
Webb
Title: Re: piCore and Wolfson Audio Card
Post by: Greg Erskine on September 14, 2016, 02:06:48 AM
hi Webb,

I doubt it (ever).

Keep an eye out for the appropriate overlay and info in README in the overlays directory on the boot partition.

It really is the responsibility of the hardware manufacturer to get their drivers incorporated into linux/Raspbian.

regards
Greg
Title: Re: piCore and Wolfson Audio Card
Post by: pkozul on April 20, 2017, 04:40:57 PM
Hi there,

I posted a question on the piCorePlayer 3.20 beta forum about support for the Wolfson / Cirrus audio card.

From what I understand, the 4.9x kernel should have support built in. Is there anything special that needs to be done in piCore to enable this card?

I followed the instructions here, but couldn't see the driver loaded in piCorePlayer.

http://www.horus.com/~hias/cirrus-driver.html (http://www.horus.com/~hias/cirrus-driver.html)

Any ideas?

Thanks,
Petar
Title: Re: piCore and Wolfson Audio Card
Post by: bmarkus on April 20, 2017, 10:51:56 PM
Wolfsson Audio is not enabled in piCore-9.0 kernel. If you need it, please make a custom kernel.

And please do not double post the same question in the Forum.
Title: Re: piCore and Wolfson Audio Card
Post by: M-H on May 02, 2017, 11:53:25 AM
Hi all,

I have a picoreplayer 3.20 setup with the modules setup as described from : http://www.horus.com/~hias/cirrus-driver.html
and it leads to a working setup of the cirrus logic audio card .

However the module loading isn't fully automatic and it needs a manual action on the usb bus to complete the driver load.
To me it seems the correct parts are in the picore kernel, and the modules do work too ,since I have audio repeatedly and have not experienced instability while enjoying the card its nice output.

Who can help and teach me how the module loading works in picore, and help tweak the boot process to eliminate the need for a manual action?

For more info please see : http://forums.slimdevices.com/showthread.php?107329-Cirrus-Logic-Audio-Card-and-Wolfson-support-in-PCP-3-20
and or ask me for more details on Info I might not have provided jet.

Regards M
Title: Re: piCore and Wolfson Audio Card
Post by: bmarkus on May 02, 2017, 08:50:01 PM

I have a picoreplayer 3.20 setup with the modules setup as described from : http://www.horus.com/~hias/cirrus-driver.html
and it leads to a working setup of the cirrus logic audio card .


For picoreplayer support please visit the picoreplayer forum. One more notice. Wolfsson Audio is not supported by piCore and it will be never supported.

Title: Re: piCore and Wolfson Audio Card
Post by: M-H on May 03, 2017, 03:33:43 PM
Hi Bela,
You are right, I now see the PCP project does use its own modified version of picore.
However in that kernel : linux 4.9.21-pcpCore | piCore v8.01  I do get my Cirrus Logic Audio Card working.
So now I have to figure out how I can make the set boot all including the modules , without my manual intervention.
Can you help me debug why the modules do not start automatically?
Or hint me where I can find the info to build my knowledge on this module loading loading in picore.

I recently found a post where it was mentioned a TCE was created to load the correct modules.
Is this indeed an option to load specific modules and execute commands from a TCE ?
And would this be perhaps a better route to add these specific hardware support parts to PCP ?
Regards M-H
Title: Re: piCore and Wolfson Audio Card
Post by: bmarkus on May 03, 2017, 10:54:32 PM
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.
Title: Re: piCore and Wolfson Audio Card
Post by: M-H on May 04, 2017, 05:04:21 AM
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: [Select]
aplay -l 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


Title: Re: piCore and Wolfson Audio Card
Post by: bmarkus on May 05, 2017, 12:17:33 AM
You can try an udev trigger, maybe it helps.
Title: Re: piCore and Cirrus Logic Audio Card
Post by: M-H on May 17, 2017, 07:12:30 AM
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

Title: Re: piCore and Wolfson Audio Card
Post by: M-H on May 21, 2017, 06:25:51 AM
I found a way to complete the driver initialisation from a script after the boot process.
Code: [Select]
sudo modprobe -r arizona_spi
sleep 1
sudo modprobe arizona_spi
sleep 3
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