/* create intel hda controller with codec attached to it, so '-soundhw hda' works.  */
static int intel_hda_and_codec_init(PCIBus *bus)
/* create intel hda controller with codec attached to it, so '-soundhw hda' works.  */
static int intel_hda_and_codec_init(PCIBus *bus)
{
    DeviceState *controller;
    BusState *hdabus;
    DeviceState *codec;
    controller = DEVICE(pci_create_simple(bus, -1, "intel-hda"));
    hdabus = QLIST_FIRST(&controller->child_bus);
    codec = qdev_create(hdabus, "hda-duplex");
    qdev_init_nofail(codec);
    return 0;
}