From owner-freebsd-multimedia Sun Jan 30 3:52:35 2000 Delivered-To: freebsd-multimedia@freebsd.org Received: from fleming.cs.strath.ac.uk (fleming.cs.strath.ac.uk [130.159.196.126]) by hub.freebsd.org (Postfix) with ESMTP id 40392151E9 for ; Sun, 30 Jan 2000 03:52:24 -0800 (PST) (envelope-from roger@cs.strath.ac.uk) Received: from cs.strath.ac.uk (scary.dmem.strath.ac.uk [130.159.202.5]) by fleming.cs.strath.ac.uk (8.8.8/8.8.8) with ESMTP id LAA17500 Sun, 30 Jan 2000 11:51:59 GMT Message-ID: <3894252F.F597ECDF@cs.strath.ac.uk> Date: Sun, 30 Jan 2000 11:49:03 +0000 From: Roger Hardiman Organization: Strathclyde University X-Mailer: Mozilla 4.51 [en] (X11; I; FreeBSD 3.4-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: Joachim =?iso-8859-1?Q?J=E4ckel?= , freebsd-multimedia@FreeBSD.ORG Subject: Re: could need a little bit support with a device-driver References: <38923745.8ADE97CC@d.kamp.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Joachim, > Because of that, I think I've to program it similiar to the > i2c-interface of the bktr-device. I'll explain bit-banging. The i2c bus uses 2 wires, one for data, one for a clock pulse. On the bt848 chip, you can write an i2c device address, and some data to a single register and the bt848 handles the i2c bus for you. Alternativly, you can write your own software to drive the data and clock lines (SDL and SCL) manually, in which case you output each bit in turn, and handle the full i2c protocol. This manual control is called bit-banding. in the bt848 driver, you can use the bt848 i2c control for the tuner device, but you need to use bit banging for the MSP34xx stereo audio decoder as it needs a protocol unsupported by the bt848's easy i2c register. Finally, the bktr driver used to do all the i2c control locally to the driver. Now it registers both as an i2c hardware provider and an i2c bus user with the smbus and iicbus code. Both the old code and the new code are in the driver (as the driver still compiles on old FreeBSD versions and on NetBSD and OpenBSD which do not have our smbus and iicbus code) Good luck Roger To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message