Axp-List Archive
soundcard input clipping

Subject: soundcard input clipping
From: Robert M. Riches Jr. (richesr1@inetarena.com)
Date: Fri Jan 5 16:35:18 2001


My sound card digitizer is clipping the input at values it should
be able to handle. I'm looking for suggestions/solutions.

Hardware: UP2000, one processor (667MHz, EV67)
           Ensoniq AudioPCI ES1371 soundcard

Software: Redhat 6.1, kernel 2.2.13
           ALSA drivers, driver 0.5.8a
           rec, ElectricEars, and homebuilt recorder apps

Format: signed 16-bit little endian, 44100 sps, stereo
           (AFMT_S16_LE from soundcard.h)

All recorder applications have the same behavior. If I capture a
level above about 0.76 of full-scale, the waveform clips. (A
triangle wave generator was used for this measurement.)

I don't believe the clipping is in the front-end analog portion
of the sound card, because reducing the ALSA-mixer input gain
makes the clipping entirely go away. The clipping looks the same
when viewed with ElecticEars (sound editor) and with an
oscilloscope hung on the line output of the sound card.

Shouldn't a sound card be able to digitize to the full range of
signed 16-bit integers without clipping?

Is this a known problem with the Ensoniq card or the ALSA
drivers?

The workaround is to limit the input gain such that the digitized
values stay below about 0.70 of full-scale, which only loses
about 3dB of S/N ratio. Is there a better solution?

(I couldn't believe how easy it was to write a capture program,
using soundcard.h and audiofile.h. The hardest part of the
program was generating the ASCII-art bar-graph level meters,
current time display, etc.)

Another quirk I observed with my homebuild capture program is the
sound card or driver seems to buffer the data in chunks of about
65KB. I read chunks of 4KB at a time from /dev/dsp, and I get
output in bursts of about 65KB at a time.

Thanks.

Robert Riches
richesr1@inetarena.com

_______________________________________________
Axp-list mailing list
Axp-list@redhat.com
https://listman.redhat.com/mailman/listinfo/axp-list



This archive was generated by hypermail version 2a22 on Sat Mar 3 12:54:54 2001 PST
Send any problems or questions about this archive to webmaster@alphalinux.org.