Backport of "pulsedeviceprovider: Add compare_device_type_name function and missing lock" into 1.22
Backport of !6558 (merged) "pulsedeviceprovider: Add compare_device_type_name function and missing lock".
Commits:
- a6c8c6f8 pulsedeviceprovider: Add is_default_device_name function and missing lock