Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Multimedia
  • Search

alsa not working properly - SOLVED

Help with creation, editing, or playback of sounds, images, or video. Amarok, audacious, mplayer, grip, cdparanoia and anything else that makes a sound or plays a video.
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
Moriah
Advocate
Advocate
User avatar
Posts: 2388
Joined: Sat Mar 27, 2004 3:11 am
Location: Kentucky
Contact:
Contact Moriah
Website

alsa not working properly - SOLVED

  • Quote

Post by Moriah » Sun Mar 31, 2024 7:52 pm

I have just rebuilt the software on my laptop. I started with a brand new blank SSD and went thru the installation procedure outlined in the handbook, including building a 6.6.13-gentoo kernel. This was followed by copying all my data files from my backup server onto the new laptop system SSD.

I now have everything working except for my sound. I had been using alsamixer as my sound control panel, mostly just as a volume control. I run it in a xterm. After emerging alsamixer, I am able to run it as root, but not as a user. Seems the perms on my sound device are not allowing write to a general user. My suspicion is that I need to make my username belong to some groupt to allow me to access the sound hardware.

But even when I run alsamixer successfully as root, I cnnot get mpg123 to play a *.mpg sound track. I even tried running mpg123 as root, and it still won't work.

Here is the sound hardware:

Code: Select all

onesimus ~ # ls -l /dev/audio1
crw-rw-r-- 1 root audio 14, 20 Mar 30 19:47 /dev/audio1
onesimus ~ # 
Here is what I get running mpg123 as my normal username:

Code: Select all

rj@onesimus ~/KJV $ mpg123 19Psa150.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
        version 1.32.3; written and copyright by Michael Hipp and others
        free software (LGPL) without any warranty but with best wishes


Terminal control enabled, press 'h' for listing of keys and functions.

Playing MPEG stream 1 of 1: 19Psa150.mp3 ...
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/conf.c:5204:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/conf.c:5204:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/confmisc.c:1342:(snd_func_refer) error evaluating name
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/pcm/pcm.c:2675:(snd_pcm_open_noupdate) Unknown PCM default
[src/libout123/modules/sdl.c:open_sdl():122] error: Couldn't open SDL audio: ALSA: Couldn't open audio device: No such file or directory

main: [/var/tmp/portage/media-sound/mpg123-base-1.32.3/work/mpg123-1.32.3/src/mpg123.c:check_fatal_output():337] error: out123 error 7: failed to open device
rj@onesimus ~/KJV $ 
And here is running as root:

Code: Select all

onesimus /home/rj/KJV # mpg123 19Psa150.mp3 
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
        version 1.32.3; written and copyright by Michael Hipp and others
        free software (LGPL) without any warranty but with best wishes
Segmentation fault
onesimus /home/rj/KJV #
Any idea what I am doing wrong? This used to work fine before the software rebuild. Could I be missing a configuration file somewhare? If so, it should be on my backup server, so it is easy to copy it over.
Last edited by Moriah on Sun Apr 14, 2024 1:21 pm, edited 1 time in total.
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Top
flexibeast
l33t
l33t
Posts: 682
Joined: Mon Apr 04, 2022 4:15 am
Location: Naarm/Melbourne, Australia
Contact:
Contact flexibeast
Website

  • Quote

Post by flexibeast » Mon Apr 01, 2024 2:10 am

Did you have asoundrc files (`.asoundrc` or `asound.conf`) for your hardware? In general they're not necessarily needed, but might be required for some hardware or configurations, so perhaps check your backups for those?
Top
Moriah
Advocate
Advocate
User avatar
Posts: 2388
Joined: Sat Mar 27, 2004 3:11 am
Location: Kentucky
Contact:
Contact Moriah
Website

  • Quote

Post by Moriah » Tue Apr 02, 2024 5:51 pm

Thanks for the tip on /etc/asound.conf; that made a difference, but I still can't run audio as a normal user.

It is obviously some kind of filke permission problem in /dev because I can play mpg123 when I am root, but not when I am my normal user.

Here is what I get when I try to run mpg123 as a normal user:

Code: Select all

rj@onesimus ~/KJV $ mpg123 19Psa150.mp3 
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
        version 1.32.3; written and copyright by Michael Hipp and others
        free software (LGPL) without any warranty but with best wishes


Terminal control enabled, press 'h' for listing of keys and functions.

Playing MPEG stream 1 of 1: 19Psa150.mp3 ...
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/confmisc.c:855:(parse_card) cannot find card '1'
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/conf.c:5204:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/conf.c:5204:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/confmisc.c:1342:(snd_func_refer) error evaluating name
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/pcm/pcm.c:2675:(snd_pcm_open_noupdate) Unknown PCM default
[src/libout123/modules/sdl.c:open_sdl():122] error: Couldn't open SDL audio: ALSA: Couldn't open audio device: No such file or directory

