Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* soundcard input clipping
@ 2001-01-06  0:35 Robert M. Riches Jr.
  0 siblings, 0 replies; only message in thread
From: Robert M. Riches Jr. @ 2001-01-06  0:35 UTC (permalink / raw)
  To: axp-list

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




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-01-06  0:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-06  0:35 soundcard input clipping Robert M. Riches Jr.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox