Cannot access file /usr/share/alsa/alsa.conf

Bug #1835290 reported by anatoly techtonik
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
snapd
Expired
Undecided
Unassigned

Bug Description

I am trying to pack core18 snap that needs ALSA. I added libraries, added plug, connected the interface https://docs.snapcraft.io/alsa-interface after installation, and I am still getting this error:

$ trx-audio.tx
trx (C) Copyright 2014 Mark Hills <email address hidden>
ALSA lib conf.c:3916:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
snd_pcm_open: No such file or directory

I feel like :alsa interface documentation is missing something essential.

affects: snapcraft → snapd
Revision history for this message
anatoly techtonik (techtonik) wrote :

This was the missing part.

layout:
  /usr/share/alsa:
    bind: $SNAP/usr/share/alsa

Revision history for this message
anatoly techtonik (techtonik) wrote :

And still is. From https://docs.snapcraft.io/alsa-interface docs.

Could also include tutorial how to build snaps for this interface.

    build-packages:
    - gcc
    - libasound2-dev
    - libopus-dev
    - libortp-dev
    stage-packages:
    - libasound2
    - libopus0
    - libortp9

Revision history for this message
Oliver Grawert (ogra) wrote :

there is documentation about using alsa in snaps at https://github.com/diddlesnaps/snapcraft-alsa

Revision history for this message
anatoly techtonik (techtonik) wrote :

What is the latency of that solution? I need ALSA because I pack https://snapcraft.io/trx-audio which is already complicated enough to wire.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Dear reporter, is this issue still blocking you? I understand that the layout definition and addition packages help in this but I'd like to hear this from you directly. If there's an issue still can you please explain what it is. I'm marking the bug as incomplete until you do so.

Separately I'd like to encourage you to contribute to the documentation of the ALSA interface itself. The documentation is hosted on https://forum.snapcraft.io/t/the-alsa-interface/7766 and the documentation page is generated directly from the first comment in that thread.

I have notified my colleague Graham to keep an eye on comments to that page.

Changed in snapd:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for snapd because there has been no activity for 60 days.]

Changed in snapd:
status: Incomplete → Expired
Revision history for this message
hilaire (hilaire-fernandes) wrote :

Hi,

On Ubuntu 19.10 I have the exact same issue when starting flightgear. Ohterwise sound is working fine with other application. It looks like something is wrong with Alsa packaging.

hilaire@PCHome:~$ flightgear --show-sound-devices
    0.00 [INFO]:general FlightGear: Version 2019.1.2
    0.00 [INFO]:general FlightGear: Build Type Dev
    0.00 [INFO]:general Built with GNU C++ version 7.4
    0.00 [INFO]:general Jenkins number/ID 0:none
    0.00 [INFO]:sound Initializing OpenAL sound manager
ALSA lib conf.c:3916:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
unknown provided by unknown

No. Device
    0.04 [ALRT]:sound Error: Default audio device not available.
0. "ALSA Default"

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.