3

If it's relevant, I'm trying this on the Debian-derived Armbian 3.4, running on an Orange Pi Zero (Raspberry Pi "clone") board. As you will see below, the board can playback sound either through a "line out" interface to earphones, or through a HDMI interface if such a monitor is attached.

I have created a new user (say user2) that seems not to be able to see the sound cards.

Running aplay -l under different users returns different results:

  • as root:
**** List of PLAYBACK Hardware Devices ****
card 0: audiocodec [audiocodec], device 0: SUNXI-CODEC sndcodec-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: sndhdmi [sndhdmi], device 0: SUNXI-HDMIAUDIO sndhdmi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
  • as my default user user1 (created by the system at first login):
**** List of PLAYBACK Hardware Devices ****
card 0: audiocodec [audiocodec], device 0: SUNXI-CODEC sndcodec-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: sndhdmi [sndhdmi], device 0: SUNXI-HDMIAUDIO sndhdmi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
  • as my problematic user user2 (created by me):
aplay: device_list:268: no soundcards found...

Obviously, playing a WAV file through aplay works for root and user1, but not for user2.

Any ideas what I need to do to make the soundcards visible to user2?

1
  • 2
    Check out the groups both users belong to (groups user1 user2). Mar 15, 2017 at 18:37

1 Answer 1

5

As root or with sudo

usermod -aG audio user2

This added the user2 in group audio.

The user has to logout and login again for the changes to take effect.

1
  • 1
    It was helpful to see what groups the users belonged to, as Stephen Kitt pointed out. Added my user2 to the group audio as you suggested. I did need to restart a program that user2 was running that called aplay - in complex cases a shutdown -r now might be handy just to be sure.
    – frIT
    Mar 15, 2017 at 21:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .