From owner-freebsd-multimedia@FreeBSD.ORG Wed Nov 9 16:07:36 2005 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 9364A16A41F; Wed, 9 Nov 2005 16:07:36 +0000 (GMT) (envelope-from skywizard@MyBSD.org.my) Received: from tomoyo.MyBSD.org.my (tomoyo.mybsd.org.my [202.157.186.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DD1843D48; Wed, 9 Nov 2005 16:07:35 +0000 (GMT) (envelope-from skywizard@MyBSD.org.my) Received: from localhost (localhost [127.0.0.1]) by tomoyo.MyBSD.org.my (Postfix) with ESMTP id 447B86CC26; Thu, 10 Nov 2005 00:09:54 +0800 (MYT) Received: from tomoyo.MyBSD.org.my ([127.0.0.1]) by localhost (TOMOYO.MYBSD.ORG.MY [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 95908-07; Thu, 10 Nov 2005 00:09:52 +0800 (MYT) Received: from kasumi.MyBSD.org.my (kasumi.MyBSD.org.my [IPv6:2001:328:2002:aa2::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tomoyo.MyBSD.org.my (Postfix) with ESMTP id 873236CC23; Thu, 10 Nov 2005 00:09:51 +0800 (MYT) Date: Thu, 10 Nov 2005 00:07:38 +0800 From: Ariff Abdullah To: Jean-Yves Lefort Message-Id: <20051110000738.00a209a6.skywizard@MyBSD.org.my> In-Reply-To: <20051109143435.7ee172cb.jylefort@FreeBSD.org> References: <200511081520.jA8FKJZd045781@freefall.freebsd.org> <20051108233517.5ec73d79.skywizard@MyBSD.org.my> <20051108181710.5c94a158.jylefort@FreeBSD.org> <20051109174843.7e97f8d7.skywizard@MyBSD.org.my> <20051109130245.3e807703.jylefort@FreeBSD.org> <20051109204513.54f482d3.skywizard@MyBSD.org.my> <20051109143435.7ee172cb.jylefort@FreeBSD.org> Organization: MyBSD X-Mailer: /usr/local/lib/ruby/1.8/net/smtp.rb Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by Amavisd AntiVirus & AntiSpam Scanner running on FreeBSD mailserver at TOMOYO.MYBSD.ORG.MY Cc: freebsd-multimedia@FreeBSD.org Subject: Re: kern/31398: [sound] newpcm does not play back the tail of sound X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Nov 2005 16:07:36 -0000 On Wed, 9 Nov 2005 14:34:35 +0100 Jean-Yves Lefort wrote: > > Excellent. While here, could you also incorporate kern/40132 (and > kern/20297 can be closed)? > [ .. ] > > Adapted to your patch: > > --- sys/dev/sound/pci/es137x.c.orig Tue Nov 8 16:56:09 2005 > +++ sys/dev/sound/pci/es137x.c Tue Nov 8 17:04:24 2005 > @@ -771,7 +771,7 @@ > } else { > es->escfg = ES_SET_SINGLE_PCM_MIX(es->escfg, 0); > } > - es->ctrl = CTRL_CDC_EN | CTRL_SERR_DIS | > + es->ctrl = CTRL_CDC_EN | CTRL_JYSTK_EN | CTRL_SERR_DIS | > (DAC2_SRTODIV(fixed_rate) << CTRL_SH_PCLKDIV); > es->ctrl |= 3 << CTRL_SH_WTSRSEL; > es_wr(es, ES1370_REG_CONTROL, es->ctrl, 4); > @@ -801,7 +801,7 @@ > /* This is NOT ES1370 */ > es->escfg = ES_SET_IS_ES1370(es->escfg, 0); > es->num = 0; > - es->ctrl = 0; > + es->ctrl = CTRL_JYSTK_EN; > es->sctrl = 0; > cssr = 0; > devid = pci_get_devid(es->dev); > @@ -824,9 +824,10 @@ > DELAY(20000); > } > /* AC'97 warm reset to start the bitclk */ > - es_wr(es, ES1370_REG_CONTROL, es->ctrl | ES1371_SYNC_RES, 4); > - DELAY(2000); > es_wr(es, ES1370_REG_CONTROL, es->ctrl, 4); > + es_wr(es, ES1371_REG_LEGACY, ES1371_SYNC_RES, 4); > + DELAY(2000); > + es_wr(es, ES1370_REG_CONTROL, es->sctrl, 4); > es1371_wait_src_ready(es); > /* Init the sample rate converter */ > es_wr(es, ES1371_REG_SMPRATE, ES1371_DIS_SRC, 4); > > Both versions work fine for me, my sound card: > Looks good. I'll incorporate it. Thanks. > pcm0@pci0:9:0: class=0x040100 card=0x13711274 chip=0x13711274 > rev=0x08 hdr=0x00 vendor = 'Creative (Was: Ensoniq)' > device = 'ES1371, ES1373 AudioPCI' > class = multimedia > subclass = audio > > Thanks > -- Ariff Abdullah MyBSD http://www.MyBSD.org.my (IPv6/IPv4) http://staff.MyBSD.org.my (IPv6/IPv4) http://tomoyo.MyBSD.org.my (IPv6/IPv4)