Archive for the 'Hacks' Category

Page 2 of 9

forked-daapd: future directions

I’ve got a few mails lately enquiring about the lack of visible activity on forked-daapd in recent times. Well, for one, I’ve been busy with other things, but there’s also been some non-public activity.

So, here’s what should happen in the next few months, in no particular order:

  • overhaul of the database schema and code;
  • metadata handling will (finally, probably) move away from ffmpeg;
  • release of the libdispatch-based forked-daapd code.

The database overhaul will bring a much-needed speedup on small devices and big libraries. It’s being worked on, but it ground to a halt with new year and all. Hopefully it’ll resume soon.

I’m also giving up on ffmpeg for metadata extraction. It doesn’t work well at all (as everybody knows by now) and it’s actually getting worse and worse. With the ffmpeg takeover/fork (call it whatever you want) it’s unclear what’s going to happen on this front. So I’m giving up and the metadata scanner will probably switch to using TagLib (one more dependency, yay).

Last, but definitely not least, the libdispatch codebase should finally see the light at the end of the tunnel in the coming months. I’ve been working on this since July last year, moving away from libevent. If you never heard about libdispatch, or Grand Central Dispatch, read my previous post on the subject. I’ll talk about it in more details at a later date.

Finally, as far as Squeeze is concerned, I plan to provide forked-daapd backports as long as it’ll be practical to do so.

This is it for now. I don’t have a “one more thing” in my sleeve, sorry. Time is at a premium right now, so big things have to wait.

pommed v1.36/v1.37: updates, fixes, MacBook7,1

pommed v1.36 is out and brings support for the MacBook7,1, along with a few fixes and updates.

A typo in the pmac keyboard backlight has been fixed, so fading now works there too. Product IDs for the ANSI and JIS keyboard variants for pmac machines were also added. It’s been like forever since I last touched that code; not a lot of people still use those (great) machines.

This release also contains a small update that will make it compatible with future kernel releases as applesmc will no longer have a fixed a name and location in sysfs.

Update: I just noticed a bug in 1.36, so 1.37 is out now. It also contains two patches that were submitted through Alioth.

pommed v1.35: October 2010 MacBook Air

I’ve just release pommed v1.35, adding support for the October 2010 MacBook Air machines.

Kernel support for these machines has been submitted during the 2.6.37-rc cycle, so it will appear in 2.6.37 or 2.6.38 depending on maintainers, merge window and patch readiness.

The machines have new keyboard assemblies (WellSpring IV and IVa) requiring new quirks in the HID layer, new trackpads, need sound & applesmc configurations of their own and the backlight module needs to know about them. So, make sure your kernel has all of that, otherwise your machine will be hard to use and pommed will not work at all.

Update: #603395 filed against linux-2.6 with all the needed patches attached. It looks like we’ll have all of this in Squeeze, thanks to our kernel team.

forked-daapd: Remote 2.0 and quick status update

Apple released Remote 2.0, which doesn’t work with forked-daapd. We are looking into it and trying to find out what the problem is. There are also more changes needed to support Remote 2.0 properly, so this will take some time.

Remote 2.0 also introduces support for the iPad, with very different features and new requests. I don’t have an iPad, so this won’t be supported.

For now, you should stick to the old version of Remote (1.3.3) until we get 2.0 working, at which point we’ll probably pull support for the previous version in an attempt to maintain everybody’s and the codebase sanity.

In other news, I have a few changes pending that I want to get in before I cut a new release.

forked-daapd: v0.12, release tarballs

Hey, look, a release! I’ve decided to start making tarball releases that make it easier to build forked-daapd, especially on embedded platforms.

The tarballs come with the build system already generated (as should any real release) and they also contain pre-generated source files for the ANTLR3-based parsers used in forked-daapd. The pre-generated files will be used if antlr3 is not available for the build.

I expect that pretty much everybody will end up using the generated files, given the feedback I’ve had about ANTLR3. I hope this will also clear the misconception that forked-daapd depends on Java.

I have expanded the installation instructions, making the distinction between building from the git tree and building from the tarballs.

A few more fixes made it to this version since my last post, and Kai also put the final piece to the sort headers by adding sort headers to the song listings.