main: [/var/tmp/portage/media-sound/mpg123-base-1.32.3/work/mpg123-1.32.3/src/mpg123.c:check_fatal_output():337] error: out123 error 7: failed to open device
rj@onesimus ~/KJV $ 
and here is what I get when I try to run alsamixer as a notmal user:

Code: Select all

rj@onesimus ~/KJV $ alsamixer
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/confmisc.c:855:(parse_card) cannot find card '1'
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/conf.c:5204:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/conf.c:5204:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/confmisc.c:1342:(snd_func_refer) error evaluating name
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.10-r2/work/alsa-lib-1.2.10/src/control/control.c:1570:(snd_ctl_open_noupdate) Invalid CTL default
cannot open mixer: No such file or directory
rj@onesimus ~/KJV $ 
Since I only have one normal non-root user on this laptop, I would prefer not to have to use group permissions, but just allow any user to access the audio devices.

What devices do I need besides these:

Code: Select all

rj@onesimus ~/KJV $ ls -l /dev/aud* /dev/mixer*
crw-rw-rw- 1 root audio 14, 20 Mar 30 19:47 /dev/audio1
crw-rw-rw- 1 root audio 14,  0 Mar 30 19:47 /dev/mixer
crw-rw-rw- 1 root audio 14, 16 Mar 30 19:47 /dev/mixer1
crw-rw-rw- 1 root audio 14, 32 Mar 30 19:47 /dev/mixer2
rj@onesimus ~/KJV $ 
As you can see, I have already allowed any user to read and wite these devices.
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Top
Hu
Administrator
Administrator
Posts: 24403
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Tue Apr 02, 2024 6:11 pm

I am not convinced that this is a permissions problem, since it references failure to find a resource, rather than a permissions error.

When you copied from backup, did you also copy over ~/.asoundrc? That file may not be correct for new hardware, and might be configuring ALSA not to work. If so, root would work, since it would look at /root/.asoundrc, and I am suggesting that only ~rj/.asoundrc exists and is bad.
Top
Moriah
Advocate
Advocate
User avatar
Posts: 2388
Joined: Sat Mar 27, 2004 3:11 am
Location: Kentucky
Contact:
Contact Moriah
Website

  • Quote

Post by Moriah » Tue Apr 02, 2024 7:11 pm

This is not new hardware; it is exactly the same hardware that used to work before the kernel upgrade. There is no .asoundrc and there is no backup of that file in my normal user account home directory. Neither is there any .asoundrc in /root. It started to work for playback with mpg123 for root when I copied /etc/asound.conf from backup.

So if it works for root, and nobody ever has any .asoundrc file, then all it knows is from /etc/asound.conf and my normal user would see that also.

Are there any other file, whether in /dev or elsewhere, that are needed to playback with mpg123 or to execute alsamixer?
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Top
flexibeast
l33t
l33t
Posts: 682
Joined: Mon Apr 04, 2022 4:15 am
Location: Naarm/Melbourne, Australia
Contact:
Contact flexibeast
Website

  • Quote

Post by flexibeast » Wed Apr 03, 2024 12:47 am

Moriah wrote:Are there any other file, whether in /dev or elsewhere, that are needed to playback with mpg123 or to execute alsamixer?
i'm not familiar enough with mpg123 to know, but you could try running it with strace(1), e.g.:

Code: Select all

$ strace -e open,openat /usr/bin/mpg123 19Psa150.mp3 2>&1 | less
and examining what mpg123 is trying to open, and any related errors.
Top
Chiitoo
Ninja Apprentice
Ninja Apprentice
User avatar
Posts: 3079
Joined: Sun Feb 28, 2010 5:36 pm
Location: Sore wa sore, kore wa kore... nanoda.

  • Quote

Post by Chiitoo » Wed Apr 03, 2024 6:11 am

Moriah wrote:It started to work for playback with mpg123 for root when I copied /etc/asound.conf from backup.

So if it works for root, and nobody ever has any .asoundrc file, then all it knows is from /etc/asound.conf and my normal user would see that also.
Just to be sure, /can/ the normal user actually see and read it as well?
Kindest of regardses.
Top
Moriah
Advocate
Advocate
User avatar
Posts: 2388
Joined: Sat Mar 27, 2004 3:11 am
Location: Kentucky
Contact:
Contact Moriah
Website

  • Quote

Post by Moriah » Wed Apr 03, 2024 6:44 pm

yes, my normal user can read /etc/asound.conf
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Top
Moriah
Advocate
Advocate
User avatar
Posts: 2388
Joined: Sat Mar 27, 2004 3:11 am
Location: Kentucky
Contact:
Contact Moriah
Website

  • Quote

Post by Moriah » Sun Apr 14, 2024 1:21 pm

Had to go out of town unexpectedly; sorry for the delay in posting, but:

THE PROBLEM IS SOLVED !!! :D

I had to put my username in the audio group in .etc/group; that's all it took.
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Top
Post Reply

9 posts • Page 1 of 1

Return to “Multimedia”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic