Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mpeg2] How to check Active Video/Present for S-Video



Hi 
   I am using the Kfir1 driver on 2.4.18-3 kernel. We have added an ioctl command which my application wants to check if the Video Source is active(present) or not.

    Here is the code segment for it.
 
    u32 *val = arg;
    decoder_command(kfircurr, DECODER_GET_STATUS, val)
    
    The value of the val is '1' from Composite Input, if the Composite
    video input is connected from the DVD player and the player is 
    ON(i.e. source is active) and '0' if the source is not connected.
    But, when I disconnect the Composite and connect the S-Video 
    cable of the DVD player and do this check, I do not get
    value as 1. Basically, it does seem to detect for S-Video.
    We have changed saa7113.c for DECODER_GET_STATUS switch
    case to comment the following code to make it work properly 
    for Composite input.
    /*                 switch (decoder->norm) {
                        case VIDEO_MODE_NTSC:
                                res |= DECODER_STATUS_NTSC;
                                break;
                        case VIDEO_MODE_PAL:
                                res |= DECODER_STATUS_PAL;
                                break;
                        default:
                        case VIDEO_MODE_AUTO:
                                if ((status & (1 << 5)) != 0) {
                                        res |= DECODER_STATUS_NTSC;
                                } else {
                                        res |= DECODER_STATUS_PAL;
                                }
                                break;
                        }
                        if ((status & (1 << 0)) != 0) {
                                res |= DECODER_STATUS_COLOR;
                        }
    */
    
    But, if I do not do this 2 lines active Video check and 
    start the encoder with S-Video, it is OK and encodes properly
    with S-Video.
    This check is creating a problem only on S-Video and Composite is OK. 
    I need to do this check in my application.
    Any suggestions on the Active Video check for S-Video.
Regards
Deepak



            




Home | Main Index | Thread Index