Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113891
b: refs/heads/master
c: 5f33df1
h: refs/heads/master
i:
  113889: 8510354
  113887: 3639224
v: v3
  • Loading branch information
Mike Isely authored and Mauro Carvalho Chehab committed Oct 12, 2008
1 parent 4eeeb12 commit 88fbaf3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 83512e207479d0bdb83ee1e000a306af9e6e870e
refs/heads/master: 5f33df1443cd53283279d017b45ed1b1bc66f622
11 changes: 11 additions & 0 deletions trunk/drivers/media/video/pvrusb2/pvrusb2-hdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,17 @@ int pvr2_upload_firmware2(struct pvr2_hdw *hdw)
if (bcnt > FIRMWARE_CHUNK_SIZE) bcnt = FIRMWARE_CHUNK_SIZE;
memcpy(fw_ptr, fw_entry->data + fw_done, bcnt);
/* Usbsnoop log shows that we must swap bytes... */
/* Some background info: The data being swapped here is a
firmware image destined for the mpeg encoder chip that
lives at the other end of a USB endpoint. The encoder
chip always talks in 32 bit chunks and its storage is
organized into 32 bit words. However from the file
system to the encoder chip everything is purely a byte
stream. The firmware file's contents are always 32 bit
swapped from what the encoder expects. Thus the need
always exists to swap the bytes regardless of the endian
type of the host processor and therefore swab32() makes
the most sense. */
for (icnt = 0; icnt < bcnt/4 ; icnt++)
((u32 *)fw_ptr)[icnt] = swab32(((u32 *)fw_ptr)[icnt]);

Expand Down

0 comments on commit 88fbaf3

Please sign in to comment.