From owner-freebsd-multimedia@FreeBSD.ORG Sun Mar 13 17:58:01 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 8DBD216A4CE for ; Sun, 13 Mar 2005 17:58:01 +0000 (GMT) Received: from trickle.cc.mcgill.ca (trickle.CC.McGill.CA [132.206.27.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF6E743D39 for ; Sun, 13 Mar 2005 17:58:00 +0000 (GMT) (envelope-from mat@cnd.mcgill.ca) Received: from mailscan5.CC.McGill.CA (mailscan5.CC.McGill.CA [132.216.77.252])j2DHve3S004482; Sun, 13 Mar 2005 12:57:45 -0500 (EST) Received: from cube.cnd.mcgill.ca (cube.CND.McGill.CA [132.216.25.196]) j2DHsrl0005123; Sun, 13 Mar 2005 12:54:54 -0500 Received: from localhost.localdomain (acid.cnd.mcgill.ca [132.216.11.151]) by cube.cnd.mcgill.ca (8.12.11/8.12.11) with ESMTP id j2DHvH19016695; Sun, 13 Mar 2005 12:57:18 -0500 Received: from localhost.localdomain (acid [127.0.0.1]) j2DHvHHn019456; Sun, 13 Mar 2005 12:57:17 -0500 Received: (from mat@localhost) by localhost.localdomain (8.12.11/8.12.11/Submit) id j2DHvEUu019455; Sun, 13 Mar 2005 12:57:14 -0500 Date: Sun, 13 Mar 2005 12:57:14 -0500 From: Mathew Kanner To: Alexander Leidinger Message-ID: <20050313175713.GI2944@cnd.mcgill.ca> References: <20050312010248.GG2944@cnd.mcgill.ca> <20050313.031425.343188571.kazuhito@ph.noda.tus.ac.jp> <20050312194401.GH2944@cnd.mcgill.ca> <20050313140222.92g1lfp60owcsw4o@netchild.homeip.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050313140222.92g1lfp60owcsw4o@netchild.homeip.net> User-Agent: Mutt/1.4.2i Organization: I speak for myself, operating in Montreal, CANADA cc: freebsd-multimedia@freebsd.org cc: Mathew Kanner Subject: Re: uaudio patch, capabilities 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: Sun, 13 Mar 2005 17:58:01 -0000 On Mar 13, Alexander Leidinger wrote: > Mathew Kanner wrote: > > >>I expected that only one sampling rate (when discrete) or > >>one sampling rate range (when continuous) must be set in caps. > >> > >>I guess that there are two solutions. > >>1) use only one sampling rate or rage, neglect others. > >>2) select one rate along a speed of a sound source > >> when the channel is initialized. > >> > >>When I challenged it slightly, I aimed at 2). > >>It had no problem that I changed the caps at ua_chan_init() in > >>uaudio_pcm.c. > > > > Hi, > > I'm not sure I know exaclty what you mean, but there were > > I think he means: > The audio device doesn't supports a range, it only supports discrete > sampling rates: 44100, 48000 and 96000. I'm not sure what the second > proposal is, but my proposal is (without looking at any code, since I don't > have much time ATM) to provide the posibility to specify multiple > capabilities. So if the device is able to 22500 and 48000 but not 44100, it > should have 2 discrete sampling rates set in the capabilities. Sadly this is what the channel interface returns: struct pcmchan_caps { u_int32_t minspeed, maxspeed; u_int32_t *fmtlist; u_int32_t caps; }; which maps to what OSS can get out of the IOCTL. One of the things fixed in the patch that we no support *not* switching to a speed if it is unsupported :) Applications are supposed to request a particular speed and see what they get. I can now run mplayer without extra options and it works. If only I could get sound recording to work with uaudio... --Mat