[media] au0828: properly handle stream on/off state 06/25806/1
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Sat, 9 Aug 2014 18:29:22 +0000 (15:29 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Sun, 10 Aug 2014 02:32:52 +0000 (23:32 -0300)
The STREAM_ON state is used by s_format callback,
but the driver never sets it.

Fix it. This will also be needed in order to handle
suspend/resume ops.

Change-Id: I73a5bf3d65acf7684814a056cde3db87030698b6
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/au0828/au0828-video.c

index 385894a..a02469f 100644 (file)
@@ -159,6 +159,7 @@ static void au0828_irq_callback(struct urb *urb)
                au0828_isocdbg("urb resubmit failed (error=%i)\n",
                               urb->status);
        }
+       dev->stream_state = STREAM_ON;
 }
 
 /*
@@ -198,6 +199,8 @@ static void au0828_uninit_isoc(struct au0828_dev *dev)
        dev->isoc_ctl.urb = NULL;
        dev->isoc_ctl.transfer_buffer = NULL;
        dev->isoc_ctl.num_bufs = 0;
+
+       dev->stream_state = STREAM_OFF;
 }
 
 /*