/* * QEMU MCPX Audio Processing Unit implementation * * Copyright (c) 2012 espes * Copyright (c) 2018-2019 Jannik Vogel * Copyright (c) 2019-2025 Matt Borgerson * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see . */ #ifndef HW_XBOX_MCPX_APU_GP_EP_H #define HW_XBOX_MCPX_APU_GP_EP_H #include "qemu/osdep.h" #include "hw/hw.h" #include "hw/pci/pci.h" #include "hw/xbox/mcpx/apu/apu_regs.h" #include "dsp.h" #include "dsp_dma.h" #include "dsp_cpu.h" #include "dsp_state.h" typedef struct MCPXAPUState MCPXAPUState; typedef struct MCPXAPUGPState { bool realtime; MemoryRegion mmio; DSPState *dsp; uint32_t regs[0x10000]; } MCPXAPUGPState; typedef struct MCPXAPUEPState { bool realtime; MemoryRegion mmio; DSPState *dsp; uint32_t regs[0x10000]; } MCPXAPUEPState; extern const MemoryRegionOps gp_ops; extern const MemoryRegionOps ep_ops; void mcpx_apu_dsp_init(MCPXAPUState *d); void mcpx_apu_update_dsp_preference(MCPXAPUState *d); void mcpx_apu_dsp_frame(MCPXAPUState *d, float mixbins[NUM_MIXBINS][NUM_SAMPLES_PER_FRAME]); #endif