At Mon, 16 Jul 2012 10:53:15 +0200, Jaroslav Kysela wrote:
Date 16.7.2012 10:40, Takashi Iwai wrote:
At Fri, 13 Jul 2012 19:48:22 +0200, Jaroslav Kysela wrote:
00:03.0 0403: 8086:0c0c (rev 01) Subsystem: 8086:2010 -- 00:1b.0 0403: 8086:8c20 (rev 01) Subsystem: 8086:7270
Perhaps, we may add also some code to penalize the HDMI only HDA bridges and allocate these cards on indexes 1+ by default (implement AZX_DCAPS_INDEX1) . Comments? I'll prepare a patch upon an agreement.
Having index=0 for analog would be nice in general, but I'm afraid that it isn't always safe in the case of HD-audio (depending on the implementation, though, of course):
BIOS may disable the analog PCI part, e.g. if a device has only HDMI/DP, or vice versa.
There are already devices showing the same problem, e.g. AMD on-board with AMD D-GPU, and users may have already added index option for such.
IMO, we should provide a mechanism to advertise the preferred configuration from the driver side without fiddling the index. For example, exposing an info bit that this is digital-I/O only card, and let alsa-lib choose another one as default (unless explicitly specified).
It's not a bad idea, but it would be good to have also "standard" plughw:0 and hw:0 devices available in the system.
You can omit ":0" part. Then alsa-lib should choose the right device.
Do you think that the PCI ID / PCI subsystem ID check is not sufficient to determine the hw type before the codec probe?
Not really, because the controller ID doesn't always tell you whether it's analog or digital.
Also, as mentioned, BIOS may enable/disable the PCI entries as it wishes, thus you may get a system suddenly without index=0 in the end if you forcibly set index=1 to HDMI/DP controller.
Takashi