PiSound, The Audio Card For The Raspberry Pi

Kids today are being loud with their ‘drum machines’ and ‘EDM’. Throw some Raspberry Pis at them, and there’s a need for a low-latency sound card with MIDI and all the other accouterments of the modern, Skrillex-haired rocker. That’s where PiSound comes in.

Of course, the Pi already comes with audio out, but that’s not enough if you want to do some real audio processing. You need audio in as well, and while you’re messing around with that, adding some high-quality opamps, ADCs, DACs, and some MIDI would be a good idea. This is what the PiSound is all about.

[Pranciskus], the guy who has been working on the PiSound for a while now, developed this multitool for audio on a tiny Linux system. One of the killer features on the PiSound is ‘The Button’, a simple tact switch that runs a script if the button is pressed, another script if the button is held down, and two more if the button is pressed two or three times. This is actually a pretty nifty UI, and we wouldn’t mind seeing this on a few more Pi accessories.

If you’d like to see some example projects using the PiSound, there example MIDI controllers, networked audio players, and some goofing around with LV2 plugins over here.

Linux-Fu: Keeping Things Running

If you’ve used Linux from the early days (or, like me, started with Unix), you didn’t have to learn as much right away and as things have become more complex, you can kind of pick things up as you go. If you are only starting with Linux because you are using a Raspberry Pi, became unhappy with XP being orphaned, or you are running a cloud server for your latest Skynet-like IoT project, it can be daunting to pick it all up in one place.

Recently my son asked me how do you make something run on a Linux box even after you log off. I thought that was a pretty good question and not necessarily a simple answer, depending on what you want to accomplish.

There’s really four different cases I could think of:

  1. You want to launch something you know will take a long time.
  2. You run something, realize it is going to take a long time, and want to log off without stopping it.
  3. You want to write a script or other kind of program that detaches itself and keeps running (known as a daemon).
  4. You want some program to run all the time, even if you didn’t log in after a reboot.

Continue reading “Linux-Fu: Keeping Things Running”

Better Linux Through Coloring

Cyber security is on everyone’s minds these days. Embedded devices like cameras have been used by bad guys to launch attacks on the Internet. People worry about data leaking from voice command devices or home automation systems. And this goes for the roll-your-own systems we build and deploy.

Many network-aware systems use Linux somewhere — one big example is pretty much every Raspberry Pi based project. How much do you think about security when you deploy a Pi? There is a superior security system available for Linux (including most versions you’d use on the Pi) called SELinux. The added letters on the front are for “Security-Enhanced” and this project was originally started by the NSA and RedHat. RedHat actually has — no kidding — a coloring book that helps explain some of the basic concepts.

We aren’t so sure the coloring book format is really the right approach here, but it is a light and informative read (we didn’t stay in the lines very well, though). Our one complaint is that it doesn’t really show you anything in practice, it just explains the ideas behind the different kind of protections available in SELinux. If you want to actually set it up on Pi, there’s a page on the Pi site that will help. If you have an hour, you can get a good overview of using SELinux in the video below.

Continue reading “Better Linux Through Coloring”

Giving Linux the Remote Boot

A lot of embedded systems are running Linux on platforms like Raspberry Pi. Since Linux is fully functional from a command line and fully network-capable, it is possible to run servers that you’ve never had physical access to.

There are a few problems, though. Sometimes you really need to reboot the box physically. You also need to be at the console to do things like totally install a new operating system. Or do you? Over on GitHub, user [marcan] has a C program and a shell script that allows you to take over a running system without using any software on the root filesystem. It starts an ssh server and you can remotely unmount the main drive, do any maintenance you want and –presumably–reboot into a new operating system.

Continue reading “Giving Linux the Remote Boot”

EEPROM Hack to Fix Autodetection Issues

Autodetection of hardware was a major part of making computers more usable for the average user. The Amiga had AutoConfig on its Zorro bus, Microsoft developed Plug And Play, and Apple used NuBus, developed by MIT. It’s something we’ve come to take for granted in the modern age, but it doesn’t always work correctly. [Evan] ran into just this problem with a video capture card that wouldn’t autodetect properly under Linux.

The video capture card consisted of four PCI capture cards with four inputs each, wired through a PCI to PCI-E bus chip for a total of sixteen inputs. Finding the cause of the problem wasn’t too difficult – the driver was detecting the card as a different model with eight inputs, instead of the sixteen inputs actually present on the card. The driver detects the device plugged in by a unique identifier reported by the card. The code on the card was identical to the code for a different model of card with different hardware, causing the issue.

