2

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?

  • 2
    Check out the groups both users belong to (groups user1 user2). – Stephen Kitt Mar 15 '17 at 18:37
4

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
    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. – fr13d Mar 15 '17 at 21:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.