[PR #976] [MERGED] Set the PulseAudio name to match librespot's device name #1170

Closed
opened 2026-02-27 20:01:26 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/976
Author: @JasonLG1979
Created: 3/8/2022
Status: Merged
Merged: 3/19/2022
Merged by: @roderickvd

Base: devHead: pulseaudio-name


📝 Commits (1)

  • e0e23c9 Use the librespot name arg for the app name in the PulseAudio backend

📊 Changes

3 files changed (+62 additions, -19 deletions)

View changed files

📝 CHANGELOG.md (+3 -0)
📝 playback/src/audio_backend/pulseaudio.rs (+22 -19)
📝 src/main.rs (+37 -0)

📄 Description

This sets the name displayed by PulseAudio to Librespot - Instance Name if a name is given otherwise Librespot (the default name).

librespot -n "Instance Name" Results in:

Screenshot from 2022-03-08 17-39-23

This also sets the correct "role" to "music" as per the docs:

https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Clients/ApplicationProperties/

PA_PROP_MEDIA_ROLE

"This is a property of the actual streamed data, not so much the application"

Roles are used for policies, things like automatically muting a music player when a call comes in and whatnot.

For bonus points this also sets PULSE_PROP_application.icon_name to audio-x-generic so that we get a nice icon in the PulseAudio settings by our name instead of a missing icon placeholder.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/librespot-org/librespot/pull/976 **Author:** [@JasonLG1979](https://github.com/JasonLG1979) **Created:** 3/8/2022 **Status:** ✅ Merged **Merged:** 3/19/2022 **Merged by:** [@roderickvd](https://github.com/roderickvd) **Base:** `dev` ← **Head:** `pulseaudio-name` --- ### 📝 Commits (1) - [`e0e23c9`](https://github.com/librespot-org/librespot/commit/e0e23c9167db6f56a6645c32ea73bb627e5f9d13) Use the librespot name arg for the app name in the PulseAudio backend ### 📊 Changes **3 files changed** (+62 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+3 -0) 📝 `playback/src/audio_backend/pulseaudio.rs` (+22 -19) 📝 `src/main.rs` (+37 -0) </details> ### 📄 Description This sets the name displayed by PulseAudio to `Librespot - Instance Name` if a name is given otherwise `Librespot` (the default name). `librespot -n "Instance Name"` Results in: ![Screenshot from 2022-03-08 17-39-23](https://user-images.githubusercontent.com/6667703/157344531-59c0b8eb-f793-4eee-a01f-0b56387857db.png) This also sets the correct "role" to "music" as per the docs: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Clients/ApplicationProperties/ PA_PROP_MEDIA_ROLE "This is a property of the actual streamed data, not so much the application" Roles are used for policies, things like automatically muting a music player when a call comes in and whatnot. For bonus points this also sets `PULSE_PROP_application.icon_name` to `audio-x-generic` so that we get a nice icon in the PulseAudio settings by our name instead of a missing icon placeholder. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:01:26 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#1170
No description provided.