[media] tm6000: all audio packets must swab
authorStefan Ringel <stefan.ringel@arcor.de>
Mon, 9 May 2011 19:54:00 +0000 (16:54 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 20 May 2011 23:07:59 +0000 (20:07 -0300)
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/tm6000/tm6000-video.c

index a9a5919c28e1af16a0b7e673ab68250ae2e81171..ea5ad6c7720632c6019f71152299a74cea145616 100644 (file)
@@ -344,17 +344,14 @@ static int copy_streams(u8 *data, unsigned long len,
                                if (vbuf)
                                        memcpy(&voutp[pos], ptr, cpysize);
                                break;
-                       case TM6000_URB_MSG_AUDIO:
-                               /* Need some code to copy audio buffer */
-                               if (dev->fourcc == V4L2_PIX_FMT_YUYV) {
-                                       /* Swap word bytes */
-                                       int i;
+                       case TM6000_URB_MSG_AUDIO: {
+                               int i;
+                               for (i = 0; i < cpysize; i += 2)
+                                       swab16s((u16 *)(ptr + i));
 
-                                       for (i = 0; i < cpysize; i += 2)
-                                               swab16s((u16 *)(ptr + i));
-                               }
                                tm6000_call_fillbuf(dev, TM6000_AUDIO, ptr, cpysize);
                                break;
+                       }
                        case TM6000_URB_MSG_VBI:
                                /* Need some code to copy vbi buffer */
                                break;