# Diretta Synchro Sync Host Install Instructions ## Prerequisites * Ubuntu Desktop/Server 22.04 LTS or 24.04 LTS * Install the following packages using apt: ```bash $ sudo apt install alsa-utils build-essential dkms ``` ## Download and unzip Diretta Host driver package * Download ALSA driver version 0.142.12 from [Diretta Preview](https://www.diretta.link/preview/) * Unzip the drivers using the following command: ```bash $ tar -xvf DirettaSalsaHost_0_142_12.tar.xz ``` ## Setup DKMS * `cd DirettaALSAdriver/` * Test for build issues with your kernel by running: ```bash $ make KERNELDIR=/lib/modules/$(uname -r)/build ``` > [!NOTE] > If you're on a kernel older than 6.4.0, you'll likely run across 2 build issues that can be fixed by uncommenting (removing the `//`) from the lines in `alsa_bridge.c` that look like: > ```c > #if LINUX_VERSION_CODE < KERNEL_VERSION(6,3,0) > vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; > #else > vm_flags_set(vma, VM_DONTEXPAND | VM_DONTDUMP); > #endif > ``` > and > ```c > #if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) > diretta_alsa.class = class_create(THIS_MODULE, "diretta-alsa"); > #else > diretta_alsa.class = class_create("diretta-alsa"); > #endif > ``` * Clean up test build using: ```bash $ make clean ``` * Run `touch dkms.conf` and add the following content: ```ini MAKE="'make' KERNELDIR=/lib/modules/${kernelver}/build" CLEAN="'make' clean" BUILT_MODULE_NAME=alsa_bridge BUILT_MODULE_LOCATION=./ DEST_MODULE_LOCATION=/kernel/drivers/alsa/ PACKAGE_NAME=alsa_bridge PACKAGE_VERSION=0.142.12 REMAKE_INITRD=yes AUTOINSTALL=yes ``` * Copy the directory into `/usr/src` for DKMS to find it ```bash $ sudo cp -R . /usr/src/alsa_bridge-0.142.12 ``` * Run the following commands to enable DKMS for the module: ```bash $ sudo dkms add -m alsa_bridge -v 0.142.12 $ sudo dkms build -m alsa_bridge -v 0.142.12 $ sudo dkms install -m alsa_bridge -v 0.142.12 ``` * Load the `alsa_bridge` module: ```bash $ sudo modprobe alsa_bridge ``` * Add `alsa_bridge` to `/etc/modules` so the module will load on boot ```bash $ echo "alsa_bridge" | sudo tee -a /etc/modules ``` ## Diretta Host Service setup > [!NOTE] > If upgrading from the old `diretta_bridge_host`, first disable it by running the following: > ```bash > $ sudo systemctl stop diretta_bridge_host > $ sudo systemctl disable diretta_bridge_host * Check your version of `gcc` using the following command: ```bash $ gcc --version ``` > [!NOTE] > Default `gcc` version for 24.04 is version 13, adjust accordingly for your install * Edit `/usr/src/alsa_bridge-0.142.12/diretta_ssync_host.service` to the following: ```ini [Unit] Description = Diretta Synchro Alsa Host After=network-online.target ConditionPathExists=/usr/src/alsa_bridge-0.142.12 [Service] ExecStart=/usr/src/alsa_bridge-0.142.12/ssyncAlsa_gcc13_x64_v1 Restart=always Type=simple [Install] WantedBy=multi-user.target ``` * Mark the selected service as executable ```bash $ sudo chmod +x /usr/src/alsa_bridge-0.142.12/ssyncAlsa_gcc13_x64_v1 ``` * Run the following steps to run `ssyncAlsa` on boot ```bash $ sudo ln -s /usr/src/alsa_bridge-0.142.12/diretta_ssync_host.service /etc/systemd/system/ $ sudo systemctl enable diretta_ssync_host $ sudo systemctl start diretta_ssync_host ``` * To check if ALSA drivers are working correctly, make sure an audio device is connected to the target and run: ```bash $ sudo aplay -l ``` > [!TIP] > If you want to edit your `settings.inf` to unlock additional performance, try the following settings: > ```ini > Interface= > TargetProfileLimitTime=200 > ThredMode=2 > InfoCycle=100000 > FlexCycle=disable > CycleTime=800 > CycleMinTime=10 > Debug=disable > periodMax=32 > periodMin=12 > periodSizeMax=38400 > periodSizeMin=960 > syncBufferCount=8 > alsaUnderrun=enable > CpuSend= > CpuOther= > ```