From owner-freebsd-multimedia@FreeBSD.ORG Tue Jun 23 16:23:34 2009 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27F29106564A for ; Tue, 23 Jun 2009 16:23:34 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: from mail-bw0-f209.google.com (mail-bw0-f209.google.com [209.85.218.209]) by mx1.freebsd.org (Postfix) with ESMTP id A72B58FC19 for ; Tue, 23 Jun 2009 16:23:33 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: by bwz5 with SMTP id 5so182116bwz.43 for ; Tue, 23 Jun 2009 09:23:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=7w+Vgu1ob3g5bvFAWra87YHZ6nlPX37dW5WA9XxqoqE=; b=bAn/cd3ttnJefFOakdCPI74/z0bEUs0QA9SJmykiPQ13LQmDDMmr95EO4mITRQx0GA JgnRefYi7Sx8WTIikvtLeo8h2feWK+lxcr+LkWIf3tH0T+f/DHEzovgPb4Q5OLiCltVo eN7sp04EesM1MbbMqmrO7f0wBwfvgtFYOGYuw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=J7j9hlRil8Xp5IyCLtuq5B9BbJ8CBRr+TLo9aXLNnSOziGiHA6yQQifIruovzHiAzr QXPs741jiYTOnxUBvo5VPmciuYMYUiJ0p9/YEDHyPdJqWOmNbqyV2R5CAdkTPjosXOVZ uF2EhY6pA3GWI6/zU6+kNgE/K3s3dVqYJh72s= MIME-Version: 1.0 Received: by 10.223.103.207 with SMTP id l15mr341367fao.2.1245774212286; Tue, 23 Jun 2009 09:23:32 -0700 (PDT) Date: Tue, 23 Jun 2009 11:23:32 -0500 Message-ID: <2d1264630906230923s4aaaaa63rc283dd1ffce2eef9@mail.gmail.com> From: Jason Harmening To: freebsd-multimedia@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Updated cx88 driver, now with PCIe! 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: Tue, 23 Jun 2009 16:23:34 -0000 cx88 version 1.2.0 is now in ports. In addition to the fix for the userspace buffer sync panic (I'm awesome!) and some cleanup of the internal driver architecture, this release adds kernel driver support for CX23885/7/8-based PCIe cards. Datasheets for the CX23885 family are not publicly available, but this support was made possible by the hard work of Konstantin Dimitrov. He did a great deal of clean-room research into the register-level programming interfaces for the CX23885/7/8, and was ultimately able to determine their SRAM layout and much of the required I2C and MPEG transport stream control logic. We were able to fill in all the remaining gaps based on our existing knowledge of the CX23880 family and correlation of observed behavior with the register constants declared in the Linux CX23885 driver source code. The net result of this effort is a very clean driver enhancement--All of the fundamental DMA and I2C logic is integrated into the common code base with leverage of existing cx88 infrastructure and relatively little added code. Common MPEG routines have been moved to cx88mpegcore.ko, which also exposes the /dev/cx88mpeg* device nodes, so the nodes are ioctl(2)-compatible. cx88mpeg.ko is now a thin CX23880-specific wrapper around cx88mpegcore, while cx23885.ko is a thin CX23885-family wrapper for all device interfaces that may be used with CX23885/7/8 devices (currently only cx88mpegcore). This support is currently MPEG-only. We will consider adding support for other streams (analog, MPEG encoders, etc.) as need arises. As usual, the kernel drivers should attach to any CX23885/7/8 device. The initial CX23885-family cards supported in userspace are the Hauppauge WinTV HVR-1250 and HVR-1800. Unfortunately, these are not dual-HDTV cards. Each has one MPEG transport stream attached to the digital TV frontend, while the 1800 has the other transport stream attached to the analog frontend via a hardware encoder. I'll shortly begin work on support for the DViCO Fusion 7 Dual, which *is* a dual-HDTV card. Konstantin is also working on support for DVB-T CX23885/7/8 cards, namely the HVR-1200 and HVR-1700. He has successfully captured TV streams with them, but they have complex tuners/demodulators that need a lot of work to polish. There are also new tunables for enabling I2C polling (for those RT people who don't like lots of interrupts) and for enabling message signaled interrupts (PCIe-only). See the wiki for details. Please join me in giving a shout-out to Konstantin--without his hard work I'd still be sitting here waiting for a datasheet to fall from the sky. --Jason