With the next commit, we'll start updating card profiles after the initial
creation of the GvcMixerCard, so get gvc_mixer_card_set_profiles() ready and
support replacing the list of profiles instead of only setting it a single
time.
When we change the card profile, there's two paths the current profile gets
updated after the change: From _pa_context_set_card_profile_by_index_cb()
and from update_card() in gvc-mixer-control.c. Both call
gvc_mixer_card_set_profile(), and if the profile change was initiated by us,
we might call set_profile() twice. Handle this a bit better in set_profile()
and early-return in case the current profile is already set.
Keep track of the `GParamSpec`s of the properties. This allows us to use
`g_object_notify_by_pspec()`, which is a bit more performant than
`g_object_notify()`(as it doesn't need to take a global lock to lookup
the property name). It also prevents accidental typos in the property
name at compile time.
Also always add `G_PARAM_STATIC_STRINGS`, to prevent some unnecessary
string duplications of property name, blurb and description.
This will allow to have different icons for internal audio cards
(which are flagged generically as "audio-card"), depending on which
port is in use (ie. headphones or speakers).
This requires the new icon information, which is only exported by
PulseAudio 3.0. If it's not available, we fallback to card icons
like before.
https://bugzilla.gnome.org/show_bug.cgi?id=689931