Tarballs are available at http://alioth.debian.org/~jblache/forked-daapd/. Tarball integrity can be verified with GPG using the matching GPG signature file and my F5D65169 GPG key from the Debian keyring.

forked-daapd: new features, Squeeze

A number of things have happened in and around forked-daapd in the last month or so, so let’s review the new features and the plan for Squeeze.

On the features front, Kai Elwert has done a lot of work since July to implement missing features at the DAAP and DACP level to get better support for Remote:

  • playlists can now be played from Remote;
  • listings are sorted in a way that’s closer to what you get from iTunes;
  • sort headers are now generated when requested so Remote can display the A-Z quick access list.

Also, forked-daapd can now remember which speakers were selected before shutdown and attempts to automatically reselect these speakers the next time around. Speakers that were selected will be reselected if they appear at most 5 minutes after startup and the player isn’t running at that time.

On the Squeeze front, a viable snapshot of forked-daapd will release with Squeeze. This snapshot doesn’t have all the Remote improvements listed above, although it’s got the playlist support, can remember the speaker selection and includes bug fixes.

My plan is to provide backports through backports.org once Squeeze is released and for as long as possible after that.

There’s always more in the works, so stay tuned =)

Grand Central Dispatch available in Debian

Thanks to the work of Mark Heily, both upstream and in Debian, this week saw the arrival of libdispatch in Debian.

libdispatch is the userspace component of Apple’s Grand Central Dispatch technology, designed to help write applications that really take advantage of multicore processors without having to fiddle directly with threads and locking (and getting it terribly wrong).

To get that working on Linux, Mark wrote a userspace implementation of the pthread workqueues and a kqueue compatibility library (libkqueue). He also packaged the Blocks runtime (libblocksruntime) for Debian so as to build libdispatch with Blocks support. That means code using libdispatch must be built with CLang (or llvm-gcc-4.2) rather than gcc, as getting Blocks support in gcc in the near future looks highly improbable.

On Mac OS X and FreeBSD, a kernel-based implementation of the pthread workqueues is used; we don’t have that for Linux yet. The all-userspace implementation we have at the moment works really well; there are some caveats, though, but that’s no reason for not starting to play with libdispatch right now!

Try it out, it’s great. Thanks again, Mark!

forked-daapd: available in experimental

Following the update of antlr3 in unstable, I have now uploaded forked-daapd to Debian. For now, and until the new version of antlr3 is ready to migrate to testing, forked-daapd will only be available in experimental.

I have also uploaded the ANTLR v3 C runtime (aka libantlr3c) to unstable. It’s currently blocked from migrating to testing, until antlr3 is ready to migrate.

Hopefully, the issues affecting antlr3 3.2 in unstable will be resolved soonish and all of this will migrate to testing and be part of Squeeze.

forked-daapd: now with AirTunes v2 streaming

I’ve been working on this for a few months now; it’s taken quite some time because I wanted to do it right and deliver something better than what already existed in the OpenSource world as far as that particular technology was (not) concerned. So here it is:

AirTunes v2 UDP streaming

forked-daapd can now do streaming to multiple AirTunes devices (as well as the local soundcard) and can be controlled from Remote (and, ideally, from anything that speaks DACP).

I’m releasing this early while the paint is still wet and not everything works on the DACP-side of things. Case in point, while playing a song or an album is supported, playing a playlist isn’t. There’s some work needed on this particular feature, and it’ll get there eventually.

There have been a couple of other changes in the codebase in recent weeks too; details after the jump.

Implementing AirTunes v2 has been quite fun and, in addition to releasing the forked-daapd code today, I’ve also taken the time to write down my findings about the protocol so others can experiment with it. This documentation is by no means exhaustive nor complete as far as the protocol goes; if you find out anything I haven’t, let me know so I can update this document.

Continue reading ‘forked-daapd: now with AirTunes v2 streaming’

pommed v1.32: maintenance release

I’ve just released pommed v1.32, a minor maintenance release for the 12″ PowerBook G4.

I’ve just realized that I did not post an announce for pommed v1.31 a while back, which was also a maintenance release, adding support for the MacBookPro5,4 (15″ June 2009) and the latest wireless keyboard.