AVRCP Cover Art in iOS / Android
In 2019, just as we finished implementing the AVRCP profile, which is used to control audio playback, e.g. pause & volume control on Bluetooth speakers, the Cover Art feature was added to the AVRCP 1.6 specification. At the time, modern car infotainment systems already showed nice song covers with both iOS and Android. As Cover Art seemed to be in use, we decided to implement it as well.
After setting up the minimal logic to support it, we tested the code with an Android device, but it turned out that the Cover Art feature wasn’t supported there. Puzzled, we also tried the current iOS version on an iPhone, but it wasn’t supported there either. Still curious, we inspected the features provided by Apple’s MFi program and indeed, the iAP2 profile was providing “Now Playing”, which provides information about the current played track including cover art.
Although iAP2 could be used with iOS devices, this still didn’t explain where the covers come from with Android. After some Internet research it became clear that there was really only one obvious option left: song covers are looked up by its artist/album/song information, either in a large local database, or in rare case by an Internet query if the car was connected. Wow… so much work, which wouldn’t be needed if Cover Art would have been supported by the major mobile phone OSs.
Implementing a feature which would have been mainly used with mobile phones, but was not supported by iOS and Android, didn’t seem like a beneficial use of our time. At that point, we stashed our changes for later – and forgot about it…
Last year, a new customer asked us for Cover Art support. This time, the world was ready as support for AVRCP Cover Art has been added in Android 12 and iOS 13. Be aware that on Android 12 and later, it’s disabled by default and it requires an elaborate dance to enable developer mode, before one can find the “AVRCP Version” popup down there, but hey, it’s there. Even on a brand new Pixel 7a with Android 13/Pixel 7a, AVRCP is still set to 1.5 by default.
With a reason to implement and actual devices to test against, we’ve added support for Cover Art in BTstack v1.5.6. Shortly before that, BTstack was officially selected to provide Bluetooth functionality on the Raspberry Pi Pico W and Pimoroni kindly sent us a Cosmic Unicorn, a device with a 32×32 RGB LED matrix, a small speaker and a Pico W. Even better, Gadgetoid already implemented a nice spectrum analyzer for it based on our A2DP Sink Demo. With everything already in place, it became a natural target to demonstrate the new Cover Art feature.
The actual image transfer in AVRCP Cover Art uses the Bluetooth Image Profile (BIP), which is quite flexible regarding image resolution and picture format. To allow for basic audio playback devices, the profile mandates to provide a thumbnail, which is a 200 x 200 JPEG image. 200 x 200 isn’t much, but still much more than the 32×32 pixels of the Cosmic Unicorn. The JPEG Library allows for a fast decoding at 1/8 resolution, which allows to show a 25 x 25 pixel image.
We extended Gadgetoid’s Cosmic Unicorn demo that already shows a nice spectrum analyzer with a scroller for artist/album/song and display the cover art.
Click on the image for a quick video of the extended demo on YouTube.
The A2DP Sink demo running on a desktop system stores the thumbnails as a 200×200 JPEG, too.