[mythtv] [mythtv-commits] Ticket #4466: MythTV should disable tuner before switching inputs

cal cal at graggrag.com
Wed Jan 30 05:33:13 UTC 2008


MythTV wrote:

> Comment(by starz909 at yahoo.com):
> 
>  OK, just a reminder everyone.  Kernel 2.6.24 is marked as stable on
>  www.kernel.org.  Anyone who switches to this kernel or uses a bleeding
>  edge ivtv driver will NOT be able to change inputs on their IVTV hardware
>  encoder cards during livetv, or any time the card is active, until a patch
>  that does as I propose is added to Mythtv.  And I imagine there are quite
>  a few people that own IVTV cards.  I urge the developers to please
>  consider my request for this addition.

xine now handles this as follows ...

   /* change input */
   if (v4l2_data->input != -1 && v4l2_data->input != this->input) {
     this->input = v4l2_data->input;

     /* as of ivtv 0.10.6: must close and reopen to set input */
     close(this->dev_fd);
     this->dev_fd = open (this->class->devname, O_RDWR);
     if (this->dev_fd < 0) {
       xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
         "input_pvr: error opening device %s\n",
           this->class->devname );
     } else {
       if( ioctl(this->dev_fd, VIDIOC_S_INPUT, &this->input) == 0 ) {
         lprintf("Tuner Input set to:%d\n", v4l2_data->input);
     } else {
       xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
         "input_pvr: error setting v4l2 input\n");
     }
   }
where this->dev_fd is the fd of the mpeg2 encoder device.

Would such a close/reopen hack be feasible in myth ... and where to look
for the possibilities?

Cheers.



More information about the mythtv-dev mailing list