On a style note, please consistently use 4-space indents. There's also an unnecessary diff in `pulse_add_device`.
I'd also suggest falling back to the default format, in the case where the unix call fails for some reason. But maybe there's a good reason to prefer failing?