Skip to content

Commit

Permalink
sound: fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandermbrown committed Feb 5, 2024
1 parent 044b41f commit efc8b3d
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 68 deletions.
18 changes: 9 additions & 9 deletions examples/virtio-snd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ CLIENT_VMM_OBJS := $(VMM_OBJS) \
block.o \
sound.o \
mmio.o \
sddf_serial_shared_ringbuffer.o \
shared_ringbuffer.o \
sddf_snd_shared_ringbuffer.o

SND_DRIVER_VMM_OBJS := $(VMM_OBJS) \
Expand All @@ -150,12 +150,12 @@ SND_DRIVER_VMM_OBJS := $(VMM_OBJS) \
block.o \
sound.o \
mmio.o \
sddf_serial_shared_ringbuffer.o \
shared_ringbuffer.o \
sddf_snd_shared_ringbuffer.o

SERIAL_MUX_TX_OBJS := mux_tx.o sddf_serial_shared_ringbuffer.o util.o printf.o
SERIAL_MUX_RX_OBJS := mux_rx.o sddf_serial_shared_ringbuffer.o
SERIAL_DRIVER_OBJS := uart.o sddf_serial_shared_ringbuffer.o
SERIAL_MUX_TX_OBJS := mux_tx.o shared_ringbuffer.o util.o printf.o
SERIAL_MUX_RX_OBJS := mux_rx.o shared_ringbuffer.o
SERIAL_DRIVER_OBJS := uart.o shared_ringbuffer.o

USERLEVEL_OBJS := sddf_snd_shared_ringbuffer.o

