11-28-2021, 05:05 AM
You probably need to investigate alsa UCM profiles (usually under /usr/share/alsa/ucm or ucm2 in a device-specific subdir) and any interaction they have with pulseaudio, or pipewire for the future. I haven't got that far myself so can't give you much more detail. Megi's writeup of the usual audio subsystem is at https://xnux.eu/devices/feature/audio-pp.html
Note that it's all currently routed through the audio hardware, not actually passing through pulseaudio, which is why we can't use the pulseaudio echo cancellation plugin. Your better modem will need to provide a USB audio interface, and you will need to work out a way of routing the mic and earpiece audio there instead of to the built in modem when profiles switch. Everything I've seen with profiles involves changing mixer settings on a single device, not setting up and taking down loopback routes between devices, so this could be tricky.
Note that it's all currently routed through the audio hardware, not actually passing through pulseaudio, which is why we can't use the pulseaudio echo cancellation plugin. Your better modem will need to provide a USB audio interface, and you will need to work out a way of routing the mic and earpiece audio there instead of to the built in modem when profiles switch. Everything I've seen with profiles involves changing mixer settings on a single device, not setting up and taking down loopback routes between devices, so this could be tricky.