[pulseaudio-discuss] Devices with dynamic capabilities (HDMI) - revisited
David Henningsson
david.henningsson at canonical.com
Sun Jan 27 20:14:30 PST 2013
On 01/22/2013 11:03 PM, Tanu Kaskinen wrote:
> On Thu, 2013-01-17 at 15:14 +0100, David Henningsson wrote:
>> Hi!
>>
>> Two months since PulseConf, and 3.0 is out there. So, time to start
>> thinking again about what we talked about at PulseConf.
>>
>> So, on my TODO list were separate cards for HDMI. According to Arun's
>> report, the conclusion was to use "dynamic profiles" and have the card
>> always present. I don't remember exactly why though.
>
> Me neither.
>
>> Anyway, I'm proposing that cards are dynamically added and removed as
>> HDMI monitors are plugged in and out, for the following reasons:
>>
>> 1) An HDMI monitor is a lot like a USB card in that sense that it
>> affects the streaming capabilities. Assuming we add some part of the ELD
>> info as the card name, it enables us to save information per monitor
>> rather than per output, so that, e g, when a user's laptop is connected
>> to his TV at home, audio gets rerouted, but not when he's connecting to
>> his projector at work, or something like that.
>>
>> 2) As we then won't have four always-present cards/sinks/ports which
>> are unavailable [1], my argument for hiding unavailable ports in the GUI
>> is no longer valid; we could potentially make them grey instead.
>>
>> 3) Last but not least, no GUIs currently support "dynamic profiles"
>> and I hate breaking other stuff. But as they already deal with USB
>> cards, this new feature will not mean any new logic for them.
>
> I don't have anything against your proposal.
Good, I will continue down that path as my time permits.
> Getting slightly off-topic: if a computer has two hdmi ports, would one
> hdmi monitor be always recognized as the same card, or would it get two
> entries in the card database if it is sometimes connected to one hdmi
> port and sometimes to the other?
That is a good question. That depends on how you define the card name.
I'm thinking of something like:
alsa_card.<pci address>.<physical port index>.<eld info>
The other option would be something like:
alsa_card.hdmi.<eld info>
The second one has the advantage that if you connect the same monitor to
first one port, then disconnect and connect it to another, your settings
will be retained.
But there is also a disadvantage, in dual-monitor setups it is not
uncommon to have two of the same sort (and thus the same ELD info). It
would be bad if the settings started flipping between the two monitors.
Both scenarios are probably quite uncommon because they deal with
hotplugging monitors: If you hotplug HDMI monitors at all, you're likely
having a laptop, and most of these have only one HDMI output.
I'm leaning towards the former (alsa_card.<pci address>.<physical port
index>.<eld info>) because it seems safer and slightly simpler to
implement (we don't have to deal with duplicates).
--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic
More information about the pulseaudio-discuss
mailing list