Two Pulseaudio streams share the same settings

I'm using my PC as an A2DP sink for my phone.

Both it and the stream for Spotify load the same saved settings. When one of them is closed / opened, it loads the volume / sink of the most recently open one. The bluetooth sink closes and opens often, depending on whether audio is played from the phone.

The issue seems to be the media.role and module-stream-restore.id properties in the streams.
Using pactl list sink inputs I get:

Spotify

Sink Input #282
        Driver: protocol-native.c
        Owner Module: 14
        Client: 244
        Sink: 7
        Sample Specification: s16le 2ch 44100Hz
        Channel Map: front-left,front-right
        Format: pcm, format.sample_format = "\"s16le\""  format.rate = "44100"  format.channels = "2"  format.channel_map = "\"front-left,front-right\""
        Corked: no
        Mute: no
        Volume: front-left: 19661 /  30% / -31.37 dB,   front-right: 19661 /  30% / -31.37 dB
                balance 0.00
        Buffer Latency: 1038117 usec
        Sink Latency: 7226 usec
        Resample method: n/a
        Properties:
                media.role = "music"
                media.name = "Spotify"
                application.name = "Spotify"
                native-protocol.peer = "UNIX socket client"
                native-protocol.version = "33"
                application.process.id = "71325"
                application.process.binary = "spotify"
                window.x11.display = ":0"
                application.language = "en_US.UTF-8"
                application.process.machine_id = "40b0367cd80f45479387499c748e89f5"
                application.process.session_id = "2"
                application.icon_name = "spotify-client"
                module-stream-restore.id = "sink-input-by-media-role:music"

Phone Loopback

Sink Input #283
        Driver: module-loopback.c
        Owner Module: 100
        Client: n/a
        Sink: 5
        Sample Specification: s16le 2ch 44100Hz
        Channel Map: front-left,front-right
        Format: pcm, format.sample_format = "\"s16le\""  format.rate = "44100"  format.channels = "2"  format.channel_map = "\"front-left,front-right\""
        Corked: yes
        Mute: no
        Volume: front-left: 81920 / 125% / 5.81 dB,   front-right: 81920 / 125% / 5.81 dB
                balance 0.00
        Buffer Latency: 200000 usec
        Sink Latency: 475 usec
        Resample method: speex-float-1
        Properties:
                media.role = "music"
                module-stream-restore.id = "sink-input-by-media-role:music"
                media.name = "Loopback from DG6"
                media.icon_name = "audio-card-bluetooth"

My Spotify volume is usually really low (~35%), so everytime this happens, the bluetooth stream volume becomes the same, and I have to change it constantly.

I tried pa_volume, but it shows again that they share the same settings under the name "music".
At this point, I'll take any solution. It's driving me crazy having to fix it every 20 minutes.

Let me know if there's any more info that's needed!

Thanks for your time.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by