Opened 13 years ago

Closed 9 years ago

#2059 closed enhancement (wontfix)

Enhanced SA3250/SA4200 Command Line Channel Changer

Reported by: chris@… Owned by:
Priority: minor Milestone: unknown
Component: Contributed Scripts & Apps Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Spinoff of Ticket #1671, see notes therein for the full backstory. Putting it in a seperate enhancement ticket as requested.

This is an enhanced version of the sa3250ch command line channel changer with the following enhancements:

  • "-s" (single command) mode for SA4200/some SA3250 models
  • 1394 port/node autodetection (on by default, but that can be changed if problematic)
  • "-p" argument to manually specify port on 1394 bus
  • "-n" argument to manually specify node on 1394 port
  • "-f" (force) mode to force sending of command(s) even if compatible device not detected
  • "-a" (autodetection/report) mode which just attempts to detect a device automatically or using a user specified port and/or node, then exits
  • Various other cleanups

Attachments (1)

sa3250.patch (13.6 KB) - added by chris@… 13 years ago.
Enhanced sa3250ch command line channel changer, also supports SA4200, patches sa3250ch.c and sa3250ch-README

Download all attachments as: .zip

Change History (9)

Changed 13 years ago by chris@…

Attachment: sa3250.patch added

Enhanced sa3250ch command line channel changer, also supports SA4200, patches sa3250ch.c and sa3250ch-README

comment:1 Changed 13 years ago by danielk

Owner: changed from Isaac Richards to jwestfall

comment:2 Changed 13 years ago by jwestfall

Milestone: 0.200.21

comment:3 Changed 13 years ago by dave_frailey@…

Type: enhancementpatch

Need to use code like this to channel change properly with my newer (mfr 06/2006) sa3250hd:

   .
   .

   if (single) {
       /* Send channel as single number for SA4200 and some SA3250s */
       if (verbose)
        printf("Using single number channel change command method\n");

       cmd[0] = CTL_CMD0 | AVC1394_SA3250_OPERAND_KEY_PRESS;
       cmd[1] = CTL_CMD1 | (chn << 8);
       cmd[2] = 0x0;

       if (verbose)
            printf("AV/C Command: cmd0=0x%08x cmd1=0x%08x cmd2=0x%08x\n",
                   cmd[0], cmd[1], cmd[2]);
       avc1394_transaction_block(handle, 0, cmd, 3, 1);
   } else {
       /* Default method sending three seperate digits */
       dig[2] = 0x30 | (chn % 10);
       dig[1] = 0x30 | ((chn % 100)  / 10);
       dig[0] = 0x30 | ((chn % 1000) / 100);

       cmd[2] = CTL_CMD2;
       if ( dir.vendor_id == SA3250HD_VENDOR_ID3 ) {
          cmd[1] = CTL_CMD1 | (chn << 8);
       } else {
          cmd[1] = CTL_CMD1 | (dig[2] << 16) | (dig[1] << 8) | dig[0];
       }

       cmd[0] = CTL_CMD0 | AVC1394_SA3250_OPERAND_KEY_PRESS;
       if (verbose)
          printf("AV/C Command: %d%d%d = cmd0=0x%08x cmd2=0x%08x cmd3=0x%08x\n",
                dig[0] & 0xf, dig[1] & 0xf, dig[2] & 0xf, cmd[0], cmd[1], cmd[2]);
       avc1394_transaction_block(handle, 0, cmd, 3, 1);

       cmd[0] = CTL_CMD0 | AVC1394_SA3250_OPERAND_KEY_RELEASE;
       if (verbose)
          printf("AV/C Command: %d%d%d = cmd0=0x%08x cmd2=0x%08x cmd3=0x%08x\n",
                dig[0] & 0xf, dig[1] & 0xf, dig[2] & 0xf, cmd[0], cmd[1], cmd[2]);
       avc1394_transaction_block(handle, 0, cmd, 3, 1);
   }

comment:4 Changed 12 years ago by Isaac Richards

Milestone: 0.210.22

comment:5 Changed 11 years ago by Rob Smith

Component: mythtvcontrib
Owner: changed from jwestfall to Rob Smith
Status: newaccepted

comment:6 Changed 10 years ago by Rob Smith

Component: contribContributed Scripts & Apps
Owner: Rob Smith deleted
Status: acceptednew

comment:7 Changed 10 years ago by danielk

Milestone: 0.22unknown
Type: patchenhancement

comment:8 Changed 9 years ago by robertm

Resolution: wontfix
Status: newclosed

Ref #2059, #7671, #5215. We have a plethora of SA firewire control tickets, with as many different approaches. After some discussion, the preference is that the changes be made to the existing changer rather than add one for each model of firewire box under the sun. So, throwing down the guantlet, let's get everyone working on one ticket with the following criterion:

1) Updates need to modify the existing SA3250 channel changer. 2) All existing boxes must continue to be supported. 3) Would prefer to have the changer tested with all common variants of the box (SA3250, SA4200, SA4250, etc) 4) Enhanced functionality is fine, but not at the expense of existing functionality.

If you feel you can meet these criterion, please reopen your ticket with an attached patch. If it occurs early enough in the development cycle, we can get it out there and work out the kinks.

Note: See TracTickets for help on using tickets.