xref: /openbmc/qemu/include/hw/isa/vt82c686.h (revision 34cc54fb)
1 #ifndef HW_VT82C686_H
2 #define HW_VT82C686_H
3 
4 #include "hw/pci/pci_device.h"
5 #include "audio/audio.h"
6 
7 #define TYPE_VT82C686B_ISA "vt82c686b-isa"
8 #define TYPE_VT82C686B_USB_UHCI "vt82c686b-usb-uhci"
9 #define TYPE_VT8231_ISA "vt8231-isa"
10 #define TYPE_VIA_AC97 "via-ac97"
11 #define TYPE_VIA_IDE "via-ide"
12 #define TYPE_VIA_MC97 "via-mc97"
13 
14 typedef struct {
15     uint8_t stat;
16     uint8_t type;
17     uint32_t base;
18     uint32_t curr;
19     uint32_t addr;
20     uint32_t clen;
21 } ViaAC97SGDChannel;
22 
23 OBJECT_DECLARE_SIMPLE_TYPE(ViaAC97State, VIA_AC97);
24 
25 struct ViaAC97State {
26     PCIDevice dev;
27     QEMUSoundCard card;
28     MemoryRegion sgd;
29     MemoryRegion fm;
30     MemoryRegion midi;
31     SWVoiceOut *vo;
32     ViaAC97SGDChannel aur;
33     uint16_t codec_regs[128];
34     uint32_t ac97_cmd;
35 };
36 
37 void via_isa_set_irq(PCIDevice *d, int n, int level);
38 
39 #endif
40