On Sat, 13 Oct 2001, CeDeROM wrote:
> Hi!
> 
> I see, that this subject is good for biig discussion :]

Looks like it.

> I've read all informations... I'm sure they will help me - as I'm just a
> begginer in that subject.
> 
> 1. There is no problem to write it in C. I just used to assembler, and
> so thought that such simple program could be written in asm - neither
> dirctly or as inline part of C module ( asm {} ).

Any modern PC will have more than enough CPU power for this application so
efficiency shouldn't be a big issue. And C will make development much
faster.

> 2. I was planning to use GAS compiler - GNU Assembly language - so:
>  - I think, that there would be no problem with multiplatform.
>  - It would allow me to insert asm code into C source.
> 
> 3. It's going to be my diplom work, so writing it in asm, would say
> something about my abiliteies, i think  :P

Your ability to write assembler code maybe.

> 3.About timers - if there is no aviable, I could do an empty loop, that
> would emulate such device - it would have to count the system speed at
> start. That's no problem, but I was wondering what is ALSA using for
> delays?

I'm pretty sure ALSA uses hardware interrupts generated by the sound card
to know when the sound card is ready for more data.

> 4. Would reading from /dev/dsp give me samples of the sound?
> If yes, are the data buffered, or sent directly with sampling frequency?
> If directly - I wouldn't have to make any delays in my program.
> 
> 5. Are the data in /dev/dsp 16-bit?
> Is it dependent from sound deliveredt to that device? 
> Are the data from /dev/dsp delivered to the soundcard with
> quality/parameters of the sound delivered to the /dev/dsp?
> 
> 6. The problem with output is that I/O device could not be fast enough
> for generating 1MHz signal.
> I was planning to use DTR/CTS lines in serial port, or data lines in
> parallel port. Maybe someone know what is maximum speed of those ports?
> From the other side only PC has USB port, so I'm not planning to use it.

This is going to be the biggest problem I think. The serial port isn't
nearly fast enough for this. The parallel port lines by themselves aren't 
fast enough either. I can think of 2 ways to do this:

1) use a high speed digital output card from National Instruments (or
various other companies). The down side here is that these cards tend to
be expensive.

2) When your program generates the PWM signal package the data into byte
size chunks and send the bytes to the parallel port output lines. At
the parallel port You would then need to convert that byte into a serial
stream using a parallel to serial converter or shift register or
something. At 1MHz that would give  1MHz/8 = 125kbs per output line. This
is really pushing the limit for the parallel port but it might work. You
could go farther and send 12 bits at a time to the parallel port to get
1MHz/12 = 83kbs per I/O line.

> 7. If I had to build some card acting as PWM (Pulse Width Modulator), I
> would built the amplifier as free-standing device...
> 
> Tanks!
> CeDeROM/KSZAK
> 
> _______________________________________________
> Alsa-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/alsa-devel
> 


_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to