Skip to content

cad-pulse: don't assume card bus path is exactly "platform-sound"

Minecrell requested to merge Minecrell/callaudiod:msm8916 into master

At the moment, callaudiod ignores all sound cards where the "bus path" is not exactly "platform-sound". While this is a very common name when the sound card is represented by a simple "sound" node on device tree platforms, it is not guaranteed to be exactly named like this.

For example, on devices using the Qualcomm Snapdragon 410 (MSM8916) the sound node has a memory address assigned in the device tree. PulseAudio therefore generates a different bus path for the sound card, namely "platform-7702000.sound".

This commit changes the check to match only the "platform-" prefix. This should be good enough to ignore external sound cards etc, but avoids assuming a specific name of the sound card.
(Note: Actually not so sure about the exact reason for that check, any better suggestions? :D)

This allows callaudiod to work on the MSM8916 smartphones supported in postmarketOS.

Merge request reports