From owner-freebsd-current@FreeBSD.ORG Tue May 24 05:38:19 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9ACE816A41C for ; Tue, 24 May 2005 05:38:19 +0000 (GMT) (envelope-from yongari@rndsoft.co.kr) Received: from rndsoft.co.kr (michelle.rndsoft.co.kr [211.32.202.209]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0BF5443D1D for ; Tue, 24 May 2005 05:38:18 +0000 (GMT) (envelope-from yongari@rndsoft.co.kr) Received: from yongari@rndsoft.co.kr(192.168.5.90) by MailFilter v1.05 with ESMTP Processed in 0.130548 secs; 24 May 2005 14:35:23 +0900 Received: from michelle.rndsoft.co.kr (localhost.rndsoft.co.kr [127.0.0.1]) by michelle.rndsoft.co.kr (8.13.1/8.13.1) with ESMTP id j4O5aSxf005988 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 24 May 2005 14:36:28 +0900 (KST) (envelope-from yongari@rndsoft.co.kr) Received: (from yongari@localhost) by michelle.rndsoft.co.kr (8.13.1/8.13.1/Submit) id j4O5aQWL005987; Tue, 24 May 2005 14:36:26 +0900 (KST) (envelope-from yongari@rndsoft.co.kr) Date: Tue, 24 May 2005 14:36:26 +0900 From: Pyun YongHyeon To: cpghost Message-ID: <20050524053626.GA5353@rndsoft.co.kr> References: <4286AB34.6050101@elischer.org> <20050515093422.GA18361@fw.farid-hajji.net> <42871944.4030506@elischer.org> <20050516022100.GB1020@rndsoft.co.kr> <4291D0CA.9090706@cordula.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4291D0CA.9090706@cordula.ws> User-Agent: Mutt/1.4.2.1i Cc: Current , Julian Elischer Subject: Re: skype on current/5.x and maestro-2E sound X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: yongari@rndsoft.co.kr List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2005 05:38:19 -0000 On Mon, May 23, 2005 at 02:47:06PM +0200, cpghost wrote: > Pyun YongHyeon wrote: > > >On Sun, May 15, 2005 at 02:41:24AM -0700, Julian Elischer wrote: > >> cpghost@cordula.ws wrote: > >> >On Sat, May 14, 2005 at 06:51:48PM -0700, Julian Elischer wrote: > >> > > >> >>Has anyone run skype successfully on these versions (5 or 6) of > >freeBSD? > >> >>I can run it successfully on 4.x but on my 5.x machine the audio is > >> >>completely > >> >>broken up. like someone is chopping the audio stream. > >> > > >> > > >> >I'm running Skype on 5.4 (via82c686). On an AMD Duron 1200 MHz, the > >> >sound quality is all right; on an EPIA 5000 Eden 500 MHz (also > >via82c686), > >> >the sound is totally chopped and it is impossible to follow. > >> > >> hmm so maybe its the fact that my machine is too slow.. it's also 500MHz > >> my 1GHz 4.11 machine seems to run it fine. > >> > > > >I don't think 500MHz is too slow. Check if kernel converters > >are active when you play audio samples.(cat /dev/sndstat after > >setting hw.snd.verbose=2). > > > > > This is what I get while skype plays the chopped sound of the echo service: > > epia2# cat /dev/sndstat > FreeBSD Audio Driver (newpcm) > Installed devices: > pcm0: at io 0xdc00 irq 10 kld snd_via82c686 (1p/1r/0v > channels duplex default) > [pcm0:play:0]: spd 48000, fmt 0x00000010, flags 0x00003030, > 0x00000000, pid 78793 > interrupts 18062, underruns 4824, ready 3580 > {userland} -> feeder_root(0x00000010) -> {hardware} > [pcm0:record:0]: spd 48000, fmt 0x00000010, flags 0x00003030, > 0x00000000, pid 78793 > interrupts 16968, overruns 4808, hfree 512, sfree 3584 > {hardware} -> feeder_root(0x00000010) -> {userland} > > No idea how to interpret this. > Format : sampling rate 48KHz, signed 16bit little endian format channel flags : opened, block size set, DMA active, triggered feeder flags : no flags(no kernel converter involed) It seems that no kernel converters are active. But you have large feeder underrun counters. It means sound quality would be poor. Quick looking the driver source showed that via82c686 has fixed sampling rate(48KHz) for playback. So userland application may need to resampling operations which requires additional CPU cycles. I vaguely guess the driver should work better than other cheap audio cards as it supports scatter/gatter DMA operations. If 500MHz CPU is not sufficient for the driver to work correctly I think something is wrong in the driver. Since I don't have a copy of 82C686 data sheet and hardware I don't know where the problem is. :-( > >Since the driver also needs Giant lock it may suffer from interrupt > >latencies with other devices. In addition if it share IRQ with > >other devices(e.g. USB) the issue would be noticable. > > > > > None that I know of: > > epia2# vmstat -i > interrupt total rate > irq0: clk 30624081 99 > irq1: atkbd0 416592 1 > irq8: rtc 39199914 128 > irq10: pcm0 1210380 3 > irq11: vr0 531082 1 > irq12: psm0 1354640 4 > irq13: npx0 1 0 > irq14: ata0 3681643 12 > Total 77018333 251 > > irc10 is not shared by any other likely interrupt source, or so it seems. > Do you use VCHAN? How about increasing DMA buffer size to 8 or 16KB? Default DMA buffer size is 4KB(via82c686.c, line 44) which I guess too small to support scatter/gatter DMA operations. How many pcm interrupts do you see when you use skype? (Use systat -vmstat 1 to to see the number of interrupts/second.) -- Regards, Pyun YongHyeon http://www.kr.freebsd.org/~yongari | yongari@freebsd.org