Revision 062db740 hw/audio/intel-hda.c
b/hw/audio/intel-hda.c | ||
---|---|---|
189 | 189 |
uint32_t msi; |
190 | 190 |
}; |
191 | 191 |
|
192 |
#define TYPE_INTEL_HDA_GENERIC "intel-hda-generic" |
|
193 |
|
|
192 | 194 |
struct IntelHDAReg { |
193 | 195 |
const char *name; /* register name */ |
194 | 196 |
uint32_t size; /* size in bytes */ |
... | ... | |
1232 | 1234 |
DEFINE_PROP_END_OF_LIST(), |
1233 | 1235 |
}; |
1234 | 1236 |
|
1235 |
static void intel_hda_class_init_common(ObjectClass *klass)
|
|
1237 |
static void intel_hda_class_init(ObjectClass *klass, void *data)
|
|
1236 | 1238 |
{ |
1237 | 1239 |
DeviceClass *dc = DEVICE_CLASS(klass); |
1238 | 1240 |
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); |
... | ... | |
1251 | 1253 |
DeviceClass *dc = DEVICE_CLASS(klass); |
1252 | 1254 |
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); |
1253 | 1255 |
|
1254 |
intel_hda_class_init_common(klass); |
|
1255 | 1256 |
k->device_id = 0x2668; |
1256 | 1257 |
k->revision = 1; |
1257 | 1258 |
dc->desc = "Intel HD Audio Controller (ich6)"; |
... | ... | |
1262 | 1263 |
DeviceClass *dc = DEVICE_CLASS(klass); |
1263 | 1264 |
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); |
1264 | 1265 |
|
1265 |
intel_hda_class_init_common(klass); |
|
1266 | 1266 |
k->device_id = 0x293e; |
1267 | 1267 |
k->revision = 3; |
1268 | 1268 |
dc->desc = "Intel HD Audio Controller (ich9)"; |
1269 | 1269 |
} |
1270 | 1270 |
|
1271 |
static const TypeInfo intel_hda_info_ich6 = {
|
|
1272 |
.name = "intel-hda",
|
|
1271 |
static const TypeInfo intel_hda_info = { |
|
1272 |
.name = TYPE_INTEL_HDA_GENERIC,
|
|
1273 | 1273 |
.parent = TYPE_PCI_DEVICE, |
1274 | 1274 |
.instance_size = sizeof(IntelHDAState), |
1275 |
.class_init = intel_hda_class_init, |
|
1276 |
.abstract = true, |
|
1277 |
}; |
|
1278 |
|
|
1279 |
static const TypeInfo intel_hda_info_ich6 = { |
|
1280 |
.name = "intel-hda", |
|
1281 |
.parent = TYPE_INTEL_HDA_GENERIC, |
|
1275 | 1282 |
.class_init = intel_hda_class_init_ich6, |
1276 | 1283 |
}; |
1277 | 1284 |
|
1278 | 1285 |
static const TypeInfo intel_hda_info_ich9 = { |
1279 | 1286 |
.name = "ich9-intel-hda", |
1280 |
.parent = TYPE_PCI_DEVICE, |
|
1281 |
.instance_size = sizeof(IntelHDAState), |
|
1287 |
.parent = TYPE_INTEL_HDA_GENERIC, |
|
1282 | 1288 |
.class_init = intel_hda_class_init_ich9, |
1283 | 1289 |
}; |
1284 | 1290 |
|
... | ... | |
1320 | 1326 |
static void intel_hda_register_types(void) |
1321 | 1327 |
{ |
1322 | 1328 |
type_register_static(&hda_codec_bus_info); |
1329 |
type_register_static(&intel_hda_info); |
|
1323 | 1330 |
type_register_static(&intel_hda_info_ich6); |
1324 | 1331 |
type_register_static(&intel_hda_info_ich9); |
1325 | 1332 |
type_register_static(&hda_codec_device_type_info); |
Also available in: Unified diff