From owner-freebsd-multimedia@FreeBSD.ORG Tue Dec 11 10:50:02 2007 Return-Path: Delivered-To: freebsd-multimedia@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FE6516A418 for ; Tue, 11 Dec 2007 10:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0DB4413C468 for ; Tue, 11 Dec 2007 10:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id lBBAo1Ue025804 for ; Tue, 11 Dec 2007 10:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id lBBAo19S025803; Tue, 11 Dec 2007 10:50:01 GMT (envelope-from gnats) Date: Tue, 11 Dec 2007 10:50:01 GMT Message-Id: <200712111050.lBBAo19S025803@freefall.freebsd.org> To: freebsd-multimedia@FreeBSD.org From: Ariff Abdullah Cc: Subject: Re: kern/118546: snd_ich: recording broken X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ariff Abdullah List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2007 10:50:02 -0000 The following reply was made to PR kern/118546; it has been noted by GNATS. From: Ariff Abdullah To: bug-followup@FreeBSD.org, uyamba@gmail.com Cc: Subject: Re: kern/118546: snd_ich: recording broken Date: Tue, 11 Dec 2007 18:44:42 +0800 This is a multi-part message in MIME format. --Multipart=_Tue__11_Dec_2007_18_44_42_+0800_5xfqKp2NlJR+0LXn Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > pcm0: at io 0xd800, 0xdc80 irq 9 bufsz 16384 > kld snd_ich [MPSAFE] (1p:1v/2r:1v channels duplex default) ^^ I have doubt for this 2nd record channel for a long time.. 1) Try disabling vchan for record channel (vrec) through sysctl dev.pcm.0.rec.vchans=0. This basically restore 6.x behaviour. 2) If #1 works, try the attached patch even with vrec enabled. -- Ariff Abdullah FreeBSD ... Recording in stereo is obviously too advanced and confusing for us idiot ***** users :P ........ --Multipart=_Tue__11_Dec_2007_18_44_42_+0800_5xfqKp2NlJR+0LXn Content-Type: text/x-diff; name="ich.c.diff" Content-Disposition: attachment; filename="ich.c.diff" Content-Transfer-Encoding: 7bit Index: src/sys/dev/sound/pci/ich.c =================================================================== RCS file: /home/ncvs/src/sys/dev/sound/pci/ich.c,v retrieving revision 1.78 diff -u -r1.78 ich.c --- src/sys/dev/sound/pci/ich.c 11 Jul 2007 14:27:45 -0000 1.78 +++ src/sys/dev/sound/pci/ich.c 11 Dec 2007 09:52:27 -0000 @@ -91,6 +91,7 @@ #define ICH_FIXED_RATE (1 << 3) #define ICH_DMA_NOCACHE (1 << 4) #define ICH_HIGH_LATENCY (1 << 5) +#define ICH_MCH_ENABLED (1 << 6) static const struct ich_type { uint16_t vendor; @@ -980,6 +981,10 @@ device_get_unit(dev), "fixedrate", &i) == 0 && i != 0) sc->flags |= ICH_FIXED_RATE; + if (resource_int_value(device_get_name(dev), + device_get_unit(dev), "mch_enabled", &i) == 0 && i != 0) + sc->flags |= ICH_MCH_ENABLED; + sc->irqid = 0; sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irqid, RF_ACTIVE | RF_SHAREABLE); @@ -1026,7 +1031,11 @@ extcaps = ac97_getextcaps(sc->codec); sc->hasvra = extcaps & AC97_EXTCAP_VRA; sc->hasvrm = extcaps & AC97_EXTCAP_VRM; - sc->hasmic = ac97_getcaps(sc->codec) & AC97_CAP_MICCHANNEL; + if ((sc->flags & ICH_MCH_ENABLED) && + (ac97_getcaps(sc->codec) & AC97_CAP_MICCHANNEL)) + sc->hasmic = 1; + else + sc->flags &= ~ICH_MCH_ENABLED; ac97_setextmode(sc->codec, sc->hasvra | sc->hasvrm); sc->dtbl_size = sizeof(struct ich_desc) * ICH_DTBL_LENGTH * --Multipart=_Tue__11_Dec_2007_18_44_42_+0800_5xfqKp2NlJR+0LXn--