Restore consistent formatting of audio devices

This commit is contained in:
malc 2009-06-20 05:13:29 +04:00
parent 03dfe9f871
commit d999f7e023
5 changed files with 31 additions and 31 deletions

View File

@ -278,12 +278,12 @@ static void update_sr (AC97LinkState *s, AC97BusMasterRegs *r, uint32_t new_sr)
if (level) { if (level) {
s->glob_sta |= masks[r - s->bm_regs]; s->glob_sta |= masks[r - s->bm_regs];
dolog ("set irq level=1\n"); 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 { else {
s->glob_sta &= ~masks[r - s->bm_regs]; s->glob_sta &= ~masks[r - s->bm_regs];
dolog ("set irq level=0\n"); dolog ("set irq level=0\n");
qemu_set_irq(s->pci_dev->irq[0], 0); qemu_set_irq (s->pci_dev->irq[0], 0);
} }
} }
@ -1331,8 +1331,8 @@ int ac97_init (PCIBus *bus)
s = &d->ac97; s = &d->ac97;
s->pci_dev = &d->dev; s->pci_dev = &d->dev;
c = d->dev.config; c = d->dev.config;
pci_config_set_vendor_id(c, PCI_VENDOR_ID_INTEL); /* 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 */ pci_config_set_device_id (c, PCI_DEVICE_ID_INTEL_82801AA_5); /* ro */
c[0x04] = 0x00; /* pcicmd pci command rw, ro */ c[0x04] = 0x00; /* pcicmd pci command rw, ro */
c[0x05] = 0x00; c[0x05] = 0x00;
@ -1342,7 +1342,7 @@ int ac97_init (PCIBus *bus)
c[0x08] = 0x01; /* rid revision ro */ c[0x08] = 0x01; /* rid revision ro */
c[0x09] = 0x00; /* pi programming interface 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[PCI_HEADER_TYPE] = PCI_HEADER_TYPE_NORMAL; /* headtyp header type ro */
c[0x10] = 0x01; /* nabmar native audio mixer base c[0x10] = 0x01; /* nabmar native audio mixer base

View File

@ -115,7 +115,7 @@ static void adlib_kill_timers (AdlibState *s)
} }
} }
static IO_WRITE_PROTO(adlib_write) static IO_WRITE_PROTO (adlib_write)
{ {
AdlibState *s = opaque; AdlibState *s = opaque;
int a = nport & 3; int a = nport & 3;
@ -133,7 +133,7 @@ static IO_WRITE_PROTO(adlib_write)
#endif #endif
} }
static IO_READ_PROTO(adlib_read) static IO_READ_PROTO (adlib_read)
{ {
AdlibState *s = opaque; AdlibState *s = opaque;
uint8_t data; uint8_t data;

View File

@ -216,7 +216,7 @@ static int16_t ALawDecompressTable[256] =
944, 912, 1008, 976, 816, 784, 880, 848 944, 912, 1008, 976, 816, 784, 880, 848
}; };
static void cs_reset(void *opaque) static void cs_reset (void *opaque)
{ {
CSState *s = opaque; CSState *s = opaque;
@ -597,23 +597,23 @@ static int cs_dma_read (void *opaque, int nchan, int dma_pos, int dma_len)
return dma_pos; return dma_pos;
} }
static void cs_save(QEMUFile *f, void *opaque) static void cs_save (QEMUFile *f, void *opaque)
{ {
CSState *s = opaque; CSState *s = opaque;
unsigned int i; unsigned int i;
uint32_t val; uint32_t val;
for (i = 0; i < CS_REGS; i++) 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); qemu_put_buffer (f, s->dregs, CS_DREGS);
val = s->dma_running; qemu_put_be32s(f, &val); val = s->dma_running; qemu_put_be32s (f, &val);
val = s->audio_free; qemu_put_be32s(f, &val); val = s->audio_free; qemu_put_be32s (f, &val);
val = s->transferred; qemu_put_be32s(f, &val); val = s->transferred; qemu_put_be32s (f, &val);
val = s->aci_counter; 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; CSState *s = opaque;
unsigned int i; unsigned int i;
@ -623,14 +623,14 @@ static int cs_load(QEMUFile *f, void *opaque, int version_id)
return -EINVAL; return -EINVAL;
for (i = 0; i < CS_REGS; i++) 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, &dma_running);
qemu_get_be32s(f, &val); s->audio_free = val; qemu_get_be32s (f, &val); s->audio_free = val;
qemu_get_be32s(f, &val); s->transferred = val; qemu_get_be32s (f, &val); s->transferred = val;
qemu_get_be32s(f, &val); s->aci_counter = val; qemu_get_be32s (f, &val); s->aci_counter = val;
if (dma_running && (s->dregs[Interface_Configuration] & PEN)) if (dma_running && (s->dregs[Interface_Configuration] & PEN))
cs_reset_voices (s, s->dregs[FS_And_Playback_Data_Format]); cs_reset_voices (s, s->dregs[FS_And_Playback_Data_Format]);
return 0; return 0;

View File

@ -327,7 +327,7 @@ static void es1370_update_status (ES1370State *s, uint32_t new_status)
else { else {
s->status = new_status & ~STAT_INTR; 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) static void es1370_reset (ES1370State *s)
@ -353,7 +353,7 @@ static void es1370_reset (ES1370State *s)
s->dac_voice[i] = NULL; 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) static void es1370_maybe_lower_irq (ES1370State *s, uint32_t sctl)
@ -1026,10 +1026,10 @@ int es1370_init (PCIBus *bus)
} }
c = d->dev.config; c = d->dev.config;
pci_config_set_vendor_id(c, PCI_VENDOR_ID_ENSONIQ); pci_config_set_vendor_id (c, PCI_VENDOR_ID_ENSONIQ);
pci_config_set_device_id(c, PCI_DEVICE_ID_ENSONIQ_ES1370); pci_config_set_device_id (c, PCI_DEVICE_ID_ENSONIQ_ES1370);
c[0x07] = 2 << 1; c[0x07] = 2 << 1;
pci_config_set_class(c, PCI_CLASS_MULTIMEDIA_AUDIO); pci_config_set_class (c, PCI_CLASS_MULTIMEDIA_AUDIO);
#if 1 #if 1
c[0x2c] = 0x42; c[0x2c] = 0x42;

View File

@ -1066,14 +1066,14 @@ static void reset_mixer (SB16State *s)
} }
} }
static IO_WRITE_PROTO(mixer_write_indexb) static IO_WRITE_PROTO (mixer_write_indexb)
{ {
SB16State *s = opaque; SB16State *s = opaque;
(void) nport; (void) nport;
s->mixer_nreg = val; s->mixer_nreg = val;
} }
static IO_WRITE_PROTO(mixer_write_datab) static IO_WRITE_PROTO (mixer_write_datab)
{ {
SB16State *s = opaque; SB16State *s = opaque;
@ -1129,13 +1129,13 @@ static IO_WRITE_PROTO(mixer_write_datab)
s->mixer_regs[s->mixer_nreg] = val; 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_indexb (opaque, nport, val & 0xff);
mixer_write_datab (opaque, nport, (val >> 8) & 0xff); mixer_write_datab (opaque, nport, (val >> 8) & 0xff);
} }
static IO_READ_PROTO(mixer_read) static IO_READ_PROTO (mixer_read)
{ {
SB16State *s = opaque; SB16State *s = opaque;