From owner-freebsd-multimedia@FreeBSD.ORG Thu Sep 15 03:36:31 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 709C316A41F for ; Thu, 15 Sep 2005 03:36:31 +0000 (GMT) (envelope-from pyunyh@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id D239043D45 for ; Thu, 15 Sep 2005 03:36:30 +0000 (GMT) (envelope-from pyunyh@gmail.com) Received: by zproxy.gmail.com with SMTP id z31so141557nzd for ; Wed, 14 Sep 2005 20:36:30 -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=uJcGOLQLH0Y797MxNTMLZ6siW9EYTraGMWZOKLVPo2YkhqOWc2UOZn1BhDqsGXJqf0PbPSX6bMzRWTTOPBaA4AZrcbtFulZrF3KWyvgMEM72McQfeHa5uS3jEluPpXAIau0yKZ+XTde8r4PgyGTLuatTrAiA5vY1VOR8P+XE23Q= Received: by 10.36.3.20 with SMTP id 20mr1427628nzc; Wed, 14 Sep 2005 20:36:30 -0700 (PDT) Received: from michelle.rndsoft.co.kr ( [211.32.202.211]) by mx.gmail.com with ESMTP id 17sm372439nzo.2005.09.14.20.36.27; Wed, 14 Sep 2005 20:36:28 -0700 (PDT) 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 j8F3b3ln018315 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 15 Sep 2005 12:37:04 +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 j8F3awCm018314; Thu, 15 Sep 2005 12:36:58 +0900 (KST) (envelope-from yongari@rndsoft.co.kr) Date: Thu, 15 Sep 2005 12:36:58 +0900 From: Pyun YongHyeon To: "Steven S." Message-ID: <20050915033658.GB17602@rndsoft.co.kr> References: <20050914174543.L45764@atlantis.403forbidden.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="9amGYk9869ThD9tj" Content-Disposition: inline In-Reply-To: <20050914174543.L45764@atlantis.403forbidden.net> User-Agent: Mutt/1.4.2.1i Cc: freebsd-multimedia@freebsd.org Subject: Re: any hope for maestro support? 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: Thu, 15 Sep 2005 03:36:31 -0000 --9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Sep 14, 2005 at 05:54:41PM -0400, Steven S. wrote: > > My original PR is now 1 1/2 years old (kern/63204) and still no luck of > getting the maestro-2e (ES1978) to work. While you can load the sound > driver and it "seems" to work the mixer has no options and you cannot get > any output out of the speakers. > > [...] > when i load the driver.. > > pcm0: port 0xfc00-0xfcff irq 11 at device 12.0 > on pci0 > pcm0: agg_rdcodec() RW_DONE timed out. > pcm0: will perform cold reset. > pcm0: agg_rdcodec() RW_DONE timed out. > pcm0: agg_rdcodec() PROGLESS timed out. > pcm0: agg_rdcodec() RW_DONE timed out. > pcm0: agg_wrcodec() PROGLESS timed out. > pcm0: agg_rdcodec() PROGLESS timed out. > pcm0: agg_rdcodec() RW_DONE timed out. > pcm0: agg_wrcodec() PROGLESS timed out. > pcm0: agg_rdcodec() PROGLESS timed out. > pcm0: agg_rdcodec() RW_DONE timed out. > pcm0: agg_wrcodec() PROGLESS timed out. > pcm0: agg_rdcodec() PROGLESS timed out. > pcm0: agg_rdcodec() RW_DONE timed out. > pcm0: agg_wrcodec() PROGLESS timed out. > pcm0: agg_rdcodec() PROGLESS timed out. > pcm0: agg_rdcodec() RW_DONE timed out. > pcm0: agg_wrcodec() PROGLESS timed out. > pcm0: agg_rdcodec() PROGLESS timed out. > pcm0: agg_rdcodec() RW_DONE timed out. > pcm0: agg_wrcodec() PROGLESS timed out. > pcm0: agg_rdcodec() PROGLESS timed out. > pcm0: agg_rdcodec() RW_DONE timed out. > pcm0: agg_wrcodec() PROGLESS timed out. > pcm0: agg_rdcodec() PROGLESS timed out. > pcm0: agg_rdcodec() RW_DONE timed out. > pcm0: agg_wrcodec() PROGLESS timed out. > pcm0: agg_rdcodec() PROGLESS timed out. > pcm0: agg_rdcodec() RW_DONE timed out. > pcm0: agg_wrcodec() PROGLESS timed out. > pcm0: agg_rdcodec() PROGLESS timed out. > pcm0: agg_rdcodec() RW_DONE timed out. > pcm0: agg_wrcodec() PROGLESS timed out. > pcm0: > pcm0: agg_rdcodec() PROGLESS timed out. > pcm0: agg_rdcodec() RW_DONE timed out. > pcm0: ac97 codec reports dac not ready > pcm0: agg_wrcodec() PROGLESS timed out. > pcm0: agg_wrcodec() PROGLESS timed out. > > > Id Refs Address Size Name > 1 5 0xc0400000 36cf38 kernel > 2 1 0xc076d000 7200 snd_maestro.ko > 3 15 0xc0775000 58034 acpi.ko > > FreeBSD Audio Driver (newpcm) > Installed devices: > pcm0: at I/O port 0xfc00 irq 11 kld > snd_maestro (4p/0r/4v > channels duplex default) > Would you try attaced patch? I don't have the hardware so it's just guess work. -- Regards, Pyun YongHyeon --9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="maestro.patch" --- sys/dev/sound/pci/maestro.c.orig Tue Mar 1 17:58:05 2005 +++ sys/dev/sound/pci/maestro.c Thu Sep 15 12:46:56 2005 @@ -227,7 +227,7 @@ static inline u_int16_t wc_rdchctl(struct agg_info*, int); static inline void wc_wrchctl(struct agg_info*, int, u_int16_t); -static inline void agg_stopclock(struct agg_info*, int part, int st); +static void agg_stopclock(struct agg_info*, int, int); static inline void agg_initcodec(struct agg_info*); static void agg_init(struct agg_info*); @@ -284,7 +284,7 @@ { int timo; - timo = msec * hz / 1000; + timo = ((msec) * hz + 999) / 1000; if (timo == 0) timo = 1; #ifdef USING_MUTEX @@ -345,16 +345,18 @@ static inline int agg_codec_wait4idle(struct agg_info *ess) { - unsigned t = 26; + int i, step, to; - while (AGG_RD(ess, PORT_CODEC_STAT, 1) & CODEC_STAT_MASK) { - if (--t == 0) - return EBUSY; - DELAY(2); /* 20.8us / 13 */ + to = 10000; /* 10ms */ + for (i = 0, step = 1; i < to; i += step) { + if ((AGG_RD(ess, PORT_CODEC_STAT, 1) & CODEC_STAT_MASK) == 0) + return (0); + step += step; + DELAY(step); } - return 0; -} + return (EBUSY); +} static inline int agg_rdcodec(struct agg_info *ess, int regno) @@ -562,7 +564,7 @@ /* -------------------------------------------------------------------- */ /* Power management */ -static inline void +static void agg_stopclock(struct agg_info *ess, int part, int st) { u_int32_t data; @@ -614,9 +616,9 @@ AGG_WR(ess, PORT_GPIO_MASK, 0xff6, 2); AGG_WR(ess, PORT_GPIO_DIR, data | 0x009, 2); AGG_WR(ess, PORT_GPIO_DATA, 0x000, 2); - DELAY(2); + DELAY(20); AGG_WR(ess, PORT_GPIO_DATA, 0x001, 2); - DELAY(1); + DELAY(20); AGG_WR(ess, PORT_GPIO_DATA, 0x009, 2); agg_sleep(ess, "agginicd", 500); AGG_WR(ess, PORT_GPIO_DIR, data, 2); --9amGYk9869ThD9tj--