aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/pvrusb2/pvrusb2-encoder.c
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-01-22 02:17:55 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-02-21 13:35:11 -0200
commit8d3643637e18e6590969436734c22151805d0350 (patch)
treef6e52e9c6a2fc2de43f6ac14967e08aee2b92ce8 /drivers/media/video/pvrusb2/pvrusb2-encoder.c
parent05ad390724d1f307111a322325df83282a1479e6 (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.c6
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 9e43182231a..ee5eb26ad56 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-encoder.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-encoder.c
@@ -26,6 +26,7 @@
#include "pvrusb2-encoder.h"
#include "pvrusb2-hdw-internal.h"
#include "pvrusb2-debug.h"
+#include "pvrusb2-fx2-cmd.h"
@@ -57,7 +58,7 @@ static int pvr2_encoder_write_words(struct pvr2_hdw *hdw,
chunkCnt = 8;
if (chunkCnt > dlen) chunkCnt = dlen;
memset(hdw->cmd_buffer,0,sizeof(hdw->cmd_buffer));
- hdw->cmd_buffer[0] = 0x01;
+ hdw->cmd_buffer[0] = FX2CMD_MEM_WRITE_DWORD;
for (idx = 0; idx < chunkCnt; idx++) {
hdw->cmd_buffer[1+(idx*7)+6] = 0x44 + idx + offs;
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,
chunkCnt = 16;
if (chunkCnt > dlen) chunkCnt = dlen;
memset(hdw->cmd_buffer,0,sizeof(hdw->cmd_buffer));
- hdw->cmd_buffer[0] = statusFl ? 0x02 : 0x28;
+ hdw->cmd_buffer[0] =
+ (statusFl ? FX2CMD_MEM_READ_DWORD : FX2CMD_MEM_READ_64BYTES);
hdw->cmd_buffer[7] = 0x44 + offs;
ret = pvr2_send_request(hdw,
hdw->cmd_buffer,8,