Pi 5 Becomes ALSA-Compatible TOSLINK Sound Card

This is one of those hacks that makes you stop in your tracks and say, “wait, you can do that!?” — before realizing, oh, yes, of course you can do that. With enough computational power, you can do a lot of things, and the Raspberry Pi 5 is a far cry from the single-board computer’s humble beginnings. In this case, the “you can do that!?” is both that [Oliver] was able to get the digital audio TOSLINK working via an LED tied to one GPIO pin on the Pi, but also the larger project that is embedded in: using the Pi as a full featured 8-channel USB sound card called Camilla DSP.

For the first one: the old TOSLink standard is very simple, and all you need to do is blink an LED quickly enough. Considering the clock frequency of the Pi 5 is in the GHz range and the TOSLINK is the same 3.1 Mbit/s S/PDIF signal you could pull off your CD-ROM drive to your Sound Blaster, there’s no problem there. Except, wouldn’t the operating system get in the way? Well, not when you have enough clock cycles to throw at the problem. Using a Pi 5 doesn’t hurt: the RP1 I/O chip included on the board is keeping things smooth with its included PIO while Linux mucks about in the background. There’s a reason we called it the most important product Raspberry Pi ever made.

As for making a USB sound card from an SBC — well, we’re not sure why that got the “you can do that” reaction. The Raspberry Pi family had ‘gadget mode’ for over a decade now, allowing you to present the computer as a USB device, so why not a sound card? That’s a valid class of USB device.

Hacking Amazon Echo Show 8 3rd Gen Via UART And EMMC

Even with Amazon’s Echo Show devices running Linux in the form of the Android-derived FireOS, using them for non-Amazon approved purposes can be a chore at best. In the case of the Echo Show 8 even simple workarounds using ADB and the bootloader have been locked-down, requiring more drastic measures. Here [Vowed] over at the XDA forums shows off one such hack, involving directly tapping into the device’s eMMC.

Suffice it to say that this is not a hack for the faint of heart, with even the iFixit teardown guide for this device being rather daunting. Even after you get access to the mainboard, you still have to remove or cut open the metal can that covers the eMMC, so that you can unleash an eMMC programmer on it. It’s best to make sure to make a backup image of the original contents too, just in case you have to restore things.

With the shield out of the way you can solder fine wires to pads that connect to the eMMC to program it. You also have to solder wires to pads for the UART, though if you’re fancy you can also create a custom pogo pin adapter. With a serial connection established to the original firmware you can then enable features like ADB, and courtesy of the connected eMMC adapter it’s possible to directly alter system files to make rooting as easy as possible.

In addition to rooting the system you can also do a straight replacement of the eMMC contents, such as the demonstrated Debian installation. Even if not the most easy of mods, it’s good to see that it’s possible to repurpose these devices.

(Top image: Amazon Echo Show 8 3rd generation mainboard. Credit: iFixit, CC BY-NC-SA 3.0.)

Linux Fu: The Local Phonebook

I’ll admit it: I miss the simplicity of /etc/hosts. There was something elegant about it. You wanted laserprinter to mean 192.168.1.40, so you opened a text file and wrote:

192.168.1.40 laserprinter

Done. No cloud account, no discovery daemon, no dashboard with material-themed icons. Just a name and an address. The trouble, of course, is that /etc/hosts is only simple when you have one machine. The moment you have a desktop, a laptop, a Raspberry Pi, a NAS, a test box, and a phone or two, every little network change becomes a tiny distributed-database problem. Which copy of /etc/hosts is authoritative? Did you update the laptop? What about the machine you only boot once a month?

One Solution

Modern LANs solved this with mDNS, using Avahi on Linux. It resolves addresses that end in .local. Instead of asking a central DNS server “who is thing.local?”, a machine sends a multicast query on the local network: “who has thing.local?” The device that owns the name answers. This is why your Linux box named spock and usually be reached as spock.local on your LAN.

There are limits. mDNS is link-local; it is meant for the local LAN, not the whole Internet and shouldn’t route across subnets. Each device is supposed to publish its own name. That works fine when the device cooperates. But what about devices that do not publish mDNS? Or little embedded things that barely even have an IP address?

That is where I wanted the best of both worlds: keep a small authoritative /etc/hosts file on one Linux box, but publish selected entries onto the LAN using mDNS.

Continue reading “Linux Fu: The Local Phonebook”

This DIY Time Server Is More Accurate Than You Need

