@Bruno - I looked into this a little bit and ALSA doesn't allow you to override the ALSA_CONFIG_DIR in the default configuration. However, your snap can ship a configuration that you point ALSA_CONFIG_PATH at and that configuration file can be setup to work. I'm not an ALSA developer and have only sketched out the following snap so that I might develop security policy for an alsa interface: https://git.launchpad.net/~jdstrand/+git/alsa-utils?h=master
What it does is: - ship a wrapper in files/bin/wrapper that sets ALSA_CONFIG_PATH="$SNAP/etc/alsa.conf" - ship files/etc/alsa.conf that is a modified version of /usr/share/alsa/alsa.conf that substitutes references to datadir with values in /snap/alsa-utils/current. ALSA supports 'getenv' in the configuration files so it shouldn't be too much work for someone to getenv the $SNAP dir instead of hard-coding /snap/alsa-utils/current - ships files/etc/alsa/cards/* that are modified versions of /usr/share/alsa/cards/* that replace 'confdir:pcm' with '/snap/alsa-utils/current/usr/share/alsa/pcm' With the above, in devmode can: $ alsa-utils.speaker-test $ alsa-utils.aplay /snap/alsa-utils/current/usr/share/sounds/alsa/Noise.wav $ alsa-utils.arecord ~/snap/alsa-utils/common/out.wav $ alsa-utils.aplay ~/snap/alsa-utils/common/out.wav I suspect a snapcraft part would be worthwhile for setting up the wrapper, alsa.conf and sed'ing the /usr/share/alsa/cards/*.conf files? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1598309 Title: The aplay command doesn't work To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1598309/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
