How to get my linux box sound and microphone path?

2

In linux how can i find what is my sound card path and microphone path? Some application is using /dev/dsp but how to make sure what is mine?

Screenshot

YumYumYum

Posted 2011-07-14T15:10:11.720

Reputation: 1 399

This is't a programming question see the faq: http://stackoverflow.com/faq

– None – 2011-07-14T15:12:59.263

Because you program using a certain OS doesn't mean any question regarding the OS are 'programming questions' http://askubuntu.com/

– None – 2011-07-14T15:18:27.287

You have several questions which have been migrated from StackOverflow to other places, you should know this by now. – marto – 2011-07-14T15:31:57.290

Is there any case like it blocks from other visitors? I don't believe so – marto – 2011-07-14T15:39:17.620

understand why there are different sections for different types of questions. Maybe you should do more research via google. – marto – 2011-07-14T15:44:04.670

Answers

3

/dev/dsp and /dev/mixer are devices for the OSS3 sound system. The device paths are always the same on all systems.

However, due to the many limits of OSS3, almost all modern Linux distributions use ALSA for sound, which doesn't have dsp and mixer devices. It's possible to use OSS emulation in several ways:

  • User-mode, PulseAudio:

    PulseAudio comes with OSS emulation libraries. Run your program through padsp:

    padsp ./sjphone
    
  • User-mode, direct ALSA:

    Install the alsa-oss package, then run your program through aoss:

    aoss ./sjphone
    

    This works on PulseAudio systems too (although maybe not as well as padsp).

  • Kernel-mode:

    Load the snd-pcm-oss and snd-mixer-oss kernel modules, then run your program normally:

    sudo modprobe snd-pcm-oss
    sudo modprobe snd-mixer-oss
    ./sjphone
    

    This method is not recommended – especially avoid it on PulseAudio systems, since kernel OSS emulation may conflict with how PulseAudio manages the hardware. User-mode padsp or aoss is usually the better choice.

user1686

Posted 2011-07-14T15:10:11.720

Reputation: 283 655

Of note: The /dev/dsp does not show up in directory listings, but can be opened for reading or writing. Try padsp cat /dev/dsp >temp.wav for recording and padsp bash -c 'cp temp.wav /dev/dsp' for playback. – nobar – 2015-02-08T04:44:40.803

Thank you. Its very nice answer and very confusing one of mine. I used "aoss ./sjphone", and i can use the slider of microphone only, but i cant use the speaker slider, which is disabled still. Is that has to do with aoss still or ./sjphone itself? – YumYumYum – 2011-07-14T22:10:43.817

Thanks again. Its just working super cool. You are genius!! – YumYumYum – 2011-07-14T22:13:30.697

0

/dev/dsp is the standard device in Linux for outputting or recording sound. There isn't a special device path for your soundcard or microphone.

Adam Prax

Posted 2011-07-14T15:10:11.720

Reputation: 921

But as you can see here it using /dev/dsp. But i do not have any mic/headphone sounds for this. What else i can apply instead of /dev/dsp in that case? e.g: http://i.stack.imgur.com/7WPVw.png

– YumYumYum – 2011-07-14T17:06:39.220