Skip to content

Instantly share code, notes, and snippets.

@famish99
Last active June 3, 2024 21:20
Show Gist options
  • Save famish99/04a847bea50981f54e8ce4e77878400d to your computer and use it in GitHub Desktop.
Save famish99/04a847bea50981f54e8ce4e77878400d to your computer and use it in GitHub Desktop.
Diretta Host Install Instructions

Diretta Host Install Instructions

Prerequisites

  • Ubuntu Server 22.04 LTS
  • Install the following packages using apt:
# sudo apt install build-essential dkms zstd

Download and unzip Diretta Host driver package

  • Download ALSA driver version 0.123.3 from Diretta Preview
  • Unzip the drivers using the following command:
# tar --use-compress-program=unzstd -xvf DirettaALSAdriver_0_123_3.tar.zst

Setup DKMS

  • cd DirettaALSAdriver/
  • touch dkms.conf and add the following content:
MAKE="'make' -C driver/ KERNELDIR=/lib/modules/${kernelver}/build"
CLEAN="'make' -C driver/ clean"
BUILT_MODULE_NAME=alsa_bridge
BUILT_MODULE_LOCATION=driver/
DEST_MODULE_LOCATION=/kernel/drivers/alsa/
PACKAGE_NAME=alsa_bridge
PACKAGE_VERSION=0.123.3
REMAKE_INITRD=yes
AUTOINSTALL=yes
  • Copy the directory into /usr/src for DKMS to find it
# sudo cp -R . /usr/src/alsa_bridge-0.123.3
  • Run the following commands to enable DKMS for the module:
# sudo dkms add -m alsa_bridge -v 0.123.3
# sudo dkms build -m alsa_bridge -v 0.123.3
# sudo dkms install -m alsa_bridge -v 0.123.3
  • Load the alsa_bridge module:
# sudo modprobe alsa_bridge
  • Add alsa_bridge to /etc/modules so the module will load on boot
# echo "alsa_bridge" | sudo tee -a /etc/modules

Diretta Host Service setup

  • Edit /usr/src/alsa_bridge-0.123.3/diretta_bridge_host.service to the following:
[Unit]
Description = Diretta Alsa Host
After=network-online.target
ConditionPathExists=/usr/src/alsa_bridge-0.123.3

[Service]
ExecStart=/usr/src/alsa_bridge-0.123.3/direttaHost.sh &
Restart=no
Type=simple

[Install]
WantedBy=multi-user.target
  • Run the following steps to run direttaHost.sh on boot
# sudo ln -s /usr/src/alsa_bridge-0.123.3/diretta_bridge_host.service /etc/systemd/system/
# sudo systemctl enable diretta_bridge_host
# sudo systemctl start diretta_bridge_host
  • To check if ALSA drivers are working correctly, make sure an audio device is connected to the target and run:
# sudo aplay -l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment