[Linux1394-cvslog] rev 565 - branches/rawiso
Brought to you by:
aeb,
bencollins
From: SVN U. <dm...@li...> - 2002-08-28 08:01:26
|
Author: dmaas Date: 2002-08-28 12:53:42 -0400 (Wed, 28 Aug 2002) New Revision: 565 Modified: branches/rawiso/amdtp.c branches/rawiso/cmp.c branches/rawiso/cmp.h Log: cmp hacks to get MPEG transmission working... this really belongs in user space Modified: branches/rawiso/amdtp.c ============================================================================== --- branches/rawiso/amdtp.c (original) +++ branches/rawiso/amdtp.c 2002-08-28 12:53:43.000000000 -0400 @@ -972,7 +972,7 @@ switch(cmd) { case AMDTP_IOC_PLUG: s->opcr = cmp_register_opcr(s->host->host, cfg->u.plug, - /*payload*/ 12, plug_update, s); + /*payload*/ 12, SPEED_100, plug_update, s); if (s->opcr == NULL) return -EINVAL; s->iso_channel = s->opcr->channel; Modified: branches/rawiso/cmp.c ============================================================================== --- branches/rawiso/cmp.c (original) +++ branches/rawiso/cmp.c 2002-08-28 12:53:43.000000000 -0400 @@ -104,7 +104,8 @@ } struct cmp_pcr * -cmp_register_opcr(struct hpsb_host *host, int opcr_number, int payload, +cmp_register_opcr(struct hpsb_host *host, int opcr_number, + int payload, int speed, void (*update)(struct cmp_pcr *pcr, void *data), void *data) { @@ -121,6 +122,7 @@ plug->u.pcr.online = 1; plug->u.pcr.bcast_count = 0; plug->u.pcr.p2p_count = 0; + plug->u.pcr.speed = speed; plug->u.pcr.overhead = 0; plug->u.pcr.payload = payload; plug->update = update; @@ -135,9 +137,13 @@ struct plug *plug; ch = lookup_cmp_host(host); - plug = (struct plug *)opcr; - if (plug - ch->opcr >= ch->u.ompr.nplugs) BUG(); + /* XXXDJM */ + //plug = (struct plug *)opcr; + //if (plug - ch->opcr >= ch->u.ompr.nplugs) BUG(); + plug = &ch->opcr[0]; + /* XXXDJM */ + plug->u.pcr.online = 0; plug->update = NULL; } @@ -165,7 +171,7 @@ } memset(ch, 0, sizeof *ch); ch->host = host; - ch->u.ompr.rate = SPEED_100; + ch->u.ompr.rate = SPEED_200; ch->u.ompr.bcast_channel_base = 63; ch->u.ompr.nplugs = 2; reset_plugs(ch); @@ -173,6 +179,15 @@ spin_lock_irq(&host_list_lock); list_add_tail(&ch->link, &host_list); spin_unlock_irq(&host_list_lock); + + /* XXXDJM */ + { + struct cmp_pcr *opcr = cmp_register_opcr(host, 0, 146, SPEED_200, NULL, NULL); + if(opcr) { + printk("register opcr: channel %d\n", opcr->channel); + } + } + /* XXXDJM */ } static void cmp_host_reset(struct hpsb_host *host) @@ -188,6 +203,11 @@ { struct cmp_host *ch; + /* XXXDJM */ + printk("unregister opcr\n"); + cmp_unregister_opcr(host, NULL); + /* XXXDJM */ + ch = lookup_cmp_host(host); if (ch == NULL) BUG(); Modified: branches/rawiso/cmp.h ============================================================================== --- branches/rawiso/cmp.h (original) +++ branches/rawiso/cmp.h 2002-08-28 12:53:43.000000000 -0400 @@ -22,7 +22,7 @@ } __attribute__((packed)); struct cmp_pcr *cmp_register_opcr(struct hpsb_host *host, int plug, - int payload, + int payload, int speed, void (*update)(struct cmp_pcr *plug, void *data), void *data); |