NewtoM Posted December 31, 2015 Posted December 31, 2015 Hello there, I belong to the group of users that bought a BPi-M2 to just find out that hardware is nothing without software support. First, to my background: I do spend a lot of time at my computer using both Windows and Linux, but I am not a Linux guru. I used to configure and build kernels several years ago, at the time, when we used LILO to boot Linux. My field of interest is real-time sound processing, based on complex filter banks (ideally implemented using multi-threading). For a current project I needed something small, powerful and easily programmable. Since the BPi-M2 has 4 cores and built-in microphone, it seemed ideal for the first tries. Anyway, I tried quite some Linux images available on the Internet, but they all suck in one way or another. Some days ago I crossed a posting of Igor and I downloaded armbian 4.5 (Debian Jessie) for the board. I instantly liked it. I love simple and clean things, and the distro was just that. Since then, I updated the kernel, installed X with LXDE, and installed Code::Blocks 13.12. I still like this distro most. Slow graphics of course sucks with the default framebuffer driver, but the real problem for me is the missing audio support. As far as I understand from the Linux mainlining effort web page, the A31 audio codec driver is not even planned for kernel 4.5. And this is what I do not understand: how can Ubuntu Mate (kernel 3.3.0-BPI-M2) support the sound (both sun6i-codec and sndhdmi with ALSA v1.0.24) and the new kernel not? And why is it so complicated to put the sun6i-codec driver from the 3.3.x kernel to the 4.4.x kernel? Please wise me up! Thanks! NewtoM ps: BTW, I am happy to help with testing!
zador.blood.stained Posted December 31, 2015 Posted December 31, 2015 Quote how can Ubuntu Mate (kernel 3.3.0-BPI-M2) support the sound (both sun6i-codec and sndhdmi with ALSA v1.0.24) and the new kernel not? Because board manufacturer took whatever kernel was available in the SDK and made some Debian/Ubuntu images with this kernel. Quote And why is it so complicated to put the sun6i-codec driver from the 3.3.x kernel to the 4.4.x kernel? Kernel internal structures, APIs and whatever else was changed, so new driver needs to be made from scratch, and it's not easy without proper documentation. Plus audio driver is not that simple - it depends on implementing PLL and DMA drivers first. Quote Please wise me up! If you want to use Armbian and mainline kernel, just buy cheap and simple USB sound card and some kind of microphone. I don't know if this will give you low enough latency for real-time sound processing, but it's better than nothing.
NewtoM Posted December 31, 2015 Author Posted December 31, 2015 Hey, thanks for the quick reply. Quote Kernel internal structures, APIs and whatever else was changed, so new driver needs to be made from scratch, and it's not easy without proper documentation. Plus audio driver is not that simple - it depends on implementing PLL and DMA drivers first. OK, but as I see it, the changed internal structures and APIs should have had an impact on all drivers that were ported from the 3.x kernel. PLL and DMA drivers are already there, aren't they? So is there anything especially tricky (except for the lacking documentation) about the A31 audio codec driver?
zador.blood.stained Posted December 31, 2015 Posted December 31, 2015 Some kernel parts change more than others. According to "Linux mainlining effort" page, DMA support is not complete and PLL is not implemented yet for A31. It's not exactly tricky, but you have to consider some things: First, there are strict rules and guidelines for getting things into mainline kernel, so you can't just quickly produce some untested spaghetti-style code and hope that it will work like intended and doesn't break anything. Second, this type of work is mostly done by enthusiasts who do programming as a hobby, so you can't complain here that driver writing is not going fast enough. Before mainline kernel 4.3 I didn't have onboard audio support on cubietruck and I too wondered, what could take so long. Then I saw PLL patch for A10/A20 SoC. No more questions from that point.
NewtoM Posted January 1, 2016 Author Posted January 1, 2016 OK, it is getting clearer. Quote so you can't complain here that driver writing is not going fast enough I am not! My mistake if it read like that. Quote Then I saw PLL patch for A10/A20 SoC. No more questions from that point. OK, I see. Thank you! And happy new year!
zador.blood.stained Posted January 1, 2016 Posted January 1, 2016 Quote I am not! My mistake if it read like that. I just wanted to say that there is no deadline, it's done when it's done. My phrasing wasn't good enough, so I'm sorry too. Quote And happy new year! For you too. Thanks.
shanevanj Posted March 17, 2016 Posted March 17, 2016 Hi, another BANANAPI-M2 sucker here.... It is so sad that a H/W manufacturer releases a great piece of hardware and has no ability to provide the software to make it achieve its potential - ARMBIAN is the best distro I have used so far for this type of board, however I will think very long and hard before buying another Bananapi product. Sound is broken, video is broken and probably a few other things I can't find yet due to no proper drivers/support. Any ideas on how to make some of the good stuff work on this board?
Mailz Posted March 22, 2016 Posted March 22, 2016 On 3/17/2016 at 6:47 AM, shanevanj said: I will think very long and hard before buying another Bananapi product. Actually, the sinovoip manufacturer used name "BananaPi" due to success of LeMaker's Banana Pi and Banana Pro. For the next time you may read about another product at sunxi's wiki - http://linux-sunxi.org/Identification_guide On 3/17/2016 at 6:47 AM, shanevanj said: Any ideas on how to make some of the good stuff work on this board? I've made Wi-Fi and GPIO working with armbian on my BPi-M2. Reply, what you're interested in.
NewtoM Posted April 20, 2016 Author Posted April 20, 2016 Hey again, I downloaded and tried "Armbian_5.00_Bananapim2_Ubuntu_trusty_4.4.1_desktop". On the download page (http://www.armbian.com/banana-pi-m2/) it says that with the Vanilla kernel (4.4.3) audio devices (analog playback and capture) are enabled. How do I upgrade to 4.4.3 kernel (apt-get update; apt-get upgrade does not seem to suffice)? Do I have to do further steps to have a working audio system? Thanks! NewtoM
Igor Posted April 20, 2016 Posted April 20, 2016 Quote How do I upgrade to 4.4.3 kernel (apt-get update; apt-get upgrade does not seem to suffice)? Do I have to do further steps to have a working audio system? New kernels will be 4.5.2 or 4.5.3 ... by the end of the month. Than you will be able to upgrade. Audio is done for most popular: A10 and A20, unfortunately M2 uses less supported chip - I think there is no audio support yet, not even in latest kernel. It's not expected that it will be available soon.
NewtoM Posted April 20, 2016 Author Posted April 20, 2016 OK, thank you, Igor. In this case, it is just misleading to have that sentence on the BPI-M2 page, I guess.
Igor Posted April 20, 2016 Posted April 20, 2016 On 4/20/2016 at 7:14 PM, NewtoM said: OK, thank you, Igor. In this case, it is just misleading to have that sentence on the BPI-M2 page, I guess. Yes, I added note to the "Bugs". That's all I can do.
NewtoM Posted April 20, 2016 Author Posted April 20, 2016 That's useful, thank you! I still hope some day I will have working audio on that **** board.
Recommended Posts