October 2018

Here’s my last month’s activity on PulseAudio, OpenEmbedded and PipeWire:

PulseAudio

There is a bug report about misaligned volume sliders in pavucontrol. I thought it would be easy to fix, so I fired up Glade (which is the UI design tool that we use with pavucontrol). I haven’t done that in many many years, and I found out that the current Glade version doesn’t really like our current UI definition file. It warned about the file targeting Gtk version 2.x, and when saving the file without doing any manual modifications, there were many automatically-made changes, some of which made compiling fail. I decided to get rid of those problems, because otherwise working on the UI would be annoying. Pavucontrol already supported Gtk 3.x, but now the Gtk 2.x support has been dropped altogether, so Glade won’t complain about that any more. I also applied the automatic changes done by Glade and adapted the pavucontrol code to deal with those changes. The original volume slider alignment bug remains unfixed, but I’ll probably get to that soon.

It was reported that the speaker-test program from ALSA in certain conditions didn’t play anything. I was able to reproduce that, and I spent some time investigating it. I found the likely root cause: when an application requests to be notified when all of its audio has finished playing, sometimes PulseAudio sends that notification immediately even if there’s still some audio left to play. It’s a bit complicated to fix, but I plan to do work on it in the not-too-distant future.

Arun is working on adding support for compressed audio passthrough streams without requiring any special wrapping to make it behave more like uncompressed audio, and I spent some time discussing the design with him. PulseAudio already supports compressed audio with S/PDIF and HDMI, but handling those is easier, because the data is wrapped in a way that makes the bitrate constant and suitable for the regular ALSA uncompressed audio API. There is a separate compressed audio API in ALSA that is used with hardware with compressed format decoding abilities. Arun also wants to add support for timestamped playback, which means that applications can specify timestamps when their audio buffers should be played. The use cases for that are a bit foggy to me, but apparently there is some hardware that can utilize such timestamps for synchronization. The timestamp stuff is not directly related to the compressed audio stuff (although they can be used together), but both will require changes in the PulseAudio client API, and it would be good to add support for both at the same time.

Reviewed patches:

  • Alexander E. Patrakov fixed 5.1 surround content playback on 5.1 sinks when the stream uses the “side” channel position and the sink uses the “rear” channel position in their respective channel maps. There is widespread confusion or disagreement about what channel positions 5.1 streams should use. Now PulseAudio is smart enough to send the stream’s “side” channels to the sink’s “rear” output. Earlier PulseAudio tried to synthesize the “rear” output from several other channels in a way that sounded really bad.
  • Sangchul Lee has been working on a patch to improve the “avoid-resampling” option behaviour so that PulseAudio automatically switches the hardware sample format according to the application stream format. After a couple of more iterations I now accepted the patch.
  • Zakhary Husak added support for a new 2018 variant of the Steelseries Arctis 7 USB headset, and jorisc90 added support for the Arctis Pro Wireless USB headset.
  • João Paulo Rechi Vita sent patches for “turning off” (i.e. switching to a profile without sinks or sources) ALSA cards that have nothing plugged in. This should help with switching streams automatically away from HDMI when an HDMI monitor is unplugged. I requested some improvements to the patches, so they haven’t been merged yet.
  • Arun Raghavan sent patches for improving the speed of automatic tests that our CI system runs. There remains some unclear stuff that needs to be sorted out before the patches can be merged.

OpenEmbedded

I started to work on updating the ALSA recipes to version 1.1.7.

PipeWire

As I mentioned in the PipeWire hackfest report, I’m nowadays trying to work 10 hours per week on PipeWire. This was the first month with that plan, and I didn’t get anywhere near the goal, but anyway, in addition to writing that report, I started looking through the recent commits in the work branch to get a feel of what’s going on in the project.