Subject: kern/18066: Clicking noise when recording audio using autri driver
To: None <gnats-bugs@gnats.netbsd.org>
From: None <gson@gson.org>
List: netbsd-bugs
Date: 08/25/2002 14:07:30
>Number:         18066
>Category:       kern
>Synopsis:       Clicking noise when recording audio using autri driver
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 25 14:08:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Andreas Gustafsson
>Release:        NetBSD 1.6F
>Organization:
Speaking for myself.
>Environment:
System: NetBSD guam.araneus.fi 1.6F NetBSD 1.6F (GUAM) #0: Thu Aug 22 18:59:53 PDT 2002 gson@guava.araneus.fi:/usr/src/sys/arch/i386.sp/compile/GUAM i386
Architecture: i386
Machine: i386
>Description:

My Toshiba Libretto L2 laptop has audio hardware which probes as follows:

  autri0 at pci0 dev 6 function 0: Acer Labs M5451 AC-Link Controller Audio Device (rev. 0x01)
  autri0: interrupting at irq 10
  autri0: Asahi Kasei AK4543 codec; headphone, 18 bit DAC, 18 bit ADC, AKM 3D
  audio0 at autri0: full duplex, mmap, independent
  midi0 at autri0: 4DWAVE MIDI UART

When I record audio using the command

  audiorecord -c 1 -e linear -P 16 -s 48000 recording.wav

the audio in the resulting wav file is interrupted by loud clicks
several times a second.

By examining the wav file using WaveSurfer (now in pkgsrc as
audio/wavesurfer), I found that the clicks occur 2400 samples apart,
which corresponds to the block size of 4800 bytes reported by
audioctl.  Each click consists of four samples of signal from several
hundred milliseconds back, presumably from the previous cycle through
the circular recording buffer.  Note that since the clicks consist of
previously recorded signal, a recording of silence will not exhibit
audible clicks.

A waveform display of a typical click can be seen at
http://www.araneus.fi/gson/netbsd/bugs/autri-click/click.gif,
and the recording being displayed is at
http://www.araneus.fi/gson/netbsd/bugs/autri-click/recording.wav.
The test signal was a repeating 2-second logarithmic sweep from
20 Hz to 20 kHz.

>How-To-Repeat:

Connect an audio source to the input of sound hardware similar to the
above, record some audio using

  audiorecord -c 1 -e linear -P 16 -s 48000 recording.wav

and play back the resulting wav file.  Notice the clicks.

>Fix:

Not known.
>Release-Note:
>Audit-Trail:
>Unformatted: