if (level) {
s->glob_sta |= masks[r - s->bm_regs];
dolog ("set irq level=1\n");
- qemu_set_irq(s->pci_dev->irq[0], 1);
+ qemu_set_irq (s->pci_dev->irq[0], 1);
}
else {
s->glob_sta &= ~masks[r - s->bm_regs];
dolog ("set irq level=0\n");
- qemu_set_irq(s->pci_dev->irq[0], 0);
+ qemu_set_irq (s->pci_dev->irq[0], 0);
}
}
s = &d->ac97;
s->pci_dev = &d->dev;
c = d->dev.config;
- pci_config_set_vendor_id(c, PCI_VENDOR_ID_INTEL); /* ro */
- pci_config_set_device_id(c, PCI_DEVICE_ID_INTEL_82801AA_5); /* ro */
+ pci_config_set_vendor_id (c, PCI_VENDOR_ID_INTEL); /* ro */
+ pci_config_set_device_id (c, PCI_DEVICE_ID_INTEL_82801AA_5); /* ro */
c[0x04] = 0x00; /* pcicmd pci command rw, ro */
c[0x05] = 0x00;
c[0x08] = 0x01; /* rid revision ro */
c[0x09] = 0x00; /* pi programming interface ro */
- pci_config_set_class(c, PCI_CLASS_MULTIMEDIA_AUDIO); /* ro */
+ pci_config_set_class (c, PCI_CLASS_MULTIMEDIA_AUDIO); /* ro */
c[PCI_HEADER_TYPE] = PCI_HEADER_TYPE_NORMAL; /* headtyp header type ro */
c[0x10] = 0x01; /* nabmar native audio mixer base
}
}
-static IO_WRITE_PROTO(adlib_write)
+static IO_WRITE_PROTO (adlib_write)
{
AdlibState *s = opaque;
int a = nport & 3;
#endif
}
-static IO_READ_PROTO(adlib_read)
+static IO_READ_PROTO (adlib_read)
{
AdlibState *s = opaque;
uint8_t data;
944, 912, 1008, 976, 816, 784, 880, 848
};
-static void cs_reset(void *opaque)
+static void cs_reset (void *opaque)
{
CSState *s = opaque;
return dma_pos;
}
-static void cs_save(QEMUFile *f, void *opaque)
+static void cs_save (QEMUFile *f, void *opaque)
{
CSState *s = opaque;
unsigned int i;
uint32_t val;
for (i = 0; i < CS_REGS; i++)
- qemu_put_be32s(f, &s->regs[i]);
+ qemu_put_be32s (f, &s->regs[i]);
- qemu_put_buffer(f, s->dregs, CS_DREGS);
- val = s->dma_running; qemu_put_be32s(f, &val);
- val = s->audio_free; qemu_put_be32s(f, &val);
- val = s->transferred; qemu_put_be32s(f, &val);
- val = s->aci_counter; qemu_put_be32s(f, &val);
+ qemu_put_buffer (f, s->dregs, CS_DREGS);
+ val = s->dma_running; qemu_put_be32s (f, &val);
+ val = s->audio_free; qemu_put_be32s (f, &val);
+ val = s->transferred; qemu_put_be32s (f, &val);
+ val = s->aci_counter; qemu_put_be32s (f, &val);
}
-static int cs_load(QEMUFile *f, void *opaque, int version_id)
+static int cs_load (QEMUFile *f, void *opaque, int version_id)
{
CSState *s = opaque;
unsigned int i;
return -EINVAL;
for (i = 0; i < CS_REGS; i++)
- qemu_get_be32s(f, &s->regs[i]);
+ qemu_get_be32s (f, &s->regs[i]);
- qemu_get_buffer(f, s->dregs, CS_DREGS);
+ qemu_get_buffer (f, s->dregs, CS_DREGS);
- qemu_get_be32s(f, &dma_running);
- qemu_get_be32s(f, &val); s->audio_free = val;
- qemu_get_be32s(f, &val); s->transferred = val;
- qemu_get_be32s(f, &val); s->aci_counter = val;
+ qemu_get_be32s (f, &dma_running);
+ qemu_get_be32s (f, &val); s->audio_free = val;
+ qemu_get_be32s (f, &val); s->transferred = val;
+ qemu_get_be32s (f, &val); s->aci_counter = val;
if (dma_running && (s->dregs[Interface_Configuration] & PEN))
cs_reset_voices (s, s->dregs[FS_And_Playback_Data_Format]);
return 0;
else {
s->status = new_status & ~STAT_INTR;
}
- qemu_set_irq(s->pci_dev->irq[0], !!level);
+ qemu_set_irq (s->pci_dev->irq[0], !!level);
}
static void es1370_reset (ES1370State *s)
s->dac_voice[i] = NULL;
}
}
- qemu_irq_lower(s->pci_dev->irq[0]);
+ qemu_irq_lower (s->pci_dev->irq[0]);
}
static void es1370_maybe_lower_irq (ES1370State *s, uint32_t sctl)
}
c = d->dev.config;
- pci_config_set_vendor_id(c, PCI_VENDOR_ID_ENSONIQ);
- pci_config_set_device_id(c, PCI_DEVICE_ID_ENSONIQ_ES1370);
+ pci_config_set_vendor_id (c, PCI_VENDOR_ID_ENSONIQ);
+ pci_config_set_device_id (c, PCI_DEVICE_ID_ENSONIQ_ES1370);
c[0x07] = 2 << 1;
- pci_config_set_class(c, PCI_CLASS_MULTIMEDIA_AUDIO);
+ pci_config_set_class (c, PCI_CLASS_MULTIMEDIA_AUDIO);
#if 1
c[0x2c] = 0x42;
}
}
-static IO_WRITE_PROTO(mixer_write_indexb)
+static IO_WRITE_PROTO (mixer_write_indexb)
{
SB16State *s = opaque;
(void) nport;
s->mixer_nreg = val;
}
-static IO_WRITE_PROTO(mixer_write_datab)
+static IO_WRITE_PROTO (mixer_write_datab)
{
SB16State *s = opaque;
s->mixer_regs[s->mixer_nreg] = val;
}
-static IO_WRITE_PROTO(mixer_write_indexw)
+static IO_WRITE_PROTO (mixer_write_indexw)
{
mixer_write_indexb (opaque, nport, val & 0xff);
mixer_write_datab (opaque, nport, (val >> 8) & 0xff);
}
-static IO_READ_PROTO(mixer_read)
+static IO_READ_PROTO (mixer_read)
{
SB16State *s = opaque;