I use Ardour a lot to test audio interfaces, USB audio devices. It is perfect to analyze frequencies, gain levels, noise, etc. But it is a bit clumsy, like many other audio softwares, to unplug and plug new devices. You must always remember to stop the devices before unplug, then plug and start again, and there is not always time or patience for this.
Sometimes if you unplug a device in Mac without stopping it before the whole software will crash. Linux is more stable but still.
Are there any thoughts on this? Ideally Ardour should be able to disconnect if you unplug a device and start automatically again if the same is plugged again. Plug and play.
It appears to me you are looking for goals that are not compatible. First you talk about “plug new devices” the assumption being that the new device will be picked up as if it were the old device. Then you talk about “if the same is plugged again”. The second seems to be what most people would expect and in fact is the way ALSA works to do things as far as it can. There are however some pot holes along the way.
First,the USB audio standard and second, the way manufactures implement that standard. The USB standard does in fact have a spot for the device serial number but so far, I have only talked to one person who has a device where the manufacture has put a serial number in that slot. So it is impossible for software to just reconnect and know that the inputs and outputs have any meaningful relationship to may have been plugged in before.
However, At least in Ardour, but in other professional software as well. Media clocks are meant to be constant, devices are meant to be present through the whole session. Timing changes with each device and even for the same device on restart. Usb devices are known for changing latency on each restart.
It seems you have a unique use and as such you need extra thought and perhaps external software to achieve your purpose. I would suggest using either Jack or PipeWire and not using the default or master device as your device being tested. PipeWire will deal with devices being plugged and unplugged though it will not name them all the same and so you may have to manually connect ports. In the case of Jack you would have to use an extra process like alsa_in or zita-a2j to connect a newly plugged in device to jack. A script would be required to detect a new device and start the alsa-jack bridge and when that device was unplugged so that bridge could be removed. Jack or PipeWire (running as Jack) could then be used as the audio backend for Ardour and the ports for your plugged in device will show up in the jack graph or not as they are plugged in or out. Honestly, stopping and starting the audio engine makes more sense to me.
I appreciate your response @Len and apologize for not being clear and dropping here a general comment on the Audio Engine, without being specific enough on the issue.
Just for clarification, I don’t use Ardour only to test audio interfaces, but mostly as a sound editor for film-soundtracks. Just happen to experiment often with USB interfaces/DAC DIY electronic circuits, then unplugging and re-plugging is constant in a day and the inability to recognize an old (previously plugged) device becomes an issue. I guess one gets used to the way all OS can deal with this automatically.
As far as I can tell Jack also needs to be restarted once an external device is unplugged/powered off. I will explore what I can do with zita-a2j or alsa-in in this regard, thanks for the suggestions.