summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorStefan Ringel <stefan.ringel@arcor.de>2011-05-09 21:54:00 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-05-21 01:07:59 +0200
commit7ecff8c93e14226e0c39d930b633d5ade78526cc (patch)
treea58bbf514575e673ef4f24f0dada582c8af8eaf2 /drivers/staging
parent[media] tm6000: remove input select (diff)
downloadlinux-7ecff8c93e14226e0c39d930b633d5ade78526cc.tar.xz
linux-7ecff8c93e14226e0c39d930b633d5ade78526cc.zip
[media] tm6000: all audio packets must swab
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/tm6000/tm6000-video.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c
index a9a5919c28e1..ea5ad6c77206 100644
--- a/drivers/staging/tm6000/tm6000-video.c
+++ b/drivers/staging/tm6000/tm6000-video.c
@@ -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;