Is it possible to edit my audio device PID and VID to give it a custom name? My goal is to make a custom name for my audio device so when I use Roon my audio device is listed as the custom name I assign it rather than the standard PID and VID name of the device.
Not sure where Roon reads identifiers from (or which ones PID and VID refer to) but there are those which are given by the hardware itself and there are the ALSA interface names in /etc/asound.conf. We simply override the “default” interfaces there but you can add own entries linked in a certain way to certain sound card and device (integer) IDs and when Roon uses those ALSA interface identifiers that could be what you want.
But probably someone has deeper insights then me with audio setup im general .
I’m referring to what is given by the hardware itself. The firmware in the hardware provides the PID and VID information to ALSA. Here’s what comes up when I list my audio devices"
Okay, at least I have no idea if that is possible and in case how to achieve. That seems to go into Linux depth, probably not even possible in userland, but the good thing is if you (or someone else) finds or knows a method on any Linux distro, that should work on DietPi as well.
Ah okay, so the card ID is stored here: cat /sys/class/sound/card0/id
And you can change it by writing to this file: echo AwesomeCard > /sys/class/sound/card0/id
Hmm, at least it might be possible. On my VM it says: -bash: echo: write error: Invalid argument
However, now the idea is to do this via udev rule on early boot, probably this works better:
Ok I tried that and it didn’t work for some reason. However I discovered that it’s the ATTRS{product}== that needs to be renamed, not the ATTR{id}==. So rather than renaming my HDMI ports, let’s try with a USB DAC instead. I discovered how to pull up all the detailed info on this USB DAC by running this command:
Since “Meizu HiFi DAC Headphone Amplifier” is what is broadcasted to Roon, it’s what I need to rename. So it’s the ATTRS{product} that needs renamed, not the ATTR{id}. If I can figure out how to do this with this USB DAC, I will be able to do it for any audio device.
I also found this page which explains another way to do it. However it’s also over my head. I tried to do what they say with no luck.