As a quick test, [Evan] tried fudging the driver selection, forcing the use of a driver for a sixteen-input model. This was successful – all sixteen inputs could now be used. But it wasn’t a portable solution, and [Evan] would have to remember this hack every time the card needed to be reinstalled or moved to a different computer.

Looking further at the hardware, [Evan] discovered the card had four 24c02 EEPROM chips on board – one for each PCI card on board. Dumping the contents, they recognised the unique identifier the driver was using to determine the card’s model. It was then a simple job to change this value to one that corresponded with a sixteen-input card to enable functional autodetection by burning a new value to the EEPROM. [Evan] then published the findings to the LinuxTVWiki page. Continue reading “EEPROM Hack to Fix Autodetection Issues”

Optimizing Linux for Slow Computers

It’s interesting, to consider what constitutes a power user of an operating system. For most people in the wider world a power user is someone who knows their way around Windows and Microsoft Office a lot, and can help them get their print jobs to come out right. For those of us in our community, and in particular Linux users though it’s a more difficult thing to nail down. If you’re a LibreOffice power user like your Windows counterpart, you’ve only really scratched the surface. Even if you’ve made your Raspberry Pi do all sorts of tricks in Python from the command line, or spent a career shepherding websites onto virtual Linux machines loaded with Apache and MySQL, are you then a power user compared to the person who knows their way around the system at the lower level and has an understanding of the kernel? Probably not. It’s like climbing a mountain with false summits, there are so many layers to power usership.

So while some of you readers will be au fait with your OS at its very lowest level, most of us will be somewhere intermediate. We’ll know our way around our OS in terms of the things we do with it, and while those things might be quite advanced we’ll rely on our distribution packager to take care of the vast majority of the hard work.

Linux distributions, at least the general purpose ones, have to be all things to all people. Which means that the way they work has to deliver acceptable performance to multiple use cases, from servers through desktops, portable, and even mobile devices. Those low-level power users we mentioned earlier can tweak their systems to release any extra performance, but the rest of us? We just have to put up with it.

To help us, [Fabio Akita] has written an excellent piece on optimizing Linux for slow computers. By which he means optimising Linux for desktop use on yesterday’s laptop that came with Windows XP or Vista, rather than on that ancient 486 in the cupboard. To a Hackaday scribe using a Core 2 Duo, and no doubt to many of you too, it’s an interesting read.

In it he explains the problem as more one of responsiveness than of hardware performance, and investigates the ways in which a typical distro can take away your resources without your realising it. He looks at RAM versus swap memory, schedulers, and tackles the thorny question of window managers head-on. Some of the tweaks that deliver the most are the easiest, for example the Great Suspender plugin for Chrome, or making Dropbox less of a hog. It’s not a hardware hack by any means, but we suspect that many readers will come away from it with a faster machine.

If you’re a power user whose skills are so advanced you have no need for such things as [Fabio]’s piece, share your wisdom on sharpening up a Linux distro for the rest of us in the comments.

Via Hacker News.

Header image, Tux: Larry Ewing, Simon Budig, Garrett LeSage [Copyrighted free use or CC0], via Wikimedia Commons.

Raspberry Pi Software Comes To PC, Mac

The Raspberry Pi Foundation has put a lot of work into their software stack. You need only look at a few of the Allwinnner-based Pi clones for the best evidence of this, but the Pi Foundation’s dedication to a clean and smooth software setup can also be found in Noobs, their support for the Pi Hardware, and to a more limited extent, their open source GPU driver offerings.

Now the Pi Foundation is doing something a bit weird. They’re offering their default Raspberry Pi installation for the Mac and PC. Instead of Flashing an SD card, you can burn a DVD and try out the latest the Pi ecosystem has to offer.

A few months ago, PIXEL became default distribution for the Raspberry Pi. This very lightweight distribution is effectively the Knoppix of 2016 – it doesn’t take up a lot of resources, it provides enough software to do basic productivity tasks, and it’s easy to use.

Now PIXEL is available as a live CD for anything that has i386 written somewhere under the hood. The PC/Mac distribution is the same as the Pi version; Minecraft and Wolfram Mathematica aren’t included due to licensing constraints. Other than that, this is the full Pi experience running on x86 hardware.

One feature that hasn’t been overlooked by a singular decade-old laptop in the Pi Foundation is Pixel’s ability to run on really old hardware. This is, after all, a lightweight distribution for the Raspberry Pi, so you shouldn’t be surprised to see this run on a Pentium II machine. This is great for a school in need of upgrading a lab, but the most interesting thing is that we now have a new standard in Linux live CDs and Flash drives.