Daphile - Unable to save settings of M-audio Audiophile 24/96 (PCI) sound card

I have the following three sound cards:
1. M-audio Fasttrack Pro (USB)
2. M-audio AP192K (PCI)
3. M-audio Audiophile 24/96 (PCI)

There is no issues when editing and applying settings for the first two devices via the web UI of Daphile. Here's an example of making changes to the settings of M-audio AP192K.

save 192k.jpg


When I tried to use the third one, error occurs. After applying changes to the M-audio Audiophile 24/96 for the first time, it appears that the change wasn't saved successfully as it shows the default settings identically. After applying changes for the second time, this device is disabled. I've tried Daphile versions from 19.xx to 21.xx both standard and rt editions, and they make no difference.

I took the initiative to dig deeper by ssh to the beta version of Daphile, and noticed that there is a directory named "/mnt/hdd/system/spac/M Audio Audiophile 24/96/" created by default and storing all kinds of settings for my third sound card. When I tried to save some changes of this card via the web UI, a new directory named "/mnt/hdd/system/spac/96/“ was created and containing the newly-changed settings only. Therefore, the new settings couldn't be applied to the card, as the system shall always read settings from the default directory. Please refer to the following screenshots.

save 2496.jpg


It seems to me that the "/" symbol in the model name of this card is the cause of this issue, since the OS considers "/" as the indicator of a sub-directory, instead of a character within a model name.

My first reaction was to rename the device in Advanced Media Server Settings. It was successfully renamed there and remained as renamed, but this made no effects to the Audio Devices section. Please see the following screen shots.

rename 2496.jpg


I also tried to rename the directory "/mnt/hdd/system/spac/M Audio Audiophile 24/96/" to "/mnt/hdd/system/spac/M Audio Audiophile 2496/" and edited all the setting files under this directory containing "M Audio Audiophile 24\/96" to "M Audio Audiophile 2496", trying to avoid the "/" symbol problem. But it didn't work. The device name in the Settings web page remains "M Audio Audiophile 24/96" with the "/", and it still creates a new directory named "/mnt/hdd/system/spac/96/" to store changed settings while reading settings from "/mnt/hdd/system/spac/M Audio Audiophile 24/96/". Please refer to the right part of the second screenshot.

Next, I tried to find all files containing "24/96". The command couldn't fully finished. The following screenshot is the best I can get.

all2496.jpg


The darker parts are files inaccessible. The blue parts are Daphile's change logs. The normal parts includes some binary files and other devices with "24/96" in their model names maybe? The first lighter part is exactly where I tried to rename my M-audio sound card. I then probed into the second lighter part and result in the following screenshot.

proc.jpg


This is where I totally stucked. I don't know how to edit binary files on Daphile since there's no apt-get available in the system, nor how to make changes to the files in "/proc" directory. I don't even know whether it will solve the problem or not if the "/" between "24" and "96" is successfully removed. Anyone here can help out?

My wild guess is that this issue is universal to all audio devices with "/" symbol in their model names. Does anyone encountered similar problem of failing to save changes to the audio device settings?
 
IMO the cause is Daphile not escaping correctly the card names when creating the directory. It's a very common bug, who would assume a card name contains slashes.

The web GUI is fully written in bash in daphile, you can try to find the relevant script and fix it. But AFAIR Daphile uses read-only filesystem, the fix will not survive reboot unless the change is copied to the read-only base image. IMO the easiest would be to report to the author and ask him for a new build with a fix. Some users here know how to contact him over facebook, IIRC.