[alsa-devel] ALSA layer in Linux 2.6.18 and OSS
Hi All,
I am trying to make an application that does Audio playback and record. I have configured Kernel and Re-built it. I want to use only ALSA features. I have said "Yes" to all ALSA related options and "No" to all OSS related things.
When I booted my kernel, I found that there was no "/dev/dsp" device and so my application was not able to run. The application opens "/dev/dsp" device first and then does other things.
Next time, when I enabled few of the OSS options in kernel's config file. I was able to run my application. My question is I do not want OSS at all. I just need ALSA then in that case what I am doing wrong.
Thanks, Viral
At Mon, 16 Feb 2009 13:24:54 +0530, Viral Mehta wrote:
Hi All,
I am trying to make an application that does Audio playback and record. I have configured Kernel and Re-built it. I want to use only ALSA features. I have said "Yes" to all ALSA related options and "No" to all OSS related things.
When I booted my kernel, I found that there was no "/dev/dsp" device and so my application was not able to run. The application opens "/dev/dsp" device first and then does other things.
Next time, when I enabled few of the OSS options in kernel's config file. I was able to run my application. My question is I do not want OSS at all. I just need ALSA then in that case what I am doing wrong.
Well, rather a real question is which app / subsystem accessing the OSS device and causes errors. You can set up ALSA-only system in the kernel side. But if the user-space side requires the OSS API, it won't work.
So, - if you want to remove all OSS-accessing apps, fix them or - build ALSA OSS *emulation* module so that they work both or - use aoss wrapper instead
Takashi
Takashi Iwai wrote:
At Mon, 16 Feb 2009 13:24:54 +0530, Viral Mehta wrote:
Hi All,
Next time, when I enabled few of the OSS options in kernel's config file. I was able to run my application. My question is I do not want OSS at all. I just need ALSA then in that case what I am doing wrong.
Well, rather a real question is which app / subsystem accessing the OSS device and causes errors.
Thanks for quick response. Well, I myself am writing Audio Player application for some embedded device. I generally used to write open("/dev/dsp") device and then do read/write of RAW data on that device and it used to work till now. I was/am doing so and completely unaware of OSS/ALSA.
You can set up ALSA-only system in the kernel side.
But then when I found while rebuilding kernel that there are two sound sub-system OSS and ALSA. ALSA is a new one and OSS is deprecated. And so I thought to remove everything about OSS from Kernel.
But if the user-space side requires the OSS API, it won't work.
So, I guess my application is such that it wont work with ALSA-only-kernel. But then on contrary, I think that opening a /dev/dsp and throwing data is a simple way AND what is so wrong in that and why ALSA-only-kernel cant understand that ?
So,
- if you want to remove all OSS-accessing apps, fix them
or
- build ALSA OSS *emulation* module so that they work both
or
- use aoss wrapper instead
At Mon, 16 Feb 2009 16:27:06 +0530, Viral Mehta wrote:
Takashi Iwai wrote:
At Mon, 16 Feb 2009 13:24:54 +0530, Viral Mehta wrote:
Hi All,
Next time, when I enabled few of the OSS options in kernel's config file. I was able to run my application. My question is I do not want OSS at all. I just need ALSA then in that case what I am doing wrong.
Well, rather a real question is which app / subsystem accessing the OSS device and causes errors.
Thanks for quick response. Well, I myself am writing Audio Player application for some embedded device. I generally used to write open("/dev/dsp") device and then do read/write of RAW data on that device and it used to work till now. I was/am doing so and completely unaware of OSS/ALSA.
You can set up ALSA-only system in the kernel side.
But then when I found while rebuilding kernel that there are two sound sub-system OSS and ALSA. ALSA is a new one and OSS is deprecated. And so I thought to remove everything about OSS from Kernel.
In that case, simply enable ALSA OSS emulation modules, the second case below. Then OSS API will work on the top of ALSA subsystem.
Takashi
But if the user-space side requires the OSS API, it won't work.
So, I guess my application is such that it wont work with ALSA-only-kernel. But then on contrary, I think that opening a /dev/dsp and throwing data is a simple way AND what is so wrong in that and why ALSA-only-kernel cant understand that ?
So,
- if you want to remove all OSS-accessing apps, fix them
or
- build ALSA OSS *emulation* module so that they work both
or
- use aoss wrapper instead
-- _____________________________________________________________________ Disclaimer: This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. Any views expressed in this message are those of the individual sender unless otherwise stated.Company has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email. __________________________________________________________________________
'Twas brillig, and Viral Mehta at 16/02/09 10:57 did gyre and gimble:
Thanks for quick response. Well, I myself am writing Audio Player application for some embedded device.
This recent article may make for interesting reading for you:
http://0pointer.de/blog/projects/guide-to-sound-apis.html
Col
2009/2/16 Viral Mehta viral.mehta@einfochips.com:
Hi All,
When I booted my kernel, I found that there was no "/dev/dsp" device and so my application was not able to run. The application opens "/dev/dsp" device first and then does other things.
/dev/dsp is the OSS API. So an install without OSS will not have /dev/dsp. An application that supports alsa will link to libasound. If you have an OSS application that you want to work with ALSA, you need to add the ALSA OSS emulation layer.
James Courtier-Dutton wrote:
2009/2/16 Viral Mehta viral.mehta@einfochips.com:
Hi All,
When I booted my kernel, I found that there was no "/dev/dsp" device and so my application was not able to run. The application opens "/dev/dsp" device first and then does other things.
/dev/dsp is the OSS API. So an install without OSS will not have /dev/dsp. An application that supports alsa will link to libasound. If you have an OSS application that you want to work with ALSA, you need to add the ALSA OSS emulation layer.
So, the last question. Is it possible to write an application totally using ALSA user and kernel things (i.e., without having OSS emulation layer)?
In that case, if application will not open /dev/dsp then what ll it do ? Just pointers will be great for me.
And will it be possible to implement full-featured application which plays stereo and also provides equalizer and etc just by using ALSA ?
participants (4)
-
Colin Guthrie
-
James Courtier-Dutton
-
Takashi Iwai
-
Viral Mehta