Expand All @@ -175,10 +175,10 @@ CFLAGS := -mstrict-align \
-Wno-unused-command-line-argument \
-Wall -Wno-unused-function -Werror \
-I$(VMM_SRC_DIR)/arch/aarch64 -I$(VMM_SRC_DIR) -I$(VMM_SRC_DIR)/util -I$(BOARD_DIR)/include \
-I$(SDDF_SERIAL_RINGBUFFER)/include \
-I$(SDDF_SERIAL_DRIVER)/include \
-I$(SDDF_BLOCK_RINGBUFFER)/include \
-I$(SDDF_SOUND_RINGBUFFER)/include \
-I$(SDDF)/include \
-I$(SDDF) \
-DBOARD_$(BOARD) \
-DCONFIG_$(CONFIG) \
Expand Down Expand Up @@ -230,7 +230,7 @@ $(CLIENT_VM_INITRD_OVERLAYED): $(addprefix $(BUILD_DIR)/, $(CLIENT_VM_USERLEVEL_
./pack.sh $(CLIENT_VM_ROOTFS_TMP_DIR) $(CLIENT_VM_INITRD) $(CURRENT_DIR)/$(CLIENT_VM_INITRD_OVERLAYED) "$^"

$(SND_DRIVER_VM_DTB): $(SND_DRIVER_VM_BASE_DTS) $(SND_DRIVER_VM_DTS_OVERLAYS)
sh ../../scripts/dtscat $^ > $(BUILD_DIR)/snd_driver_vm.dts
sh ../../tools/dtscat $^ > $(BUILD_DIR)/snd_driver_vm.dts
$(DTC) -q -I dts -O dtb $(BUILD_DIR)/snd_driver_vm.dts > $@

$(BUILD_DIR)/snd_driver_images.o: $(VMM_TOOLS)/package_guest_images.S $(SND_DRIVER_VM_LINUX) $(SND_DRIVER_VM_DTB) $(SND_DRIVER_VM_INITRD_OVERLAYED)
Expand All @@ -242,7 +242,7 @@ $(BUILD_DIR)/snd_driver_images.o: $(VMM_TOOLS)/package_guest_images.S $(SND_DRIV
$< -o $@

$(CLIENT_VM_DTB): $(CLIENT_VM_BASE_DTS) $(CLIENT_VM_DTS_OVERLAYS)
sh ../../scripts/dtscat $^ > $(BUILD_DIR)/client_vm.dts
sh ../../tools/dtscat $^ > $(BUILD_DIR)/client_vm.dts
$(DTC) -q -I dts -O dtb $(BUILD_DIR)/client_vm.dts > $@

$(BUILD_DIR)/client_images.o: $(VMM_TOOLS)/package_guest_images.S $(CLIENT_VM_LINUX) $(CLIENT_VM_DTB) $(CLIENT_VM_INITRD_OVERLAYED)
Expand Down Expand Up @@ -288,7 +288,7 @@ $(BUILD_DIR)/%.o: $(VMM_SRC_DIR)/virtio/%.c Makefile
$(CC) -c $(CFLAGS) $< -o $@

$(BUILD_DIR)/%.o: $(SDDF_SERIAL_COMPONENTS)/%.c Makefile
$(CC) -c $(CFLAGS) -DNUM_CLIENTS=2 -DTRANSFER_WITH_COLOUR=1 $< -o $@
$(CC) -c $(CFLAGS) -DSERIAL_NUM_CLIENTS=2 -DSERIAL_TRANSFER_WITH_COLOUR=1 $< -o $@

$(BUILD_DIR)/%.o: $(SDDF_SERIAL_RINGBUFFER)/%.c Makefile
$(CC) -c $(CFLAGS) $< -o $@
Expand Down
52 changes: 29 additions & 23 deletions examples/virtio-snd/client_vmm.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "virtio/virtio.h"
#include "virtio/console.h"
#include "virtio/sound.h"
#include "serial/libserialsharedringbuffer/include/sddf_serial_shared_ringbuffer.h"
#include "sddf/serial/shared_ringbuffer.h"
#include "sound/libsoundsharedringbuffer/include/sddf_snd_shared_ringbuffer.h"

/*
Expand Down Expand Up @@ -68,10 +68,11 @@ uintptr_t serial_tx_used;
uintptr_t serial_rx_data;
uintptr_t serial_tx_data;

sddf_serial_ring_handle_t serial_rx_ring_handle;
sddf_serial_ring_handle_t serial_tx_ring_handle;
static ring_handle_t serial_rx_ring_handle;
static ring_handle_t serial_tx_ring_handle;

static sddf_serial_ring_handle_t *serial_ring_handles[SDDF_SERIAL_NUM_RING_HANDLES];
static size_t serial_ch[SDDF_SERIAL_NUM_CH];
static ring_handle_t *serial_ring_handles[SDDF_SERIAL_NUM_HANDLES];

uintptr_t sound_commands;
uintptr_t sound_responses;
Expand All @@ -85,6 +86,9 @@ uintptr_t sound_tx_data;

uintptr_t sound_shared_state;

// @alexbr: currently SDDF_SERIAL_NUM_CH is defined in virtio...
// doesn't make sense
static size_t sound_ch[VIRTIO_SND_NUM_CH];
static sddf_snd_state_t snd_state;

static struct virtio_device virtio_console;
Expand Down Expand Up @@ -123,28 +127,28 @@ void init(void) {
}

/* Initialise our sDDF ring buffers for the serial device */
sddf_serial_ring_init(&serial_rx_ring_handle,
(sddf_serial_ring_buffer_t *)serial_rx_free,
(sddf_serial_ring_buffer_t *)serial_rx_used,
true,
SDDF_SERIAL_NUM_BUFFERS,
SDDF_SERIAL_NUM_BUFFERS);
for (int i = 0; i < SDDF_SERIAL_NUM_BUFFERS - 1; i++) {
int ret = sddf_serial_enqueue_free(&serial_rx_ring_handle, serial_rx_data + (i * SDDF_SERIAL_BUFFER_SIZE), SDDF_SERIAL_BUFFER_SIZE, NULL);
ring_init(&serial_rx_ring_handle,
(ring_buffer_t *)serial_rx_free,
(ring_buffer_t *)serial_rx_used,
true,
NUM_BUFFERS,
NUM_BUFFERS);
for (int i = 0; i < NUM_BUFFERS - 1; i++) {
int ret = enqueue_free(&serial_rx_ring_handle, serial_rx_data + (i * BUFFER_SIZE), BUFFER_SIZE, NULL);
if (ret != 0) {
microkit_dbg_puts(microkit_name);
microkit_dbg_puts(": server rx buffer population, unable to enqueue buffer\n");
}
}
sddf_serial_ring_init(&serial_tx_ring_handle,
(sddf_serial_ring_buffer_t *)serial_tx_free,
(sddf_serial_ring_buffer_t *)serial_tx_used,
ring_init(&serial_tx_ring_handle,
(ring_buffer_t *)serial_tx_free,
(ring_buffer_t *)serial_tx_used,
true,
SDDF_SERIAL_NUM_BUFFERS,
SDDF_SERIAL_NUM_BUFFERS);
for (int i = 0; i < SDDF_SERIAL_NUM_BUFFERS - 1; i++) {
NUM_BUFFERS,
NUM_BUFFERS);
for (int i = 0; i < NUM_BUFFERS - 1; i++) {
// Have to start at the memory region left of by the rx ring
int ret = sddf_serial_enqueue_free(&serial_tx_ring_handle, serial_tx_data + ((i + SDDF_SERIAL_NUM_BUFFERS) * SDDF_SERIAL_BUFFER_SIZE), SDDF_SERIAL_BUFFER_SIZE, NULL);
int ret = enqueue_free(&serial_tx_ring_handle, serial_tx_data + ((i + NUM_BUFFERS) * BUFFER_SIZE), BUFFER_SIZE, NULL);
assert(ret == 0);
if (ret != 0) {
microkit_dbg_puts(microkit_name);
Expand All @@ -154,11 +158,12 @@ void init(void) {
serial_ring_handles[SDDF_SERIAL_RX_RING] = &serial_rx_ring_handle;
serial_ring_handles[SDDF_SERIAL_TX_RING] = &serial_tx_ring_handle;
/* Neither ring should be plugged and hence all buffers we send should actually end up at the driver. */
assert(!sddf_serial_ring_plugged(serial_tx_ring_handle.free_ring));
assert(!sddf_serial_ring_plugged(serial_tx_ring_handle.used_ring));
assert(!ring_plugged(serial_tx_ring_handle.free_ring));
assert(!ring_plugged(serial_tx_ring_handle.used_ring));
/* Initialise virtIO console device */
serial_ch[SDDF_SERIAL_TX_CH_INDEX] = SERIAL_MUX_TX_CH;
success = virtio_mmio_device_init(&virtio_console, CONSOLE, VIRTIO_CONSOLE_BASE, VIRTIO_CONSOLE_SIZE, VIRTIO_CONSOLE_IRQ,
NULL, (void **)serial_ring_handles, SERIAL_MUX_TX_CH);
NULL, NULL, (void **)serial_ring_handles, serial_ch);
assert(success);

assert(sound_commands);
Expand Down Expand Up @@ -195,8 +200,9 @@ void init(void) {
assert(ret == 0);
}

sound_ch[VIRTIO_SND_CH_INDEX] = SOUND_DRIVER_CH;
success = virtio_mmio_device_init(&virtio_sound, SND, VIRTIO_SOUND_BASE, VIRTIO_SOUND_SIZE, VIRTIO_SOUND_IRQ,
NULL, (void **)&snd_state, SOUND_DRIVER_CH);
NULL, NULL, (void **)&snd_state, sound_ch);
assert(success);

/* Don't start the guest until driver VM is ready. */
Expand Down
46 changes: 24 additions & 22 deletions examples/virtio-snd/snd_driver_vmm.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "virtio/console.h"
#include "virtio/block.h"
#include "virtio/sound.h"
#include "sddf_serial_shared_ringbuffer.h"
#include <sddf/serial/shared_ringbuffer.h>
#include "sddf_snd_shared_ringbuffer.h"
#include "uio.h"

Expand Down Expand Up @@ -77,10 +77,11 @@ uintptr_t serial_tx_used;
uintptr_t serial_rx_data;
uintptr_t serial_tx_data;

sddf_serial_ring_handle_t serial_rx_ring_handle;
sddf_serial_ring_handle_t serial_tx_ring_handle;
static ring_handle_t serial_rx_ring_handle;
static ring_handle_t serial_tx_ring_handle;

static sddf_serial_ring_handle_t *serial_ring_handles[SDDF_SERIAL_NUM_RING_HANDLES];
static size_t serial_ch[SDDF_SERIAL_NUM_CH];
static ring_handle_t *serial_ring_handles[SDDF_SERIAL_NUM_HANDLES];

static struct virtio_device virtio_console;

Expand Down Expand Up @@ -125,28 +126,28 @@ void init(void) {
}

/* Initialise our sDDF ring buffers for the serial device */
sddf_serial_ring_init(&serial_rx_ring_handle,
(sddf_serial_ring_buffer_t *)serial_rx_free,
(sddf_serial_ring_buffer_t *)serial_rx_used,
ring_init(&serial_rx_ring_handle,
(ring_buffer_t *)serial_rx_free,
(ring_buffer_t *)serial_rx_used,
true,
SDDF_SERIAL_NUM_BUFFERS,
SDDF_SERIAL_NUM_BUFFERS);
for (int i = 0; i < SDDF_SERIAL_NUM_BUFFERS - 1; i++) {
int ret = sddf_serial_enqueue_free(&serial_rx_ring_handle, serial_rx_data + (i * SDDF_SERIAL_BUFFER_SIZE), SDDF_SERIAL_BUFFER_SIZE, NULL);
NUM_BUFFERS,
NUM_BUFFERS);
for (int i = 0; i < NUM_BUFFERS - 1; i++) {
int ret = enqueue_free(&serial_rx_ring_handle, serial_rx_data + (i * BUFFER_SIZE), BUFFER_SIZE, NULL);
if (ret != 0) {
microkit_dbg_puts(microkit_name);
microkit_dbg_puts(": server rx buffer population, unable to enqueue buffer\n");
}
}
sddf_serial_ring_init(&serial_tx_ring_handle,
(sddf_serial_ring_buffer_t *)serial_tx_free,
(sddf_serial_ring_buffer_t *)serial_tx_used,
true,
SDDF_SERIAL_NUM_BUFFERS,
SDDF_SERIAL_NUM_BUFFERS);
for (int i = 0; i < SDDF_SERIAL_NUM_BUFFERS - 1; i++) {
ring_init(&serial_tx_ring_handle,
(ring_buffer_t *)serial_tx_free,
(ring_buffer_t *)serial_tx_used,
true,
NUM_BUFFERS,
NUM_BUFFERS);
for (int i = 0; i < NUM_BUFFERS - 1; i++) {
// Have to start at the memory region left of by the rx ring
int ret = sddf_serial_enqueue_free(&serial_tx_ring_handle, serial_tx_data + ((i + SDDF_SERIAL_NUM_BUFFERS) * SDDF_SERIAL_BUFFER_SIZE), SDDF_SERIAL_BUFFER_SIZE, NULL);
int ret = enqueue_free(&serial_tx_ring_handle, serial_tx_data + ((i + NUM_BUFFERS) * BUFFER_SIZE), BUFFER_SIZE, NULL);
assert(ret == 0);
if (ret != 0) {
microkit_dbg_puts(microkit_name);
Expand All @@ -156,11 +157,12 @@ void init(void) {
serial_ring_handles[SDDF_SERIAL_RX_RING] = &serial_rx_ring_handle;
serial_ring_handles[SDDF_SERIAL_TX_RING] = &serial_tx_ring_handle;
/* Neither ring should be plugged and hence all buffers we send should actually end up at the driver. */
assert(!sddf_serial_ring_plugged(serial_tx_ring_handle.free_ring));
assert(!sddf_serial_ring_plugged(serial_tx_ring_handle.used_ring));
assert(!ring_plugged(serial_tx_ring_handle.free_ring));
assert(!ring_plugged(serial_tx_ring_handle.used_ring));
/* Initialise virtIO console device */
serial_ch[SDDF_SERIAL_TX_CH_INDEX] = SERIAL_MUX_TX_CH;
success = virtio_mmio_device_init(&virtio_console, CONSOLE, VIRTIO_CONSOLE_BASE, VIRTIO_CONSOLE_SIZE, VIRTIO_CONSOLE_IRQ,
NULL, (void **)serial_ring_handles, SERIAL_MUX_TX_CH);
NULL, NULL, (void **)serial_ring_handles, serial_ch);
assert(success);

success = virq_register(GUEST_VCPU_ID, SOUND_IRQ, &snd_virq_ack, NULL);
Expand Down
2 changes: 1 addition & 1 deletion examples/virtio/sddf
Submodule sddf updated 97 files
+52 −0 .github/workflows/ci.yaml
+1 −1 .gitignore
+56 −38 README.md
+4 −4 benchmark/benchmark.c
+4 −4 benchmark/idle.c
+31 −0 blk/libblksharedqueue/Makefile
+29 −0 blk/libblksharedqueue/shared_queue.c
+0 −66 block/libblocksharedringbuffer/README.md
+0 −365 block/libblocksharedringbuffer/include/sddf_blk_shared_ringbuffer.h
+0 −31 block/libblocksharedringbuffer/sddf_blk_shared_ringbuffer.c
+73 −0 ci/examples.sh
+1 −1 drivers/clock/imx/timer.c
+233 −0 drivers/i2c/meson/README.md
+53 −0 drivers/i2c/meson/i2c-sel4cp.h
+178 −0 drivers/i2c/meson/i2c-transport.c
+158 −0 drivers/i2c/meson/i2c.c
+718 −0 drivers/i2c/meson/i2c_driver.c
+12 −0 drivers/i2c/meson/include/clk.h
+52 −0 drivers/i2c/meson/include/gpio.h
+51 −0 drivers/i2c/meson/include/i2c-driver.h
+40 −0 drivers/i2c/meson/include/i2c-token.h
+140 −0 drivers/i2c/meson/include/i2c-transport.h
+55 −0 drivers/i2c/meson/include/i2c.h
+64 −0 drivers/i2c/meson/include/odroidc4-i2c-mem.h
+117 −0 drivers/i2c/meson/include/printf.h
+212 −0 drivers/i2c/meson/include/sw_shared_ringbuffer.h
+914 −0 drivers/i2c/meson/printf.c
+19 −0 drivers/i2c/meson/sw_shared_ringbuffer.c
+42 −30 drivers/network/imx/ethernet.c
+19 −35 drivers/network/meson/ethernet.c
+1 −1 drivers/serial/arm/include/uart.h
+12 −12 drivers/serial/arm/uart.c
+1 −1 drivers/serial/meson/include/uart.h
+1 −5 drivers/serial/meson/uart.c
+4 −11 examples/echo_server/Makefile
+18 −0 examples/echo_server/README.md
+5 −4 examples/echo_server/echo_server.system
+8 −0 examples/i2c/.gitignore
+99 −0 examples/i2c/Makefile
+17 −0 examples/i2c/README.md
+195 −0 examples/i2c/client.c
+1 −0 examples/i2c/client.h
+120 −0 examples/i2c/i2c.system
+438 −0 examples/i2c/pn532.c
+23 −0 examples/i2c/pn532.h
+4 −9 examples/serial_two_client/Makefile
+2 −1 examples/serial_two_client/include/serial_server.h
+1 −2 examples/serial_two_client/serial_server_1.c
+1 −2 examples/serial_two_client/serial_server_2.c
+1 −1 examples/timer/Makefile
+0 −0 include/sddf/benchmark/bench.h
+0 −0 include/sddf/benchmark/sel4bench.h
+344 −0 include/sddf/blk/shared_queue.h
+1 −1 include/sddf/network/shared_ringbuffer.h
+26 −104 include/sddf/serial/shared_ringbuffer.h
+20 −0 include/sddf/serial/util.h
+1 −1 include/sddf/util/arch/cc.h
+0 −0 include/sddf/util/cache.h
+0 −0 include/sddf/util/echo.h
+0 −0 include/sddf/util/fence.h
+0 −0 include/sddf/util/lwipopts.h
+0 −0 include/sddf/util/timer.h
+2 −9 include/sddf/util/util.h
+9 −0 libco/LICENSE.txt
+82 −0 libco/aarch64.c
+74 −0 libco/amd64.c
+49 −0 libco/arm.c
+21 −0 libco/libco.c
+19 −0 libco/libco.h
+21 −0 libco/settings.h
+84 −10 network/components/arp.c
+31 −34 network/components/copy.c
+51 −22 network/components/lwip.c
+1 −1 network/components/lwip_timer.c
+38 −32 network/components/mux_rx.c
+38 −20 network/components/mux_tx.c
+1 −1 network/components/mux_tx_bandwidth_limited.c
+1 −1 network/components/mux_tx_priority.c
+1 −1 network/components/mux_tx_round_robin.c
+16 −3 network/components/udp_echo_socket.c
+5 −7 network/components/utilization_socket.c
+0 −1 network/ipstacks/lwip/src/core/ipv4/ip4.c
+0 −1 network/ipstacks/lwip/src/core/tcp_in.c
+0 −1 network/ipstacks/lwip/src/core/udp.c
+1 −1 network/ipstacks/lwip/src/include/lwip/arch.h
+1 −1 network/ipstacks/lwip/src/include/lwip/opt.h
+1 −2 network/libethsharedringbuffer/Makefile
+3 −3 network/libethsharedringbuffer/shared_ringbuffer.c
+26 −24 serial/components/mux_rx.c
+26 −24 serial/components/mux_tx.c
+162 −20 serial/config.json
+31 −0 serial/libserialsharedringbuffer/Makefile
+0 −26 serial/libserialsharedringbuffer/sddf_serial_shared_ringbuffer.c
+128 −0 serial/libserialsharedringbuffer/shared_ringbuffer.c
+0 −1 sound/libsoundsharedringbuffer/include/sddf_snd_shared_ringbuffer.h
+1 −0 sound/libsoundsharedringbuffer/sddf_snd_shared_ringbuffer.c
+2 −2 util/cache.c
19 changes: 11 additions & 8 deletions src/virtio/sound.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static sddf_snd_state_t *get_state(struct virtio_device *dev)
{
// @alexbr: currently this casts from a void ** which doesn't make sense.
// I prefer to have a struct instead of array however, need to discuss.
return (sddf_snd_state_t *)dev->sddf_ring_handles;
return (sddf_snd_state_t *)dev->sddf_handlers;
}

static void msg_store_init(msg_store_t *msg_store, unsigned int num_buffers)
Expand Down Expand Up @@ -896,7 +896,7 @@ static int virtio_snd_mmio_queue_notify(struct virtio_device *dev)
handle_virtq(dev, dev->data.QueueNotify, &notify_driver, &respond);

if (notify_driver) {
microkit_notify(dev->sddf_ch);
microkit_notify(dev->sddf_ch[VIRTIO_SND_CH_INDEX]);
}
if (respond) {
virtio_snd_respond(dev);
Expand All @@ -915,19 +915,22 @@ static virtio_device_funs_t functions = {
};

void virtio_snd_init(struct virtio_device *dev,
struct virtio_queue_handler *vqs, size_t num_vqs,
size_t virq,
void **data_region_handles,
void **sddf_ring_handles, size_t sddf_ch)
struct virtio_queue_handler *vqs,
size_t num_vqs,
size_t virq,
void *config,
void **data_region_handlers,
void **sddf_handlers, size_t *sddf_ch)
{
dev->data.DeviceID = DEVICE_ID_VIRTIO_SOUND;
dev->data.VendorID = VIRTIO_MMIO_DEV_VENDOR_ID;
dev->funs = &functions;
dev->vqs = vqs;
dev->num_vqs = num_vqs;
dev->virq = virq;
dev->data_region_handles = data_region_handles;
dev->sddf_ring_handles = sddf_ring_handles;
dev->config = config;
dev->data_region_handlers = data_region_handlers;
dev->sddf_handlers = sddf_handlers;
dev->sddf_ch = sddf_ch;

virtio_snd_config_init();
Expand Down
12 changes: 8 additions & 4 deletions src/virtio/sound.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
#include "virtio/mmio.h"

#define VIRTIO_SND_NUM_VIRTQ 4
#define VIRTIO_SND_CH_INDEX 0
#define VIRTIO_SND_NUM_CH 1

struct virtio_snd_config {
uint32_t jacks;
Expand Down Expand Up @@ -284,9 +286,11 @@ struct virtio_snd_chmap_info {


void virtio_snd_init(struct virtio_device *dev,
struct virtio_queue_handler *vqs, size_t num_vqs,
size_t virq,
void **data_region_handles,
void **sddf_ring_handles, size_t sddf_ch);
struct virtio_queue_handler *vqs,
size_t num_vqs,
size_t virq,
void *config,
void **data_region_handlers,
void **sddf_handlers, size_t *sddf_ch);

void virtio_snd_notified(struct virtio_device *dev);
2 changes: 1 addition & 1 deletion src/virtio/virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ bool virtio_mmio_device_init(virtio_device_t *dev,
break;
case SND:
LOG_VMM("Init sound device at [%#lx, %#lx), irq %lu\n", region_base, region_base + region_size, virq);
virtio_snd_init(dev, virtio_snd_queues, VIRTIO_SND_NUM_VIRTQ, virq, data_region_handles, sddf_ring_handles, sddf_ch);
virtio_snd_init(dev, virtio_snd_queues, VIRTIO_SND_NUM_VIRTQ, virq, config, data_region_handlers, sddf_handlers, sddf_ch);
success = fault_register_vm_exception_handler(region_base,
region_size,
&virtio_mmio_fault_handle,
Expand Down

0 comments on commit efc8b3d

Please sign in to comment.