This is a discussion on problems setting up alsa on gentoo - sox: Can't open output file: within the Gentoo Linux Support forums, part of the Unix Operating Systems category; --> Hi! After installing compiling and installing alsa from the source, I am still not able to get some music ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi! After installing compiling and installing alsa from the source, I am still not able to get some music to run. I receive the error message: sox: Can't open output file: '/dev/dsp': Permission denied /dev/dsp doesn't exist, what could mean that the devfsd application didn't set up the virtual filesystem for the soundcard. what I did: Kernel: Soundcard support is available and devfsd (with automount at boottime) is activated alsa: latest alsa stuff downloaded, compiled and installed alsa: soundcard is confifured with alsaconfig Sample Linux-User with audio access is created! For any ideas and help to solve my problem, I would thank very much Tamer |
| |||
| Tamer Higazi has offered us the following clue : > Hi! > After installing compiling and installing alsa from the source, I am > still not able to get some music to run. > > I receive the error message: > > sox: Can't open output file: '/dev/dsp': Permission denied > > /dev/dsp doesn't exist, what could mean that the devfsd application > didn't set up the virtual filesystem for the soundcard. > > what I did: > > Kernel: Soundcard support is available and devfsd (with automount at > boottime) is activated > > alsa: latest alsa stuff downloaded, compiled and installed > alsa: soundcard is confifured with alsaconfig > > Sample Linux-User with audio access is created! > > For any ideas and help to solve my problem, I would thank very much > > > Tamer Did ou try to run music from root to check permissions ? |
| |||
| Tamer Higazi wrote: > Hi! > After installing compiling and installing alsa from the source, I am > still not able to get some music to run. > > I receive the error message: > > sox: Can't open output file: '/dev/dsp': Permission denied > > /dev/dsp doesn't exist, what could mean that the devfsd application > didn't set up the virtual filesystem for the soundcard. > > what I did: > > Kernel: Soundcard support is available and devfsd (with automount at > boottime) is activated > > alsa: latest alsa stuff downloaded, compiled and installed > alsa: soundcard is confifured with alsaconfig > > Sample Linux-User with audio access is created! > > For any ideas and help to solve my problem, I would thank very much /dev/dsp is an OSS device, not an ALSA device. You need to enable OSS emulation in the kernel (look in the ALSA section), which creates the (deprecated) devices for you. -- Regards, Karsten |
| |||
| Albert enlightened us with: > Did ou try to run music from root to check permissions ? Albert, you keep giving bad advice. Running something as root, just because it's giving a permission denied error is Bad Practice. What's wrong with simply examining the output of "stat /dev/dsp"? My guess: OP isn't in the 'audio' group. Sybren -- The problem with the world is stupidity. Not saying there should be a capital punishment for stupidity, but why don't we just take the safety labels off of everything and let the problem solve itself? |
| |||
| Hui Sybren! The user is in the "audio" group. By the way, I think I'll try out what Karsten said. That sounded for me more logical. But thank you anyway. Sybren Stuvel schrieb: > Albert enlightened us with: > >>Did ou try to run music from root to check permissions ? > > > Albert, you keep giving bad advice. Running something as root, just > because it's giving a permission denied error is Bad Practice. What's > wrong with simply examining the output of "stat /dev/dsp"? > > My guess: OP isn't in the 'audio' group. > > Sybren |
| |||
| I wrote: > > /dev/dsp is an OSS device, not an ALSA device. You need to enable OSS > emulation in the kernel (look in the ALSA section), which creates the > (deprecated) devices for you. > Basically my suggested solution works, but it dosn't really fit your problem. I missed your first statement "installed ALSA from source". Sorry about that. In this case you'll need the alsa-oss compatibility layer (just emerge alsa-oss) to enable the OSS emulation. -- Regards, Karsten |
| |||
| Sybren Stuvel has offered us the following clue : > Albert enlightened us with: >> Did ou try to run music from root to check permissions ? > > Albert, you keep giving bad advice. Running something as root, just > because it's giving a permission denied error is Bad Practice. What's > wrong with simply examining the output of "stat /dev/dsp"? > > My guess: OP isn't in the 'audio' group. > > Sybren Thank you Mollah Sybren for enlighting us on Good Practise. We all know it is bad practise to launch anything from root but this is very theoritical in case of a desktop use where one already runs such a vast quantity of software such as media players or even X. If you run such software on a Linux box, that means you accept some degree of risk (http://www.gentoo.org/security/en/gl...200408-01.xml). Running a piece of software which is well known 1 minute from root carries a limited risk and gives you an immediate idea if you were having a permission problem. Permission problems can be quite difficult to sort out because several things can pile up. One time, I spent a long time trying to understand why a file for which I had all permissions would not delete, only to find later that one directory far above did not have the correct rights. Rights in Linux is a wonderful thing but can be quite a headache and are sometimes overkill. By the way, if I understand well, you recommend that people like me using scanning, audio, CD recording, etc, should belong to the scanner, audio, cdr, etc groups ? This is nonsense for a regular desktop usage such as mine. I bother for security but there is a limit between good practise and extremism. For a Linux box sitting on a network, OK, I accept that. |
| |||
| So anyway, it was like, 11:30 CET Feb 08 2005, you know? Oh, and, yeah, Albert was all like, "Dude, > By the way, if I understand well, you recommend that people like > me using scanning, audio, CD recording, etc, should belong to the > scanner, audio, cdr, etc groups ? This is nonsense for a regular > desktop usage such as mine. On the contrary, the default security settings for certain software that require such devices are often set to a certain group. If just adding your username to the "audio" group makes music playback work, doesn't that seem like a pretty neat idea? > I bother for security but there is a limit between good practise and > extremism. For a Linux box sitting on a network, OK, I accept that. Your linux box isn't sitting on a network then, I take it? -- Time flies like an arrow, fruit flies like a banana. Perth ---> * 11:41:24 up 107 days, 8 min, 11 users, load average: 1.04, 1.54, 1.27 Linux 2.6.9 x86_64 GNU/Linux Registered Linux user #261729 |
| ||||
| Karsten Baumgarten <karsten@invalid.net> writes: > /dev/dsp is an OSS device, not an ALSA device. You need to enable OSS > emulation in the kernel (look in the ALSA section), which creates the > (deprecated) devices for you. I have currently upgraded to 2.6.10 from 2.4.26, from fsdev to udev and OSS to Alsa and have not quite got it sorted out but: I have Alsa with OSS support built as modules, and unfortunately /dev/dsp and /dev/mixer are *not* created by the loaded modules. But the following works: As root (I do it in a boot script now): mknod -m 660 /dev/dsp c 14 3 chgrp audio /dev/dsp mknod -m 660 /dev/mixer c 14 3 chgrp audio /dev/mixer And add yourself to audio group. Accessing /dev/dsp as a user (eg starting mpg123 or realplayer) will then load the correct modules. But it starts fully muted so use a mixer to raise the volume (eg aumix). I have not had time yet to find the "correct way" to interface OSS apps to Alsa :-( -- Simon Kellett, Darmstadt, Germany | http://home.arcor.de/zoxed Gentoo Linux, Fvwm, Firefox | Xemacs, vm, Gnus |