Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.36.0: selected application specific audio output is not remembered (by pipewire/wireplumber) #12041

Closed
tgurr opened this issue Jul 28, 2023 · 2 comments · Fixed by #12050
Closed
Labels

Comments

@tgurr
Copy link

tgurr commented Jul 28, 2023

Important Information

Provide following Information:

  • mpv version: 0.36.0
  • Linux Distribution and Version: Exherbo Linux
  • Source of the mpv binary: Exherbo Package (source-based)
  • If known which version of mpv introduced the problem: 0.36.0
  • Window Manager and version: Kwin 5.27.6
  • GPU driver and version: NVIDIA 535.86.05
  • Possible screenshot or video of visual glitches: -
  • Pipewire version: 0.3.76
  • Wireplumber version: 0.4.14

/etc/mpv/mpv.conf:

hwdec=auto
cache=no
gpu-api=vulkan
ao=pipewire
vo=gpu-next

issue also happens when passing --no-config.

Reproduction steps

With mpv 0.36.0:

  1. Play any file with audio, switch audio output to headphones for the application mpv
  2. See the setting not being remembered the next time you play another or the same file

kde-plasma-mpv-0 36 0

Expected behavior

Like with mpv 0.35.1: Have the selected audio output device for the application mpv being remembered (by pipewire/wireplumber). The reason I'm reporting this here instead of pipewire/wireplumber is the fact that when I downgrade mpv back to 0.35.1 it works like intended again and I also didn't observe this issue with other applications like browsers, games and so on.

kde-plasma-mpv-0 35 1

Actual behavior

Selected audio output device for the application mpv 0.36.0 is not being remembered.

Log file

Nothing in regards to the problem is visible in the mpv logs.

Sample files

Happens with any file.

@tgurr tgurr added the os:linux label Jul 28, 2023
@tgurr tgurr changed the title 0.36.0: selected audio output is not remembered (by pipewire/wireplumber) 0.36.0: selected application specific audio output is not remembered (by pipewire/wireplumber) Jul 28, 2023
@t-8ch
Copy link
Contributor

t-8ch commented Jul 29, 2023

This should be the same problem that #11253 tries to fix.
But the problematic commit 535cd6f is also in 0.35, so something else may be going on.

What happens for you with this patch:

diff --git a/audio/out/ao_pipewire.c b/audio/out/ao_pipewire.c
index 0a39e4e1a596..0e29f69e58a9 100644
--- a/audio/out/ao_pipewire.c
+++ b/audio/out/ao_pipewire.c
@@ -713,6 +713,7 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg)
                     break;
                 }
                 case AOCONTROL_UPDATE_MEDIA_ROLE: {
+                    break;
                     enum aocontrol_media_role *role = arg;
                     struct spa_dict_item items[1];
                     const char *role_str;

@tgurr
Copy link
Author

tgurr commented Jul 29, 2023

This should be the same problem that #11253 tries to fix. But the problematic commit 535cd6f is also in 0.35, so something else may be going on.

What happens for you with this patch:

Applying the attached patch indeed appears to fix the issue for me, the selected application specific output device is remembered again.

t-8ch added a commit to t-8ch/mpv that referenced this issue Jul 30, 2023
As the role property is interpreted by wireplumber it can only be
evaluated when creating the stream. The current, dynamic mechanism is
racy so revert it.

See: mpv-player#11253
Fixes: mpv-player#12041
This reverts commit 535cd6f.
sfan5 pushed a commit that referenced this issue Jul 30, 2023
As the role property is interpreted by wireplumber it can only be
evaluated when creating the stream. The current, dynamic mechanism is
racy so revert it.

See: #11253
Fixes: #12041
This reverts commit 535cd6f.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants