亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? dv1394-private.h

?? Ieee1394驅(qū)動實(shí)現(xiàn)
?? H
?? 第 1 頁 / 共 2 頁
字號:
/*
 * dv1394-private.h - DV input/output over IEEE 1394 on OHCI chips
 *   Copyright (C)2001 Daniel Maas <dmaas@dcine.com>
 *     receive by Dan Dennedy <dan@dennedy.org>
 *
 * based on:
 *   video1394.h - driver for OHCI 1394 boards
 *   Copyright (C)1999,2000 Sebastien Rougeaux <sebastien.rougeaux@anu.edu.au>
 *                          Peter Schlaile <udbz@rz.uni-karlsruhe.de>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#ifndef _DV_1394_PRIVATE_H
#define _DV_1394_PRIVATE_H

#include "ieee1394.h"
#include "ohci1394.h"
#include "dma.h"

/* data structures private to the dv1394 driver */
/* none of this is exposed to user-space */


/*
   the 8-byte CIP (Common Isochronous Packet) header that precedes
   each packet of DV data.

   See the IEC 61883 standard.
*/

struct CIP_header { unsigned char b[8]; };

static inline void fill_cip_header(struct CIP_header *cip,
				   unsigned char source_node_id,
				   unsigned long counter,
				   enum pal_or_ntsc format,
				   unsigned long timestamp)
{
	cip->b[0] = source_node_id;
	cip->b[1] = 0x78; /* packet size in quadlets (480/4) - even for empty packets! */
	cip->b[2] = 0x00;
	cip->b[3] = counter;

	cip->b[4] = 0x80; /* const */

	switch(format) {
	case DV1394_PAL:
		cip->b[5] = 0x80;
		break;
	case DV1394_NTSC:
		cip->b[5] = 0x00;
		break;
	}

	cip->b[6] = timestamp >> 8;
	cip->b[7] = timestamp & 0xFF;
}



/*
   DMA commands used to program the OHCI's DMA engine

   See the Texas Instruments OHCI 1394 chipset documentation.
*/

struct output_more_immediate { u32 q[8]; };
struct output_more { u32 q[4]; };
struct output_last { u32 q[4]; };
struct input_more { u32 q[4]; };
struct input_last { u32 q[4]; };

/* outputs */

static inline void fill_output_more_immediate(struct output_more_immediate *omi,
					      unsigned char tag,
					      unsigned char channel,
					      unsigned char sync_tag,
					      unsigned int  payload_size)
{
	omi->q[0] = cpu_to_le32(0x02000000 | 8); /* OUTPUT_MORE_IMMEDIATE; 8 is the size of the IT header */
	omi->q[1] = 0;
	omi->q[2] = 0;
	omi->q[3] = 0;

	/* IT packet header */
	omi->q[4] = cpu_to_le32(  (0x0 << 16)  /* IEEE1394_SPEED_100 */
				  | (tag << 14)
				  | (channel << 8)
				  | (TCODE_ISO_DATA << 4)
				  | (sync_tag) );

	/* reserved field; mimic behavior of my Sony DSR-40 */
	omi->q[5] = cpu_to_le32((payload_size << 16) | (0x7F << 8) | 0xA0);

	omi->q[6] = 0;
	omi->q[7] = 0;
}

static inline void fill_output_more(struct output_more *om,
				    unsigned int data_size,
				    unsigned long data_phys_addr)
{
	om->q[0] = cpu_to_le32(data_size);
	om->q[1] = cpu_to_le32(data_phys_addr);
	om->q[2] = 0;
	om->q[3] = 0;
}

static inline void fill_output_last(struct output_last *ol,
				    int want_timestamp,
				    int want_interrupt,
				    unsigned int data_size,
				    unsigned long data_phys_addr)
{
	u32 temp = 0;
	temp |= 1 << 28; /* OUTPUT_LAST */

	if (want_timestamp) /* controller will update timestamp at DMA time */
		temp |= 1 << 27;

	if (want_interrupt)
		temp |= 3 << 20;

	temp |= 3 << 18; /* must take branch */
	temp |= data_size;

	ol->q[0] = cpu_to_le32(temp);
	ol->q[1] = cpu_to_le32(data_phys_addr);
	ol->q[2] = 0;
	ol->q[3] = 0;
}

/* inputs */

static inline void fill_input_more(struct input_more *im,
				   int want_interrupt,
				   unsigned int data_size,
				   unsigned long data_phys_addr)
{
	u32 temp =  2 << 28; /* INPUT_MORE */
	temp |= 8 << 24; /* s = 1, update xferStatus and resCount */
	if (want_interrupt)
		temp |= 0 << 20; /* interrupts, i=0 in packet-per-buffer mode */
	temp |= 0x0 << 16; /* disable branch to address for packet-per-buffer mode */
	                       /* disable wait on sync field, not used in DV :-( */
       	temp |= data_size;

	im->q[0] = cpu_to_le32(temp);
	im->q[1] = cpu_to_le32(data_phys_addr);
	im->q[2] = 0; /* branchAddress and Z not use in packet-per-buffer mode */
	im->q[3] = 0; /* xferStatus & resCount, resCount must be initialize to data_size */
}
 
static inline void fill_input_last(struct input_last *il,
				    int want_interrupt,
				    unsigned int data_size,
				    unsigned long data_phys_addr)
{
	u32 temp =  3 << 28; /* INPUT_LAST */
	temp |= 8 << 24; /* s = 1, update xferStatus and resCount */
	if (want_interrupt)
		temp |= 3 << 20; /* enable interrupts */
	temp |= 0xC << 16; /* enable branch to address */
	                       /* disable wait on sync field, not used in DV :-( */
	temp |= data_size;

	il->q[0] = cpu_to_le32(temp);
	il->q[1] = cpu_to_le32(data_phys_addr);
	il->q[2] = cpu_to_le32(1); /* branchAddress (filled in later) and Z = 1 descriptor in next block */
	il->q[3] = cpu_to_le32(data_size); /* xferStatus & resCount, resCount must be initialize to data_size */
}



/*
   A "DMA descriptor block" consists of several contiguous DMA commands.
   struct DMA_descriptor_block encapsulates all of the commands necessary
   to send one packet of DV data.

   There are three different types of these blocks:

        1) command to send an empty packet (CIP header only, no DV data):

	    OUTPUT_MORE-Immediate <-- contains the iso header in-line
	    OUTPUT_LAST           <-- points to the CIP header

	2) command to send a full packet when the DV data payload does NOT
	   cross a page boundary:

	    OUTPUT_MORE-Immediate <-- contains the iso header in-line
	    OUTPUT_MORE           <-- points to the CIP header
	    OUTPUT_LAST           <-- points to entire DV data payload

	3) command to send a full packet when the DV payload DOES cross
	   a page boundary:

	    OUTPUT_MORE-Immediate <-- contains the iso header in-line
	    OUTPUT_MORE           <-- points to the CIP header
	    OUTPUT_MORE           <-- points to first part of DV data payload
	    OUTPUT_LAST           <-- points to second part of DV data payload

   This struct describes all three block types using unions.

   !!! It is vital that an even number of these descriptor blocks fit on one
   page of memory, since a block cannot cross a page boundary !!!

 */

struct DMA_descriptor_block {

	union {
		struct {
			/*  iso header, common to all output block types */
			struct output_more_immediate omi;

			union {
				/* empty packet */
				struct {
					struct output_last ol;  /* CIP header */
				} empty;

				/* full packet */
				struct {
					struct output_more om;  /* CIP header */

					union {
				               /* payload does not cross page boundary */
						struct {
							struct output_last ol;  /* data payload */
						} nocross;

				               /* payload crosses page boundary */
						struct {
							struct output_more om;  /* data payload */
							struct output_last ol;  /* data payload */
						} cross;
					} u;

				} full;
			} u;
		} out;

		struct {
			struct input_last il;
		} in;

	} u;

	/* ensure that PAGE_SIZE % sizeof(struct DMA_descriptor_block) == 0
	   by padding out to 128 bytes */
	u32 __pad__[12];
};


/* struct frame contains all data associated with one frame in the
   ringbuffer these are allocated when the DMA context is initialized
   do_dv1394_init().  They are re-used after the card finishes
   transmitting the frame. */

struct video_card; /* forward declaration */

struct frame {

	/* points to the struct video_card that owns this frame */
	struct video_card *video;

	/* index of this frame in video_card->frames[] */
	unsigned int frame_num;

	/* FRAME_CLEAR - DMA program not set up, waiting for data
	   FRAME_READY - DMA program written, ready to transmit

	   Changes to these should be locked against the interrupt
	*/
	enum {
		FRAME_CLEAR = 0,
		FRAME_READY
	} state;

	/* whether this frame has been DMA'ed already; used only from
	   the IRQ handler to determine whether the frame can be reset */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产三级精品三级在线专区| 成人手机在线视频| 国产精品99久久久久久有的能看| 欧洲av一区二区嗯嗯嗯啊| 国产精品久久国产精麻豆99网站| 韩国女主播成人在线观看| 欧美日韩一区二区电影| 亚洲自拍偷拍av| 狠狠狠色丁香婷婷综合激情| 欧美成人三级在线| 国内外成人在线视频| 欧美va天堂va视频va在线| 日本欧美一区二区三区| 69堂精品视频| 日韩中文欧美在线| 91精品一区二区三区在线观看| 午夜私人影院久久久久| 色呦呦日韩精品| 亚洲一区二区欧美激情| 欧美日韩成人一区| 日韩成人一级大片| 日韩欧美国产午夜精品| 精品影院一区二区久久久| 精品国产百合女同互慰| 国产美女精品人人做人人爽| 国产精品久久久久影院亚瑟| 国产成人一区在线| 欧美激情一区在线观看| 色婷婷精品久久二区二区蜜臀av| 伊人一区二区三区| 欧美日韩高清影院| 视频在线观看国产精品| 精品国产污污免费网站入口 | 色偷偷久久一区二区三区| 亚洲综合一二区| 欧美一区二区三区成人| 激情五月婷婷综合网| 国产性天天综合网| 91麻豆视频网站| 蜜桃视频一区二区三区在线观看| 久久久国产综合精品女国产盗摄| 成人app在线观看| 亚洲一区二区三区爽爽爽爽爽 | 欧美女孩性生活视频| 日韩高清国产一区在线| 国产精品欧美久久久久一区二区| 色综合网站在线| 精品一区二区三区在线观看国产| 国产精品水嫩水嫩| 欧美福利一区二区| 国产不卡在线播放| 亚洲v日本v欧美v久久精品| 日韩一二三四区| 成人sese在线| 日本不卡的三区四区五区| 国产精品入口麻豆九色| 欧美精品99久久久**| 99久久精品情趣| 久久精工是国产品牌吗| 亚洲视频在线观看三级| 欧美日韩国产中文| 成人av综合一区| 麻豆精品久久精品色综合| 亚洲伦在线观看| 久久中文字幕电影| 欧美高清精品3d| 91麻豆免费观看| 国产在线播放一区三区四| 亚洲国产成人tv| 成人免费视频在线观看| 久久久蜜臀国产一区二区| 欧美电影一区二区三区| 91老师片黄在线观看| 国产伦理精品不卡| 日韩一区精品视频| 欧美激情在线观看视频免费| 日韩精品一区二区三区在线| 欧美日韩美少妇| 欧美伊人久久大香线蕉综合69 | 国产丝袜欧美中文另类| 日韩一区二区三区视频在线| 在线观看日韩电影| 一本久久综合亚洲鲁鲁五月天| 激情综合色综合久久| 婷婷久久综合九色综合伊人色| 一区二区三区欧美亚洲| 亚洲精品水蜜桃| 亚洲日本va午夜在线影院| 26uuu另类欧美| 国产精品美女久久久久久久| 国产欧美日韩在线| 日韩精品中文字幕一区| 欧美精品一区二区久久久| 欧美一区二区三级| 欧美一级理论片| 精品剧情在线观看| 5566中文字幕一区二区电影| 一本一道久久a久久精品| 色哟哟亚洲精品| 欧美综合久久久| 91.com视频| 日韩精品一区二区三区四区| 精品91自产拍在线观看一区| 日韩欧美一二三区| 欧美天天综合网| 欧美精品视频www在线观看 | 国产福利一区二区三区视频在线| 秋霞午夜av一区二区三区| 蜜臀av一区二区三区| 免费国产亚洲视频| 久久国产夜色精品鲁鲁99| 国产真实乱偷精品视频免| 国产福利91精品一区二区三区| 国产高清不卡一区| 91在线视频官网| 欧美日韩一区高清| 日韩欧美国产三级| 欧美r级在线观看| 亚洲精品国久久99热| 亚洲高清视频在线| 精品系列免费在线观看| 国产大陆亚洲精品国产| 风间由美一区二区三区在线观看| 不卡一区在线观看| 欧美日韩大陆一区二区| 精品美女在线播放| 国产精品久久久久久久久动漫 | 国产成人免费av在线| 欧美三级韩国三级日本三斤| 国产三级精品在线| 亚洲国产视频一区| 国产专区欧美精品| 欧美色爱综合网| 中文字幕av一区 二区| 蜜桃av一区二区在线观看| 色婷婷综合久久久中文字幕| 久久精品人人做人人爽人人| 图片区小说区国产精品视频| www.欧美精品一二区| 日韩免费在线观看| 亚洲bt欧美bt精品| 丰满放荡岳乱妇91ww| 精品久久久久一区二区国产| 亚洲18色成人| 日本高清免费不卡视频| 国产精品精品国产色婷婷| 久久国产精品一区二区| 7777精品伊人久久久大香线蕉超级流畅 | 免费高清视频精品| 欧美日韩免费不卡视频一区二区三区| 国产精品美女久久久久高潮| 国内精品视频一区二区三区八戒| 91精品婷婷国产综合久久性色| 亚洲精品伦理在线| 一本久久a久久免费精品不卡| 国产日产亚洲精品系列| 美国欧美日韩国产在线播放| 色综合久久中文综合久久牛| 久久99精品国产.久久久久久| 久久美女高清视频| 国产成人av电影在线播放| 欧美日韩国产小视频在线观看| 亚洲男同1069视频| 在线视频欧美精品| 国产成人亚洲综合a∨婷婷图片 | 欧美亚洲精品一区| 午夜精品福利视频网站| 欧美一区二区三区电影| 成人动漫中文字幕| 国产.欧美.日韩| 成人污污视频在线观看| 美腿丝袜一区二区三区| 婷婷久久综合九色综合伊人色| 17c精品麻豆一区二区免费| 久久久久成人黄色影片| 91久久一区二区| 蜜桃精品在线观看| 亚洲欧洲三级电影| 欧美一区二区三区四区五区| 国产一区二区不卡在线| 亚洲精品国产第一综合99久久| 日韩欧美久久一区| 99视频在线精品| 国产69精品久久久久777| 性久久久久久久久| 久久久一区二区| 91精品国产高清一区二区三区蜜臀| 麻豆高清免费国产一区| 亚洲成人一区在线| 亚洲欧美一区二区视频| 亚洲精品在线免费播放| 91精品国产综合久久小美女| 91在线视频在线| 色综合天天做天天爱| 激情综合网最新| 久久精品国产久精国产| 性欧美大战久久久久久久久| 伊人婷婷欧美激情| 亚洲同性同志一二三专区| 国产精品天天看|