From owner-freebsd-multimedia@FreeBSD.ORG Wed Apr 27 08:14:03 2005 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 46B7616A4CE for ; Wed, 27 Apr 2005 08:14:03 +0000 (GMT) Received: from delight.idiom.com (delight.idiom.com [216.240.32.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0AB1D43D41 for ; Wed, 27 Apr 2005 08:14:03 +0000 (GMT) (envelope-from julian@elischer.org) Received: from idiom.com (idiom.com [216.240.32.1]) by delight.idiom.com (Postfix) with ESMTP id D0AB51F63C3; Wed, 27 Apr 2005 01:14:02 -0700 (PDT) Received: from [192.168.2.3] (home.elischer.org [216.240.48.38]) by idiom.com (8.12.11/8.12.11) with ESMTP id j3R8DuSp012374; Wed, 27 Apr 2005 01:13:56 -0700 (PDT) (envelope-from julian@elischer.org) Message-ID: <426F49C3.1020009@elischer.org> Date: Wed, 27 Apr 2005 01:13:55 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.7) Gecko/20050424 X-Accept-Language: en, hu MIME-Version: 1.0 To: Julian Elischer References: <20050306171027.GE4237@cnd.mcgill.ca> <20050306184416.5603976c@Magellan.Leidinger.net> <20050307030419.GC951@kt-is.co.kr> <20050308.121415.847025091.kazuhito@ph.noda.tus.ac.jp> <426F409D.6010007@elischer.org> <426F4280.9030206@elischer.org> In-Reply-To: <426F4280.9030206@elischer.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: FreeBSD Multimedia cc: Alexander@Leidinger.net cc: mat@cnd.mcgill.ca Subject: Re: uaudio patch, X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Apr 2005 08:14:03 -0000 Julian Elischer wrote: > Julian Elischer wrote: > >> Kazuhito HONDA wrote: >> >>> Hello, >>> >>> From: Pyun YongHyeon >>> Subject: Re: uaudio patch, configurable buffer size >>> Date: Mon, 7 Mar 2005 12:04:19 +0900 >>> >>> >>>> AFAIK, we already have format converter in kernel. >>>> See feeder_fmt.c. The converter detects differences between hardware >>>> capabilities and audio samples and automatically converts it(e.g. >>>> big endian <->little endian, mono <-> stereo, signed <-> unsigned, >>>> ulaw<->alow etc). >>> >>> >>> >>> >>> Ah, I haven't found it for a long time. I tried to change the caps >>> in uaudio_pcm.c, and a sampling rate can be converted correctly as >>> you wrote. >>> >>> I'll challenge to use this converter in uaudio, too. >>> If I or someone will succeed in it, I'll write to PR usb/78028 that >>> it should be closed except applied. >> >> >> >> while I closed this, I have sort of changed my mind.. >> this PR gives teh following result: >> >> At least they work and produce the following output: >> ---snip--- >> pcm0: at addr ? (1p/1r/0v channels duplex default) >> playback: 2ch, 16/16bit, pcm, 44100Hz >> playback: 2ch, 24/24bit, pcm, 44100Hz >> playback: 4ch, 16/16bit, pcm, 44100Hz >> playback: 4ch, 24/24bit, pcm, 44100Hz >> playback: 6ch, 16/16bit, pcm, 44100Hz >> playback: 6ch, 24/24bit, pcm, 44100Hz >> playback: 2ch, 16/16bit, pcm, 48000Hz >> playback: 2ch, 24/24bit, pcm, 48000Hz >> playback: 4ch, 16/16bit, pcm, 48000Hz >> playback: 4ch, 24/24bit, pcm, 48000Hz >> playback: 6ch, 16/16bit, pcm, 48000Hz >> playback: 6ch, 24/24bit, pcm, 48000Hz >> playback: 2ch, 16/16bit, pcm, 96000Hz >> playback: 2ch, 24/24bit, pcm, 96000Hz >> recording: 2ch, 16/16bit, pcm, 44100Hz >> recording: 2ch, 24/24bit, pcm, 44100Hz >> recording: 2ch, 16/16bit, pcm, 48000Hz >> recording: 2ch, 24/24bit, pcm, 48000Hz >> recording: 2ch, 16/16bit, pcm, 96000Hz >> recording: 2ch, 24/24bit, pcm, 96000Hz >> >> >> I think this information is important and not available anywhere else. >> >> I tried applying it but it didn't work on top of Matt's last patch. >> I'll have to try it with the unchanged version. > > > with uaudio out of -current I see: > pcm1: at addr ? (0p/1r/0v channels duplex) > recording: 1ch, 16/16bit, pcm, 44100Hz > recording: 1ch, 16/16bit, pcm, 22050Hz > recording: 1ch, 16/16bit, pcm, 11025Hz > recording: 1ch, 16/16bit, pcm, 8000Hz with a little change: # cat /dev/sndstat FreeBSD Audio Driver (newpcm) Installed devices: pcm0: port 0x1400-0x14ff irq 5 at device 8.0 on pci0 (4p/1r/0v channels duplex default) pcm1: at addr ? (0p/1r/0v channels duplex) mode 1:(recording) 1ch, 16/16bit, pcm, 44100Hz mode 2:(recording) 1ch, 16/16bit, pcm, 22050Hz mode 3:(recording) 1ch, 16/16bit, pcm, 11025Hz mode 4:(recording) 1ch, 16/16bit, pcm, 8000Hz is this worth commiting? and would "input" be better than "recording"? > > The question now is: > "How the heck to I select which one to use?" > > > > > > >> >> Matt can you make a version of this that works with your change? >> (I guess the fact that your patch stopped my mic. might have made this >> fail as well. maybe it still works but your patch is the problem... >> >> julian >>