sound setting: a possible regression on profile_combo_box
There is no issue on gnome-control-center-3.28.2 (ubuntu 18.04) There is issue on gnome-control-center-3.36.2 (ubuntu 20.04)
On the ubuntu 18.04, open the sound setting, there is profile combo box, users could select wanted profile and then it will trigger the callback function profile_selection_changed()
While on ubuntu 20.04, open the sound setting, there is no profile combo box if there is only one profile, users couldn't select profile, so the callback function profile_changed_cb() shouldn't be triggered. But the reality is upon opening the sound-setting, the callback function is called, and whenever the input/output device changes, the callback function is called too. This behaviour is greatly different from gcc-3.28.2.
The callback function should be called only users actively select profile, the callback function will call gvc_mixer_control_change_profile_on_selected_device() in the libgvc, in this function it will set profile_swapping_device_id, then on each output/input device updates, it will call pa_context_set_default_sink/source, this will set configured_default_sink/source in the pulseaudio. The configured_default_sink/source only should be set when users select device from UI, but with gcc-3.36.2, even users don't select anything, the gcc will trigger profile_changed_cb(), then through libgvc and pulseaudio, the configured_default_sink/source is set or changed.
Since there is no profile selection combo box from UI if users have no other profile to select (only 1 profile in total) with gcc-3.36.2, why the callback function profile_changed_cb() is triggered? Could we do some change to let it behave the same as gcc-3.28.2: if users select the profile, the callback function will be called, otherwise it will not be called.