mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-30 11:10:29 -04:00
bluez5: different icon for A2DP & HFP output routes
Set different icons for A2DP & HFP output routes, so that they look different (in Gnome). Don't call the non-HFP output route as "headset" or "handsfree" in this case, to be less ambiguous about microphone availability. Also set device.icon-name for the device too.
This commit is contained in:
parent
9586ef891e
commit
270eda63a9
3 changed files with 71 additions and 6 deletions
|
|
@ -427,6 +427,31 @@ static inline const char *spa_bt_form_factor_name(enum spa_bt_form_factor ff)
|
|||
}
|
||||
}
|
||||
|
||||
static inline const char *spa_bt_form_factor_icon_name(enum spa_bt_form_factor ff)
|
||||
{
|
||||
switch (ff) {
|
||||
case SPA_BT_FORM_FACTOR_HEADSET:
|
||||
return "audio-headset-bluetooth";
|
||||
case SPA_BT_FORM_FACTOR_HANDSFREE:
|
||||
return "audio-handsfree-bluetooth";
|
||||
case SPA_BT_FORM_FACTOR_MICROPHONE:
|
||||
return "audio-input-microphone-bluetooth";
|
||||
case SPA_BT_FORM_FACTOR_SPEAKER:
|
||||
return "audio-speakers-bluetooth";
|
||||
case SPA_BT_FORM_FACTOR_HEADPHONE:
|
||||
return "audio-headphones-bluetooth";
|
||||
case SPA_BT_FORM_FACTOR_PORTABLE:
|
||||
return "multimedia-player-bluetooth";
|
||||
case SPA_BT_FORM_FACTOR_PHONE:
|
||||
return "phone-bluetooth";
|
||||
case SPA_BT_FORM_FACTOR_CAR:
|
||||
case SPA_BT_FORM_FACTOR_HIFI:
|
||||
case SPA_BT_FORM_FACTOR_UNKNOWN:
|
||||
default:
|
||||
return "audio-card-bluetooth";
|
||||
}
|
||||
}
|
||||
|
||||
static inline enum spa_bt_form_factor spa_bt_form_factor_from_class(uint32_t bluetooth_class)
|
||||
{
|
||||
uint32_t major, minor;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue