From f6cc216e428f71a3cc49b08202b2247288ae40cb Mon Sep 17 00:00:00 2001 From: Cameron Clough Date: Wed, 30 Nov 2022 15:01:41 -0800 Subject: [PATCH] pactl: use default sink --- system/hardware/pc/hardware.h | 2 +- system/hardware/tici/hardware.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/hardware/pc/hardware.h b/system/hardware/pc/hardware.h index 34f365ec6be6e2..529b4bfe9d1efc 100644 --- a/system/hardware/pc/hardware.h +++ b/system/hardware/pc/hardware.h @@ -16,6 +16,6 @@ class HardwarePC : public HardwareNone { char volume_str[6]; snprintf(volume_str, sizeof(volume_str), "%.3f", volume); - std::system(("pactl set-sink-volume 1 " + std::string(volume_str)).c_str()); + std::system(("pactl set-sink-volume @DEFAULT_SINK@ " + std::string(volume_str)).c_str()); } }; diff --git a/system/hardware/tici/hardware.h b/system/hardware/tici/hardware.h index 91daf308f69e39..02becb76e49b0e 100644 --- a/system/hardware/tici/hardware.h +++ b/system/hardware/tici/hardware.h @@ -43,7 +43,7 @@ class HardwareTici : public HardwareNone { char volume_str[6]; snprintf(volume_str, sizeof(volume_str), "%.3f", volume); - std::system(("pactl set-sink-volume alsa_output.platform-soc_sound-tavil.stereo-fallback " + std::string(volume_str)).c_str()); + std::system(("pactl set-sink-volume @DEFAULT_SINK@ " + std::string(volume_str)).c_str()); } static bool get_ssh_enabled() { return Params().getBool("SshEnabled"); };