From owner-freebsd-multimedia@FreeBSD.ORG Wed Oct 11 01:18:30 2006 Return-Path: X-Original-To: freebsd-multimedia@freebsd.org 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 1874616A492 for ; Wed, 11 Oct 2006 01:18:30 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id 27EFD43D4C for ; Wed, 11 Oct 2006 01:18:29 +0000 (GMT) (envelope-from pyunyh@gmail.com) Received: by py-out-1112.google.com with SMTP id o67so68731pye for ; Tue, 10 Oct 2006 18:18:28 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=ezM+a7ElUJR341k4lFVIQDvG8YFb3k/QcPJ1CZ8G4yDfTllUKijHa8tlldKwKN68xGqCEthBM84VaglihW6P9DJYSeE5BHWSQbJDxJbsd37iqxnbCEyggNSJxUFif+CFaMYV0IN6lXSz/RQloCWOhWSAi6em96bW9e6HFwrhKNU= Received: by 10.35.61.2 with SMTP id o2mr332955pyk; Tue, 10 Oct 2006 18:18:27 -0700 (PDT) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.google.com with ESMTP id 6sm618013nzn.2006.10.10.18.18.24; Tue, 10 Oct 2006 18:18:26 -0700 (PDT) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id k9B1IKW8012143 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 11 Oct 2006 10:18:20 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id k9B1IIxC012142; Wed, 11 Oct 2006 10:18:18 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Wed, 11 Oct 2006 10:18:18 +0900 From: Pyun YongHyeon To: Anish Mistry Message-ID: <20061011011818.GB11667@cdnetworks.co.kr> References: <200511211530.jALFUOFL035354@freefall.freebsd.org> <200610071652.16259.amistry@am-productions.biz> <20061010071632.GD7419@cdnetworks.co.kr> <200610101559.32458.amistry@am-productions.biz> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ZPt4rx8FFjLCG7dd" Content-Disposition: inline In-Reply-To: <200610101559.32458.amistry@am-productions.biz> User-Agent: Mutt/1.4.2.1i Cc: freebsd-multimedia@freebsd.org, Marian Cerny Subject: Re: kern/87782: [sound] snd_t4dwave and pcm0:record:0: record interrupt timeout, channel dead X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Oct 2006 01:18:30 -0000 --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Oct 10, 2006 at 03:59:20PM -0400, Anish Mistry wrote: > On Tuesday 10 October 2006 03:16, Pyun YongHyeon wrote: > > On Sat, Oct 07, 2006 at 04:52:02PM -0400, Anish Mistry wrote: > > > On Monday 21 November 2005 10:30, Marian Cerny wrote: > > > > The following reply was made to PR kern/87782; it has been > > > > noted by GNATS. > > > > > > > > From: Marian Cerny > > > > To: bug-followup@FreeBSD.org, freebsd@fadesa.es > > > > Cc: > > > > Subject: Re: kern/87782: [sound] snd_t4dwave and > > > > pcm0:record:0: record interrupt timeout, channel dead Date: > > > > Mon, 21 Nov 2005 16:29:00 +0100 > > > > > > > > I have the same problem on FreeBSD 5.4-RELEASE-p1. > > > > > > > > # dmesg | grep pcm > > > > pcm0: port 0x8400-0x84ff mem > > > > 0xf0011000-0xf0011fff irq 5 at device 8.0 on pci0 pcm0: > > > > > > > > pcm0:record:0: record interrupt timeout, channel dead > > > > > > pcm0: port 0x1000-0x10ff mem > > > 0xfc101000-0xfc101fff irq 9 at device 4.0 on pci0 > > > pcm0: > > > pcm0: at io 0x1000 irq 9 kld snd_t4dwave > > > (4p/1r/1v channels duplex default) > > > > > > I'm still seeing this with -CURRENT. I can give access to > > > someone if they need access. > > > > Hmm... I think I've posted a possible fix log time ago but got no > > reply. Would you please try attached patch? > > If it work for you I'll make complete patch. > The patch does not work. I don't see the channel dead message when > using wmrecord, but the app sort of hangs (I can stop the recording, > but the timer doesn't advance) and doesn't record anything. There > seems to be data in the wav file but it isn't playable. Attached. > Did recording ever work on your M5451? I have no idea why t4dwave(4) still uses legacy capturing mode(Sound Blaster compatible mode). It seems that M5451 support code lacks codec initialization. So I guess its ADC part was not activated. Try attached patch and let me know the result. -- Regards, Pyun YongHyeon --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="t4dwave.diff2" --- t4dwave.c.orig Tue Mar 1 17:58:05 2005 +++ t4dwave.c Wed Oct 11 09:57:42 2006 @@ -93,6 +93,7 @@ struct mtx *lock; + u_int32_t numchans; u_int32_t playchns; unsigned int bufsz; @@ -725,7 +726,7 @@ intsrc = tr_rd(tr, TR_REG_MISCINT, 4); if (intsrc & TR_INT_ADDR) { chnum = 0; - while (chnum < 64) { + while (chnum < tr->numchans) { mask = 0x00000001; active = tr_rd(tr, (chnum < 32)? TR_REG_ADDRINTA : TR_REG_ADDRINTB, 4); bufhalf = tr_rd(tr, (chnum < 32)? TR_REG_CSPF_A : TR_REG_CSPF_B, 4); @@ -773,6 +774,7 @@ tr_wr(tr, SPA_REG_CODECST, SPA_RST_OFF, 4); break; case TDX_PCI_ID: + case ALI_PCI_ID: tr_wr(tr, TDX_REG_CODECST, TDX_CDC_ON, 4); break; case TNX_PCI_ID: @@ -846,6 +848,10 @@ device_printf(dev, "unable to initialize the card\n"); goto bad; } + if (tr->type == ALI_PCI_ID) + tr->numchans = 32; + else + tr->numchans = 64; tr->playchns = 0; codec = AC97_CREATE(dev, tr, tr_ac97); --ZPt4rx8FFjLCG7dd--