1 (edited by Hamcat 2026-04-06 19:22:56)

Topic: Changing WDM Devices friendly names

Hi,
Just got my first PCIE RME card, an old AIO but I'm already loving it.

The only thing that bothered me is that the 8 stereo outputs in windows were all called the same (RME HDSPe AIO), impossible to know which one is which without selecting it.

So I identified the wdm devices and made a script to rename the outputs : enjoy if that's bothering you too ! (elevated powershell)

Add-Type @"
using System;
using System.Runtime.InteropServices;
using System.Security.AccessControl;
using System.Security.Principal;
using Microsoft.Win32;

public class RegOwner {
    [DllImport("advapi32.dll")] static extern bool OpenProcessToken(IntPtr h, int acc, ref IntPtr tok);
    [DllImport("advapi32.dll")] static extern bool LookupPrivilegeValue(string host, string name, ref long luid);
    [DllImport("advapi32.dll")] static extern bool AdjustTokenPrivileges(IntPtr tok, bool dis, ref TP tp, int len, IntPtr p, IntPtr r);
    [StructLayout(LayoutKind.Sequential, Pack=1)]
    struct TP { public int Count; public long Luid; public int Attr; }

    static void EnablePriv(string priv) {
        IntPtr htok = IntPtr.Zero;
        OpenProcessToken(System.Diagnostics.Process.GetCurrentProcess().Handle, 0x28, ref htok);
        TP tp; tp.Count=1; tp.Luid=0; tp.Attr=2;
        LookupPrivilegeValue(null, priv, ref tp.Luid);
        AdjustTokenPrivileges(htok, false, ref tp, 0, IntPtr.Zero, IntPtr.Zero);
    }

    public static void TakeOwnerAndGrant(string subKey) {
        EnablePriv("SeTakeOwnershipPrivilege");
        EnablePriv("SeRestorePrivilege");
        var key = Registry.LocalMachine.OpenSubKey(subKey,
            RegistryKeyPermissionCheck.ReadWriteSubTree,
            RegistryRights.TakeOwnership);
        var acl = key.GetAccessControl(AccessControlSections.None);
        acl.SetOwner(WindowsIdentity.GetCurrent().User);
        key.SetAccessControl(acl);
        var acl2 = key.GetAccessControl();
        acl2.SetAccessRule(new RegistryAccessRule(
            WindowsIdentity.GetCurrent().User,
            RegistryRights.FullControl,
            InheritanceFlags.None, PropagationFlags.None,
            AccessControlType.Allow));
        key.SetAccessControl(acl2);
        key.Close();
    }
}
"@

$names = @{
    "i_hdspwave1_44"   = "AIO Analog 1-2"
    "i_hdspwave4_44"   = "AIO Phones"
    "i_hdspwave5_44"   = "AIO AES"
    "i_hdspwave6_44"   = "AIO SPDIF"
    "i_hdspwave7_44"   = "AIO ADAT 1-2"
    "i_hdspwave8_44"   = "AIO ADAT 3-4"
    "i_hdspwave9_44"   = "AIO ADAT 5-6"
    "i_hdspwavea_44"   = "AIO ADAT 7-8"
    "i_hdspwave7_44_8" = "AIO ADAT 8ch"
}

$render  = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render"
$nameKey = "{a45c254e-df1c-4efd-8020-67d146a850e0},2"
$wdmKey  = "{233164c8-1b2c-4c7d-bc68-b671687a2567},1"
$strip   = '^Microsoft\.PowerShell\.Core\\Registry::HKEY_LOCAL_MACHINE\\'

Get-ChildItem $render | ForEach-Object {
    $propsPath = "$($_.PSPath)\Properties"
    $props = Get-ItemProperty $propsPath -EA SilentlyContinue
    if ($props."{b3f8fa53-0004-438e-9003-51a46e139bfc},6" -notlike "*RME*") { return }

    $wdm = $props.$wdmKey
    $key = ([regex]::Match($wdm, 'i_hdspwave\w+')).Value
    if (-not $names.ContainsKey($key)) { return }

    $nativeSubKey = $propsPath -replace $strip, ''
    [RegOwner]::TakeOwnerAndGrant($nativeSubKey)
    Set-ItemProperty $propsPath -Name $nameKey -Value $names[$key]
    Write-Host "OK: $key -> $($names[$key])"
}