You almost certainly don’t have an application for the sort of accurate timekeeping that’s made possible by this enhanced version of [Cristiano Monteiro]’s satellite-backed time server. By his own admission, the vast majority of users will be more than happy to have their system’s time synchronized by the traditional Network Time Protocol (NTP). But if you’re really chasing those last few microseconds, that’s where the Precision Time Protocol (PTP) comes in.

With NTP, you can get within 10 milliseconds or so of your upstream time source — but PTP is accurate down to nanoseconds. Unless you’re performing some kind of scientific research, running a robotic assembly line, or perhaps doing high-speed financial trading, there’s no reason for this level of accuracy. In fact, PTP is such a niche technology that until the release of the ESP32-P4, [Cristiano] couldn’t even find an affordable enough chip that supported it.

Hardware-level support for PTP is important as there’s no way to achieve this level of accuracy with software alone, the capability needs to be baked into the Ethernet controller. As you might expect, it takes a highly accurate time source to make the most of PTP, and that’s where the navigation-grade Global Navigation Satellite System (GNSS) receiver comes in. All told the cost of the build is unsurprisingly higher than that of its predecessor, but [Cristiano] says it’s still a couple zeros shy of what a commercial offering would run.

As with his original time server from 2021, [Cristiano] made sure this build was as friendly as possible for hackers and makers. We especially like the 3D printed case designed in OpenSCAD, and his insistence that the gadget have a front panel with blinking status LEDs. Again, the vast majority of us don’t need our clocks to be accurate down to the nanosecond…but it’s nice to know we have the option.

ESP32 Keeps Tabs On Your Local Airspace

We know, we know. Despite being called ESP32-Plane-Radar, this project from [Mateusz Juszczyk] isn’t actually using radar. But thanks to the round LCD this desktop gadget does a fantastic job of recreating a classic radar display, and by pulling in Automatic Dependent Surveillance–Broadcast (ADS-B) data, the visuals even match nearby real-world aircraft.

Perhaps the best part of this project is just how easy it is for others to get in on the action. Although the presentation certainly looks professional — and expensive, if we’re being honest — there’s nothing particularly exotic going on here. Specifically, there’s ESP32-C3 Super Mini behind the scenes cranking through the ADS-B data and pushing it out to a circular GC9A01 display. A minimalistic 3D printed enclosure holds both components, and while it’s undeniably slick as-is, we can’t help but think there’s potential here for more elaborate designs.

As you probably guessed from the lack of a radio in the parts list, the code [Mateusz] provides doesn’t actually sniff ADS-B out of the air. It connects to the local network over WiFi, and then hits adsb.fi to pull in crowdsourced flight data. Since the device has to connect to the network anyway, the code also offers up a web-based configuration interface which puts a little more polish on what’s already an impressive presentation.

We used a round GC9A01 display on the Vectorscope back in 2023, so if anyone ports this over to their old Supercon badge we’d love to see it in action.

Thanks to [Mauricio] for the tip.

The Atari Jaguar Runs Linux

Among the many forgotten might-have-beens of the games console world, the Atari Jaguar occupies a special place. It was the final gasp of Atari Corporation, the Jack Tramiel-era incarnation of the famous pioneering game console brand that brought us the ST line of computers, and like Marlon Brando’s Terry Malloy character from On the Waterfront, it coulda been a contender. But the early ’90s games business wasn’t kind to the console from Sunnyvale, and it was squeezed from behind by the SNES and Genesis/MegaDrive, and in front from the PlayStation. Thirty years later then, can it run Linux? [Cakehonolulu] is here to show us how.

With only 2 megabytes of RAM and space for 8 megabytes of ROM, this is hardly a powerhouse. But its 16-bit 68000 processor is a supported Linux architecture, albeit with the -nommu flag on compilation. The “Jerry” DSP chip has the required serial port and timer to boot a first Linux kernel, and after a bit of hackery to make it jump to the ROM location, something boots. There’s no init process until the flat executable file for a -nommu kernel is navigated, but with that past a BusyBox userspace and a graphics driver for the “Tom” graphics chip gives it a chunky on-screen console. The code can be found in a GitHub repository, for the curious.

It seems to be the moment for 68k consoles to receive the Linux treatment, as it’s only a few weeks since we saw it on a MegaDrive. Other ’90s consoles aren’t far behind though, with the Nintendo 64 falling to the penguin a few years ago. Meanwhile, the Dreamcast had Linux running decades ago.


Jaguar image: Evan-Amos, Public domain.