Revision 8b07eaa1 hw/intel-hda.c
b/hw/intel-hda.c | ||
---|---|---|
1232 | 1232 |
DEFINE_PROP_END_OF_LIST(), |
1233 | 1233 |
}; |
1234 | 1234 |
|
1235 |
static void intel_hda_class_init(ObjectClass *klass, void *data)
|
|
1235 |
static void intel_hda_class_init_common(ObjectClass *klass)
|
|
1236 | 1236 |
{ |
1237 | 1237 |
DeviceClass *dc = DEVICE_CLASS(klass); |
1238 | 1238 |
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); |
... | ... | |
1240 | 1240 |
k->init = intel_hda_init; |
1241 | 1241 |
k->exit = intel_hda_exit; |
1242 | 1242 |
k->vendor_id = PCI_VENDOR_ID_INTEL; |
1243 |
k->device_id = 0x2668; |
|
1244 |
k->revision = 1; |
|
1245 | 1243 |
k->class_id = PCI_CLASS_MULTIMEDIA_HD_AUDIO; |
1246 |
dc->desc = "Intel HD Audio Controller"; |
|
1247 | 1244 |
dc->reset = intel_hda_reset; |
1248 | 1245 |
dc->vmsd = &vmstate_intel_hda; |
1249 | 1246 |
dc->props = intel_hda_properties; |
1250 | 1247 |
} |
1251 | 1248 |
|
1252 |
static TypeInfo intel_hda_info = { |
|
1249 |
static void intel_hda_class_init_ich6(ObjectClass *klass, void *data) |
|
1250 |
{ |
|
1251 |
DeviceClass *dc = DEVICE_CLASS(klass); |
|
1252 |
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); |
|
1253 |
|
|
1254 |
intel_hda_class_init_common(klass); |
|
1255 |
k->device_id = 0x2668; |
|
1256 |
k->revision = 1; |
|
1257 |
dc->desc = "Intel HD Audio Controller (ich6)"; |
|
1258 |
} |
|
1259 |
|
|
1260 |
static void intel_hda_class_init_ich9(ObjectClass *klass, void *data) |
|
1261 |
{ |
|
1262 |
DeviceClass *dc = DEVICE_CLASS(klass); |
|
1263 |
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); |
|
1264 |
|
|
1265 |
intel_hda_class_init_common(klass); |
|
1266 |
k->device_id = 0x293e; |
|
1267 |
k->revision = 3; |
|
1268 |
dc->desc = "Intel HD Audio Controller (ich9)"; |
|
1269 |
} |
|
1270 |
|
|
1271 |
static TypeInfo intel_hda_info_ich6 = { |
|
1253 | 1272 |
.name = "intel-hda", |
1254 | 1273 |
.parent = TYPE_PCI_DEVICE, |
1255 | 1274 |
.instance_size = sizeof(IntelHDAState), |
1256 |
.class_init = intel_hda_class_init, |
|
1275 |
.class_init = intel_hda_class_init_ich6, |
|
1276 |
}; |
|
1277 |
|
|
1278 |
static TypeInfo intel_hda_info_ich9 = { |
|
1279 |
.name = "ich9-intel-hda", |
|
1280 |
.parent = TYPE_PCI_DEVICE, |
|
1281 |
.instance_size = sizeof(IntelHDAState), |
|
1282 |
.class_init = intel_hda_class_init_ich9, |
|
1257 | 1283 |
}; |
1258 | 1284 |
|
1259 | 1285 |
static void hda_codec_device_class_init(ObjectClass *klass, void *data) |
... | ... | |
1277 | 1303 |
static void intel_hda_register_types(void) |
1278 | 1304 |
{ |
1279 | 1305 |
type_register_static(&hda_codec_bus_info); |
1280 |
type_register_static(&intel_hda_info); |
|
1306 |
type_register_static(&intel_hda_info_ich6); |
|
1307 |
type_register_static(&intel_hda_info_ich9); |
|
1281 | 1308 |
type_register_static(&hda_codec_device_type_info); |
1282 | 1309 |
} |
1283 | 1310 |
|
Also available in: Unified diff