Restart-Service audiosrv

PS : don't know if AIO is the only card concerned, maybe RME could check on that for future updates ? tongue

2 (edited by ramses 2026-05-09 09:59:54)

Re: Changing WDM Devices friendly names

Hi Hamcat,

welcome to the RME user forum and thanks for sharing your work.

After some evaluation it turns out that this is not as easy as it looks.

First of all, I discovered with a KI generated check script (I personally have no powershell skills)
that WDM entries in the registry are not automatically present.
I know of the bad quality of KI generated answers and also code, but this one seems to work
as it finds some entries for all interfaces.

From the results it seems that I can only change the name of a WDM device if the entry is present,
and this seems to be only the case, if the WDM devices has been created already.
Perhaps you did it upfront, but most people only activate the needed ones, normally only a few.

The next thing is that such entries are additionally created only for a certain sample rate.
So to change the names of all interfaces and ports, it seems as if you had to create WDM devices at every sample rate.
Currently this is only a suspicion, but it looks like this, see the different entries in the 2nd code block with different sample rate.

If the objective is to change the sample rate for all of my interfaces
- HDSPe MADI FX
- UFX III
- ADI-2 Pro R BE

It looks as if I had to create WDM devices upfront
- for all interfaces
- for all ports
- at all sample rates.

Currently its only a theory that those entries stay in the registry.
I can only assume that I created so many WDM devices just for a test.
If they would be deleted if you remove the WDM entry in RME driver settings,
this would be bad, because then they would be created dynamically again with standard names
and you would have to repeat the whole procedure.

I think this is more easily doable in a controlled way if you have one interface with not so many ports.
But this doesn't seem to be an easy approach for one or more interfaces with a lot of ports.

I hope my observations are correct.

For me it appears to be too much work to perform all this
and I do not know whether it really pays out or if I introduce changes, that might also be wrong,
according to the number of ports I would have to check. For ports, I would never use.
Usually I have only one WDM device in use and I can easily find it in Windows Sound.

Nevertheless, thanks again for sharing your work.

# ps script for reading WDM keys
$render = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render"
$wdmKey = "{233164c8-1b2c-4c7d-bc68-b671687a2567},1"
 
Write-Host ""
Write-Host "=== RME WDM-Geraete ===" -ForegroundColor Cyan
Write-Host ""
 
$count = 0
 
Get-ChildItem $render | ForEach-Object {
    $propsPath = "$($_.PSPath)\Properties"
    $props = Get-ItemProperty $propsPath -EA SilentlyContinue
 
    $deviceString = $props."{b3f8fa53-0004-438e-9003-51a46e139bfc},6"
    if ($deviceString -notlike "*RME*") { return }
 
    $wdm         = $props.$wdmKey
    $currentName = $props."{a45c254e-df1c-4efd-8020-67d146a850e0},2"
 
    # Korrekte Regex: letztes Segment nach dem letzten Backslash
    $key = ([regex]::Match($wdm, '[^\\]+$')).Value
 
    Write-Host "Geraet        : $deviceString" -ForegroundColor Yellow
    Write-Host "Aktueller Name: $currentName"
    Write-Host "WDM-Schluessel: $key"
    Write-Host "---"
 
    $count++
}
 
if ($count -eq 0) {
    Write-Host "Keine RME-Geraete gefunden." -ForegroundColor Red
}
 
Write-Host ""
Write-Host "$count Eintraege gefunden." -ForegroundColor Cyan
Write-Host ""
Read-Host "Enter zum Schliessen"

The result

=== RME WDM-Geraete ===

