Li, Maggie wrote:
Dan,
I read the RRG spec, just as you said, you should use 0xF in file sb600_hda.c to get the current audio codec, that is to say,
dword &= 0xF; if (!dword) goto no_codec;
pci_locate_device is really should be used in early setup. Device_t is the type of u32 at that time. After this stage, you should use dev_find_slot. In file sb600_sata.c, “/* sm_dev = pci_locate_device(PCI_ID(0x1002, 0x4385), 0) */ “ gives you misunderstanding about how to get the SMBus and it should be removed. You can submit a patch about sata and I will ack it. Thanks.
Somewhat related, I think the device_t azalia_dev = dev_find_slot(0, PCI_DEVFN(0x14, 2));
should be passed from hda_init() instead, because the device is already known there.
Stefan