From owner-freebsd-multimedia@FreeBSD.ORG Sun Mar 6 15:27:23 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 D956F16A4CE for ; Sun, 6 Mar 2005 15:27:23 +0000 (GMT) Received: from mailout06.sul.t-online.com (mailout06.sul.t-online.com [194.25.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5EDF943D48 for ; Sun, 6 Mar 2005 15:27:23 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from fwd27.aul.t-online.de by mailout06.sul.t-online.com with smtp id 1D7xf7-0005G8-03; Sun, 06 Mar 2005 16:27:21 +0100 Received: from Andro-Beta.Leidinger.net (VyP8csZaoe29rRcNgPwvJhFKT0H2GjHwZitSHwZXrYhh0uEvd3p60h@[84.128.202.132]) by fwd27.sul.t-online.de with esmtp id 1D7xer-1WC4h60; Sun, 6 Mar 2005 16:27:05 +0100 Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) j26FQ8Mc011467; Sun, 6 Mar 2005 16:26:08 +0100 (CET) (envelope-from Alexander@Leidinger.net) Date: Sun, 6 Mar 2005 16:28:11 +0100 From: Alexander Leidinger To: Mathew Kanner Message-ID: <20050306162811.694d9c82@Magellan.Leidinger.net> In-Reply-To: <20050305224005.GC4237@cnd.mcgill.ca> References: <20050305224005.GC4237@cnd.mcgill.ca> X-Mailer: Sylpheed-Claws 1.0.1 (GTK+ 1.2.10; i386-portbld-freebsd6.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-ID: VyP8csZaoe29rRcNgPwvJhFKT0H2GjHwZitSHwZXrYhh0uEvd3p60h@t-dialin.net X-TOI-MSGID: 13efeb96-1aba-4de2-bb72-aef4c0c1ba4d cc: freebsd-multimedia@freebsd.org Subject: Re: uaudio patch, configurable buffer size 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, 06 Mar 2005 15:27:24 -0000 On Sat, 5 Mar 2005 17:40:05 -0500 Mathew Kanner wrote: > Hi All, > I couldn't use my usb device because the default buffer size > (16*1024 bytes) was too much to be allocated (dma changes that > happened a while ago). The following is a patch to make it a tunable: > > http://www.cnd.mcgill.ca/~mat/uaudio-HEAD-buffersize-tunable.diff.gz There's an open PR about it. It changes the buffer size. AFAIR it also talks about changing the value of a parameter to a busdma call instead. I've patched the busdma call and now the device is detected here (but I don't hear any output...). I think you should add another set of validation code: The buffer size is divided by 2 in the code, so I think it should at least print a warning if "buffsize % 2 != 0". > Would love to hear if this works for anybody else, I haven't tried it yet, maybe I get time to test it in the next days. Can you also please have a look at PR usb/78028? It adds some info to /dev/sndstat. Bye, Alexander. -- To boldly go where I surely don't belong. http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7 From owner-freebsd-multimedia@FreeBSD.ORG Sun Mar 6 17:10:53 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 5CD5916A4CE for ; Sun, 6 Mar 2005 17:10:53 +0000 (GMT) Received: from deluge.cc.mcgill.ca (deluge.CC.McGill.CA [132.206.27.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE78C43D46 for ; Sun, 6 Mar 2005 17:10:52 +0000 (GMT) (envelope-from mat@cnd.mcgill.ca) Received: from mailscan3.cc.mcgill.ca (mailscan3.CC.McGill.CA [132.216.77.250]) by deluge.cc.mcgill.ca (8.12.11/8.12.3) with ESMTP id j26HAneK008267; Sun, 6 Mar 2005 12:10:49 -0500 (EST) Received: from cube.cnd.mcgill.ca (cube.CND.McGill.CA [132.216.25.196]) j26HATvO003355; Sun, 6 Mar 2005 12:10:30 -0500 (EST) 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 j26HATKq012622; Sun, 6 Mar 2005 12:10:29 -0500 Received: from localhost.localdomain (acid [127.0.0.1]) j26HATh2000806; Sun, 6 Mar 2005 12:10:29 -0500 Received: (from mat@localhost) by localhost.localdomain (8.12.11/8.12.11/Submit) id j26HARws000805; Sun, 6 Mar 2005 12:10:27 -0500 Date: Sun, 6 Mar 2005 12:10:27 -0500 From: Mathew Kanner To: Alexander Leidinger Message-ID: <20050306171027.GE4237@cnd.mcgill.ca> References: <20050305224005.GC4237@cnd.mcgill.ca> <20050306162811.694d9c82@Magellan.Leidinger.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050306162811.694d9c82@Magellan.Leidinger.net> User-Agent: Mutt/1.4.2i Organization: I speak for myself, operating in Montreal, CANADA cc: freebsd-multimedia@freebsd.org Subject: Re: uaudio patch, configurable buffer size 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, 06 Mar 2005 17:10:53 -0000 On Mar 06, Alexander Leidinger wrote: > On Sat, 5 Mar 2005 17:40:05 -0500 > Mathew Kanner wrote: > > > Hi All, > > I couldn't use my usb device because the default buffer size > > (16*1024 bytes) was too much to be allocated (dma changes that > > happened a while ago). The following is a patch to make it a tunable: > > > > http://www.cnd.mcgill.ca/~mat/uaudio-HEAD-buffersize-tunable.diff.gz > > There's an open PR about it. It changes the buffer size. AFAIR it also > talks about changing the value of a parameter to a busdma call instead. > I've patched the busdma call and now the device is detected here (but I > don't hear any output...). > > I think you should add another set of validation code: The buffer size > is divided by 2 in the code, so I think it should at least print a > warning if "buffsize % 2 != 0". ok, it now rejects odd sizes. > > > Would love to hear if this works for anybody else, > > I haven't tried it yet, maybe I get time to test it in the next days. > > Can you also please have a look at PR usb/78028? It adds some info to > /dev/sndstat. For now I don't object to his first try that always producing verbose output for format discovery. The second part that adds sndstd output I think is wrong as it duplicates sndstd itself (though a little prettier). However in the long term I don't think it's the right thing. The reason (I'm guessing) he wants the verbose output all the time is to be able to choose according the devices capabilities. The problem is we always reports supporting speeds in between [4000,48000], so for example on my device which only supports 48000hz, mplayer will happily try 44100hz and produce no output. Forcing resample to 48000 (mplayer -af resample=48000 ...) works. The situation is even worse in regards to reporting soft formats as you might not get a vote in what speed the hardware device gets set at. (All the same applies to formats as well). I tried to solve this once a while ago with less that perfect results, a better solution suddenly seems more obvious, which is to pass a blank pcm_caps to a new function uaudio_queury_formats. I'll see if I can come up with anything. Thanks, --Mat From owner-freebsd-multimedia@FreeBSD.ORG Sun Mar 6 17:43:27 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 E310F16A4CE for ; Sun, 6 Mar 2005 17:43:27 +0000 (GMT) Received: from mailout02.sul.t-online.com (mailout02.sul.t-online.com [194.25.134.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0FE9143D53 for ; Sun, 6 Mar 2005 17:43:27 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from fwd27.aul.t-online.de by mailout02.sul.t-online.com with smtp id 1D7zmo-0003an-01; Sun, 06 Mar 2005 18:43:26 +0100 Received: from Andro-Beta.Leidinger.net (GEeBosZ-YekZy81Lh0wXFLvW8I7nq9r+sn3EuGjExRxif+XOlTy5ZL@[84.128.202.132]) by fwd27.sul.t-online.de with esmtp id 1D7zmX-1atYXI0; Sun, 6 Mar 2005 18:43:09 +0100 Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) j26HgDtx030269; Sun, 6 Mar 2005 18:42:13 +0100 (CET) (envelope-from Alexander@Leidinger.net) Date: Sun, 6 Mar 2005 18:44:16 +0100 From: Alexander Leidinger To: Mathew Kanner Message-ID: <20050306184416.5603976c@Magellan.Leidinger.net> In-Reply-To: <20050306171027.GE4237@cnd.mcgill.ca> References: <20050305224005.GC4237@cnd.mcgill.ca> <20050306162811.694d9c82@Magellan.Leidinger.net> <20050306171027.GE4237@cnd.mcgill.ca> X-Mailer: Sylpheed-Claws 1.0.1 (GTK+ 1.2.10; i386-portbld-freebsd6.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-ID: GEeBosZ-YekZy81Lh0wXFLvW8I7nq9r+sn3EuGjExRxif+XOlTy5ZL@t-dialin.net X-TOI-MSGID: 24ebe20a-97a9-4c2f-a67f-ed446216c6c2 cc: freebsd-multimedia@freebsd.org Subject: Re: uaudio patch, configurable buffer size 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, 06 Mar 2005 17:43:28 -0000 On Sun, 6 Mar 2005 12:10:27 -0500 Mathew Kanner wrote: > > Can you also please have a look at PR usb/78028? It adds some info to > > /dev/sndstat. > > For now I don't object to his first try that always producing > verbose output for format discovery. The second part that adds sndstd I don't think we should clutter the boot process with this output. If it's interesting for someone, he shouldn't need to look at those messages. That's the reason I proposed to add the information to sndstat. > output I think is wrong as it duplicates sndstd itself (though a > little prettier). Do we have a way to extend sndstat? If not, we should add it, since a device may have to say something interesting about its capabilities (read: it would be nice if every device would tell the use about its capabilities in sndstat). > However in the long term I don't think it's the right thing. > The reason (I'm guessing) he wants the verbose output all the time is > to be able to choose according the devices capabilities. The problem > is we always reports supporting speeds in between [4000,48000], so for Why? > example on my device which only supports 48000hz, mplayer will happily > try 44100hz and produce no output. Forcing resample to 48000 (mplayer > -af resample=48000 ...) works. The situation is even worse in regards > to reporting soft formats as you might not get a vote in what speed > the hardware device gets set at. (All the same applies to formats as > well). So either we need a format converter in the kernel (looks ugly to me, it belongs IMHO into the userland, but NetBSD seems to have this possibility in the kernel), or we need to reject incompatible use. Bye, Alexander. -- To boldly go where I surely don't belong. http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7 From owner-freebsd-multimedia@FreeBSD.ORG Sun Mar 6 20:49:58 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 83DDE16A4CE for ; Sun, 6 Mar 2005 20:49:58 +0000 (GMT) Received: from trickle.cc.mcgill.ca (trickle.CC.McGill.CA [132.206.27.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1FBC143D55 for ; Sun, 6 Mar 2005 20:49:58 +0000 (GMT) (envelope-from mat@cnd.mcgill.ca) Received: from mailscan5.CC.McGill.CA (mailscan5.CC.McGill.CA [132.216.77.252])j26KnmOi026932; Sun, 6 Mar 2005 15:49:55 -0500 (EST) Received: from cube.cnd.mcgill.ca (cube.CND.McGill.CA [132.216.25.196]) j26KlOTV017994; Sun, 6 Mar 2005 15:47:24 -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 j26KnEBu013759; Sun, 6 Mar 2005 15:49:15 -0500 Received: from localhost.localdomain (acid [127.0.0.1]) j26KnEMM000853; Sun, 6 Mar 2005 15:49:14 -0500 Received: (from mat@localhost) by localhost.localdomain (8.12.11/8.12.11/Submit) id j26Kn8CK000852; Sun, 6 Mar 2005 15:49:08 -0500 Date: Sun, 6 Mar 2005 15:49:08 -0500 From: Mathew Kanner To: Alexander Leidinger Message-ID: <20050306204908.GF4237@cnd.mcgill.ca> References: <20050305224005.GC4237@cnd.mcgill.ca> <20050306162811.694d9c82@Magellan.Leidinger.net> <20050306171027.GE4237@cnd.mcgill.ca> <20050306184416.5603976c@Magellan.Leidinger.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050306184416.5603976c@Magellan.Leidinger.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, configurable buffer size 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, 06 Mar 2005 20:49:58 -0000 On Mar 06, Alexander Leidinger wrote: > On Sun, 6 Mar 2005 12:10:27 -0500 > Mathew Kanner wrote: > > > > Can you also please have a look at PR usb/78028? It adds some info to > > > /dev/sndstat. > > > > For now I don't object to his first try that always producing > > verbose output for format discovery. The second part that adds sndstd > > I don't think we should clutter the boot process with this output. If > it's interesting for someone, he shouldn't need to look at those > messages. That's the reason I proposed to add the information to > sndstat. > > > output I think is wrong as it duplicates sndstd itself (though a > > little prettier). > > Do we have a way to extend sndstat? If not, we should add it, since a > device may have to say something interesting about its capabilities > (read: it would be nice if every device would tell the use about its > capabilities in sndstat). > > > However in the long term I don't think it's the right thing. > > The reason (I'm guessing) he wants the verbose output all the time is > > to be able to choose according the devices capabilities. The problem > > is we always reports supporting speeds in between [4000,48000], so for > > Why? As I say below, he probably needs this because uaudio (the pcm bridge of it at least) wrongly reports it's capabilities. I would be that his first solution and second solution don't even yield the same results. > > > example on my device which only supports 48000hz, mplayer will happily > > try 44100hz and produce no output. Forcing resample to 48000 (mplayer > > -af resample=48000 ...) works. The situation is even worse in regards > > to reporting soft formats as you might not get a vote in what speed > > the hardware device gets set at. (All the same applies to formats as > > well). > > So either we need a format converter in the kernel (looks ugly to me, it > belongs IMHO into the userland, but NetBSD seems to have this > possibility in the kernel), or we need to reject incompatible use. It does belong is userland. We could get the same effect by having the something probe capabilities via ioctls but we need to fix the reporting of caps first. --Mat > > Bye, > Alexander. > > -- > To boldly go where I surely don't belong. > > http://www.Leidinger.net Alexander @ Leidinger.net > GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7 -- From owner-freebsd-multimedia@FreeBSD.ORG Mon Mar 7 02:58:10 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 BE25716A4CE for ; Mon, 7 Mar 2005 02:58:10 +0000 (GMT) Received: from ns.kt-is.co.kr (ns.kt-is.co.kr [211.218.149.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id 099D843D53 for ; Mon, 7 Mar 2005 02:58:10 +0000 (GMT) (envelope-from yongari@kt-is.co.kr) Received: from michelle.kt-is.co.kr (ns2.kt-is.co.kr [220.76.118.193]) (authenticated bits=128) by ns.kt-is.co.kr (8.12.10/8.12.10) with ESMTP id j272s9Ah001821 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 7 Mar 2005 11:54:10 +0900 (KST) Received: from michelle.kt-is.co.kr (localhost.kt-is.co.kr [127.0.0.1]) by michelle.kt-is.co.kr (8.13.1/8.13.1) with ESMTP id j272vp1G001046 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 7 Mar 2005 11:57:51 +0900 (KST) (envelope-from yongari@kt-is.co.kr) Received: (from yongari@localhost) by michelle.kt-is.co.kr (8.13.1/8.13.1/Submit) id j272vggI001045; Mon, 7 Mar 2005 11:57:42 +0900 (KST) (envelope-from yongari@kt-is.co.kr) Date: Mon, 7 Mar 2005 11:57:42 +0900 From: Pyun YongHyeon To: Mathew Kanner Message-ID: <20050307025742.GA951@kt-is.co.kr> References: <20050305224005.GC4237@cnd.mcgill.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050305224005.GC4237@cnd.mcgill.ca> User-Agent: Mutt/1.4.2.1i X-Filter-Version: 1.11a (ns.kt-is.co.kr) cc: freebsd-multimedia@freebsd.org Subject: Re: uaudio patch, configurable buffer size X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: yongari@kt-is.co.kr List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2005 02:58:10 -0000 On Sat, Mar 05, 2005 at 05:40:05PM -0500, Mathew Kanner wrote: > Hi All, > I couldn't use my usb device because the default buffer size > (16*1024 bytes) was too much to be allocated (dma changes that > happened a while ago). The following is a patch to make it a tunable: > > http://www.cnd.mcgill.ca/~mat/uaudio-HEAD-buffersize-tunable.diff.gz > Hi Mathew, I guess the real reason DMA buffer allocation failure comes from the fixed argument 0x3fff of bus_dma_tag_create(9). And if we allow TUNABLE for "hw.snd.uaudio.default_buffer_size" we should also update the argument of bus_dma_tag_create(9) too or we couldn't allocate larger buffer size than 16383(0x3fff). Another thing to note is that we are not allowed to use buffer size less than 4KB since we use bufsz = pcm_getbuffersize(dev, 4096, UAUDIO_PCM_BUFF_SIZE, 65536); in uaudio_pcm.c. So I think you should also reject size less than 4KB. -- Regards, Pyun YongHyeon http://www.kr.freebsd.org/~yongari | yongari@freebsd.org From owner-freebsd-multimedia@FreeBSD.ORG Mon Mar 7 02:59:57 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 987E116A4CE for ; Mon, 7 Mar 2005 02:59:57 +0000 (GMT) Received: from ns.kt-is.co.kr (ns.kt-is.co.kr [211.218.149.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0B93643D39 for ; Mon, 7 Mar 2005 02:59:57 +0000 (GMT) (envelope-from yongari@kt-is.co.kr) Received: from michelle.kt-is.co.kr (ns2.kt-is.co.kr [220.76.118.193]) (authenticated bits=128) by ns.kt-is.co.kr (8.12.10/8.12.10) with ESMTP id j272tqAh001980 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 7 Mar 2005 11:56:06 +0900 (KST) Received: from michelle.kt-is.co.kr (localhost.kt-is.co.kr [127.0.0.1]) by michelle.kt-is.co.kr (8.13.1/8.13.1) with ESMTP id j272xYOS001060 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 7 Mar 2005 11:59:34 +0900 (KST) (envelope-from yongari@kt-is.co.kr) Received: (from yongari@localhost) by michelle.kt-is.co.kr (8.13.1/8.13.1/Submit) id j272xRQ0001059; Mon, 7 Mar 2005 11:59:27 +0900 (KST) (envelope-from yongari@kt-is.co.kr) Date: Mon, 7 Mar 2005 11:59:27 +0900 From: Pyun YongHyeon To: Alexander Leidinger Message-ID: <20050307025927.GB951@kt-is.co.kr> References: <20050305224005.GC4237@cnd.mcgill.ca> <20050306162811.694d9c82@Magellan.Leidinger.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050306162811.694d9c82@Magellan.Leidinger.net> User-Agent: Mutt/1.4.2.1i X-Filter-Version: 1.11a (ns.kt-is.co.kr) cc: freebsd-multimedia@freebsd.org cc: Mathew Kanner Subject: Re: uaudio patch, configurable buffer size X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: yongari@kt-is.co.kr List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2005 02:59:57 -0000 On Sun, Mar 06, 2005 at 04:28:11PM +0100, Alexander Leidinger wrote: > On Sat, 5 Mar 2005 17:40:05 -0500 > Mathew Kanner wrote: > > > Hi All, > > I couldn't use my usb device because the default buffer size > > (16*1024 bytes) was too much to be allocated (dma changes that > > happened a while ago). The following is a patch to make it a tunable: > > > > http://www.cnd.mcgill.ca/~mat/uaudio-HEAD-buffersize-tunable.diff.gz > > There's an open PR about it. It changes the buffer size. AFAIR it also > talks about changing the value of a parameter to a busdma call instead. > I've patched the busdma call and now the device is detected here (but I > don't hear any output...). > > I think you should add another set of validation code: The buffer size > is divided by 2 in the code, so I think it should at least print a > warning if "buffsize % 2 != 0". > AFAIK no. The buffer size should be power of 2. See pcm_getbuffersize() in sound.c. -- Regards, Pyun YongHyeon http://www.kr.freebsd.org/~yongari | yongari@freebsd.org From owner-freebsd-multimedia@FreeBSD.ORG Mon Mar 7 03:04:25 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 2757B16A4CE for ; Mon, 7 Mar 2005 03:04:25 +0000 (GMT) Received: from ns.kt-is.co.kr (ns.kt-is.co.kr [211.218.149.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9039643D31 for ; Mon, 7 Mar 2005 03:04:24 +0000 (GMT) (envelope-from yongari@kt-is.co.kr) Received: from michelle.kt-is.co.kr (ns2.kt-is.co.kr [220.76.118.193]) (authenticated bits=128) by ns.kt-is.co.kr (8.12.10/8.12.10) with ESMTP id j2730aAh002297 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 7 Mar 2005 12:00:37 +0900 (KST) Received: from michelle.kt-is.co.kr (localhost.kt-is.co.kr [127.0.0.1]) by michelle.kt-is.co.kr (8.13.1/8.13.1) with ESMTP id j2734JXB001090 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 7 Mar 2005 12:04:19 +0900 (KST) (envelope-from yongari@kt-is.co.kr) Received: (from yongari@localhost) by michelle.kt-is.co.kr (8.13.1/8.13.1/Submit) id j2734J8n001089; Mon, 7 Mar 2005 12:04:19 +0900 (KST) (envelope-from yongari@kt-is.co.kr) Date: Mon, 7 Mar 2005 12:04:19 +0900 From: Pyun YongHyeon To: Alexander Leidinger Message-ID: <20050307030419.GC951@kt-is.co.kr> References: <20050305224005.GC4237@cnd.mcgill.ca> <20050306162811.694d9c82@Magellan.Leidinger.net> <20050306171027.GE4237@cnd.mcgill.ca> <20050306184416.5603976c@Magellan.Leidinger.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050306184416.5603976c@Magellan.Leidinger.net> User-Agent: Mutt/1.4.2.1i X-Filter-Version: 1.11a (ns.kt-is.co.kr) cc: freebsd-multimedia@freebsd.org cc: Mathew Kanner Subject: Re: uaudio patch, configurable buffer size X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: yongari@kt-is.co.kr List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2005 03:04:25 -0000 On Sun, Mar 06, 2005 at 06:44:16PM +0100, Alexander Leidinger wrote: > > So either we need a format converter in the kernel (looks ugly to me, it > belongs IMHO into the userland, but NetBSD seems to have this > possibility in the kernel), or we need to reject incompatible use. > 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). -- Regards, Pyun YongHyeon http://www.kr.freebsd.org/~yongari | yongari@freebsd.org From owner-freebsd-multimedia@FreeBSD.ORG Mon Mar 7 03:29:17 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 4DF0616A4CE for ; Mon, 7 Mar 2005 03:29:17 +0000 (GMT) Received: from deluge.cc.mcgill.ca (deluge.CC.McGill.CA [132.206.27.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7605B43D2D for ; Mon, 7 Mar 2005 03:29:16 +0000 (GMT) (envelope-from mat@cnd.mcgill.ca) Received: from mailscan1.cc.mcgill.ca (mailscan1.CC.McGill.CA [132.216.77.248]) by deluge.cc.mcgill.ca (8.12.11/8.12.3) with ESMTP id j273TC2M014804; Sun, 6 Mar 2005 22:29:14 -0500 (EST) Received: from cube.cnd.mcgill.ca (cube.CND.McGill.CA [132.216.25.196]) j273Shlw023030; Sun, 6 Mar 2005 22:28:44 -0500 (EST) 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 j273SNwc016037; Sun, 6 Mar 2005 22:28:24 -0500 Received: from localhost.localdomain (acid [127.0.0.1]) j273SNLr000957; Sun, 6 Mar 2005 22:28:23 -0500 Received: (from mat@localhost) by localhost.localdomain (8.12.11/8.12.11/Submit) id j273SNqV000956; Sun, 6 Mar 2005 22:28:23 -0500 Date: Sun, 6 Mar 2005 22:28:23 -0500 From: Mathew Kanner To: Pyun YongHyeon Message-ID: <20050307032823.GH4237@cnd.mcgill.ca> References: <20050305224005.GC4237@cnd.mcgill.ca> <20050306162811.694d9c82@Magellan.Leidinger.net> <20050307025927.GB951@kt-is.co.kr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050307025927.GB951@kt-is.co.kr> User-Agent: Mutt/1.4.2i Organization: I speak for myself, operating in Montreal, CANADA cc: freebsd-multimedia@freebsd.org cc: Alexander Leidinger cc: Mathew Kanner Subject: Re: uaudio patch, configurable buffer size 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: Mon, 07 Mar 2005 03:29:17 -0000 On Mar 06, Pyun YongHyeon wrote: > On Sun, Mar 06, 2005 at 04:28:11PM +0100, Alexander Leidinger wrote: > > On Sat, 5 Mar 2005 17:40:05 -0500 > > Mathew Kanner wrote: > > > > > Hi All, > > > I couldn't use my usb device because the default buffer size > > > (16*1024 bytes) was too much to be allocated (dma changes that > > > happened a while ago). The following is a patch to make it a tunable: > > > > > > http://www.cnd.mcgill.ca/~mat/uaudio-HEAD-buffersize-tunable.diff.gz > > > > There's an open PR about it. It changes the buffer size. AFAIR it also > > talks about changing the value of a parameter to a busdma call instead. > > I've patched the busdma call and now the device is detected here (but I > > don't hear any output...). > > > > I think you should add another set of validation code: The buffer size > > is divided by 2 in the code, so I think it should at least print a > > warning if "buffsize % 2 != 0". > > > > AFAIK no. The buffer size should be power of 2. > See pcm_getbuffersize() in sound.c. Hi Pyun, Darn, I totally forgot about the tunable in the form of hw.snd.pcm0.buffersize as is used in pcm_getbuffersize. This probably means that this patch isn't so necessary. Though there might be some value in having a tunable just for uaudio devices since we don't know the what pcm unit it will be before the devices comes (ok, they're seqeuential). Per your other e-mail, as present in the source, is having the default size of 16*1024 and doing bus_dma_tag_create with a maxsegz of 0x3fff (16*1024-1) a bug? --Mat From owner-freebsd-multimedia@FreeBSD.ORG Mon Mar 7 03:53:59 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 E5EC216A4CE for ; Mon, 7 Mar 2005 03:53:59 +0000 (GMT) Received: from ns.kt-is.co.kr (ns.kt-is.co.kr [211.218.149.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CAFE43D1F for ; Mon, 7 Mar 2005 03:53:59 +0000 (GMT) (envelope-from yongari@kt-is.co.kr) Received: from michelle.kt-is.co.kr (ns2.kt-is.co.kr [220.76.118.193]) (authenticated bits=128) by ns.kt-is.co.kr (8.12.10/8.12.10) with ESMTP id j273o9Ah005166 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 7 Mar 2005 12:50:09 +0900 (KST) Received: from michelle.kt-is.co.kr (localhost.kt-is.co.kr [127.0.0.1]) by michelle.kt-is.co.kr (8.13.1/8.13.1) with ESMTP id j273rqk4001273 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 7 Mar 2005 12:53:52 +0900 (KST) (envelope-from yongari@kt-is.co.kr) Received: (from yongari@localhost) by michelle.kt-is.co.kr (8.13.1/8.13.1/Submit) id j273rp1T001272; Mon, 7 Mar 2005 12:53:51 +0900 (KST) (envelope-from yongari@kt-is.co.kr) Date: Mon, 7 Mar 2005 12:53:51 +0900 From: Pyun YongHyeon To: Mathew Kanner Message-ID: <20050307035351.GD951@kt-is.co.kr> References: <20050305224005.GC4237@cnd.mcgill.ca> <20050306162811.694d9c82@Magellan.Leidinger.net> <20050307025927.GB951@kt-is.co.kr> <20050307032823.GH4237@cnd.mcgill.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050307032823.GH4237@cnd.mcgill.ca> User-Agent: Mutt/1.4.2.1i X-Filter-Version: 1.11a (ns.kt-is.co.kr) cc: freebsd-multimedia@freebsd.org cc: Alexander Leidinger Subject: Re: uaudio patch, configurable buffer size X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: yongari@kt-is.co.kr List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2005 03:54:00 -0000 On Sun, Mar 06, 2005 at 10:28:23PM -0500, Mathew Kanner wrote: [...] > Per your other e-mail, as present in the source, is having the > default size of 16*1024 and doing bus_dma_tag_create with a maxsegz of > 0x3fff (16*1024-1) a bug? I think so. I couldn't verify it since I don't have real hardware and don't know USB audio internals. But I believe almost all audio hardwares can transfer upto 64KB in a single DMA request. Many device drivers for PCI audio cards use 0x3ffff(256KB - 1). I don't know those hardwares can transfer upto that huge size and hardly believe this. But pcm(4) further restricts the buffer size to 64KB in pcm_getbuffersize and we created DMA tag with single segment, so it would be OK to use 0x3ffff. -- Regards, Pyun YongHyeon http://www.kr.freebsd.org/~yongari | yongari@freebsd.org From owner-freebsd-multimedia@FreeBSD.ORG Tue Mar 8 02:57:58 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 A626C16A4CE for ; Tue, 8 Mar 2005 02:57:58 +0000 (GMT) Received: from phws.ph.noda.tus.ac.jp (phws.ph.noda.tus.ac.jp [133.31.102.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C61E43D41 for ; Tue, 8 Mar 2005 02:57:58 +0000 (GMT) (envelope-from kazuhito@ph.noda.tus.ac.jp) Received: from localhost (unknown [133.31.111.131]) by phws.ph.noda.tus.ac.jp (Postfix) with ESMTP id 383634D80A3; Tue, 8 Mar 2005 11:57:56 +0900 (JST) Date: Tue, 08 Mar 2005 11:57:56 +0900 (JST) Message-Id: <20050308.115756.343099305.kazuhito@ph.noda.tus.ac.jp> To: mat@cnd.mcgill.ca From: Kazuhito HONDA In-Reply-To: <20050307032823.GH4237@cnd.mcgill.ca> References: <20050306162811.694d9c82@Magellan.Leidinger.net> <20050307025927.GB951@kt-is.co.kr> <20050307032823.GH4237@cnd.mcgill.ca> X-Mailer: Mew version 3.3 on XEmacs 21.5-b18 (chestnut) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-multimedia@freebsd.org cc: Alexander@Leidinger.net Subject: Re: uaudio patch, configurable buffer size 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: Tue, 08 Mar 2005 02:57:58 -0000 Hi, From: Mathew Kanner Subject: Re: uaudio patch, configurable buffer size Date: Sun, 6 Mar 2005 22:28:23 -0500 > Per your other e-mail, as present in the source, is having the > default size of 16*1024 and doing bus_dma_tag_create with a maxsegz of > 0x3fff (16*1024-1) a bug? I think so. please see PR kern/74893 and this: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=84345+0+archive/2005/freebsd-multimedia/20050206.freebsd-multimedia By the way, I agree with you on the tunable buffersize for USB audio. According to my experience, however, if the buffer size can't be divided by 4, left and right channels interchange for a stereo sound source. Regards, Kazuhito HONDA From owner-freebsd-multimedia@FreeBSD.ORG Tue Mar 8 03:14:17 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 3660A16A4CE for ; Tue, 8 Mar 2005 03:14:17 +0000 (GMT) Received: from phws.ph.noda.tus.ac.jp (phws.ph.noda.tus.ac.jp [133.31.102.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E5F343D1F for ; Tue, 8 Mar 2005 03:14:16 +0000 (GMT) (envelope-from kazuhito@ph.noda.tus.ac.jp) Received: from localhost (unknown [133.31.111.131]) by phws.ph.noda.tus.ac.jp (Postfix) with ESMTP id 4410F4D80A3; Tue, 8 Mar 2005 12:14:15 +0900 (JST) Date: Tue, 08 Mar 2005 12:14:15 +0900 (JST) Message-Id: <20050308.121415.847025091.kazuhito@ph.noda.tus.ac.jp> To: yongari@kt-is.co.kr From: Kazuhito HONDA In-Reply-To: <20050307030419.GC951@kt-is.co.kr> References: <20050306171027.GE4237@cnd.mcgill.ca> <20050306184416.5603976c@Magellan.Leidinger.net> <20050307030419.GC951@kt-is.co.kr> X-Mailer: Mew version 3.3 on XEmacs 21.5-b18 (chestnut) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-multimedia@freebsd.org cc: Alexander@Leidinger.net cc: mat@cnd.mcgill.ca Subject: Re: uaudio patch, configurable buffer size 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: Tue, 08 Mar 2005 03:14:17 -0000 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. regards, Kazuhito HONDA From owner-freebsd-multimedia@FreeBSD.ORG Tue Mar 8 06:48:31 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 82A0416A4CE for ; Tue, 8 Mar 2005 06:48:31 +0000 (GMT) Received: from phws.ph.noda.tus.ac.jp (phws.ph.noda.tus.ac.jp [133.31.102.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE90843D39 for ; Tue, 8 Mar 2005 06:48:30 +0000 (GMT) (envelope-from kazuhito@ph.noda.tus.ac.jp) Received: from localhost (unknown [133.31.111.131]) by phws.ph.noda.tus.ac.jp (Postfix) with ESMTP id 9E9E94D80A3; Tue, 8 Mar 2005 15:48:28 +0900 (JST) Date: Tue, 08 Mar 2005 15:48:28 +0900 (JST) Message-Id: <20050308.154828.963419604.kazuhito@ph.noda.tus.ac.jp> To: mat@cnd.mcgill.ca From: Kazuhito HONDA In-Reply-To: <20050306204908.GF4237@cnd.mcgill.ca> References: <20050306171027.GE4237@cnd.mcgill.ca> <20050306184416.5603976c@Magellan.Leidinger.net> <20050306204908.GF4237@cnd.mcgill.ca> X-Mailer: Mew version 3.3 on XEmacs 21.5-b18 (chestnut) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-multimedia@freebsd.org cc: Alexander@Leidinger.net Subject: Re: uaudio patch, configurable buffer size 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: Tue, 08 Mar 2005 06:48:31 -0000 Hello, `he' is me, isn't he? I haven't found that FreeBSD has the sampling rate converter. So I have made several ugly solutions for uaudio. But when uaudio can use the sampling rate converter, they should be canceled. regards, Kazuhito HONDA From owner-freebsd-multimedia@FreeBSD.ORG Tue Mar 8 11:21:26 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 D5B4F16A4CE for ; Tue, 8 Mar 2005 11:21:26 +0000 (GMT) Received: from mailout02.sul.t-online.com (mailout02.sul.t-online.com [194.25.134.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id D408943D62 for ; Tue, 8 Mar 2005 11:21:25 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from fwd32.aul.t-online.de by mailout02.sul.t-online.com with smtp id 1D8cmC-0003P9-02; Tue, 08 Mar 2005 12:21:24 +0100 Received: from Andro-Beta.Leidinger.net (GQHtE0ZareeG0nmX502SZ9caX16Z8oMIVCQFLDYml1UNKTzZ-7MpwI@[217.83.27.253]) by fwd32.sul.t-online.de with esmtp id 1D8cm3-0dW5lQ0; Tue, 8 Mar 2005 12:21:15 +0100 Received: from localhost (localhost [127.0.0.1])j28BKGc4085495; Tue, 8 Mar 2005 12:20:16 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from 141.113.101.32 ([141.113.101.32]) by netchild.homeip.net (Horde) with HTTP for ; Tue, 8 Mar 2005 12:20:16 +0100 Message-ID: <20050308122016.hhg424lmsgo8cs0k@netchild.homeip.net> X-Priority: 3 (Normal) Date: Tue, 8 Mar 2005 12:20:16 +0100 From: Alexander Leidinger To: Mathew Kanner References: <20050305224005.GC4237@cnd.mcgill.ca> <20050306162811.694d9c82@Magellan.Leidinger.net> <20050306171027.GE4237@cnd.mcgill.ca> <20050306184416.5603976c@Magellan.Leidinger.net> <20050306204908.GF4237@cnd.mcgill.ca> In-Reply-To: <20050306204908.GF4237@cnd.mcgill.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.0.2) / FreeBSD-4.11 X-ID: GQHtE0ZareeG0nmX502SZ9caX16Z8oMIVCQFLDYml1UNKTzZ-7MpwI@t-dialin.net X-TOI-MSGID: 252c0603-7ee9-403b-b34f-8a6151522cbd cc: freebsd-multimedia@freebsd.org Subject: Re: uaudio patch, configurable buffer size 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: Tue, 08 Mar 2005 11:21:26 -0000 Mathew Kanner wrote: > > > However in the long term I don't think it's the right thing. > > > The reason (I'm guessing) he wants the verbose output all the time is > > > to be able to choose according the devices capabilities. The problem > > > is we always reports supporting speeds in between [4000,48000], so for > > > Why? > > As I say below, he probably needs this because uaudio (the pcm > bridge of it at least) wrongly reports it's capabilities. I would be > that his first solution and second solution don't even yield the same > results. Sorry, my question was a bit short. I wasn't asking why he wants the verbose output (I talked with him about it previous to the submission of the PR), I wanted to know why we always report those speeds. uaudio doesn't converts the sampling rate, so it shouldn't be allowed to report those speeds. I try to have a look at the sound code (with doxygen; or if "The Design and Implementation of FreeBSD" contains an overview, I will read about it there). Feel free to point out better resources. Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 Jacquin's Postulate on Democratic Government: No man's life, liberty, or property are safe while the legislature is in session. From owner-freebsd-multimedia@FreeBSD.ORG Tue Mar 8 12:08:50 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 E916A16A4CE for ; Tue, 8 Mar 2005 12:08:50 +0000 (GMT) Received: from deluge.cc.mcgill.ca (deluge.CC.McGill.CA [132.206.27.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2DA1E43D46 for ; Tue, 8 Mar 2005 12:08:50 +0000 (GMT) (envelope-from mat@cnd.mcgill.ca) Received: from mailscan1.cc.mcgill.ca (mailscan1.CC.McGill.CA [132.216.77.248]) by deluge.cc.mcgill.ca (8.12.11/8.12.3) with ESMTP id j28C8mJR011171; Tue, 8 Mar 2005 07:08:49 -0500 (EST) Received: from cube.cnd.mcgill.ca (cube.CND.McGill.CA [132.216.25.196]) j28C8WK0004523; Tue, 8 Mar 2005 07:08:32 -0500 (EST) 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 j28C8MDE031594; Tue, 8 Mar 2005 07:08:22 -0500 Received: from localhost.localdomain (acid [127.0.0.1]) j28C8Mht005277; Tue, 8 Mar 2005 07:08:22 -0500 Received: (from mat@localhost) by localhost.localdomain (8.12.11/8.12.11/Submit) id j28C8KNc005276; Tue, 8 Mar 2005 07:08:20 -0500 Date: Tue, 8 Mar 2005 07:08:20 -0500 From: Mathew Kanner To: Kazuhito HONDA Message-ID: <20050308120820.GA2944@cnd.mcgill.ca> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050308.121415.847025091.kazuhito@ph.noda.tus.ac.jp> User-Agent: Mutt/1.4.2i Organization: I speak for myself, operating in Montreal, CANADA cc: freebsd-multimedia@freebsd.org cc: Alexander@Leidinger.net cc: mat@cnd.mcgill.ca Subject: Re: uaudio patch, configurable buffer size 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: Tue, 08 Mar 2005 12:08:51 -0000 On Mar 07, 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. Hi Kazuhito, Sorry about referring to you in the third person in other e-mails :) I'm presently working on moving the ua_playcaps and ua_reccaps into struct ua_info instead of global variables. You'll notice that we do a uaudio_query_formats, which should be at device attach and if we add a query for the min/max speed, it should be sufficient . I hope to have it done in few days but if you beet me to the punch we can commit it. --Mat > > 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. -- From owner-freebsd-multimedia@FreeBSD.ORG Tue Mar 8 12:37:48 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 D2F4016A4CE for ; Tue, 8 Mar 2005 12:37:48 +0000 (GMT) Received: from trickle.cc.mcgill.ca (trickle.CC.McGill.CA [132.206.27.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id 707AB43D2F for ; Tue, 8 Mar 2005 12:37:48 +0000 (GMT) (envelope-from mat@cnd.mcgill.ca) Received: from mailscan5.CC.McGill.CA (mailscan5.CC.McGill.CA [132.216.77.252])j28Cbbub006324; Tue, 8 Mar 2005 07:37:43 -0500 (EST) Received: from cube.cnd.mcgill.ca (cube.CND.McGill.CA [132.216.25.196]) j28CZ0pS005404; Tue, 8 Mar 2005 07:35:00 -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 j28Cb1Ta031810; Tue, 8 Mar 2005 07:37:01 -0500 Received: from localhost.localdomain (acid [127.0.0.1]) j28Cb19T005284; Tue, 8 Mar 2005 07:37:01 -0500 Received: (from mat@localhost) by localhost.localdomain (8.12.11/8.12.11/Submit) id j28Cb0CQ005283; Tue, 8 Mar 2005 07:37:00 -0500 Date: Tue, 8 Mar 2005 07:37:00 -0500 From: Mathew Kanner To: Kazuhito HONDA Message-ID: <20050308123700.GB2944@cnd.mcgill.ca> References: <20050306171027.GE4237@cnd.mcgill.ca> <20050306184416.5603976c@Magellan.Leidinger.net> <20050306204908.GF4237@cnd.mcgill.ca> <20050308.154828.963419604.kazuhito@ph.noda.tus.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050308.154828.963419604.kazuhito@ph.noda.tus.ac.jp> User-Agent: Mutt/1.4.2i Organization: I speak for myself, operating in Montreal, CANADA cc: freebsd-multimedia@freebsd.org cc: Alexander@Leidinger.net cc: mat@cnd.mcgill.ca Subject: Re: uaudio patch, configurable buffer size 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: Tue, 08 Mar 2005 12:37:48 -0000 On Mar 08, Kazuhito HONDA wrote: > Hello, > > `he' is me, isn't he? > > I haven't found that FreeBSD has the sampling rate converter. > So I have made several ugly solutions for uaudio. > But when uaudio can use the sampling rate converter, > they should be canceled. Hi Kazuhito, FreeBSD does have a format/sample rate converter in the kernel, refer to hw.snd.report_soft_formats in the snd(4). However, it won't work with uaudio until we probe the capabilities properly. See my other e-mail to you a couple of minutes ago. --Mat From owner-freebsd-multimedia@FreeBSD.ORG Tue Mar 8 20:45:57 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 6F2DE16A4CE for ; Tue, 8 Mar 2005 20:45:57 +0000 (GMT) Received: from dutch10.digitalus.nl (dutch10.digitalus.nl [81.173.33.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id B044D43D31 for ; Tue, 8 Mar 2005 20:45:56 +0000 (GMT) (envelope-from webmaster@shizukana.net) Received: from www.shizukana.net (localhost.localdomain [127.0.0.1]) by dutch10.digitalus.nl (8.12.10/8.12.10) with ESMTP id j28Kjo0g021861 for ; Tue, 8 Mar 2005 21:45:50 +0100 Received: from 84.26.82.135 (SquirrelMail authenticated user webmaster@shizukana.net); by www.shizukana.net with HTTP; Tue, 8 Mar 2005 21:45:50 +0100 (CET) Message-ID: <57337.84.26.82.135.1110314750.squirrel@84.26.82.135> Date: Tue, 8 Mar 2005 21:45:50 +0100 (CET) From: "Webmaster Shizukana.net" To: freebsd-multimedia@freebsd.org User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: SiS7012 AC'97 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: Tue, 08 Mar 2005 20:45:57 -0000 Hi, A friend of mines have a problem with setting up her sound under FreeBSD 5.3-Release She has a SiS 7012 Audio Accelerator (onboard soundcard) and if she makes a new kernel with the lines: device sound device "snd_ich" and she compile & run the kernel. the soundcard will be found, but after she starts X she hears the start sound of KDE but then she doesn't have sound, if she plays mp3's or does Test sound under KDE Control Center (at sound and multimedia) she doesn't hear that either now she compilled a new kernel with only device sound and put the lines snd_ich_load="YES" in /boot/loader.conf it wont be loaded after looking in some mails from the mailinglists i found out to put sound_load="YES" snd_driver_load="YES" hw.snd.maxautovchans=4 in the /boot/loader.conf now she has the same problem like before she hears the sound when she start X with kde and then the sound doesn't work anymore can anybody help her? please? thanks Nexohrion From owner-freebsd-multimedia@FreeBSD.ORG Tue Mar 8 21:10:32 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 699F116A4CE for ; Tue, 8 Mar 2005 21:10:32 +0000 (GMT) Received: from post.its.mcw.edu (post.its.mcw.edu [141.106.32.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 87C4543D55 for ; Tue, 8 Mar 2005 21:10:31 +0000 (GMT) (envelope-from sidabraj@nsgcorp.net) Received: from [141.106.202.124] (net-202-124.dhcp.mcw.edu [141.106.202.124]) by post.its.mcw.edu (8.11.6+Sun/8.11.4) with ESMTP id j28LATT10313 for ; Tue, 8 Mar 2005 15:10:30 -0600 (CST) Message-ID: <422E1338.7030907@nsgcorp.net> Date: Tue, 08 Mar 2005 15:03:52 -0600 From: Jason Sidabras User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-multimedia@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Mark of the Unicorn - Firewire 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: Tue, 08 Mar 2005 21:10:32 -0000 Has anyone gotten any Mark of the Unicorn firewire systems working in freebsd? I am not sure of the chipset and googling had no relavent results. Thanks, Jason From owner-freebsd-multimedia@FreeBSD.ORG Tue Mar 8 22:11:44 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 D241416A4CE for ; Tue, 8 Mar 2005 22:11:44 +0000 (GMT) Received: from mail.gmx.net (pop.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id AD3D643D46 for ; Tue, 8 Mar 2005 22:11:43 +0000 (GMT) (envelope-from michaelnottebrock@gmx.net) Received: (qmail invoked by alias); 08 Mar 2005 22:11:42 -0000 Received: from p508BD0D1.dip.t-dialin.net (EHLO lofi.dyndns.org) (80.139.208.209) by mail.gmx.net (mp010) with SMTP; 08 Mar 2005 23:11:42 +0100 X-Authenticated: #443188 Received: from kiste.my.domain (lofi@kiste.my.domain [192.168.8.4]) (authenticated bits=0) by lofi.dyndns.org (8.12.10/8.12.10) with ESMTP id j28MBcmb098994 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Tue, 8 Mar 2005 23:11:39 +0100 (CET) (envelope-from michaelnottebrock@gmx.net) From: Michael Nottebrock To: freebsd-multimedia@freebsd.org Date: Tue, 8 Mar 2005 23:11:34 +0100 User-Agent: KMail/1.7.2 References: <57337.84.26.82.135.1110314750.squirrel@84.26.82.135> In-Reply-To: <57337.84.26.82.135.1110314750.squirrel@84.26.82.135> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart58440080.B3ysQIYxVe"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200503082311.38091.michaelnottebrock@gmx.net> X-Virus-Scanned: by amavisd-new X-Y-GMX-Trusted: 0 Subject: Re: SiS7012 AC'97 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: Tue, 08 Mar 2005 22:11:44 -0000 --nextPart58440080.B3ysQIYxVe Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday, 8. March 2005 21:45, Webmaster Shizukana.net wrote: > she hears the sound when she start X with kde and then the sound doesn't > work anymore Make sure the volume is still turned up in the mixer after loading KDE. Run= =20 kmix (part of the kdemultimedia port/package) and adjust the volumes. Leave= =20 it running when exiting KDE and it will be automatically launched on startu= p=20 and restore the correct volumes (closing the window will leave it iconified= =20 in the systray). =2D-=20 ,_, | Michael Nottebrock | lofi@freebsd.org (/^ ^\) | FreeBSD - The Power to Serve | http://www.freebsd.org \u/ | K Desktop Environment on FreeBSD | http://freebsd.kde.org --nextPart58440080.B3ysQIYxVe Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQBCLiMaXhc68WspdLARAlenAJ9324TF9PFrKTFUlzbH8OY9jsLy+QCcDJh1 QDF9OtqGs+XPzRcl5xgMA04= =/JgL -----END PGP SIGNATURE----- --nextPart58440080.B3ysQIYxVe-- From owner-freebsd-multimedia@FreeBSD.ORG Tue Mar 8 22:35:29 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 648BD16A4CE for ; Tue, 8 Mar 2005 22:35:29 +0000 (GMT) Received: from dutch10.digitalus.nl (dutch10.digitalus.nl [81.173.33.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5DE5843D54 for ; Tue, 8 Mar 2005 22:35:28 +0000 (GMT) (envelope-from webmaster@shizukana.net) Received: from www.shizukana.net (localhost.localdomain [127.0.0.1]) j28MZL0g001789; Tue, 8 Mar 2005 23:35:21 +0100 Received: from 84.26.82.135 (SquirrelMail authenticated user webmaster@shizukana.net); by www.shizukana.net with HTTP; Tue, 8 Mar 2005 23:35:21 +0100 (CET) Message-ID: <58281.84.26.82.135.1110321321.squirrel@84.26.82.135> In-Reply-To: <200503082311.38091.michaelnottebrock@gmx.net> References: <57337.84.26.82.135.1110314750.squirrel@84.26.82.135> <200503082311.38091.michaelnottebrock@gmx.net> Date: Tue, 8 Mar 2005 23:35:21 +0100 (CET) From: "Webmaster Shizukana.net" To: freebsd-multimedia@freebsd.org, webmaster@shizukana.net User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: SiS7012 AC'97 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: Tue, 08 Mar 2005 22:35:29 -0000 The user " Michael Nottebrock" wrote this strange object...: > On Tuesday, 8. March 2005 21:45, Webmaster Shizukana.net wrote: > >> she hears the sound when she start X with kde and then the sound doesn't >> work anymore > > Make sure the volume is still turned up in the mixer after loading KDE. > Run > kmix (part of the kdemultimedia port/package) and adjust the volumes. > Leave She already tried, but everything seemed ok I forgot the commando but found it somewhere else in the mailing list, to check /dev/mixer but everything looks ok. also she have tried to patch it with http://staff.mybsd.org.my/skywizard/FreeBSD/ac97.c.diff but same result it just shuts up are there something wrong with the drivers ? From owner-freebsd-multimedia@FreeBSD.ORG Tue Mar 8 22:47:07 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 94A2516A4CE for ; Tue, 8 Mar 2005 22:47:07 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B90943D2F for ; Tue, 8 Mar 2005 22:47:07 +0000 (GMT) (envelope-from normal1.lists@gmail.com) Received: by wproxy.gmail.com with SMTP id 67so66311wri for ; Tue, 08 Mar 2005 14:47:06 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=fBIkUqSvdrlgywiW/uq25P5bIJPZNk2x89G7kzwuSdV9qaUnc1ad5tkmHfTWAsYFw6FRtDMwZYaNQG5zeJ89qDaACPjaKMZEUzzmWO8OXYkibeybJa2YPglavLgOja9FaOEI93sjfz9DZuXAhWFXUKEOBU/Lb0fOeK8vIXwnJ40= Received: by 10.54.4.8 with SMTP id 8mr259352wrd; Tue, 08 Mar 2005 14:47:06 -0800 (PST) Received: by 10.54.2.45 with HTTP; Tue, 8 Mar 2005 14:47:06 -0800 (PST) Message-ID: Date: Tue, 8 Mar 2005 22:47:06 +0000 From: gabriel To: freebsd-multimedia@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: TV Tuner and FXTV(?) X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: gabriel List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2005 22:47:07 -0000 Okay, so here's my dilemma, or rather big problem. I have a TV tuner card which when installed is recognized by the system and I've installed FXTV Which when executed displays a beautifully crisp and colorful tv image, however, there is no sound to be heard. XMMS plays just fine which narrows down a couple of components which make sound work (drivers.. speakers.. you get the idea) so I'm wondering, does anyone have any clues or ideas that may help in at least troubleshooting this? Here's the dmesg output: bktr0: mem 0xef002000-0xef002fff irq 10 at device 12.0 on pci0 bktr0: IMS TV Turbo, Philips FR1236 NTSC FM tuner. Please help! Cheers! -- gabriel, Member of: FreeBSD-Announce FreeBSD-Hardware FreeBSD-Multimedia FreeBSD-questions From owner-freebsd-multimedia@FreeBSD.ORG Tue Mar 8 23:09:20 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 CE8D516A4CE for ; Tue, 8 Mar 2005 23:09:20 +0000 (GMT) Received: from web41201.mail.yahoo.com (web41201.mail.yahoo.com [66.218.93.34]) by mx1.FreeBSD.org (Postfix) with SMTP id 992A143D2F for ; Tue, 8 Mar 2005 23:09:20 +0000 (GMT) (envelope-from arne_woerner@yahoo.com) Received: (qmail 91354 invoked by uid 60001); 8 Mar 2005 23:09:20 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=nmOCWJ+eKoo88tqpcg1wN//+Zzx6gcuddGbg+dUSP+Yd467L6xaZrBxqvb/FR+7meX9tk5KN7BwnZCd+nr84wuHLPjOlnO+NMBMLek6x4RpGLnDLn3XkdNZZ7n7CZowYsmbzaDTGoLNa6Mc93Fb5U/V24/yNEyhvZrSmhPcX5OM= ; Message-ID: <20050308230920.91352.qmail@web41201.mail.yahoo.com> Received: from [83.129.168.172] by web41201.mail.yahoo.com via HTTP; Tue, 08 Mar 2005 15:09:20 PST Date: Tue, 8 Mar 2005 15:09:20 -0800 (PST) From: Arne "Wörner" To: gabriel , freebsd-multimedia@freebsd.org In-Reply-To: 6667 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: TV Tuner and FXTV(?) 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: Tue, 08 Mar 2005 23:09:20 -0000 --- gabriel wrote: > [...] work (drivers.. speakers.. you get the idea) so I'm > wondering, does anyone have any clues or ideas that may > help in at least troubleshooting this? > Do you know how your TV card delivers the sound? (a) analogously via a little cable from the TV card to the sound card? (b) digitally? I had the same symptoms, when I misconfigured the mixer values (mixer(8)), so that the line/cd source was muted (0:0). I have no further ideas in this case. -Arne __________________________________ Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web http://birthday.yahoo.com/netrospective/ From owner-freebsd-multimedia@FreeBSD.ORG Tue Mar 8 23:11:29 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 DE35916A4CE for ; Tue, 8 Mar 2005 23:11:29 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 437A343D31 for ; Tue, 8 Mar 2005 23:11:29 +0000 (GMT) (envelope-from normal1.lists@gmail.com) Received: by wproxy.gmail.com with SMTP id 37so50905wra for ; Tue, 08 Mar 2005 15:11:28 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=lTIyJiFlSuosl8Byzy7On4K7QYKy2PfYHmJN+/f9naKpR/7VAOhNbXBCZXAWfA46q0qNi+PpSt1TT8gNAgwT9etLbAJ1Z6BKuuOdp8KoA2KDzo5pGtL3UBR45tLc0+/cBqq0YC2Me8NekvTiWNKH8fQcjLDW4zv2OBU3n9fVBII= Received: by 10.54.34.28 with SMTP id h28mr274123wrh; Tue, 08 Mar 2005 15:11:28 -0800 (PST) Received: by 10.54.2.45 with HTTP; Tue, 8 Mar 2005 15:11:28 -0800 (PST) Message-ID: Date: Tue, 8 Mar 2005 23:11:28 +0000 From: gabriel To: =?ISO-8859-1?Q?Arne_W=F6rner?= In-Reply-To: <20050308230920.91352.qmail@web41201.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable References: <20050308230920.91352.qmail@web41201.mail.yahoo.com> cc: freebsd-multimedia@freebsd.org Subject: Re: TV Tuner and FXTV(?) X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: gabriel List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2005 23:11:30 -0000 I dont really know, but I think I'm gonna need that little cable. There are two jumper places one is labeled "CD IN" and another one beside it says "CD OUT" so I guess something goes there? *sigh* On Tue, 8 Mar 2005 15:09:20 -0800 (PST), Arne W=F6rner wrote: > --- gabriel wrote: > > [...] work (drivers.. speakers.. you get the idea) so I'm > > wondering, does anyone have any clues or ideas that may > > help in at least troubleshooting this? > > > Do you know how your TV card delivers the sound? > (a) analogously via a little cable from the TV card to the sound > card? > (b) digitally? >=20 > I had the same symptoms, when I misconfigured the mixer values > (mixer(8)), so that the line/cd source was muted (0:0). >=20 > I have no further ideas in this case. >=20 > -Arne >=20 >=20 > __________________________________ > Celebrate Yahoo!'s 10th Birthday! > Yahoo! Netrospective: 100 Moments of the Web > http://birthday.yahoo.com/netrospective/ >=20 --=20 gabriel, Member of: FreeBSD-Announce FreeBSD-Hardware FreeBSD-Multimedia FreeBSD-questions From owner-freebsd-multimedia@FreeBSD.ORG Wed Mar 9 00:34:51 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 8A07C16A4CE for ; Wed, 9 Mar 2005 00:34:51 +0000 (GMT) Received: from blackwater.lemis.com (wantadilla.lemis.com [192.109.197.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6643143D46 for ; Wed, 9 Mar 2005 00:34:50 +0000 (GMT) (envelope-from grog@lemis.com) Received: by blackwater.lemis.com (Postfix, from userid 1004) id CBC1085688; Wed, 9 Mar 2005 11:04:47 +1030 (CST) Date: Wed, 9 Mar 2005 11:04:47 +1030 From: Greg 'groggy' Lehey To: gabriel Message-ID: <20050309003447.GY67848@wantadilla.lemis.com> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="b/1sb/HZzV9blKCG" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 cc: freebsd-multimedia@freebsd.org Subject: Re: TV Tuner and FXTV(?) 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, 09 Mar 2005 00:34:51 -0000 --b/1sb/HZzV9blKCG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tuesday, 8 March 2005 at 22:47:06 +0000, gabriel wrote: > Okay, so here's my dilemma, or rather big problem. I have a TV tuner > card which when installed is recognized by the system and I've > installed FXTV Which when executed displays a beautifully crisp and > colorful tv image, however, there is no sound to be heard. XMMS plays > just fine which narrows down a couple of components which make sound > work (drivers.. speakers.. you get the idea) so I'm wondering, does > anyone have any clues or ideas that may help in at least > troubleshooting this? Do you have any sound at all? It could be that the sound drivers aren't loaded. Greg -- See complete headers for address and phone numbers. --b/1sb/HZzV9blKCG Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFCLkSnIubykFB6QiMRAlrXAJ4yEip3pN2eyA6nqwWRXHKPC9gGIwCeJ+/J jxe4PaQxd5oDE1IZ4sTIuZY= =AciH -----END PGP SIGNATURE----- --b/1sb/HZzV9blKCG-- From owner-freebsd-multimedia@FreeBSD.ORG Wed Mar 9 03:43:54 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 2B78C16A4CE for ; Wed, 9 Mar 2005 03:43:54 +0000 (GMT) Received: from ns.kt-is.co.kr (ns.kt-is.co.kr [211.218.149.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id 61ED843D2D for ; Wed, 9 Mar 2005 03:43:53 +0000 (GMT) (envelope-from yongari@kt-is.co.kr) Received: from michelle.kt-is.co.kr (ns2.kt-is.co.kr [220.76.118.193]) (authenticated bits=128) by ns.kt-is.co.kr (8.12.10/8.12.10) with ESMTP id j293hZAh009558 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 9 Mar 2005 12:43:36 +0900 (KST) Received: from michelle.kt-is.co.kr (localhost.kt-is.co.kr [127.0.0.1]) by michelle.kt-is.co.kr (8.13.1/8.13.1) with ESMTP id j293haJK008791 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 9 Mar 2005 12:43:36 +0900 (KST) (envelope-from yongari@kt-is.co.kr) Received: (from yongari@localhost) by michelle.kt-is.co.kr (8.13.1/8.13.1/Submit) id j293hMbX008789; Wed, 9 Mar 2005 12:43:22 +0900 (KST) (envelope-from yongari@kt-is.co.kr) Date: Wed, 9 Mar 2005 12:43:22 +0900 From: Pyun YongHyeon To: Mathew Kanner Message-ID: <20050309034322.GC8398@kt-is.co.kr> References: <20050306171027.GE4237@cnd.mcgill.ca> <20050306184416.5603976c@Magellan.Leidinger.net> <20050306204908.GF4237@cnd.mcgill.ca> <20050308.154828.963419604.kazuhito@ph.noda.tus.ac.jp> <20050308123700.GB2944@cnd.mcgill.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050308123700.GB2944@cnd.mcgill.ca> User-Agent: Mutt/1.4.2.1i X-Filter-Version: 1.11a (ns.kt-is.co.kr) cc: freebsd-multimedia@freebsd.org cc: Alexander@Leidinger.net Subject: Re: uaudio patch, configurable buffer size X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: yongari@kt-is.co.kr List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Mar 2005 03:43:54 -0000 On Tue, Mar 08, 2005 at 07:37:00AM -0500, Mathew Kanner wrote: > On Mar 08, Kazuhito HONDA wrote: > > Hello, > > > > `he' is me, isn't he? > > > > I haven't found that FreeBSD has the sampling rate converter. > > So I have made several ugly solutions for uaudio. > > But when uaudio can use the sampling rate converter, > > they should be canceled. > > Hi Kazuhito, > FreeBSD does have a format/sample rate converter in the > kernel, refer to hw.snd.report_soft_formats in the snd(4). However, I believe the kernel format converter should be used in the last resort. The conversion consumes extra CPU cycles in kernel and it would generate "audio hiccups" under high network or disk I/Os. Accessing hardware buffer in kernel needs a Giant lock or device supplied lock and the conversion needs manipulations of every bytes of audio streams. Also audio application could be fooled with hw.snd.report_soft_formats and the application will think that the hardware supports almost every format. That would impose unnecessary burden on pcm(4). There are some comments in OSS Programmer's Guide too.(See page 31.) > it won't work with uaudio until we probe the capabilities properly. Yes. Reporting correct hardware capabilities is prerequisit to correct operation of audio hardware. > See my other e-mail to you a couple of minutes ago. > --Mat -- Regards, Pyun YongHyeon http://www.kr.freebsd.org/~yongari | yongari@freebsd.org From owner-freebsd-multimedia@FreeBSD.ORG Wed Mar 9 06:03:11 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 8C03D16A4CE for ; Wed, 9 Mar 2005 06:03:11 +0000 (GMT) Received: from mx2.mail.ru (mx2.mail.ru [194.67.23.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3DFBB43D5C for ; Wed, 9 Mar 2005 06:03:11 +0000 (GMT) (envelope-from samspeedu@mail.ru) Received: from [213.129.119.20] (port=1309 helo=192.168.3.7) by mx2.mail.ru with esmtp id 1D8uHl-0004uf-00 for freebsd-multimedia@freebsd.org; Wed, 09 Mar 2005 09:03:09 +0300 Date: Wed, 9 Mar 2005 08:59:51 +0300 From: Andrey Smagin X-Mailer: The Bat! (v1.62r) Organization: DiP X-Priority: 3 (Normal) Message-ID: <631978394.20050309085951@mail.ru> To: freebsd-multimedia@freebsd.org In-Reply-To: <58281.84.26.82.135.1110321321.squirrel@84.26.82.135> References: <57337.84.26.82.135.1110314750.squirrel@84.26.82.135> <200503082311.38091.michaelnottebrock@gmx.net> <58281.84.26.82.135.1110321321.squirrel@84.26.82.135> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam: Not detected Subject: Re[2]: SiS7012 AC'97 X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: SAMU List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Mar 2005 06:03:11 -0000 Try add virtual channels in device (example sysctl hw.pcm0.vchans=32), and more global virtual channels - 32 or 64. I have integrated SiS7012 on my motherboard and had same problem before. -- Best regards, Andrey mailto:samspeedu@mail.ru From owner-freebsd-multimedia@FreeBSD.ORG Wed Mar 9 07:32:50 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 2DBC216A4CE; Wed, 9 Mar 2005 07:32:50 +0000 (GMT) Received: from sark4.cc.gatech.edu (sark4.cc.gatech.edu [130.207.7.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D7D743D31; Wed, 9 Mar 2005 07:32:49 +0000 (GMT) (envelope-from jasonh@cc.gatech.edu) Received: from siwenna.cc.gatech.edu (siwenna.cc.gatech.edu [130.207.7.232]) by sark4.cc.gatech.edu (8.12.10/8.12.8) with ESMTP id j297Wmx5028661; Wed, 9 Mar 2005 02:32:48 -0500 (EST) Received: (from www@localhost) by siwenna.cc.gatech.edu (8.12.10/8.12.8) id j297Wmxx015932; Wed, 9 Mar 2005 02:32:48 -0500 (EST) X-Authentication-Warning: siwenna.cc.gatech.edu: www set sender to jasonh@cc.gatech.edu using -f Received: from cpe-24-27-59-14.austin.res.rr.com ([24.27.59.14]) (SquirrelMail authenticated user jasonh); by webmail.cc.gatech.edu with HTTP; Wed, 9 Mar 2005 02:32:48 -0500 (EST) Message-ID: <33566.24.27.59.14.1110353568.squirrel@24.27.59.14> Date: Wed, 9 Mar 2005 02:32:48 -0500 (EST) From: jasonh@cc.gatech.edu To: freebsd-multimedia@freebsd.org, freebsd-hardware@freebsd.org User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: via8237 SPDIF output 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, 09 Mar 2005 07:32:50 -0000 Hi all, I recently built a new system based on the Asus A8V Deluxe mobo, and installed FreeBSD on it. The onboard via8237 (Realtek ALC850) sound works fine through the analog jacks on my speakers (with snd_via8233 in the kernel config), but when I switch to the SPDIF jacks and set hw.snd.pcm0.spdif_enabled to 1, I get no sound. I know it's not a hardware problem, because SPDIF out works in Linux. It's not a huge issue because I have working analog, but I would kind of like to get SPDIF working. Is there something else I need to do to enable it? The system is FreeBSD 5.4-PRERELEASE (amd64), just cvsupped a few hours ago. Thanks, Jason Harmening From owner-freebsd-multimedia@FreeBSD.ORG Wed Mar 9 11:06:44 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 A7DBC16A4CE for ; Wed, 9 Mar 2005 11:06:44 +0000 (GMT) Received: from phws.ph.noda.tus.ac.jp (phws.ph.noda.tus.ac.jp [133.31.102.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1928043D1F for ; Wed, 9 Mar 2005 11:06:44 +0000 (GMT) (envelope-from kazuhito@ph.noda.tus.ac.jp) Received: from localhost (unknown [133.31.111.131]) by phws.ph.noda.tus.ac.jp (Postfix) with ESMTP id C174C4D804C; Wed, 9 Mar 2005 20:06:42 +0900 (JST) Date: Wed, 09 Mar 2005 20:06:42 +0900 (JST) Message-Id: <20050309.200642.343164846.kazuhito@ph.noda.tus.ac.jp> To: mat@cnd.mcgill.ca From: Kazuhito HONDA In-Reply-To: <20050308120820.GA2944@cnd.mcgill.ca> References: <20050307030419.GC951@kt-is.co.kr> <20050308.121415.847025091.kazuhito@ph.noda.tus.ac.jp> <20050308120820.GA2944@cnd.mcgill.ca> X-Mailer: Mew version 3.3 on XEmacs 21.5-b18 (chestnut) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-multimedia@freebsd.org cc: Alexander@Leidinger.net Subject: Re: uaudio patch, configurable buffer size 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, 09 Mar 2005 11:06:44 -0000 From: Mathew Kanner Subject: Re: uaudio patch, configurable buffer size Date: Tue, 8 Mar 2005 07:08:20 -0500 > I'm presently working on moving the ua_playcaps and ua_reccaps > into struct ua_info instead of global variables. O.K. I'm looking forward to your result. regards, Kazuhito HONDA From owner-freebsd-multimedia@FreeBSD.ORG Thu Mar 10 15:50:46 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 5539B16A4CE for ; Thu, 10 Mar 2005 15:50:46 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id C18CB43D4C for ; Thu, 10 Mar 2005 15:50:45 +0000 (GMT) (envelope-from normal1.lists@gmail.com) Received: by wproxy.gmail.com with SMTP id 69so623970wri for ; Thu, 10 Mar 2005 07:50:44 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=CGd+1Gk//0LYTc1bH1/zr8RHVnnQos0/VyRdtcBHpDEa2VuuqcShsz4Yg0gZx7JYU+Gapnd+SW2mfDoABkLea2jKHsxn47P2WNKhfJl1hUizvTY98IVQdynSEk57Y16f8682GKWm/5gXjotnOjB6SsDWYf6qW89Sc5/sk8nZsAE= Received: by 10.54.29.35 with SMTP id c35mr696619wrc; Thu, 10 Mar 2005 07:50:43 -0800 (PST) Received: by 10.54.2.45 with HTTP; Thu, 10 Mar 2005 07:50:43 -0800 (PST) Message-ID: Date: Thu, 10 Mar 2005 07:50:43 -0800 From: gabriel To: Greg 'groggy' Lehey In-Reply-To: <20050309003447.GY67848@wantadilla.lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <20050309003447.GY67848@wantadilla.lemis.com> cc: freebsd-multimedia@freebsd.org Subject: Re: TV Tuner and FXTV(?) X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: gabriel List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Mar 2005 15:50:46 -0000 Hehehe I think someone didn't read the full paragraph! :P - yes, "... XMMS plays just fine which narrows down a couple of components which make sound work (drivers.. speakers.. you get the idea)" Cheers! On Wed, 9 Mar 2005 11:04:47 +1030, Greg 'groggy' Lehey wrote: > On Tuesday, 8 March 2005 at 22:47:06 +0000, gabriel wrote: > > Okay, so here's my dilemma, or rather big problem. I have a TV tuner > > card which when installed is recognized by the system and I've > > installed FXTV Which when executed displays a beautifully crisp and > > colorful tv image, however, there is no sound to be heard. XMMS plays > > just fine which narrows down a couple of components which make sound > > work (drivers.. speakers.. you get the idea) so I'm wondering, does > > anyone have any clues or ideas that may help in at least > > troubleshooting this? > > Do you have any sound at all? It could be that the sound drivers > aren't loaded. > > Greg > -- > See complete headers for address and phone numbers. > > > -- gabriel, Member of: FreeBSD-Announce FreeBSD-Hardware FreeBSD-Multimedia FreeBSD-questions From owner-freebsd-multimedia@FreeBSD.ORG Fri Mar 11 20:03:36 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 D318616A4CE for ; Fri, 11 Mar 2005 20:03:36 +0000 (GMT) Received: from bgo1smout1.broadpark.no (bgo1smout1.broadpark.no [217.13.4.94]) by mx1.FreeBSD.org (Postfix) with ESMTP id 574F643D2D for ; Fri, 11 Mar 2005 20:03:36 +0000 (GMT) (envelope-from torfinn.ingolfsen@broadpark.no) Received: from bgo1sminn1.broadpark.no ([217.13.4.93]) by bgo1smout1.broadpark.no (Sun Java System Messaging Server 6.1 HotFix 0.05 (built Oct 21 2004)) with ESMTP id <0ID700K39E4X22E0@bgo1smout1.broadpark.no> for freebsd-multimedia@freebsd.org; Fri, 11 Mar 2005 20:58:09 +0100 (CET) Received: from kg-work.kg4.no ([80.203.21.150]) by bgo1sminn1.broadpark.no (Sun Java System Messaging Server 6.1 HotFix 0.05 (built Oct 21 2004)) with SMTP id <0ID7002EJEH3SR90@bgo1sminn1.broadpark.no> for freebsd-multimedia@freebsd.org; Fri, 11 Mar 2005 21:05:28 +0100 (CET) Date: Fri, 11 Mar 2005 21:03:32 +0100 From: Torfinn Ingolfsen X-Face: "t9w2,-X@O^I`jVW\sonI3.,36KBLZE*AL[y9lL[PyFD*r_S:dIL9c[8Y>V42R0"!"yb_zN,f#%.[PYYNq;m"_0v;~rUM2Yy!zmkh)3&U|u!=T(zyv,MHJv"nDH>OJ`t(@mil461d_B'Uo|'nMwlKe0Mv=kvV?Nh@>Hb<3s_z2jYgZhPb@?Wi^x1a~Hplz1.zH To: freebsd-multimedia@freebsd.org Message-id: <20050311210332.0d4d7cda.torfinn.ingolfsen@broadpark.no> MIME-version: 1.0 X-Mailer: Sylpheed version 1.0.0beta3 (GTK+ 1.2.10; i386-portbld-freebsd5.3) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: cxm driver: does it work with PVR 150, PVR 500? 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: Fri, 11 Mar 2005 20:03:36 -0000 Hello, Has anybody tried the cxm driver with the new Hauppauge WinTV cards (PVR 150, PVR 500)? Does it work? The PVR 500 have dual tuners, that might be interesting. I think the PVR 150's (there are at least three models) are just cheaper versions of the 250 or 350, but (as usual) the web pages of the manufacturer is lacking the tecnical details. -- Regards, Torfinn Ingolfsen Norway From owner-freebsd-multimedia@FreeBSD.ORG Fri Mar 11 20:22:42 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 2D59916A4CE for ; Fri, 11 Mar 2005 20:22:42 +0000 (GMT) Received: from phws.ph.noda.tus.ac.jp (phws.ph.noda.tus.ac.jp [133.31.102.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0BFBB43D46 for ; Fri, 11 Mar 2005 20:22:41 +0000 (GMT) (envelope-from kazuhito@ph.noda.tus.ac.jp) Received: from localhost (unknown [133.31.111.131]) by phws.ph.noda.tus.ac.jp (Postfix) with ESMTP id BA20D4D8035; Sat, 12 Mar 2005 05:22:38 +0900 (JST) Date: Sat, 12 Mar 2005 05:22:38 +0900 (JST) Message-Id: <20050312.052238.343190976.kazuhito@ph.noda.tus.ac.jp> To: freebsd-misuser@dyndns.dk From: Kazuhito HONDA In-Reply-To: <20050207.144135.343184916.kazuhito@ph.noda.tus.ac.jp> References: <20050202.125013.343181897.kazuhito@ph.noda.tus.ac.jp> <200502040227.j142Rnw4000784@Mail.NOSPAM.DynDNS.dK> <20050207.144135.343184916.kazuhito@ph.noda.tus.ac.jp> X-Mailer: Mew version 3.3 on XEmacs 21.5-b18 (chestnut) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-multimedia@freebsd.org Subject: Re: Which USB-Soundcards work? 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: Fri, 11 Mar 2005 20:22:42 -0000 From: Kazuhito HONDA Subject: Re: Which USB-Soundcards work? Date: Mon, 07 Feb 2005 14:41:35 +0900 (JST) > Oh, I couldn't have that idea to use FreeBSD sysctl knob > when my coding. It's a nice idea, > and mixer system for USB audios should be. All controllers of USB audio devices come to be able to control through FreeBSD sysctl knob. http://sobarally.dyndns.org/~trench/uaudio/uaudio-mixer-sysctl.gz For example, when SB Digital Music and SB Live! 24-bit External are connected after applying the patch above, sysctl says: hw.snd.pcm0.record@sel8-i10i11i12: 1 hw.snd.pcm0.outputs@speaker-mute: 0 hw.snd.pcm0.outputs@speaker: 7474 hw.snd.pcm0.record@mic-mute: 0 hw.snd.pcm0.record@mic: 26976600 hw.snd.pcm0.record@mic-agc: 0 hw.snd.pcm0.record@line-mute: 0 hw.snd.pcm0.record@line: 7474 hw.snd.pcm0.record@aux-mute: 0 hw.snd.pcm0.inputs@mic-mute: 0 hw.snd.pcm0.inputs@mic: 7400 hw.snd.pcm0.inputs@line-mute: 1 hw.snd.pcm0.inputs@line: 7474 hw.snd.pcm1.outputs@speaker-mute: 0 hw.snd.pcm1.outputs@speaker: 7400 hw.snd.pcm1.record@line: 7700 `*@*-mute's are mute controllers. 0 is OFF and 1 is ON. `*@sel*-*' is a source selector. each `i[num]' corresponds to each input source. `hw.snd.pcm0.record@sel8-i10i11i12' shows three input source, and we can select them by 1,2 or 3. Almost others are volumes. first two orders correspond to a left or mono's volume. last two orders correspond to a right volume. their values are from 0 to 99. `hw.snd.pcm0.record@mic: 26976600' is ...... a bug, I'll research sometime. `sysctl -w' changes behaviors of the USB audio device, but this isn't reflected by FreeBSD mixer command. Sincerely Kazuhito HONDA From owner-freebsd-multimedia@FreeBSD.ORG Sat Mar 12 01:03:26 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 4C0D616A4CE for ; Sat, 12 Mar 2005 01:03:26 +0000 (GMT) Received: from drizzle.CC.McGill.CA (drizzle.cc.mcgill.ca [132.206.27.48]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2AFC943D54 for ; Sat, 12 Mar 2005 01:03:23 +0000 (GMT) (envelope-from mat@cnd.mcgill.ca) Received: from mailscan2.cc.mcgill.ca (mailscan2.CC.McGill.CA [132.216.77.249])j2C13J9a018562; Fri, 11 Mar 2005 20:03:19 -0500 Received: from cube.cnd.mcgill.ca (cube.CND.McGill.CA [132.216.25.196]) j2C12vrO016163; Fri, 11 Mar 2005 20:02:58 -0500 (EST) 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 j2C12pYt009627; Fri, 11 Mar 2005 20:02:56 -0500 Received: from localhost.localdomain (acid [127.0.0.1]) j2C12pkJ019229; Fri, 11 Mar 2005 20:02:51 -0500 Received: (from mat@localhost) by localhost.localdomain (8.12.11/8.12.11/Submit) id j2C12mHf019228; Fri, 11 Mar 2005 20:02:48 -0500 Date: Fri, 11 Mar 2005 20:02:48 -0500 From: Mathew Kanner To: Kazuhito HONDA Message-ID: <20050312010248.GG2944@cnd.mcgill.ca> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="UlVJffcvxoiEqYs2" Content-Disposition: inline User-Agent: Mutt/1.4.2i Organization: I speak for myself, operating in Montreal, CANADA cc: freebsd-multimedia@freebsd.org Subject: 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: Sat, 12 Mar 2005 01:03:26 -0000 --UlVJffcvxoiEqYs2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mar 09, Kazuhito HONDA wrote: > From: Mathew Kanner > Subject: Re: uaudio patch, configurable buffer size > Date: Tue, 8 Mar 2005 07:08:20 -0500 > > > I'm presently working on moving the ua_playcaps and ua_reccaps > > into struct ua_info instead of global variables. > > O.K. I'm looking forward to your result. Hello Kazuhito, Please find attached my work in progress to add probing the min/max rate for the uaudio device. It does what I described before (de-globalizes the caps). It still prints some extra debugging information and needs some polish thought before commiting. I also sneak in some minor changes: - add the kld info to /dev/sndstat (like the other sound modules) - reduce the default buffer size to 8kb - Start to get ready for no playback/ mixer only devices. --Mat --UlVJffcvxoiEqYs2 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="uaudio_caps.diff" Index: sys/dev/sound/usb/uaudio.c =================================================================== RCS file: /home/ncvs/src/sys/dev/sound/usb/uaudio.c,v retrieving revision 1.13 diff -u -r1.13 uaudio.c --- sys/dev/sound/usb/uaudio.c 6 Jan 2005 01:43:22 -0000 1.13 +++ sys/dev/sound/usb/uaudio.c 11 Mar 2005 20:01:52 -0000 @@ -3764,22 +3764,24 @@ return (0); } -void -uaudio_query_formats(device_t dev, u_int32_t *pfmt, u_int32_t *rfmt) +int +uaudio_query_formats(device_t dev, u_int32_t *min, u_int32_t *max, u_int32_t *pfmt, u_int32_t *rfmt) { int i, pn=0, rn=0; int prec, dir; u_int32_t fmt; struct uaudio_softc *sc; - const struct usb_audio_streaming_type1_descriptor *a1d; + const struct usb_audio_streaming_type1_descriptor *asf1d; sc = device_get_softc(dev); + *min = *max = 0; + for (i = 0; i < sc->sc_nalts; i++) { fmt = 0; - a1d = sc->sc_alts[i].asf1desc; - prec = a1d->bBitResolution; /* precision */ + asf1d = sc->sc_alts[i].asf1desc; + prec = asf1d->bBitResolution; /* precision */ switch (sc->sc_alts[i].encoding) { case AUDIO_ENCODING_ULINEAR_LE: @@ -3819,28 +3821,58 @@ } if (fmt != 0) { - if (a1d->bNrChannels == 2) { /* stereo/mono */ + if (asf1d->bNrChannels == 2) { /* stereo/mono */ fmt |= AFMT_STEREO; - } else if (a1d->bNrChannels != 1) { + } else if (asf1d->bNrChannels != 1) { fmt = 0; } } if (fmt != 0) { dir= UE_GET_DIR(sc->sc_alts[i].edesc->bEndpointAddress); - if (dir == UE_DIR_OUT) { + if (dir == UE_DIR_OUT && pn <= 8*2) { pfmt[pn++] = fmt; - } else if (dir == UE_DIR_IN) { + } else if (dir == UE_DIR_IN && rn <= 8*2 ) { rfmt[rn++] = fmt; } } - if ((pn > 8*2) || (rn > 8*2)) - break; + /* + * Sadly, for now, we will only look for the min/max + * of playback channels as this is more important to + * report correctly. I don't know of a way to report + * caps of playback and record seperately + */ + if ( fmt == 0 || dir != UE_DIR_OUT ) + continue; + if ( asf1d->bSamFreqType == UA_SAMP_CONTNUOUS) { + int it = UA_SAMP_LO(asf1d); + printf( " Testing continuous lo %d min %d max %d\n", it, *min, *max); + if ( *min == 0 || it <= *min ) + *min = it; + if ( *max == 0 ) + *max = *min; + it = UA_SAMP_HI(asf1d); + printf( " Testing continuous hi %d min %d max %d\n", it, *min, *max); + if ( it >= *max ) + *max = it; + } else { + int r, it; + for (r = 0; r < asf1d->bSamFreqType; r++) { + it = UA_GETSAMP(asf1d, r); + printf( " Testing fixed %d min %d max %d\n", it, *min, *max); + if ( *min == 0 || it <= *min ) + *min = it; + if ( *max == 0 ) + *max = *min; + if ( it >= *max ) + *max = it; + } + } } pfmt[pn] = 0; rfmt[rn] = 0; - return; + return 1; } void Index: sys/dev/sound/usb/uaudio.h =================================================================== RCS file: /home/ncvs/src/sys/dev/sound/usb/uaudio.h,v retrieving revision 1.5 diff -u -r1.5 uaudio.h --- sys/dev/sound/usb/uaudio.h 6 Jan 2005 01:43:22 -0000 1.5 +++ sys/dev/sound/usb/uaudio.h 11 Mar 2005 20:04:51 -0000 @@ -49,4 +49,4 @@ u_int32_t uaudio_mixer_setrecsrc(device_t dev, u_int32_t src); u_int32_t uaudio_query_mix_info(device_t dev); u_int32_t uaudio_query_recsrc_info(device_t dev); -void uaudio_query_formats(device_t dev, u_int32_t *pfmt, u_int32_t *rfmt); +int uaudio_query_formats(device_t dev, u_int32_t *min, u_int32_t *max, u_int32_t *pfmt, u_int32_t *rfmt); Index: sys/dev/sound/usb/uaudio_pcm.c =================================================================== RCS file: /home/ncvs/src/sys/dev/sound/usb/uaudio_pcm.c,v retrieving revision 1.10 diff -u -r1.10 uaudio_pcm.c --- sys/dev/sound/usb/uaudio_pcm.c 1 Mar 2005 08:58:06 -0000 1.10 +++ sys/dev/sound/usb/uaudio_pcm.c 11 Mar 2005 20:03:03 -0000 @@ -48,17 +48,13 @@ device_t sc_dev; struct ua_chinfo pch, rch; bus_dma_tag_t parent_dmat; + u_int32_t ua_playfmt[8*2+1]; /* 8 format * (stereo or mono) + endptr */ + u_int32_t ua_recfmt[8*2+1]; /* 8 format * (stereo or mono) + endptr */ + struct pcmchan_caps ua_playcaps; + struct pcmchan_caps ua_reccaps; }; -static u_int32_t ua_playfmt[8*2+1]; /* 8 format * (stereo or mono) + endptr */ - -static struct pcmchan_caps ua_playcaps = {8000, 48000, ua_playfmt, 0}; - -static u_int32_t ua_recfmt[8*2+1]; /* 8 format * (stereo or mono) + endptr */ - -static struct pcmchan_caps ua_reccaps = {8000, 48000, ua_recfmt, 0}; - -#define UAUDIO_PCM_BUFF_SIZE 16*1024 +#define UAUDIO_PCM_BUFF_SIZE 8*1024 /************************************************************/ static void * @@ -76,12 +72,6 @@ ch->dir = dir; pa_dev = device_get_parent(sc->sc_dev); - /* Create ua_playfmt[] & ua_recfmt[] */ - uaudio_query_formats(pa_dev, (u_int32_t *)&ua_playfmt, (u_int32_t *)&ua_recfmt); - if (ua_playfmt[0] == 0) { - printf("%s channel supported format list invalid\n", dir == PCMDIR_PLAY? "play" : "record"); - return NULL; - } /* allocate PCM side DMA buffer */ if (sndbuf_alloc(ch->buffer, sc->parent_dmat, UAUDIO_PCM_BUFF_SIZE) != 0) { @@ -207,7 +197,7 @@ { struct ua_chinfo *ch = data; - return (ch->dir == PCMDIR_PLAY) ? &ua_playcaps : & ua_reccaps; + return (ch->dir == PCMDIR_PLAY) ? &(ch->parent->ua_playcaps) : &(ch->parent->ua_reccaps); } static kobj_method_t ua_chan_methods[] = { @@ -299,6 +289,9 @@ struct ua_info *ua; char status[SND_STATUSLEN]; unsigned int bufsz; + u_int32_t nplay, nrec; + u_int32_t min, max; + int i; ua = (struct ua_info *)malloc(sizeof *ua, M_DEVBUF, M_NOWAIT); if (!ua) @@ -323,22 +316,40 @@ } if (mixer_init(dev, &ua_mixer_class, ua)) { - return(ENXIO); + goto bad; } - snprintf(status, SND_STATUSLEN, "at addr ?"); + snprintf(status, SND_STATUSLEN, "%s", PCM_KLDSTRING(snd_uaudio)); + uaudio_query_formats(device_get_parent(dev), &min, &max, ua->ua_playfmt, ua->ua_recfmt); + ua->ua_playcaps.minspeed = min; + ua->ua_playcaps.maxspeed = max; + ua->ua_playcaps.fmtlist = ua->ua_playfmt; + ua->ua_reccaps.minspeed = min; + ua->ua_reccaps.maxspeed = max; + ua->ua_reccaps.fmtlist = ua->ua_recfmt; + + nplay = 1; + nrec = 1; + /* + * XXX Should really check if we have playback and record channels + */ #ifndef NO_RECORDING - if (pcm_register(dev, ua, 1, 1)) { + if (pcm_register(dev, ua, nplay, nrec)) { #else - if (pcm_register(dev, ua, 1, 0)) { + if (pcm_register(dev, ua, nplay, 0)) { #endif return(ENXIO); } - pcm_addchan(dev, PCMDIR_PLAY, &ua_chan_class, ua); + for (i = 0; i < nplay; i++) { + pcm_addchan(dev, PCMDIR_PLAY, &ua_chan_class, ua); + } + #ifndef NO_RECORDING - pcm_addchan(dev, PCMDIR_REC, &ua_chan_class, ua); + for (i = 0; i < nplay; i++) { + pcm_addchan(dev, PCMDIR_REC, &ua_chan_class, ua); + } #endif pcm_setstatus(dev, status); --UlVJffcvxoiEqYs2-- From owner-freebsd-multimedia@FreeBSD.ORG Sat Mar 12 18:14:28 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 6D7A516A4CE for ; Sat, 12 Mar 2005 18:14:28 +0000 (GMT) Received: from t-mta2.odn.ne.jp (mfep2.odn.ne.jp [143.90.131.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id E605D43D31 for ; Sat, 12 Mar 2005 18:14:26 +0000 (GMT) (envelope-from kazuhito@ph.noda.tus.ac.jp) Received: from localhost ([211.121.97.13]) by t-mta2.odn.ne.jp with ESMTP id <20050312181425948.OLLZ.2961.t-mta2.odn.ne.jp@mta2.odn.ne.jp>; Sun, 13 Mar 2005 03:14:25 +0900 Date: Sun, 13 Mar 2005 03:14:25 +0900 (JST) Message-Id: <20050313.031425.343188571.kazuhito@ph.noda.tus.ac.jp> To: mat@cnd.mcgill.ca From: Kazuhito HONDA In-Reply-To: <20050312010248.GG2944@cnd.mcgill.ca> References: <20050312010248.GG2944@cnd.mcgill.ca> X-Mailer: Mew version 3.3 on XEmacs 21.4.17 (Jumbo Shrimp) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-multimedia@freebsd.org 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: Sat, 12 Mar 2005 18:14:28 -0000 From: Mathew Kanner Subject: uaudio patch, capabilities Date: Fri, 11 Mar 2005 20:02:48 -0500 > Please find attached my work in progress to add probing the > min/max rate for the uaudio device. Hello, Thank you very much for your coding. But it had one problem when I tried it. My USB audio device, SB Live! 24-bit External, has three fixed sampling rate, 44100, 48000, and 96000 Hz. So min/max speeds of playback caps came to be 44100 Hz and 96000 Hz. In this case, sound source of 44100 Hz and 48000 Hz could be played exactly, and sound sources whose sampling rate was under 44100 Hz could be played with converted, but sound sources whose sampling sate was between 44100 Hz and 48000 Hz couldn't be played. 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. Sincerely, Kazuhito HONDA From owner-freebsd-multimedia@FreeBSD.ORG Sat Mar 12 19:08:04 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 C2FA316A4CE for ; Sat, 12 Mar 2005 19:08:04 +0000 (GMT) Received: from t-mta2.odn.ne.jp (mfep2.odn.ne.jp [143.90.131.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 233C343D39 for ; Sat, 12 Mar 2005 19:08:04 +0000 (GMT) (envelope-from kazuhito@ph.noda.tus.ac.jp) Received: from localhost ([211.121.97.13]) by t-mta2.odn.ne.jp with ESMTP id <20050312190803582.ONIT.2961.t-mta2.odn.ne.jp@mta2.odn.ne.jp>; Sun, 13 Mar 2005 04:08:03 +0900 Date: Sun, 13 Mar 2005 04:08:03 +0900 (JST) Message-Id: <20050313.040803.465784117.kazuhito@ph.noda.tus.ac.jp> To: mat@cnd.mcgill.ca From: Kazuhito HONDA In-Reply-To: <20050312010248.GG2944@cnd.mcgill.ca> References: <20050312010248.GG2944@cnd.mcgill.ca> X-Mailer: Mew version 3.3 on XEmacs 21.4.17 (Jumbo Shrimp) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-multimedia@freebsd.org 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: Sat, 12 Mar 2005 19:08:04 -0000 I forgot another point. From: Mathew Kanner Subject: uaudio patch, capabilities Date: Fri, 11 Mar 2005 20:02:48 -0500 > - reduce the default buffer size to 8kb Is this for the problem that channel can't be created (kern/74893)? It's true, it might be better to increase maxsegzs in bus_dma_tag_create() of uaudio_pcm.c, because `0x3fff' must be a typo of `0x3ffff'. Sincerely, Kazuhito HONDA From owner-freebsd-multimedia@FreeBSD.ORG Sat Mar 12 19:44:39 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 11A0816A4CE for ; Sat, 12 Mar 2005 19:44:39 +0000 (GMT) Received: from drizzle.CC.McGill.CA (drizzle.cc.mcgill.ca [132.206.27.48]) by mx1.FreeBSD.org (Postfix) with ESMTP id 487DC43D2D for ; Sat, 12 Mar 2005 19:44:38 +0000 (GMT) (envelope-from mat@cnd.mcgill.ca) Received: from mailscan2.cc.mcgill.ca (mailscan2.CC.McGill.CA [132.216.77.249])j2CJiY5k011551; Sat, 12 Mar 2005 14:44:35 -0500 Received: from cube.cnd.mcgill.ca (cube.CND.McGill.CA [132.216.25.196]) j2CJiIAh015104; Sat, 12 Mar 2005 14:44:19 -0500 (EST) 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 j2CJi46x020119; Sat, 12 Mar 2005 14:44:05 -0500 Received: from localhost.localdomain (acid [127.0.0.1]) j2CJi4Va023008; Sat, 12 Mar 2005 14:44:04 -0500 Received: (from mat@localhost) by localhost.localdomain (8.12.11/8.12.11/Submit) id j2CJi2TK023007; Sat, 12 Mar 2005 14:44:02 -0500 Date: Sat, 12 Mar 2005 14:44:01 -0500 From: Mathew Kanner To: Kazuhito HONDA Message-ID: <20050312194401.GH2944@cnd.mcgill.ca> References: <20050312010248.GG2944@cnd.mcgill.ca> <20050313.031425.343188571.kazuhito@ph.noda.tus.ac.jp> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="KFztAG8eRSV9hGtP" Content-Disposition: inline In-Reply-To: <20050313.031425.343188571.kazuhito@ph.noda.tus.ac.jp> User-Agent: Mutt/1.4.2i Organization: I speak for myself, operating in Montreal, CANADA cc: freebsd-multimedia@freebsd.org cc: mat@cnd.mcgill.ca 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: Sat, 12 Mar 2005 19:44:39 -0000 --KFztAG8eRSV9hGtP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mar 12, Kazuhito HONDA wrote: > From: Mathew Kanner > Subject: uaudio patch, capabilities > Date: Fri, 11 Mar 2005 20:02:48 -0500 > > > Please find attached my work in progress to add probing the > > min/max rate for the uaudio device. > > Hello, > > Thank you very much for your coding. > But it had one problem when I tried it. > > My USB audio device, SB Live! 24-bit External, > has three fixed sampling rate, 44100, 48000, and 96000 Hz. > So min/max speeds of playback caps came to be 44100 Hz and 96000 Hz. > In this case, sound source of 44100 Hz and 48000 Hz could be played exactly, > and sound sources whose sampling rate was under 44100 Hz could be played > with converted, but sound sources whose sampling sate was between 44100 Hz > and 48000 Hz couldn't be played. > > 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 numerous problems with the first patch. For instance the min/max was taken from the record playback channel for no reason. Please try this patch. Thanks, --Mat --KFztAG8eRSV9hGtP Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="uaudio_caps.2.diff" Index: uaudio.c =================================================================== RCS file: /home/ncvs/src/sys/dev/sound/usb/uaudio.c,v retrieving revision 1.13 diff -u -r1.13 uaudio.c --- uaudio.c 6 Jan 2005 01:43:22 -0000 1.13 +++ uaudio.c 12 Mar 2005 14:47:52 -0000 @@ -3764,83 +3764,131 @@ return (0); } -void -uaudio_query_formats(device_t dev, u_int32_t *pfmt, u_int32_t *rfmt) -{ - int i, pn=0, rn=0; - int prec, dir; +struct uaudio_convesion { + uint8_t uaudio_fmt; + uint8_t uaudio_prec; + uint32_t freebsd_fmt; +}; + +const struct uaudio_convesion const accepted_conversion[] = { + {AUDIO_ENCODING_ULINEAR_LE, 8, AFMT_U8}, + {AUDIO_ENCODING_ULINEAR_LE, 16, AFMT_U16_LE}, + {AUDIO_ENCODING_SLINEAR_LE, 8, AFMT_S8}, + {AUDIO_ENCODING_SLINEAR_LE, 16, AFMT_S16_LE}, + {AUDIO_ENCODING_SLINEAR_BE, 16, AFMT_S16_BE}, + {AUDIO_ENCODING_ALAW, 8, AFMT_A_LAW}, + {AUDIO_ENCODING_ULAW, 8, AFMT_MU_LAW}, + {0,0,0} +}; + +unsigned +uaudio_query_formats(device_t dev, int reqdir, unsigned maxfmt, struct pcmchan_caps *cap) +{ + struct uaudio_softc *sc = device_get_softc(dev); + const struct usb_audio_streaming_type1_descriptor *asf1d; + const struct uaudio_convesion *iterator; + unsigned fmtcount, foundcount; u_int32_t fmt; - struct uaudio_softc *sc; + uint8_t format, numchan, subframesize, prec, dir, iscontinuous; + int freq, freq_min, freq_max; + char *numchannel_descr; + char freq_descr[64]; + int i,r; - const struct usb_audio_streaming_type1_descriptor *a1d; + if ( sc == NULL ) + return 0; - sc = device_get_softc(dev); + device_printf( dev, "uaudio_query_formats: querying for %s\n",(reqdir==PCMDIR_PLAY)?"playback":"record"); + + cap->minspeed = cap->maxspeed = 0; + foundcount = fmtcount = 0; for (i = 0; i < sc->sc_nalts; i++) { - fmt = 0; - a1d = sc->sc_alts[i].asf1desc; - prec = a1d->bBitResolution; /* precision */ - - switch (sc->sc_alts[i].encoding) { - case AUDIO_ENCODING_ULINEAR_LE: - if (prec == 8) { - fmt = AFMT_U8; - } else if (prec == 16) { - fmt = AFMT_U16_LE; - } - break; - case AUDIO_ENCODING_SLINEAR_LE: - if (prec == 8) { - fmt = AFMT_S8; - } else if (prec == 16) { - fmt = AFMT_S16_LE; - } - break; - case AUDIO_ENCODING_ULINEAR_BE: - if (prec == 16) { - fmt = AFMT_U16_BE; - } - break; - case AUDIO_ENCODING_SLINEAR_BE: - if (prec == 16) { - fmt = AFMT_S16_BE; - } - break; - case AUDIO_ENCODING_ALAW: - if (prec == 8) { - fmt = AFMT_A_LAW; - } - break; - case AUDIO_ENCODING_ULAW: - if (prec == 8) { - fmt = AFMT_MU_LAW; - } - break; - } + dir = UE_GET_DIR(sc->sc_alts[i].edesc->bEndpointAddress); - if (fmt != 0) { - if (a1d->bNrChannels == 2) { /* stereo/mono */ - fmt |= AFMT_STEREO; - } else if (a1d->bNrChannels != 1) { - fmt = 0; - } - } + if ( (dir == UE_DIR_OUT) != (reqdir == PCMDIR_PLAY) ) + continue; + + asf1d = sc->sc_alts[i].asf1desc; + format = sc->sc_alts[i].encoding; + + numchan = asf1d->bNrChannels; + subframesize = asf1d->bSubFrameSize; + prec = asf1d->bBitResolution; /* precision */ + iscontinuous = asf1d->bSamFreqType == UA_SAMP_CONTNUOUS; + + if (iscontinuous) + snprintf(freq_descr, 64, "continous min %d max %d", UA_SAMP_LO(asf1d), UA_SAMP_HI(asf1d)); + else + snprintf(freq_descr, 64, "fixed frequency (%d listed formats)", asf1d->bSamFreqType); + + if ( numchan == 1) + numchannel_descr = " (mono)"; + else if ( numchan == 2 ) + numchannel_descr = " (stereo)"; + else + numchannel_descr = ""; + + device_printf( dev, "uaudio_query_formats: found a native %s channel%s %s %dbit %dbytes/subframe X %d channels = %d bytes per sample\n", + (dir==UE_DIR_OUT)?"playback":"record", + numchannel_descr, freq_descr, + prec, subframesize, numchan, subframesize*numchan); + + /* + * Now start rejecting the ones that don't map to FreeBSD + */ + + if (numchan != 1 && numchan != 2) + continue; + + for ( iterator = accepted_conversion ; iterator->uaudio_fmt != 0 ; iterator++ ) + if ( iterator->uaudio_fmt == format && iterator->uaudio_prec == prec ) + break; + + if ( iterator->uaudio_fmt == 0 ) + continue; + + fmt = iterator->freebsd_fmt; + + if (asf1d->bNrChannels == 2) + fmt |= AFMT_STEREO; + + if ( numchan != 1 && numchan == 2 ) - if (fmt != 0) { - dir= UE_GET_DIR(sc->sc_alts[i].edesc->bEndpointAddress); - if (dir == UE_DIR_OUT) { - pfmt[pn++] = fmt; - } else if (dir == UE_DIR_IN) { - rfmt[rn++] = fmt; + foundcount++; + + if (fmtcount >= maxfmt ) + continue; + + cap->fmtlist[fmtcount++] = fmt; + + if (iscontinuous) { + freq_min = UA_SAMP_LO(asf1d); + freq_max = UA_SAMP_HI(asf1d); + + if ( cap->minspeed == 0 || freq_min < cap->minspeed ) + cap->minspeed = freq_min; + if ( cap->maxspeed == 0 ) + cap->maxspeed = cap->minspeed; + if ( freq_max > cap->maxspeed ) + cap->maxspeed = freq_max; + } else { + device_printf( dev, "uaudio_query_formats: accepted for fixed frequencies" ); + for (r = 0; r < asf1d->bSamFreqType; r++) { + freq = UA_GETSAMP(asf1d, r); + printf(" %dhz", freq); + if (cap->minspeed == 0 || freq < cap->minspeed) + cap->minspeed = freq; + if (cap->maxspeed == 0) + cap->maxspeed = cap->minspeed; + if (freq > cap->maxspeed) + cap->maxspeed = freq; } + printf("\n"); } - - if ((pn > 8*2) || (rn > 8*2)) - break; } - pfmt[pn] = 0; - rfmt[rn] = 0; - return; + cap->fmtlist[fmtcount] = 0; + return foundcount; } void @@ -3851,14 +3899,10 @@ struct chan *ch; sc = device_get_softc(dev); -#ifndef NO_RECORDING if (dir == PCMDIR_PLAY) ch = &sc->sc_playchan; else ch = &sc->sc_recchan; -#else - ch = &sc->sc_playchan; -#endif ch->start = start; ch->end = end; @@ -3875,39 +3919,60 @@ struct chan *ch; sc = device_get_softc(dev); -#ifndef NO_RECORDING if (dir == PCMDIR_PLAY) ch = &sc->sc_playchan; else ch = &sc->sc_recchan; -#else - ch = &sc->sc_playchan; -#endif ch->blksize = blocksize; return; } -void -uaudio_chan_set_param_speed(device_t dev, u_int32_t speed, int dir) +int +uaudio_chan_set_param_speed(device_t dev, u_int32_t speed, int reqdir) { + const struct uaudio_convesion *iterator; struct uaudio_softc *sc; struct chan *ch; + int i, r; sc = device_get_softc(dev); -#ifndef NO_RECORDING - if (dir == PCMDIR_PLAY) + if (reqdir == PCMDIR_PLAY) ch = &sc->sc_playchan; else ch = &sc->sc_recchan; -#else - ch = &sc->sc_playchan; -#endif - ch->sample_rate = speed; + /* + * We are successful if we find an endpoint that matches our selected format and it + * supports the requested speed. + */ + for (i = 0; i < sc->sc_nalts; i++) { + int dir = UE_GET_DIR(sc->sc_alts[i].edesc->bEndpointAddress); + int format = sc->sc_alts[i].encoding; + const struct usb_audio_streaming_type1_descriptor *asf1d = sc->sc_alts[i].asf1desc; + int iscontinuous = asf1d->bSamFreqType == UA_SAMP_CONTNUOUS; - return; + if ( (dir == UE_DIR_OUT) != (reqdir == PCMDIR_PLAY) ) + continue; + + for ( iterator = accepted_conversion ; iterator->uaudio_fmt != 0 ; iterator++ ) + if ( iterator->uaudio_fmt == format && iterator->freebsd_fmt == (ch->format&0xfffffff) ) { + if (iscontinuous) { + if ( speed >= UA_SAMP_LO(asf1d) && speed <= UA_SAMP_HI(asf1d)) { + ch->sample_rate = speed; + return 1; + } + } else + for (r = 0; r < asf1d->bSamFreqType; r++) + if ( speed == UA_GETSAMP(asf1d, r) ) { + ch->sample_rate = speed; + return 1; + } + } + } + + return 0; } int @@ -3918,14 +3983,11 @@ int ptr; sc = device_get_softc(dev); -#ifndef NO_RECORDING + if (dir == PCMDIR_PLAY) ch = &sc->sc_playchan; else ch = &sc->sc_recchan; -#else - ch = &sc->sc_playchan; -#endif ptr = ch->cur - ch->start; @@ -3939,15 +4001,10 @@ struct chan *ch; sc = device_get_softc(dev); -#ifndef NO_RECORDING if (dir == PCMDIR_PLAY) ch = &sc->sc_playchan; else ch = &sc->sc_recchan; -#else - ch = &sc->sc_playchan; -#endif - ch->format = format; return; Index: uaudio.h =================================================================== RCS file: /home/ncvs/src/sys/dev/sound/usb/uaudio.h,v retrieving revision 1.5 diff -u -r1.5 uaudio.h --- uaudio.h 6 Jan 2005 01:43:22 -0000 1.5 +++ uaudio.h 12 Mar 2005 14:21:12 -0000 @@ -41,7 +41,7 @@ #endif void uaudio_chan_set_param(device_t, u_char *, u_char *); void uaudio_chan_set_param_blocksize(device_t dev, u_int32_t blocksize, int dir); -void uaudio_chan_set_param_speed(device_t dev, u_int32_t speed, int dir); +int uaudio_chan_set_param_speed(device_t dev, u_int32_t speed, int reqdir); void uaudio_chan_set_param_format(device_t dev, u_int32_t format,int dir); int uaudio_chan_getptr(device_t dev, int); void uaudio_mixer_set(device_t dev, unsigned type, unsigned left, @@ -49,4 +49,4 @@ u_int32_t uaudio_mixer_setrecsrc(device_t dev, u_int32_t src); u_int32_t uaudio_query_mix_info(device_t dev); u_int32_t uaudio_query_recsrc_info(device_t dev); -void uaudio_query_formats(device_t dev, u_int32_t *pfmt, u_int32_t *rfmt); +unsigned uaudio_query_formats(device_t dev, int dir, unsigned maxfmt, struct pcmchan_caps *fmt); Index: uaudio_pcm.c =================================================================== RCS file: /home/ncvs/src/sys/dev/sound/usb/uaudio_pcm.c,v retrieving revision 1.10 diff -u -r1.10 uaudio_pcm.c --- uaudio_pcm.c 1 Mar 2005 08:58:06 -0000 1.10 +++ uaudio_pcm.c 12 Mar 2005 14:43:20 -0000 @@ -48,17 +48,13 @@ device_t sc_dev; struct ua_chinfo pch, rch; bus_dma_tag_t parent_dmat; + u_int32_t ua_playfmt[8*2+1]; /* 8 format * (stereo or mono) + endptr */ + u_int32_t ua_recfmt[8*2+1]; /* 8 format * (stereo or mono) + endptr */ + struct pcmchan_caps ua_playcaps; + struct pcmchan_caps ua_reccaps; }; -static u_int32_t ua_playfmt[8*2+1]; /* 8 format * (stereo or mono) + endptr */ - -static struct pcmchan_caps ua_playcaps = {8000, 48000, ua_playfmt, 0}; - -static u_int32_t ua_recfmt[8*2+1]; /* 8 format * (stereo or mono) + endptr */ - -static struct pcmchan_caps ua_reccaps = {8000, 48000, ua_recfmt, 0}; - -#define UAUDIO_PCM_BUFF_SIZE 16*1024 +#define UAUDIO_PCM_BUFF_SIZE 8*1024 /************************************************************/ static void * @@ -76,12 +72,6 @@ ch->dir = dir; pa_dev = device_get_parent(sc->sc_dev); - /* Create ua_playfmt[] & ua_recfmt[] */ - uaudio_query_formats(pa_dev, (u_int32_t *)&ua_playfmt, (u_int32_t *)&ua_recfmt); - if (ua_playfmt[0] == 0) { - printf("%s channel supported format list invalid\n", dir == PCMDIR_PLAY? "play" : "record"); - return NULL; - } /* allocate PCM side DMA buffer */ if (sndbuf_alloc(ch->buffer, sc->parent_dmat, UAUDIO_PCM_BUFF_SIZE) != 0) { @@ -112,10 +102,14 @@ struct ua_chinfo *ch = data; + /* + * At this point, no need to queury as we shouldn't select an unsorted format + */ ua = ch->parent; pa_dev = device_get_parent(ua->sc_dev); uaudio_chan_set_param_format(pa_dev, format, ch->dir); + printf("ua_chan_setformat %u\n", format); ch->fmt = format; return 0; } @@ -123,16 +117,14 @@ static int ua_chan_setspeed(kobj_t obj, void *data, u_int32_t speed) { - device_t pa_dev; - struct ua_info *ua; - struct ua_chinfo *ch = data; - ch->spd = speed; + device_t pa_dev = device_get_parent(ch->parent->sc_dev); + int res; - ua = ch->parent; - pa_dev = device_get_parent(ua->sc_dev); - uaudio_chan_set_param_speed(pa_dev, speed, ch->dir); + if ( (res = uaudio_chan_set_param_speed(pa_dev, speed, ch->dir)) ) + ch->spd = speed; + printf("ua_chan_setspeed %d %s\n", speed, res?"worked":"failed"); return ch->spd; } @@ -207,7 +199,7 @@ { struct ua_chinfo *ch = data; - return (ch->dir == PCMDIR_PLAY) ? &ua_playcaps : & ua_reccaps; + return (ch->dir == PCMDIR_PLAY) ? &(ch->parent->ua_playcaps) : &(ch->parent->ua_reccaps); } static kobj_method_t ua_chan_methods[] = { @@ -297,8 +289,11 @@ ua_attach(device_t dev) { struct ua_info *ua; + device_t pa_dev; char status[SND_STATUSLEN]; unsigned int bufsz; + u_int32_t nplay, nrec; + int i; ua = (struct ua_info *)malloc(sizeof *ua, M_DEVBUF, M_NOWAIT); if (!ua) @@ -307,6 +302,8 @@ ua->sc_dev = dev; + pa_dev = device_get_parent(dev); + bufsz = pcm_getbuffersize(dev, 4096, UAUDIO_PCM_BUFF_SIZE, 65536); if (bus_dma_tag_create(/*parent*/NULL, /*alignment*/2, /*boundary*/0, @@ -314,7 +311,7 @@ /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/bufsz, /*nsegments*/1, - /*maxsegz*/0x3fff, /*flags*/0, + /*maxsegz*/65536, /*flags*/0, /*lockfunc*/busdma_lock_mutex, /*lockarg*/&Giant, &ua->parent_dmat) != 0) { @@ -323,22 +320,37 @@ } if (mixer_init(dev, &ua_mixer_class, ua)) { - return(ENXIO); + goto bad; } - snprintf(status, SND_STATUSLEN, "at addr ?"); + snprintf(status, SND_STATUSLEN, "%s", PCM_KLDSTRING(snd_uaudio)); + + ua->ua_playcaps.fmtlist = ua->ua_playfmt; + ua->ua_reccaps.fmtlist = ua->ua_recfmt; + nplay = uaudio_query_formats(pa_dev, PCMDIR_PLAY, 8, &ua->ua_playcaps); + nrec = uaudio_query_formats(pa_dev, PCMDIR_REC, 8, &ua->ua_reccaps); + + if ( nplay > 1 ) + nplay = 1; + if ( nrec > 1 ) + nrec = 1; #ifndef NO_RECORDING - if (pcm_register(dev, ua, 1, 1)) { + if (pcm_register(dev, ua, nplay, nrec)) { #else - if (pcm_register(dev, ua, 1, 0)) { + if (pcm_register(dev, ua, nplay, 0)) { #endif return(ENXIO); } - pcm_addchan(dev, PCMDIR_PLAY, &ua_chan_class, ua); + for (i = 0; i < nplay; i++) { + pcm_addchan(dev, PCMDIR_PLAY, &ua_chan_class, ua); + } + #ifndef NO_RECORDING - pcm_addchan(dev, PCMDIR_REC, &ua_chan_class, ua); + for (i = 0; i < nplay; i++) { + pcm_addchan(dev, PCMDIR_REC, &ua_chan_class, ua); + } #endif pcm_setstatus(dev, status); --KFztAG8eRSV9hGtP--