[alsa-devel] ALSA: hda: hdmi: Hint matching between input devices and pcm devices

Stephen Warren swarren at nvidia.com
Tue Aug 23 17:51:36 CEST 2011


David Henningsson wrote at Tuesday, August 23, 2011 9:12 AM:
> Since modern HDMI cards often have more than one output pin and thus
> input device, we need to know which one has actually been plugged in.
> 
> This patch adds a name hint that indicates which PCM device is connected
> to which pin.
> 
> To do that, the jack creation has been deferred to build_controls, i e,
> after the PCM devices have been created.
> 
> Would be great to have Stephen look through this patch quickly before
> it's committed.

Structurally, I think this looks OK. The only question I have is the 
string format:

"HDMI/DP (pcm %d)", pcmdev

* Is there a 1:1 mapping between the internal pcmdev numbers and what
alsa-lib presents to clients? Thinking about ALSA device numbering, it's
like "hw:1,3", so includes the card number too; should that be in the
string?

* Would it be better to make the string completely generic - i.e. not
include "HDMI/DP", but rather something like "ALSA PCM %d", or even
"ALSA PCM hw:%d,%d" so that the same format could be used for non-HDMI/
DP PCMs in the future?

-- 
nvpublic



More information about the Alsa-devel mailing list