fix: allow volume control when QConnect peer renderer is active on ALSA hw:

When ALSA Direct hw: is active but a remote device (phone, speaker) is
the active renderer via QConnect, volume changes go to the remote device
not the local DAC. The 100% lock should only apply to local playback.

cc
This commit is contained in:
vicrodh committed 2026-03-20 17:34:47 -06:00
1 parent a4782c645e
commit dde7c192dc
1 file changed
+6 -6
+6 -6
View File
@@ -2198,8 +2198,8 @@
}
async function handleVolumeChange(newVolume: number) {
// ALSA Direct hw: locks volume at 100%
if (isAlsaDirectHw) return;
// ALSA Direct hw: locks volume at 100% — unless controlling a remote renderer
if (isAlsaDirectHw && !qconnectPeerRendererActive) return;
try {
const handledRemotely = await invoke<boolean>('v2_qconnect_set_volume_if_remote', { volume: newVolume });
@@ -2216,8 +2216,8 @@
}
async function handleToggleMute() {
// ALSA Direct hw: locks volume at 100%
if (isAlsaDirectHw) return;
// ALSA Direct hw: locks volume at 100% — unless controlling a remote renderer
if (isAlsaDirectHw && !qconnectPeerRendererActive) return;
// Determine current mute state from volume
const currentlyMuted = volume === 0;
@@ -5577,7 +5577,7 @@
onToggleQconnectConnection={handleQobuzConnectButton}
qconnectBusy={qobuzConnectBusy}
{showQconnectDevButton}
volumeLocked={isAlsaDirectHw}
volumeLocked={isAlsaDirectHw && !qconnectPeerRendererActive}
/>
{:else}
<NowPlayingBar
@@ -5599,7 +5599,7 @@
onToggleQconnectConnection={handleQobuzConnectButton}
qconnectBusy={qobuzConnectBusy}
{showQconnectDevButton}
volumeLocked={isAlsaDirectHw}
volumeLocked={isAlsaDirectHw && !qconnectPeerRendererActive}
/>
{/if}