Thanks for this suggestion, this got past the alsa.conf error, but then I just had a bunch more errors.
Bingo! Once I added libpulse0
to stage-packages
audio output started working.
I have now removed the alsa
plug and added both the audio-playback
and pulseaudio
plugs back and it seems to work. It also seems to autoconnect the pulseaudio plug which is not what the documentation suggests.
Here is the working snapcraft.yaml for reference.