Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-18-2006, 04:39 PM
|
#1
|
Member
Registered: Oct 2003
Distribution: Slackware Debian VectorLinux
Posts: 429
Rep:
|
Alsa device files
Hello!
My ALSA is working ok, but when I try to
cat soundfile > /dev/snd/pcmC0D0c
it doesn't work. I tried to cat to the other pcmD0C0 files in the directory, and cat returns invalid argument or invalid descriptor error.
Are these the correct ALSA device files? If so, how do I access them?
Thanks,
Murdock
|
|
|
03-18-2006, 05:56 PM
|
#2
|
Senior Member
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687
Rep:
|
try /dev/dsp
which is a symlink to:
/dev/sound/dsp
or /dev/audio
which is a symlink to:
/dev/sound/audio
|
|
|
03-18-2006, 06:04 PM
|
#3
|
Member
Registered: Oct 2005
Location: Ontario, Canada
Distribution: Arch, Gentoo
Posts: 98
Rep:
|
/dev/dsp is for OSS, or for ALSA with OSS emulation.
If you want to stick with ALSA, try the aplay command. It accepts files on it's standard input so you could try cat soundfile | aplay or even just aplay soundfile.
|
|
|
03-19-2006, 12:23 AM
|
#4
|
Member
Registered: Oct 2003
Distribution: Slackware Debian VectorLinux
Posts: 429
Original Poster
Rep:
|
Thanks All!
However, there are many programs that need to access the device files directly, such as recording programs, and aplay is insufficient.
For these programs, I could active OSS emulation, and send it to /dev/dsp, but there must be a better way.
aplay in fact does work, but I need to access Alsa files as I would OSS device files.
Also, why can't I access them through pcmC0D0 files?
Thanks,
Murdock
|
|
|
03-19-2006, 12:33 AM
|
#5
|
Member
Registered: Mar 2006
Location: Redmond, WA
Distribution: FC4, WinXP Pro
Posts: 37
Rep:
|
Someone may have a more technical answer for why you can't use pcmC0D0, but as I understand it, the file is in the wrong format.
I too find kernel OSS emulation insufficient. The problem is that only one device can use the emulation at a time. You also cannot use software mixing, routing, or any othe other asound configuration options with it.
I've found aoss to work better. It will emulate the OSS devices on a per application basis, and it will redirect them to your default ALSA device (which could be a software mixing dmix device).
|
|
|
03-19-2006, 07:39 AM
|
#6
|
Member
Registered: Oct 2003
Distribution: Slackware Debian VectorLinux
Posts: 429
Original Poster
Rep:
|
I'll look into aoss.
You see, in the KDE sound control tab, if I want to override the default device, what should I put in? In fact, what is the default device anyway?
I'm not using OSS, so it's not dsp or the equivalent.
Thanks,
Murdock
|
|
|
03-19-2006, 11:39 PM
|
#7
|
Member
Registered: Mar 2006
Location: Redmond, WA
Distribution: FC4, WinXP Pro
Posts: 37
Rep:
|
Sorry, I don't know much about KDE, but on my computer it supports several different APIs to access the sound card. OSS and ALSA are among those. Assuming you decide to use ALSA, the default device is "default" (no quotes). Other likely choices are "hw:0,0", "hw:1,0", and "hw:0,1".
The correct way to configure ALSA devices is through the asound.conf file. You'll see that the default device is defined in there. You can also rearrange the speakers or enable software mixing in asound.conf.
|
|
|
All times are GMT -5. The time now is 10:52 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|