Geraet        : RME HDSPe MADI FX
Aktueller Name: Brücke
WDM-Schluessel:
---
Geraet        : RME ADI-2 Pro
Aktueller Name: Digitale Ausgabe
WDM-Schluessel: mfacewave027_44
---
Geraet        : RME UFX III USB 3.0
Aktueller Name: MADI (63+64)
WDM-Schluessel: mfacewave092_44
---
Geraet        : RME ADI-2 Pro
Aktueller Name: Digitale Ausgabe
WDM-Schluessel: mfacewave111_44
---
Geraet        : RME HDSPe MADI FX
Aktueller Name: Phones
WDM-Schluessel: madifx03_44
---
Geraet        : RME UFX III USB 3.0
Aktueller Name: Brücke
WDM-Schluessel:
---
Geraet        : RME ADI-2 Pro
Aktueller Name: SPDIF
WDM-Schluessel: mfacewave111_192
---
Geraet        : RME ADI-2 Pro
Aktueller Name: Analog (1+2)
WDM-Schluessel: mfacewave025_192
---
Geraet        : RME UFX III USB 2.0
Aktueller Name: Brücke
WDM-Schluessel:
---
Geraet        : RME HDSPe MADI FX
Aktueller Name: Lautsprecher
WDM-Schluessel: madifx02_96
---
Geraet        : RME UFX III USB 2.0
Aktueller Name: Brücke
WDM-Schluessel:
---
Geraet        : RME UFX III USB 3.0
Aktueller Name: Brücke
WDM-Schluessel:
---
Geraet        : RME HDSPe MADI FX
Aktueller Name: MADI (3+4)
WDM-Schluessel: madifx05_44
---
Geraet        : RME ADI-2 Pro
Aktueller Name: Phones
WDM-Schluessel: mfacewave026_44
---
Geraet        : RME ADI-2 Pro
Aktueller Name: AES
WDM-Schluessel: mfacewave027_44
---
Geraet        : RME ADI-2 Pro
Aktueller Name: SPDIF
WDM-Schluessel: mfacewave111_44
---
Geraet        : RME ADI-2 Pro
Aktueller Name: Kopfhörer
WDM-Schluessel: mfacewave026_96
---
Geraet        : RME ADI-2 Pro
Aktueller Name: Phones
WDM-Schluessel: mfacewave026_48
---
Geraet        : RME ADI-2 Pro
Aktueller Name: SPDIF
WDM-Schluessel: mfacewave111_48
---
Geraet        : RME HDSPe MADI FX
Aktueller Name: Brücke
WDM-Schluessel:
---
Geraet        : RME ADI-2 Pro
Aktueller Name: Analog (1+2)
WDM-Schluessel: mfacewave025_44
---
Geraet        : RME HDSPe MADI FX
Aktueller Name: MADI (1+2)
WDM-Schluessel: madifx04_44
---
Geraet        : RME UFX III USB 3.0
Aktueller Name: Analog (11+12)
WDM-Schluessel: mfacewave030_44
---
Geraet        : RME ADI-2 Pro
Aktueller Name: Brücke
WDM-Schluessel:
---
Geraet        : RME ADI-2 Pro
Aktueller Name: Kopfhörer
WDM-Schluessel: mfacewave026_44
---
Geraet        : RME ADI-2 Pro
Aktueller Name: Ausgang
WDM-Schluessel: mfacewave025_44
---
Geraet        : RME UFX III USB 2.0
Aktueller Name: Brücke
WDM-Schluessel:
---
Geraet        : RME HDSPe MADI FX
Aktueller Name: MADI (1-8)
WDM-Schluessel: madifx04_44_8
---
Geraet        : RME HDSPe MADI FX
Aktueller Name: MADI (151+152)
WDM-Schluessel: madifx79_44
---
Geraet        : RME HDSPe MADI FX
Aktueller Name: Brücke
WDM-Schluessel:
---
Geraet        : RME ADI-2 Pro
Aktueller Name: Brücke
WDM-Schluessel:
---
Geraet        : RME UFX III USB 2.0
Aktueller Name: Brücke
WDM-Schluessel:
---
Geraet        : RME ADI-2 Pro
Aktueller Name: AES
WDM-Schluessel: mfacewave027_48
---
Geraet        : RME ADI-2 Pro
Aktueller Name: Ausgang
WDM-Schluessel: mfacewave025_96
---
Geraet        : RME ARC
Aktueller Name: Interne AUX-Buchse
WDM-Schluessel:
---
Geraet        : RME HDSPe MADI FX
Aktueller Name: Lautsprecher
WDM-Schluessel: madifx02_32
---
Geraet        : RME HDSPe MADI FX
Aktueller Name: Lautsprecher
WDM-Schluessel: madifx02_44
---
Geraet        : RME HDSPe MADI FX
Aktueller Name: MADI (9-16)
WDM-Schluessel: madifx05_44_8
---
Geraet        : RME UFX III USB 3.0
Aktueller Name: Analog (1+2)
WDM-Schluessel: mfacewave025_44
---
Geraet        : RME HDSPe MADI FX
Aktueller Name: Lautsprecher
WDM-Schluessel: madifx02_96
---
Geraet        : RME ADI-2 Pro
Aktueller Name: Digitale Ausgabe
WDM-Schluessel: mfacewave111_96
---
Geraet        : RME HDSPe MADI FX
Aktueller Name: MADI (1+2)
WDM-Schluessel: madifx04_44
---
Geraet        : RME HDSPe MADI FX
Aktueller Name: Lautsprecher
WDM-Schluessel: madifx02_48
---
Geraet        : RME HDSPe MADI FX
Aktueller Name: Brücke
WDM-Schluessel:
---
Geraet        : RME HDSPe MADI FX
Aktueller Name: Lautsprecher
WDM-Schluessel: madifx02_88
---
Geraet        : RME ADI-2 Pro
Aktueller Name: Digitale Ausgabe
WDM-Schluessel: mfacewave027_96
---
Geraet        : RME ADI-2 Pro
Aktueller Name: Phones
WDM-Schluessel: mfacewave026_192
---
Geraet        : RME HDSPe MADI FX
Aktueller Name: MADI (1+2)
WDM-Schluessel: madifx04_48
---
Geraet        : RME UFX III USB 3.0
Aktueller Name: Brücke
WDM-Schluessel:
---
Geraet        : RME UFX III USB 3.0
Aktueller Name: Brücke
WDM-Schluessel:
---
Geraet        : RME ADI-2 Pro
Aktueller Name: Analog (1+2)
WDM-Schluessel: mfacewave025_48
---
Geraet        : RME HDSPe MADI FX
Aktueller Name: Lautsprecher
WDM-Schluessel: madifx02_192
---
Geraet        : RME ADI-2 Pro
Aktueller Name: AES
WDM-Schluessel: mfacewave027_192
---

