{"id":28000663,"url":"https://github.com/sysprog21/vsnd","last_synced_at":"2025-05-08T23:54:06.791Z","repository":{"id":220330417,"uuid":"751355852","full_name":"sysprog21/vsnd","owner":"sysprog21","description":"Virtual Linux soundcard driver","archived":false,"fork":false,"pushed_at":"2024-05-06T09:55:13.000Z","size":22,"stargazers_count":27,"open_issues_count":2,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-08T23:54:02.035Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sysprog21.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-01T12:57:54.000Z","updated_at":"2025-03-23T06:30:37.000Z","dependencies_parsed_at":"2024-02-01T14:29:14.053Z","dependency_job_id":"6b84b76e-60db-4e28-8585-30c9f05521b2","html_url":"https://github.com/sysprog21/vsnd","commit_stats":null,"previous_names":["sysprog21/vsnd"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysprog21%2Fvsnd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysprog21%2Fvsnd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysprog21%2Fvsnd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysprog21%2Fvsnd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sysprog21","download_url":"https://codeload.github.com/sysprog21/vsnd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253166484,"owners_count":21864471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-08T23:54:06.229Z","updated_at":"2025-05-08T23:54:06.774Z","avatar_url":"https://github.com/sysprog21.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Virtual Soundcard Driver for Linux Kernel\n\n`vsnd` implements a Linux device driver that introduces a virtual soundcard.\nTypically, a sound card is a hardware component that enables computers to play\naudio files. This virtual soundcard, however, is designed to transmit audio\nPCM data received from various programs directly into a FIFO file.\n\n## Prerequisites\n\nThe following packages must be installed before building `vsnd`.\n\nTo compile the kernel driver successfully, package versions of currently used\nkernel, kernel-devel and kernel-headers need to be matched.\n\n```shell\n$ sudo apt install linux-headers-$(uname -r)\n```\n\nAdditional packages are required for verification purpose.\n\n```shell\n$ sudo apt install alsa-utils ffmpeg\n```\n\n## Build and Run\n\nAfter running make, you should be able to generate the file `vsnd.ko`.\n\nBefore loading this kernel module, you have to satisfy its dependency:\n\n```shell\n$ sudo modprobe snd_pcm\n```\n\nA FIFO file is required during kernel module initialization and is used for\ntransmitting audio PCM data.\n\n```shell\n$ mkfifo /tmp/audio.pcm\n```\n\nThe module can be loaded to Linux kernel by runnning the command:\n\n```shell\n$ sudo insmod vsnd.ko out_fifo_name=/tmp/audio.pcm\n```\n\nThen, use [aplay](https://manpages.org/aplay) to check the soundcard device\nprovided by `vsnd`.\n\n```shell\n$ aplay -l\n```\n\nReference output:\n\n```\ncard 0: vsnd [vsnd], device 0: vsnd PCM [vsnd PCM]\n  Subdevices: 1/1\n  Subdevice #0: subdevice #0\n```\n\nSee [scripts/verify.sh](scripts/verify.sh) for automated test.\n\n### Run on PulseAudio-enabled environment\n\nIf your system uses PulseAudio to control the sound ouput\ndevice (i.e., sink), you may undergo\nwith the following error when you select the sink\nas `vsnd` from PulseAudio then you try to remove `vsnd`:\n\n```shell\n$ sudo rmmod vsnd\nrmmod: ERROR: Module vsnd is in use\n```\n\nThe reason is that PulseAudio occupies `vsnd`. Though you can\ntell PulseAudio to disable `vsnd` so that you can remove `vsnd`,\nwe suggest you to disable temporarily when using `vsnd` by the following\ncommand:\n\n```shell\n$ systemctl --user stop pulseaudio.socket\n$ systemctl --user stop pulseaudio.service\n```\n\nAfter using `vsnd`, you can execute the following command to bring\nback PulseAudio:\n\n```shell\n$ systemctl --user start pulseaudio.service\n$ systemctl --user start pulseaudio.socket\n```\n\n### Run on PipeWire-enabled environment\n\nIn systems use the PipeWire (e.g., Ubuntu 24.04 LTS), you might also encounter\nthe problem that you are not able to remove the vsnd module.\n\nTo solve this problem, you need to stop the PipeWire with:\n\n```shell\n$ systemctl --user stop pipewire.socket\n$ systemctl --user stop pipewire\n```\n\nAnd after removing the module, restart it with:\n\n```shell\n$ systemctl --user start pipewire\n```\n\n## License\n\n`vsnd`is released under the MIT license. Use of this source code is governed by\na MIT-style license that can be found in the LICENSE file.\n\n## Reference\n\n* [The ALSA Driver API](https://www.kernel.org/doc/html/latest/sound/kernel-api/alsa-driver-api.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysprog21%2Fvsnd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsysprog21%2Fvsnd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysprog21%2Fvsnd/lists"}