[pulseaudio-discuss] update-card-properties? Possible?
Tanu Kaskinen
tanuk at iki.fi
Wed Aug 17 15:11:16 UTC 2016
On Wed, 2016-08-17 at 12:55 +1000, Bernd Wechner wrote:
> If device.description is intended by design for UIs to label devices
> (cards or ports) then that should indeed suffice. No need to consider
> another property.
>
> When I look at ALSA:
>
> http://www.alsa-project.org/main/index.php/Main_Page
>
> It looks a little too low level to be worried about local naming of
> devices which I'd see as a more supervisory OS feature, belonging IMHO
> almost at the Xwindows or Gnome level and not even necessarily as low as
> pulseaudio. I was looking here because someone on the MINT forums
> suggests it was a pulsaudio issue (but that has the feel of buckpassing
> slowly).
The reason why alsa might make sense is that that way the functionality
would be usable in any environment - pulseaudio wouldn't be a
requirement. Similarly, it doesn't make sense to push the description
management to layers above pulseaudio, because then the functionality
would have to be replicated in many places.
I don't know if the alsa developers are interested in having this
functionality in alsa. It would certainly be much simpler to do this in
pulseaudio, and I welcome patches for that.
> And the level of pulsaudio for example complexities arise with say USB
> devices. They are hot plugable and so if I unplug it and plug it in
> again how is it described? I'd like its local name to stick, in the same
> way that I find my names for USB flash drives stick and my printers (by
> different mechanisms, but the same UX result).
We already save and restore some card settings, so the infrastructure
for restoring the description for hotplugged devices already exists.
> But if I've helped spot a pulseaudio bug (failure to copy the HDMI
> product name to the card description in some way), that's that's nice. I
> do think it would awesome and seemingly an easy fix to see those HDMI
> device identifiers in the Sound settings through the card
> device.description.
Note that the HDMI product name shouldn't be used as the card
description, at least in most cases, because often a card that provides
HDMI has multiple devices - there might be analog devices on the same
card, or multiple HDMI ports. It makes more sense as a port
description.
The Gnome sound settings output selection list, for example, uses this
format in the labels:
<port description> - <card description>
If HDMI is provided by the built-in sound card, I guess using the HDMI
product name as the port description would look like this:
<product name> - Built-in Audio
I'd imagine the "Built-in Audio" part in combination with the monitor
name would look a bit strange to many users. Maybe that's why we
haven't gone as far as replacing the port description with the product
name? I'll add David Henningsson to Cc in case he wants to comment.
He's the one who implemented the monitor name reading.
> As to the simple use case and why someone would like to change the name
> that is easily answered.
>
> 1) USB devices identify themselves with weird or unclear names. HDMI
> devices similarly. They are techie and device descriptive.
>
> 2) These names used as well in the System tray sound apps that allow
> selection of output device for example.
>
> 3) I have family and others using a multimedia machine, as I suspect
> many do who want to be able to select output device, pump sound into one
> attached unit or another (I have quite a few).
>
> 4) For that reason I'd like freedom to name these devices, in a way that
> sticks, and ideally survives unplugging and plugging in again, to be
> meaningful to end users. Names like "Wireless headphones", "Surround
> sound system", "Bedroom speakers", "FM transmitter" etc, by way of
> example. As it is essentially with complex sound systems and multiple
> devices served any user has to try them one by one until they detect
> sound where they want it. That is neither practical fro all devices nor
> friendly so most steer clear of it.
>
> 5) Further, it'd be nice to name them in the Sound Settings GUI and not
> have to lay around with config files in /etc if possible.
All these use cases seem like they deal only with the descriptions. You
made earlier a distinction between card names and card descriptions,
and it's unclear where you'd need to care about the card name.
> I migrated from Windows a while back and there I could name the sound
> devices. And I suspect it's managed at a level higher than ALSA, maybe
> at a level like pulseaudio, and possible even at a higher level still.
>
> Getting my head around where this might fit. As I may be in a position
> to contribute code of course once I know where is most appropriate and
> how to contribute to the relevant community.
If you decide to start working on the code, feel free to ask any
questions on this mailing list or in IRC (#pulseaudio at freenode.net).
--
Tanu
More information about the pulseaudio-discuss
mailing list