gnome-control-center/panels/sound
Hui Wang 0f18a662be sound: update the volume-slider after getting a valid stream
In the ubuntu 20.04, we met an issue about the output volume-slider
on the machine with the legacy HDA audio driver, the output device
is the Speaker first (analog-stereo pa sink), then we connect a hdmi
monitor, the HDMI audio is in the output combo-box, we select the
hdmi audio (hdmi-stereo pa sink) from the combo-box, the hdmi audio
becomes the active output device now, we adjust the output volume from
the volume-slider, the slider UI is changed, but the output sound
is not changed with the UI.

The root cause is when the speaker is active, the pulseaudio only
keeps the analog-stereo sink, the sink hdmi-stereo is unlinked, when
users select the hdmi audio from UI, the pulseaudio will unlink
analo-stereo sink and create hdmi-stereo sink, but before hdmi-stereo
is created, the output_device_changed_cb() is called and
gvc_mixer_control_get_stream_from_device() returns a NULL since the
hdmi-stereo sink is not created yet in the pulseaudio. Because stream
is NULL, the output_volume_slider->stream is NULL, users can't change
the output volume via the volume-slider.

To fix it, we add a output_volume_slider->stream check in the
device_update_cb(), if it is NULL, get the stream and set it to
volume-slider. In this function, the sink hdmi-stereo is created
already, so the stream is not NULL. And this change also applies to
input as well.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
2021-08-01 22:12:11 +00:00
..
icons sound: Add missing subwoofer icons 2020-01-07 20:49:12 +00:00
sounds sound: Rename new sound panel to replace old one 2019-02-07 09:31:18 +13:00
cc-alert-chooser.c sound: Rename new sound panel to replace old one 2019-02-07 09:31:18 +13:00
cc-alert-chooser.h sound: Rename new sound panel to replace old one 2019-02-07 09:31:18 +13:00
cc-alert-chooser.ui sound: Rename new sound panel to replace old one 2019-02-07 09:31:18 +13:00
cc-balance-slider.c sound: Rename new sound panel to replace old one 2019-02-07 09:31:18 +13:00
cc-balance-slider.h sound: Rename new sound panel to replace old one 2019-02-07 09:31:18 +13:00
cc-balance-slider.ui sound: Rename new sound panel to replace old one 2019-02-07 09:31:18 +13:00
cc-device-combo-box.c sound: Clean up labels of devices without origin 2019-05-22 17:19:26 +02:00
cc-device-combo-box.h sound: Rename new sound panel to replace old one 2019-02-07 09:31:18 +13:00
cc-device-combo-box.ui sound: Make the panel adaptive 2019-02-18 15:12:53 +01:00
cc-fade-slider.c sound: Rename new sound panel to replace old one 2019-02-07 09:31:18 +13:00
cc-fade-slider.h sound: Rename new sound panel to replace old one 2019-02-07 09:31:18 +13:00
cc-fade-slider.ui sound: Rename new sound panel to replace old one 2019-02-07 09:31:18 +13:00
cc-level-bar.c sound: Remove unused variable 2019-06-16 01:01:36 +00:00
cc-level-bar.h sounds: Use correct mute icon in the input section 2019-06-16 01:01:36 +00:00
cc-output-test-dialog.c sound: Rename new sound panel to replace old one 2019-02-07 09:31:18 +13:00
cc-output-test-dialog.h sound: Rename new sound panel to replace old one 2019-02-07 09:31:18 +13:00
cc-output-test-dialog.ui sound: Use "avatar-default-symbolic" in sound test dialog 2019-09-17 10:33:38 +02:00
cc-profile-combo-box.c sound: Stop non-interactive profile changes from triggering changed events 2020-06-17 19:29:57 +00:00
cc-profile-combo-box.h sound: Rename new sound panel to replace old one 2019-02-07 09:31:18 +13:00
cc-profile-combo-box.ui sound: Rename new sound panel to replace old one 2019-02-07 09:31:18 +13:00
cc-sound-button.c sound: Rename new sound panel to replace old one 2019-02-07 09:31:18 +13:00
cc-sound-button.h sound: Rename new sound panel to replace old one 2019-02-07 09:31:18 +13:00
cc-sound-button.ui sound: Remove icon from sound theme buttons 2019-06-16 01:01:36 +00:00
cc-sound-enums.h sounds: Use correct mute icon in the input section 2019-06-16 01:01:36 +00:00
cc-sound-panel.c sound: update the volume-slider after getting a valid stream 2021-08-01 22:12:11 +00:00
cc-sound-panel.h sound: Rename new sound panel to replace old one 2019-02-07 09:31:18 +13:00
cc-sound-panel.ui sound: Use content style for listboxes 2021-05-19 03:25:47 +00:00
cc-speaker-test-button.c sound: Rename new sound panel to replace old one 2019-02-07 09:31:18 +13:00
cc-speaker-test-button.h sound: Rename new sound panel to replace old one 2019-02-07 09:31:18 +13:00
cc-speaker-test-button.ui sound: Rename new sound panel to replace old one 2019-02-07 09:31:18 +13:00
cc-stream-list-box.c sound: Pass a GvcMixerControl to the stream volume sliders 2019-09-09 15:23:32 +00:00
cc-stream-list-box.h sounds: Use correct mute icon in the input section 2019-06-16 01:01:36 +00:00
cc-stream-row.c sound: Prefer symbolic icons for audio streams 2020-02-13 21:12:37 +00:00
cc-stream-row.h sound: Pass a GvcMixerControl to the stream volume sliders 2019-09-09 15:23:32 +00:00
cc-stream-row.ui sound: Add shadow to application icons 2019-03-13 13:46:53 +01:00
cc-subwoofer-slider.c sound: fix subwoofer slider 2020-09-25 01:53:44 +00:00
cc-subwoofer-slider.h sound: Fix volume sliders regression 2019-08-25 09:51:31 +00:00
cc-subwoofer-slider.ui sound: Rename new sound panel to replace old one 2019-02-07 09:31:18 +13:00
cc-volume-slider.c sound: update the volume-slider after getting a valid stream 2021-08-01 22:12:11 +00:00
cc-volume-slider.h sound: update the volume-slider after getting a valid stream 2021-08-01 22:12:11 +00:00
cc-volume-slider.ui sounds: Use correct mute icon in the input section 2019-06-16 01:01:36 +00:00
gnome-sound-panel.desktop.in.in panel-list: Reorganize Devices section 2020-01-06 15:15:30 +00:00
gvc-mixer-stream-private.h sound: Replace ifdefs with #pragma once 2019-11-27 21:56:10 +00:00
meson.build sound: Rename new sound panel to replace old one 2019-02-07 09:31:18 +13:00
sound.gresource.xml sound: Add missing subwoofer icons 2020-01-07 20:49:12 +00:00