NetBSD Problem Report #16385

Received: (qmail 13306 invoked from network); 17 Apr 2002 03:31:33 -0000
Message-Id: <200204170331.g3H3VVc00515@miyuki.my.domain>
Date: Wed, 17 Apr 2002 12:31:31 +0900 (JST)
From: toshii@netbsd.org
Reply-To: toshii@netbsd.org
To: gnats-bugs@gnats.netbsd.org
Subject: recording on uaudio causes noise
X-Send-Pr-Version: 3.95

>Number:         16385
>Category:       kern
>Synopsis:       recording on uaudio causes noise
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 17 03:32:00 +0000 2002
>Closed-Date:    Sun Mar 30 04:48:47 +0000 2003
>Last-Modified:  Sun Mar 30 04:48:47 +0000 2003
>Originator:     IWAMOTO Toshihiro
>Release:        NetBSD 1.5ZC
>Organization:

>Environment:
System: NetBSD miyuki.my.domain 1.5ZC NetBSD 1.5ZC #67: Sat Apr 6 00:59:23 JST 2002
Architecture: i386
Machine: i386
>Description:
	Recording on uaudio causes noise.  I supppose this is due to
	rev. 1.54 of uaudio.c, but I don't have time to look at it.

	Another problem is that playing sound on the device switches
	it to monaural recording mode.

>How-To-Repeat:
	Use a Roland UA-3 (at /dev/sound1) with the following script.
	This causes impulse noises every 100~200 samples.

#!/bin/sh
audioctl -f /dev/audioctl1 -w record=8000,1,8,mulaw
audioctl -f /dev/audioctl1 -w record=44100,2,16,slinear play=44100,2,16,slinear
dev=/dev/sound1

l=$(($3*60*344))
dd if=$dev of=$2 count=$l

	To invoke the second problem, run the above script first and
	play some mp3 with madplay on the same device.
	Then running the recording script generates a monaural recording
	file.
>Fix:
	Unknown.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: kent 
State-Changed-When: Sat Apr 20 10:38:01 PDT 2002 
State-Changed-Why:  
Fixed in uaudio.c 1.59. 

From: IWAMOTO Toshihiro <iwamoto@sat.t.u-tokyo.ac.jp>
To: kent@netbsd.org
Cc: toshii@netbsd.org, kern-bug-people@netbsd.org,
	gnats-bugs@netbsd.org
Subject: Re: kern/16385
Date: Sun, 21 Apr 2002 19:53:23 +0900

 At 20 Apr 2002 17:39:28 -0000,
 kent@netbsd.org wrote:
 > 
 > Synopsis: recording on uaudio causes noise

 > State-Changed-Why: 
 > Fixed in uaudio.c 1.59.

 I confirmed the monaural mode problem has been fixed, but the noise
 problem isn't.

 Did you test recording?  Noise doesn't happen if no signal is supplied
 to the device.
 Is the UAUDIO_NFRAMES change related to this problem?

 --
 IWAMOTO Toshihiro

From: IWAMOTO Toshihiro <toshii@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: pr/16385 CVS commit: syssrc/sys/dev/usb
Date: Mon,  2 Dec 2002 04:36:15 +0200 (EET)

 Module Name:	syssrc
 Committed By:	toshii
 Date:		Mon Dec  2 02:36:15 UTC 2002

 Modified Files:
 	syssrc/sys/dev/usb: uaudio.c

 Log Message:
 Don't stuff extra data when we receive data less than expected.
 This situation is normal for asynchronous sources, and the byte stuffing
 algorithm used generates unpleasant noise.
 Also take care of scattered data buffer and do memcpy correctly.

 This should fix PR kern/16385.


 To generate a diff of this commit:
 cvs rdiff -r1.61 -r1.62 syssrc/sys/dev/usb/uaudio.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: feedback->closed 
State-Changed-By: toshii 
State-Changed-When: Sat Mar 29 20:47:48 PST 2003 
State-Changed-Why:  
All recording problems should have been fixed in rev. 1.65 of uaudio.c. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.