diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-01-22 00:17:55 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-02-21 10:35:11 -0500 |
commit | 8d3643637e18e6590969436734c22151805d0350 (patch) | |
tree | f6e52e9c6a2fc2de43f6ac14967e08aee2b92ce8 /drivers/media/video/pvrusb2/pvrusb2-encoder.c | |
parent | 05ad390724d1f307111a322325df83282a1479e6 (diff) |
V4L/DVB (5169): Pvrusb2: Use macro names for FX2 commands
This is a maintainability cleanup; use nice names for all the FX2
commands instead of raw bytes. This way we can easily find where we
issue FX commands.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-encoder.c')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-encoder.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-encoder.c b/drivers/media/video/pvrusb2/pvrusb2-encoder.c index 9e43182231a5..ee5eb26ad56d 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-encoder.c +++ b/drivers/media/video/pvrusb2/pvrusb2-encoder.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include "pvrusb2-encoder.h" | 26 | #include "pvrusb2-encoder.h" |
27 | #include "pvrusb2-hdw-internal.h" | 27 | #include "pvrusb2-hdw-internal.h" |
28 | #include "pvrusb2-debug.h" | 28 | #include "pvrusb2-debug.h" |
29 | #include "pvrusb2-fx2-cmd.h" | ||
29 | 30 | ||
30 | 31 | ||
31 | 32 | ||
@@ -57,7 +58,7 @@ static int pvr2_encoder_write_words(struct pvr2_hdw *hdw, | |||
57 | chunkCnt = 8; | 58 | chunkCnt = 8; |
58 | if (chunkCnt > dlen) chunkCnt = dlen; | 59 | if (chunkCnt > dlen) chunkCnt = dlen; |
59 | memset(hdw->cmd_buffer,0,sizeof(hdw->cmd_buffer)); | 60 | memset(hdw->cmd_buffer,0,sizeof(hdw->cmd_buffer)); |
60 | hdw->cmd_buffer[0] = 0x01; | 61 | hdw->cmd_buffer[0] = FX2CMD_MEM_WRITE_DWORD; |
61 | for (idx = 0; idx < chunkCnt; idx++) { | 62 | for (idx = 0; idx < chunkCnt; idx++) { |
62 | hdw->cmd_buffer[1+(idx*7)+6] = 0x44 + idx + offs; | 63 | hdw->cmd_buffer[1+(idx*7)+6] = 0x44 + idx + offs; |
63 | PVR2_DECOMPOSE_LE(hdw->cmd_buffer, 1+(idx*7), | 64 | PVR2_DECOMPOSE_LE(hdw->cmd_buffer, 1+(idx*7), |
@@ -98,7 +99,8 @@ static int pvr2_encoder_read_words(struct pvr2_hdw *hdw,int statusFl, | |||
98 | chunkCnt = 16; | 99 | chunkCnt = 16; |
99 | if (chunkCnt > dlen) chunkCnt = dlen; | 100 | if (chunkCnt > dlen) chunkCnt = dlen; |
100 | memset(hdw->cmd_buffer,0,sizeof(hdw->cmd_buffer)); | 101 | memset(hdw->cmd_buffer,0,sizeof(hdw->cmd_buffer)); |
101 | hdw->cmd_buffer[0] = statusFl ? 0x02 : 0x28; | 102 | hdw->cmd_buffer[0] = |
103 | (statusFl ? FX2CMD_MEM_READ_DWORD : FX2CMD_MEM_READ_64BYTES); | ||
102 | hdw->cmd_buffer[7] = 0x44 + offs; | 104 | hdw->cmd_buffer[7] = 0x44 + offs; |
103 | ret = pvr2_send_request(hdw, | 105 | ret = pvr2_send_request(hdw, |
104 | hdw->cmd_buffer,8, | 106 | hdw->cmd_buffer,8, |