31 #define IVTV_MASK_SPU_ENABLE 0xFFFFFFFE
32 #define IVTV_MASK_VPU_ENABLE15 0xFFFFFFF6
33 #define IVTV_MASK_VPU_ENABLE16 0xFFFFFFFB
34 #define IVTV_CMD_VDM_STOP 0x00000000
35 #define IVTV_CMD_AO_STOP 0x00000005
36 #define IVTV_CMD_APU_PING 0x00000000
37 #define IVTV_CMD_VPU_STOP15 0xFFFFFFFE
38 #define IVTV_CMD_VPU_STOP16 0xFFFFFFEE
39 #define IVTV_CMD_HW_BLOCKS_RST 0xFFFFFFFF
40 #define IVTV_CMD_SPU_STOP 0x00000001
41 #define IVTV_CMD_SDRAM_PRECHARGE_INIT 0x0000001A
42 #define IVTV_CMD_SDRAM_REFRESH_INIT 0x80000640
43 #define IVTV_SDRAM_SLEEPTIME 600
45 #define IVTV_DECODE_INIT_MPEG_FILENAME "v4l-cx2341x-init.mpg"
46 #define IVTV_DECODE_INIT_MPEG_SIZE (152*1024)
49 #define IVTV_FW_ENC_SIZE (376836)
50 #define IVTV_FW_DEC_SIZE (256*1024)
68 IVTV_INFO(
"Retry: file loaded was not %s (expected size %ld, got %zd)\n", fn, size, fw->
size);
73 for (i = 0; i < fw->
size; i += 4) {
83 IVTV_ERR(
"Unable to open firmware %s (must be %ld bytes)\n", fn, size);
84 IVTV_ERR(
"Did you put the firmware in the hotplug firmware directory?\n");
146 IVTV_INFO(
"Encoder revision: 0x%08x\n", data[0]);
148 if (data[0] != 0x02060039)
149 IVTV_WARN(
"Recommended firmware version is 0x02060039.\n");
154 IVTV_INFO(
"Decoder revision: 0x%08x\n", data[0]);
158 static int ivtv_firmware_copy(
struct ivtv *itv)
184 for (i = 0; i <
size; i += 0x100) {
185 if (
readl(mem + i) == 0x12345678 &&
186 readl(mem + i + 4) == 0x34567812 &&
187 readl(mem + i + 8) == 0x56781234 &&
188 readl(mem + i + 12) == 0x78123456) {
202 err = ivtv_firmware_copy(itv);
220 IVTV_ERR(
"Encoder mailbox not found\n");
222 IVTV_ERR(
"Encoder firmware dead!\n");
233 IVTV_ERR(
"Decoder mailbox not found\n");
235 IVTV_ERR(
"Decoder firmware dead!\n");
251 data[1] = itv->
cxhdl.width;
252 data[2] = itv->
cxhdl.height;
253 data[3] = itv->
cxhdl.audio_properties;
256 IVTV_ERR(
"ivtv_init_mpeg_decoder failed to set decoder source\n");
261 IVTV_ERR(
"ivtv_init_mpeg_decoder failed to start playback\n");
265 mem_offset = itv->
dec_mem + data[1];
269 IVTV_DEBUG_WARN(
"failed to read mpeg decoder initialisation file %s\n",
341 IVTV_WARN(
"Encoder has died : %s\n", where);
352 IVTV_WARN(
"Audio has died (Encoder OK) : %s\n", where);
363 IVTV_WARN(
"Audio has died (Decoder) : %s\n",
371 IVTV_WARN(
"Decoder has died : %s\n", where);
379 IVTV_INFO(
"Detected in %s that firmware had failed - "
380 "Reloading\n", where);