The second Card should also be listed/loaded.
For the not wanted HDMI-Devices I used the module pci_stub to claim the Audio-Device before the snd-modules are loaded. After adding the line you have to execute update-initramfs -u
if i remember correctly.
To use the pci_stub-Module on your not wanted Soundcard, you have to get the PCI-Vendor-Info with lspci -nn
.
In my Case this was the following
lspci -nn |grep -i audio
01:00.1 Audio device [0403]: NVIDIA Corporation TU116 High Definition Audio Controller [10de:1aeb] (rev a1)
06:00.0 Audio device [0403]: Creative Labs Sound Core3D [Sound Blaster Recon3D / Z-Series] [1102:0012] (rev 01)
As i want to get rid of the 'Audio Card' from my GPU the wanted ID is "10de:1aeb".
You then put the pci_stub ids=10de:1aeb
in the File /etc/initramfs-tools/modules
.
The listet modules in that File will be loaded' before automatic Module-Loading where a device ususally gets the correct module/driver.
The ids=10de:1aeb or in your case some other String is needed so that the correct PCI-Card will be chosen(i think it doesn't even work without) which then ,through the pci_stub-module, will be blocked from 'auto-loading' the correct 'snd-*' module. And therefore no /dev/snd/hwXYZ-Device will be created and alsa won't recognize it as a Sound-Card.
lspci -s 01:00.01 -v
01:00.1 Audio device: NVIDIA Corporation TU116 High Definition Audio Controller (rev a1)
Subsystem: Gigabyte Technology Co., Ltd TU116 High Definition Audio Controller
Flags: bus master, fast devsel, latency 0, IRQ 10, IOMMU group 1
Memory at df080000 (32-bit, non-prefetchable) [size=16K]
Capabilities: [60] Power Management version 3
Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [78] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Kernel driver in use: pci-stub
Kernel modules: snd_hda_intel
Here you can see the 'Kernel driver in use'
And as a result of blocking the NVIDIA-CARD i got only one Card recognized
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Creative [HDA Creative], device 0: ALC898 Analog [ALC898 Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
It isn't directly your problem but maybe it helps. :-)
In my Case Sound worked, but Switching the Hardware-IDs around for alsa and things like that... ..*******.. my Displays don't even have Speakers..