On Mon, 22 Dec 2003, Bhiksha Raj wrote:

> Hi,
> 
> I have installed a delta 1010 on my 3.06 ghz machine
> (with 2GB ram), running redhat 9 (kernel 2.4.20-24.9).
> 
> I find
> a) that trying to grab audio from 8 channels at 96Khz
>     (a supported sampling rate for DL1010) eats up
>     50% of my CPU, and after a few seconds begins
>     giving me error -5 (Input/Output Error).
>     I was getting the same error earlier at a sampling
>     rate of 16Khz (8 channels) on a 2 Ghz processor,
>     which prompted me to upgrade my CPU. Now I can
>     get 16Khz, but not 32 or 48 Khz (which is what
>     I need).
> 
>     Since these are supported sampling rates, Im
>     surprised that it must consume so much CPU.

The format conversion probably eats your CPU time. Actually our data
conversion routines are too much universal (too much jumps which totaly
confuses CPU prediction and pipes) and not much optimized as they should
be for common conversions. Use S32_LE format to play really with raw data
which your hardware supports.

>     Strangely, if I include a printf in my code
>     to print out energies in the recorded channels,
>     I get more errors at higher sampling rates.
> 
> b) I am completely unable to duplex. I can either
>     record audio, or play it back. If I try to do
>     both (i.e. record and then play back) I get
>     the error
> "write to audio interface failed (Broken pipe)"
> 
>   I have opened two different hanldes to default,
>   so I do not see why this doesnt work..
> 
> Ive attached the code I use.  If I
> comment out the recording the play works,
> and if I comment out the play the recording
> works, but not both together.
> 
> Any advice at all would be greatly appreciated.

Your code is broken. You MUST fill the playback ring buffer ahead.
Think about it. Simple read() -> write() sequence cannot work because
the playback buffer will become empty in the next read() cycle.

                                                Jaroslav

-----
Jaroslav Kysela <[EMAIL PROTECTED]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to