Skip to content

Commit

Permalink
[media] tm6000: all audio packets must swab
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Stefan Ringel authored and Mauro Carvalho Chehab committed May 20, 2011
1 parent f2e18dc commit 7ecff8c
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions drivers/staging/tm6000/tm6000-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7ecff8c

Please sign in to comment.