Dell XPS 13 (9320): microphone not working

Thank you for this solution.

For the record, I strace the alsactl init process and it seems that it write the file /var/lib/alsa/card0.conf.d/ctl-remap.conf with the following content:

ctl.default {
	@args.0 CARD
	@args.CARD.type string
	type remap
	child {
		type hw
		card $CARD
	}
}

I had not tested if just doing so manually could fix the problem, but I’ll do that next time I observe the problem (which should happen quickly, we have 20 xps 9315 at work). If yes, I’ll hardcode this file in my nixos setup, this is still magic, but easier to reproduce than the alsactl init + magic patching for rm and mkdir.