From owner-freebsd-multimedia@FreeBSD.ORG Wed Nov 9 05:27:05 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 5820D16A41F for ; Wed, 9 Nov 2005 05:27:05 +0000 (GMT) (envelope-from dgreid@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C2A643D53 for ; Wed, 9 Nov 2005 05:27:03 +0000 (GMT) (envelope-from dgreid@gmail.com) Received: by wproxy.gmail.com with SMTP id i5so282498wra for ; Tue, 08 Nov 2005 21:27:03 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=ct+m9KRTZ3pC0Svu1lXb+n3axhuQtEv7Zc54qQeMRoXYFY/q4pc5z4N6UZUVdC/nWP67xBznMeUlX+AxNg+IDZSDCqPQpjwmBQxaRlp6A/Q+LJUG3grF2tf7dydZVJbFOEso9AEUhanDV4gQiIU8qsK/yXO4UJaEs/hZ8BA5SwI= Received: by 10.54.86.19 with SMTP id j19mr253802wrb; Tue, 08 Nov 2005 21:27:03 -0800 (PST) Received: by 10.54.118.17 with HTTP; Tue, 8 Nov 2005 21:27:03 -0800 (PST) Message-ID: Date: Wed, 9 Nov 2005 05:27:03 +0000 From: Dylan Reid To: freebsd-multimedia@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: PVR250 MCE with cxm driver under 6.0 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 05:27:05 -0000 I have been trying to set up mythtv on FreeBSD 6.0 with an amd64 system. First thing was to get the capture card to work. I first applied patches fo= r ports/85433 and ports/87518. This got me compiling. In order to get the module to load, I had to ignore the missing IR receiver. Next I wanted to use composite input, so I had to change which mode the saa7115 was configured to when the composite input was selected. I could no= t find a good way to determine dynamically if the card is an MCE or not. I di= d not look into this too hard however. So i just went with the easiest possible change. I did notice the Linux ivtv driver does not know the difference. Below are the patches I made in case anyone else wants to use the cxm drive= r with a 250 MCE. -Dylan --- cxm.c.orig Wed Nov 9 04:42:14 2005 +++ cxm.c Wed Nov 9 04:51:56 2005 @@ -1762,8 +1762,10 @@ */ if (cxm_ir_init(sc) < 0) { device_printf(dev, "could not initialize IR remote\n"); +#ifndef PVR250_MCE error =3D ENXIO; goto fail; +#endif } sc->dec_mbx =3D -1; --- cxm.h.orig Wed Nov 9 04:59:32 2005 +++ cxm.h Wed Nov 9 05:00:13 2005 @@ -41,6 +41,8 @@ #define NUM_ELEMENTS(array) (sizeof(array) / sizeof(*array)) +#define PVR250_MCE // define for media center edition + /* * For simplicity several large buffers allocate during * driver attachment which normally occurs early on --- cxm_video.c.orig Wed Nov 9 04:44:24 2005 +++ cxm_video.c Wed Nov 9 05:21:44 2005 @@ -147,6 +147,21 @@ } }; +#ifdef PVR250_MCE +static struct cxm_saa7115_command +saa7115_select_line_in_composite =3D { + 3, + { + /* Amp plus anti-alias filter, CVBS from AI24 */ + { 0x02, 1, { 0xc5 } }, + /* Adaptive luminance comb filter */ + { 0x09, 1, { 0x40 } }, + + /* Enable AD2, audio clock, scaler, decoder */ + { 0x88, 1, { 0xb0 } } + } +}; +#else static struct cxm_saa7115_command saa7115_select_line_in_composite =3D { 3, @@ -160,6 +175,7 @@ { 0x88, 1, { 0x70 } } } }; +#endif static struct cxm_saa7115_command saa7115_select_line_in_svideo =3D {