53 Eintraege gefunden.
BR Ramses - HDSPe MADI FX, M-1620 Pro D, 12Mic, UFX III, ADI-2 Pro FS R BE, Nuendo 15, Win10 IoT Ent

3

Re: Changing WDM Devices friendly names

Hamcat wrote:

Hi,
Just got my first PCIE RME card, an old AIO but I'm already loving it.

The only thing that bothered me is that the 8 stereo outputs in windows were all called the same (RME HDSPe AIO)

I doubt so. From the installation script:

hdsp.Wave108_6.szPname = "AIO Analog (1-6)"
hdsp.Wave108.szPname   = "AIO Analog (1+2)"
hdsp.Wave109.szPname   = "AIO Analog (3+4)"
hdsp.Wave110.szPname   = "AIO Analog (5+6)"
hdsp.Wave111.szPname   = "AIO Phones"
hdsp.Wave112.szPname   = "AIO AES"
hdsp.Wave113.szPname   = "AIO SPDIF"
hdsp.Wave114_8.szPname = "AIO ADAT (1-8)"
hdsp.Wave114_4.szPname = "AIO ADAT (1-4)"
hdsp.Wave114.szPname   = "AIO ADAT (1+2)"
hdsp.Wave115.szPname   = "AIO ADAT (3+4)"
hdsp.Wave116.szPname   = "AIO ADAT (5+6)"
hdsp.Wave117.szPname   = "AIO ADAT (7+8)"

Was your issue the names shown in Sound Control panel or in a specific Windows program?

Regards
Matthias Carstens
RME