diff options
author | Timos Ampelikiotis <t.ampelikiotis@virtualopensystems.com> | 2023-10-10 11:40:56 +0000 |
---|---|---|
committer | Timos Ampelikiotis <t.ampelikiotis@virtualopensystems.com> | 2023-10-10 11:40:56 +0000 |
commit | e02cda008591317b1625707ff8e115a4841aa889 (patch) | |
tree | aee302e3cf8b59ec2d32ec481be3d1afddfc8968 /include/hw/audio | |
parent | cc668e6b7e0ffd8c9d130513d12053cf5eda1d3b (diff) |
Introduce Virtio-loopback epsilon release:
Epsilon release introduces a new compatibility layer which make virtio-loopback
design to work with QEMU and rust-vmm vhost-user backend without require any
changes.
Signed-off-by: Timos Ampelikiotis <t.ampelikiotis@virtualopensystems.com>
Change-Id: I52e57563e08a7d0bdc002f8e928ee61ba0c53dd9
Diffstat (limited to 'include/hw/audio')
-rw-r--r-- | include/hw/audio/pcspk.h | 40 | ||||
-rw-r--r-- | include/hw/audio/soundhw.h | 15 | ||||
-rw-r--r-- | include/hw/audio/wm8750.h | 30 |
3 files changed, 85 insertions, 0 deletions
diff --git a/include/hw/audio/pcspk.h b/include/hw/audio/pcspk.h new file mode 100644 index 000000000..950617958 --- /dev/null +++ b/include/hw/audio/pcspk.h @@ -0,0 +1,40 @@ +/* + * QEMU PC speaker emulation + * + * Copyright (c) 2006 Joachim Henke + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef HW_PCSPK_H +#define HW_PCSPK_H + +#include "hw/isa/isa.h" +#include "hw/qdev-properties.h" +#include "qapi/error.h" + +#define TYPE_PC_SPEAKER "isa-pcspk" + +static inline void pcspk_init(ISADevice *isadev, ISABus *bus, ISADevice *pit) +{ + object_property_set_link(OBJECT(isadev), "pit", OBJECT(pit), NULL); + isa_realize_and_unref(isadev, bus, &error_fatal); +} + +#endif /* HW_PCSPK_H */ diff --git a/include/hw/audio/soundhw.h b/include/hw/audio/soundhw.h new file mode 100644 index 000000000..f09a29785 --- /dev/null +++ b/include/hw/audio/soundhw.h @@ -0,0 +1,15 @@ +#ifndef HW_SOUNDHW_H +#define HW_SOUNDHW_H + +void isa_register_soundhw(const char *name, const char *descr, + int (*init_isa)(ISABus *bus)); + +void pci_register_soundhw(const char *name, const char *descr, + int (*init_pci)(PCIBus *bus)); +void deprecated_register_soundhw(const char *name, const char *descr, + int isa, const char *typename); + +void soundhw_init(void); +void select_soundhw(const char *optarg); + +#endif diff --git a/include/hw/audio/wm8750.h b/include/hw/audio/wm8750.h new file mode 100644 index 000000000..f7bafd5e3 --- /dev/null +++ b/include/hw/audio/wm8750.h @@ -0,0 +1,30 @@ +/* + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2 or later, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see <http://www.gnu.org/licenses/>. + */ +#ifndef HW_DAC_WM8750_H +#define HW_DAC_WM8750_H + + +#define TYPE_WM8750 "wm8750" +#define TYPE_MV88W8618_AUDIO "mv88w8618_audio" + +typedef void data_req_cb(void *opaque, int free_out, int free_in); + +void wm8750_data_req_set(DeviceState *dev, data_req_cb *data_req, void *opaque); +void wm8750_dac_dat(void *opaque, uint32_t sample); +uint32_t wm8750_adc_dat(void *opaque); +void *wm8750_dac_buffer(void *opaque, int samples); +void wm8750_dac_commit(void *opaque); +void wm8750_set_bclk_in(void *opaque, int new_hz); + +#endif |