From de1c308c62c73579a7db62f78c927be251063c8a Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Mon, 16 Oct 2023 14:53:32 +0300 Subject: [PATCH] Rename vhost-user-sound to vhost-device-sound Signed-off-by: Manos Pitsidianakis --- Cargo.lock | 40 ++++++++++++++++++++-------------------- crates/sound/Cargo.toml | 2 +- crates/sound/README.md | 8 ++++---- crates/sound/src/lib.rs | 4 ++-- crates/sound/src/main.rs | 2 +- 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3bea431..fbd38e6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1446,6 +1446,26 @@ dependencies = [ "vmm-sys-util", ] +[[package]] +name = "vhost-device-sound" +version = "0.1.0" +dependencies = [ + "alsa", + "clap", + "env_logger", + "log", + "pipewire", + "rstest", + "serial_test", + "thiserror", + "vhost 0.6.1", + "vhost-user-backend 0.8.0", + "virtio-bindings 0.2.1", + "virtio-queue 0.7.1", + "vm-memory 0.10.0", + "vmm-sys-util", +] + [[package]] name = "vhost-device-vsock" version = "0.1.0" @@ -1499,26 +1519,6 @@ dependencies = [ "vmm-sys-util", ] -[[package]] -name = "vhost-user-sound" -version = "0.1.0" -dependencies = [ - "alsa", - "clap", - "env_logger", - "log", - "pipewire", - "rstest", - "serial_test", - "thiserror", - "vhost 0.6.1", - "vhost-user-backend 0.8.0", - "virtio-bindings 0.2.1", - "virtio-queue 0.7.1", - "vm-memory 0.10.0", - "vmm-sys-util", -] - [[package]] name = "virtio-bindings" version = "0.1.0" diff --git a/crates/sound/Cargo.toml b/crates/sound/Cargo.toml index 8df35e2..598d55d 100644 --- a/crates/sound/Cargo.toml +++ b/crates/sound/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "vhost-user-sound" +name = "vhost-device-sound" version = "0.1.0" authors = ["Stefano Garzarella ", "Manos Pitsidianakis "] description = "A virtio-sound device using the vhost-user protocol." diff --git a/crates/sound/README.md b/crates/sound/README.md index 52ad5ad..a06356e 100644 --- a/crates/sound/README.md +++ b/crates/sound/README.md @@ -1,10 +1,10 @@ -# vhost-user-sound +# vhost-device-sound ## Synopsis - vhost-user-sound --socket --backend + vhost-device-sound --socket --backend ## Description A virtio-sound device using the vhost-user protocol. @@ -30,7 +30,7 @@ generated with help2man target/debug/vhost-user-sound |mandoc Launch the backend on the host machine: ```shell -host# vhost-user-sound --socket /tmp/snd.sock --backend null +host# vhost-device-sound --socket /tmp/snd.sock --backend null ``` With QEMU, you can add a `virtio` device that uses the backend's socket with the following flags: diff --git a/crates/sound/src/lib.rs b/crates/sound/src/lib.rs index f34f759..d15be90 100644 --- a/crates/sound/src/lib.rs +++ b/crates/sound/src/lib.rs @@ -281,14 +281,14 @@ impl Drop for IOMessage { } /// This is the public API through which an external program starts the -/// vhost-user-sound backend server. +/// vhost-device-sound backend server. pub fn start_backend_server(config: SoundConfig) { log::trace!("Using config {:?}", &config); let listener = Listener::new(config.get_socket_path(), true).unwrap(); let backend = Arc::new(VhostUserSoundBackend::new(config).unwrap()); let mut daemon = VhostUserDaemon::new( - String::from("vhost-user-sound"), + String::from("vhost-device-sound"), backend.clone(), GuestMemoryAtomic::new(GuestMemoryMmap::new()), ) diff --git a/crates/sound/src/main.rs b/crates/sound/src/main.rs index 0939669..8689b39 100644 --- a/crates/sound/src/main.rs +++ b/crates/sound/src/main.rs @@ -4,7 +4,7 @@ use std::convert::TryFrom; use clap::Parser; -use vhost_user_sound::{start_backend_server, BackendType, Error, Result, SoundConfig}; +use vhost_device_sound::{start_backend_server, BackendType, Error, Result, SoundConfig}; #[derive(Parser, Debug)] #[clap(version, about, long_about = None)]