NetBSD Problem Report #48394

From www@NetBSD.org  Fri Nov 22 01:11:33 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 7874BA61B2
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 22 Nov 2013 01:11:33 +0000 (UTC)
Message-Id: <20131122011131.F0540A624E@mollari.NetBSD.org>
Date: Fri, 22 Nov 2013 01:11:31 +0000 (UTC)
From: nathanialsloss@yahoo.com.au
Reply-To: nathanialsloss@yahoo.com.au
To: gnats-bugs@NetBSD.org
Subject: uaudio trouble setting recording parameters sample rate etc.
X-Send-Pr-Version: www-1.0

>Number:         48394
>Category:       kern
>Synopsis:       uaudio trouble setting recording parameters sample rate etc.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 22 01:15:00 +0000 2013
>Closed-Date:    Mon Sep 22 14:28:01 +0000 2014
>Last-Modified:  Fri Sep 02 00:30:01 +0000 2016
>Originator:     Nat Sloss
>Release:        NetBSD 6.1.1
>Organization:
>Environment:
NetBSD beast 6.1.1_PATCH NetBSD 6.1.1_PATCH (PCIPAE) #22: Thu Nov 21 23:13:25 EST 2013  build@microrusty:/usr/src/sys/arch/i386/compile/obj/PCIPAE i386
>Description:
When using uaudio for recording attempt to set the sample rate ie:
audiorecord -F wav -d 'path to usb audio device' -e slinear -P 16 -s 44100 test.wav

You may find on playback that the audio is really high pitch and fast.
On my particular device (a webcam) there is only a microphone no playback facilities I am not sure if this makes this bug more prominent.

Looking through the source I found a refernce to pfill when setting up recording parameters, where I think it should be rfill.
>How-To-Repeat:
Refer to above.
>Fix:
Index: src/sys/dev/usb/uaudio.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/uaudio.c,v
retrieving revision 1.128
diff -u -r1.128 uaudio.c
--- src/sys/dev/usb/uaudio.c	23 Dec 2011 00:51:44 -0000	1.128
+++ src/sys/dev/usb/uaudio.c	22 Nov 2013 01:00:10 -0000
@@ -3085,7 +3085,7 @@
 		uaudio_chan_init(&sc->sc_playchan, paltidx, p, 0);
 	}
 	if ((setmode & AUMODE_RECORD)) {
-		p = rfil->req_size > 0 ? &pfil->filters[0].param : rec;
+		p = rfil->req_size > 0 ? &rfil->filters[0].param : rec;
 		/* XXX abort transfer if currently happening? */
 		uaudio_chan_init(&sc->sc_recchan, raltidx, p,
 		    UGETW(sc->sc_alts[raltidx].edesc->wMaxPacketSize));

Regards,

Nat.

PS:  I would like to request that NetBSD-6 be pulled up when a solution is found.

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: nat@NetBSD.org
State-Changed-When: Mon, 22 Sep 2014 14:28:01 +0000
State-Changed-Why:
Patch from PR applied.


From: "Nathanial Sloss" <nat@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/48394 CVS commit: src/sys/dev/usb
Date: Mon, 22 Sep 2014 14:25:33 +0000

 Module Name:	src
 Committed By:	nat
 Date:		Mon Sep 22 14:25:33 UTC 2014

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

 Log Message:
 Fix trouble setting recording parameters.

 Addresses PR 48394.

 This commit was approved by christos@


 To generate a diff of this commit:
 cvs rdiff -u -r1.139 -r1.140 src/sys/dev/usb/uaudio.c

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

From: ron@NetBSD.org
To: gnats-bugs@NetBSD.org
Cc: 
Subject: This may be a recursion of kern/48394 bug:  cannot set recording parameters / uaudio
Date: Fri,  2 Sep 2016 00:29:32 +0000 (UTC)

 >Submitter-Id:	net
 >Originator:	ron
 >Organization:	
 >Confidential:	no
 >Synopsis:	This may be a recursion of kern/48394 bug:  cannot set recording parameters / uaudio
 >Severity:	non-critical
 >Priority:	medium
 >Category:	kern
 >Class:		sw-bug
 >Release:	
 >Environment:	NetBSD 7 (raspberrypi) evbarm
 >Description:
 Using C-Media USB audio device, audio plays normally.

 "Play" settings can be set with audioctl, and are retained, but "record settings" are not kept:

 The command (audioctl -d /dev/audio1 -w record=44100,1,16,slinear_le) seems to work OK (no error). 

 But - a subsequent command issued: (audioctl -d /dev/audio1 -a) shows all the settings have retained original default values).


 >How-To-Repeat:
 Use C-Media USB audio device, and try to set the "record" settings with audioctl.


 >Fix:

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.