Skip to content

Instantly share code, notes, and snippets.

@famish99
Last active November 7, 2025 19:10
Show Gist options
  • Select an option

  • Save famish99/a274c8867d4afddd6cc0090a847c4366 to your computer and use it in GitHub Desktop.

Select an option

Save famish99/a274c8867d4afddd6cc0090a847c4366 to your computer and use it in GitHub Desktop.
Diretta Synchro Sync Host Install

Diretta Synchro Sync Host Install Instructions

Prerequisites

  • Ubuntu Desktop/Server 22.04 LTS or 24.04 LTS
  • Install the following packages using apt:
    $ sudo apt install alsa-utils build-essential dkms

Download and unzip Diretta Host driver package

  • Download ALSA driver version 0.147.1 from Diretta Preview
  • Unzip the drivers using the following command:
    $ tar -xvf DirettaAlsaHost_0_147_01.tar.xz

Setup DKMS

  • cd DirettaAlsaHost/
  • Test for build issues with your kernel by running:
    $ 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:

#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

#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:

    $ make clean
  • Run touch dkms.conf and add the following content:

    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.147.1
    REMAKE_INITRD=yes
    AUTOINSTALL=yes
  • Copy the directory into /usr/src for DKMS to find it

    $ sudo cp -R . /usr/src/alsa_bridge-0.147.1
  • Run the following commands to enable DKMS for the module:

    $ sudo dkms add -m alsa_bridge -v 0.147.1
    $ sudo dkms build -m alsa_bridge -v 0.147.1
    $ sudo dkms install -m alsa_bridge -v 0.147.1
  • 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

Note

When upgrading from a previous version, you will have to disable it by running the following:

$ sudo systemctl stop diretta_sync_host
$ sudo systemctl disable diretta_sync_host
  • Check your version of gcc using the following command:
    $ gcc --version

Note

Depending on the age of your CPU, the v3 and v4 versions of the syncAlsa may give you the following error: Illegal instruction

  • Edit /usr/src/alsa_bridge-0.147.1/diretta_sync_host.service to the following:

    [Unit]
    Description = Diretta Synchro Alsa Host
    After=network-online.target
    ConditionPathExists=/usr/src/alsa_bridge-0.147.1
    
    [Service]
    ExecStart=/usr/src/alsa_bridge-0.147.1/syncAlsa_gcc15_x64_v4
    ExecStop=/usr/src/alsa_bridge-0.147.1/syncAlsa_gcc15_x64_v4 kill
    Restart=always
    Type=simple
    
    [Install]
    WantedBy=multi-user.target
  • Mark the selected service as executable

    $ sudo chmod +x /usr/src/alsa_bridge-0.147.1/syncAlsa_gcc15_x64_v4
  • Run the following steps to run syncAlsa on boot

    $ sudo ln -s /usr/src/alsa_bridge-0.147.1/diretta_sync_host.service /etc/systemd/system/
    $ sudo systemctl enable diretta_sync_host
    $ sudo systemctl start diretta_sync_host
  • To check if ALSA drivers are working correctly, make sure an audio device is connected to the target and run:

    $ sudo aplay -l

Tip

If you want to edit your /usr/src/alsa_bridge-0.147.1/syncalsa_setting.inf to unlock additional performance, try the following settings:

Interface=
TargetProfileLimitTime=200
ThredMode=1
InfoCycle=100000
FlexCycle=disable
CycleTime=800
CycleMinTime=10
Debug=disable
periodMax=32
periodMin=12
periodSizeMax=38400
periodSizeMin=960
syncBufferCount=8
alsaUnderrun=enable
CpuSend=
CpuOther=
@hun009-ccc
Copy link

Hello, are you able to install the diretta on Hqplayer OS? I tried your guide but the apt or make command are not working on the Hqplayer OS... I will very appreciate if you could help. Thank you.

@famish99
Copy link
Author

famish99 commented Mar 10, 2025 via email

@hun009-ccc
Copy link

I have not tried and my friend that attempted it said it was fairly high difficulty due to lack of build tooling in the image. My recommendation would be to either install hqplayer into Ubuntu or to use GentooPlayer since they have packaged both diretta host and hqplayer.

On Mon, Mar 10, 2025 at 12:46 PM hun009-ccc @.> wrote: @.* commented on this gist. ------------------------------ Hello, are you able to install the diretta on Hqplayer OS? I tried your guide but the apt or make command are not working on the Hqplayer OS... I will very appreciate if you could help. Thank you. — Reply to this email directly, view it on GitHub https://gist.github.com/famish99/a274c8867d4afddd6cc0090a847c4366#gistcomment-5481949 or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOS23W5XQOVQOUV4E5QW7D2TXFXVBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVEYTGMZWHA2TEOBXU52HE2LHM5SXFJTDOJSWC5DF . You are receiving this email because you authored the thread. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

Thank you for your reply. Yes...It's too difficult. I think I may try the GentooPlayer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment