Revision 738012be
b/hw/marvell_88w8618_audio.c | ||
---|---|---|
34 | 34 |
#define MP_AUDIO_CLOCK_24MHZ (1 << 9) |
35 | 35 |
#define MP_AUDIO_MONO (1 << 14) |
36 | 36 |
|
37 |
#ifdef HAS_AUDIO |
|
38 | 37 |
typedef struct mv88w8618_audio_state { |
39 | 38 |
SysBusDevice busdev; |
40 | 39 |
qemu_irq irq; |
... | ... | |
290 | 289 |
{/* end of list */} |
291 | 290 |
} |
292 | 291 |
}; |
293 |
#endif |
|
294 | 292 |
|
295 | 293 |
static void mv88w8618_register_devices(void) |
296 | 294 |
{ |
297 |
#ifdef HAS_AUDIO |
|
298 | 295 |
sysbus_register_withprop(&mv88w8618_audio_info); |
299 |
#endif |
|
300 | 296 |
} |
301 | 297 |
|
302 | 298 |
device_init(mv88w8618_register_devices) |
b/hw/mips_jazz.c | ||
---|---|---|
89 | 89 |
dma_dummy_writeb, |
90 | 90 |
}; |
91 | 91 |
|
92 |
#ifdef HAS_AUDIO |
|
93 | 92 |
static void audio_init(qemu_irq *pic) |
94 | 93 |
{ |
95 | 94 |
struct soundhw *c; |
... | ... | |
109 | 108 |
} |
110 | 109 |
} |
111 | 110 |
} |
112 |
#endif |
|
113 | 111 |
|
114 | 112 |
#define MAGNUM_BIOS_SIZE_MAX 0x7e000 |
115 | 113 |
#define MAGNUM_BIOS_SIZE (BIOS_SIZE < MAGNUM_BIOS_SIZE_MAX ? BIOS_SIZE : MAGNUM_BIOS_SIZE_MAX) |
... | ... | |
288 | 286 |
|
289 | 287 |
/* Sound card */ |
290 | 288 |
/* FIXME: missing Jazz sound at 0x8000c000, rc4030[2] */ |
291 |
#ifdef HAS_AUDIO |
|
292 | 289 |
audio_init(i8259); |
293 |
#endif |
|
294 | 290 |
|
295 | 291 |
/* NVRAM: Unprotected at 0x9000, Protected at 0xa000, Read only at 0xb000 */ |
296 | 292 |
ds1225y_init(0x80009000, "nvram"); |
b/hw/mips_malta.c | ||
---|---|---|
456 | 456 |
} |
457 | 457 |
|
458 | 458 |
/* Audio support */ |
459 |
#ifdef HAS_AUDIO |
|
460 | 459 |
static void audio_init (PCIBus *pci_bus) |
461 | 460 |
{ |
462 | 461 |
struct soundhw *c; |
... | ... | |
474 | 473 |
} |
475 | 474 |
} |
476 | 475 |
} |
477 |
#endif |
|
478 | 476 |
|
479 | 477 |
/* Network support */ |
480 | 478 |
static void network_init(void) |
... | ... | |
970 | 968 |
floppy_controller = fdctrl_init_isa(fd); |
971 | 969 |
|
972 | 970 |
/* Sound card */ |
973 |
#ifdef HAS_AUDIO |
|
974 | 971 |
audio_init(pci_bus); |
975 |
#endif |
|
976 | 972 |
|
977 | 973 |
/* Network card */ |
978 | 974 |
network_init(); |
b/hw/musicpal.c | ||
---|---|---|
1486 | 1486 |
DeviceState *i2c_dev; |
1487 | 1487 |
DeviceState *lcd_dev; |
1488 | 1488 |
DeviceState *key_dev; |
1489 |
#ifdef HAS_AUDIO |
|
1490 | 1489 |
DeviceState *wm8750_dev; |
1491 | 1490 |
SysBusDevice *s; |
1492 |
#endif |
|
1493 | 1491 |
i2c_bus *i2c; |
1494 | 1492 |
int i; |
1495 | 1493 |
unsigned long flash_size; |
... | ... | |
1611 | 1609 |
qdev_connect_gpio_out(key_dev, i, qdev_get_gpio_in(dev, i + 15)); |
1612 | 1610 |
} |
1613 | 1611 |
|
1614 |
#ifdef HAS_AUDIO |
|
1615 | 1612 |
wm8750_dev = i2c_create_slave(i2c, "wm8750", MP_WM_ADDR); |
1616 | 1613 |
dev = qdev_create(NULL, "mv88w8618_audio"); |
1617 | 1614 |
s = sysbus_from_qdev(dev); |
... | ... | |
1619 | 1616 |
qdev_init_nofail(dev); |
1620 | 1617 |
sysbus_mmio_map(s, 0, MP_AUDIO_BASE); |
1621 | 1618 |
sysbus_connect_irq(s, 0, pic[MP_AUDIO_IRQ]); |
1622 |
#endif |
|
1623 | 1619 |
|
1624 | 1620 |
musicpal_binfo.ram_size = MP_RAM_DEFAULT_SIZE; |
1625 | 1621 |
musicpal_binfo.kernel_filename = kernel_filename; |
b/hw/omap2.c | ||
---|---|---|
1973 | 1973 |
s->codec.txdrq = *drq; |
1974 | 1974 |
omap_eac_reset(s); |
1975 | 1975 |
|
1976 |
#ifdef HAS_AUDIO |
|
1977 | 1976 |
AUD_register_card("OMAP EAC", &s->codec.card); |
1978 | 1977 |
|
1979 | 1978 |
iomemtype = cpu_register_io_memory(omap_eac_readfn, |
1980 | 1979 |
omap_eac_writefn, s); |
1981 | 1980 |
omap_l4_attach(ta, 0, iomemtype); |
1982 |
#endif |
|
1983 | 1981 |
|
1984 | 1982 |
return s; |
1985 | 1983 |
} |
b/hw/pc.c | ||
---|---|---|
721 | 721 |
static const int parallel_io[MAX_PARALLEL_PORTS] = { 0x378, 0x278, 0x3bc }; |
722 | 722 |
static const int parallel_irq[MAX_PARALLEL_PORTS] = { 7, 7, 7 }; |
723 | 723 |
|
724 |
#ifdef HAS_AUDIO |
|
725 | 724 |
void pc_audio_init (PCIBus *pci_bus, qemu_irq *pic) |
726 | 725 |
{ |
727 | 726 |
struct soundhw *c; |
... | ... | |
738 | 737 |
} |
739 | 738 |
} |
740 | 739 |
} |
741 |
#endif |
|
742 | 740 |
|
743 | 741 |
void pc_init_ne2k_isa(NICInfo *nd) |
744 | 742 |
{ |
b/hw/pc_piix.c | ||
---|---|---|
140 | 140 |
} |
141 | 141 |
} |
142 | 142 |
|
143 |
#ifdef HAS_AUDIO |
|
144 | 143 |
pc_audio_init(pci_enabled ? pci_bus : NULL, isa_irq); |
145 |
#endif |
|
146 | 144 |
|
147 | 145 |
pc_cmos_init(below_4g_mem_size, above_4g_mem_size, boot_device, hd, |
148 | 146 |
floppy_controller, rtc_state); |
b/hw/spitz.c | ||
---|---|---|
768 | 768 |
|
769 | 769 |
#define SPITZ_GPIO_WM 5 |
770 | 770 |
|
771 |
#ifdef HAS_AUDIO |
|
772 | 771 |
static void spitz_wm8750_addr(void *opaque, int line, int level) |
773 | 772 |
{ |
774 | 773 |
i2c_slave *wm = (i2c_slave *) opaque; |
... | ... | |
777 | 776 |
else |
778 | 777 |
i2c_set_slave_address(wm, SPITZ_WM_ADDRL); |
779 | 778 |
} |
780 |
#endif |
|
781 | 779 |
|
782 | 780 |
static void spitz_i2c_setup(PXA2xxState *cpu) |
783 | 781 |
{ |
784 | 782 |
/* Attach the CPU on one end of our I2C bus. */ |
785 | 783 |
i2c_bus *bus = pxa2xx_i2c_bus(cpu->i2c[0]); |
786 | 784 |
|
787 |
#ifdef HAS_AUDIO |
|
788 | 785 |
DeviceState *wm; |
789 | 786 |
|
790 | 787 |
/* Attach a WM8750 to the bus */ |
... | ... | |
798 | 795 |
cpu->i2s->codec_out = wm8750_dac_dat; |
799 | 796 |
cpu->i2s->codec_in = wm8750_adc_dat; |
800 | 797 |
wm8750_data_req_set(wm, cpu->i2s->data_req, cpu->i2s); |
801 |
#endif |
|
802 | 798 |
} |
803 | 799 |
|
804 | 800 |
static void spitz_akita_i2c_setup(PXA2xxState *cpu) |
Also available in: Unified diff