[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>
This commit is contained in:
Родитель
f2e18dc179
Коммит
7ecff8c93e
|
@ -344,17 +344,14 @@ static int copy_streams(u8 *data, unsigned long len,
|
||||||
if (vbuf)
|
if (vbuf)
|
||||||
memcpy(&voutp[pos], ptr, cpysize);
|
memcpy(&voutp[pos], ptr, cpysize);
|
||||||
break;
|
break;
|
||||||
case TM6000_URB_MSG_AUDIO:
|
case TM6000_URB_MSG_AUDIO: {
|
||||||
/* Need some code to copy audio buffer */
|
int i;
|
||||||
if (dev->fourcc == V4L2_PIX_FMT_YUYV) {
|
for (i = 0; i < cpysize; i += 2)
|
||||||
/* Swap word bytes */
|
swab16s((u16 *)(ptr + i));
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < cpysize; i += 2)
|
|
||||||
swab16s((u16 *)(ptr + i));
|
|
||||||
}
|
|
||||||
tm6000_call_fillbuf(dev, TM6000_AUDIO, ptr, cpysize);
|
tm6000_call_fillbuf(dev, TM6000_AUDIO, ptr, cpysize);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case TM6000_URB_MSG_VBI:
|
case TM6000_URB_MSG_VBI:
|
||||||
/* Need some code to copy vbi buffer */
|
/* Need some code to copy vbi buffer */
|
||||||
break;
|
break;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче