On Sat, Apr 16, 2005 at 06:07:59PM -0400, Tyler Trafford wrote:
> Jasper van der Neut - Stulen <[EMAIL PROTECTED]> wrote:
>
> > This patch fixes audio format detection for my
> > PVR150 MCE PAL, which was broken since 0.3.2s. I can only
> > test the tuner input, so maybe other input need something
> > similar.
>
> Ah, I see now. I think the real problem is that before the firmware
> is loaded, MICROCNTL is stopped, but then afterwards isn't restarted
> again. 'end_fw_load' should end with a call to start it, but we never
> noticed until I removed those other stop/starts.
Yes, you're right. But I think we can do away with the MIRCOCNTL calls
in the start_fw_load and end_fw_load if we call load_aud_fw a little
earlier in cx25840_initialize. Attached patch "worksforme".
Jasper
--- ivtv-0.3.2z-orig/driver/cx25840-driver.c 2005-04-16 18:20:33.000000000
+0200
+++ ivtv-0.3.2z/driver/cx25840-driver.c 2005-04-17 09:12:24.000000000 +0200
@@ -312,7 +312,6 @@
CX25840_SET_DL_MAP(0x0003); // '*' (Default 0x0000) Reg: 0x0803
Start bit: 0 Bit length: 2
CX25840_SET_DL_AUTO_INC(0x0000); // 'Auto increment address on
write' (Default 0x0000) Reg: 0x0803 Start bit: 2 Bit length: 1
CX25840_SET_DL_ENABLE(0x0001); // 'Enable' (Default 0x0000) Reg:
0x0803 Start bit: 3 Bit length: 1
- CX25840_SET_START_MICROCNTL(0x0000); // '*' (Default 0x0000) Reg:
0x0803 Start bit: 4 Bit length: 1
CX25840_SET_AUTO_INC_DIS(0x0001); // 'Do not increment the
address' (Default 0x0000) Reg: 0x0000 Start bit: 5 Bit length: 1
}
@@ -619,12 +618,12 @@
CX25840_SET_Sample_Rate_Converter_Status1_REG(0x000a); // '*' (Default
0x0000) Reg: 0x08f1 Start bit: 0 Bit length: 8
CX25840_SET_Sample_Rate_Converter_Status2_REG(0x0002); // '*' (Default
0x0000) Reg: 0x08f2 Start bit: 0 Bit length: 8
#endif
+ load_aud_fw(client);
+
CX25840_SET_VD_SOFT_RST(0x0000); // Video deassert
CX25840_SET_SOFT_RESET(0x0000); // Soft reset release
CX25840_SET_START_MICROCNTL(0x0001); // Brodcast audio
microcontroller is running.
- load_aud_fw(client);
-
return 0;
}
@@ -1084,7 +1083,6 @@
case CX25840_TUNER:
DEBUG(1, "Tuner Input");
- CX25840_SET_START_MICROCNTL(0x0000); // FW stop.
CX25840_SET_DUAL_MODE_ADC2(0x0000);
CX25840_SET_CH_1__SOURCE(cardtype ==
2 ? 0x0001 : 0x0006);
@@ -1101,7 +1099,6 @@
CX25840_SET_SA_MUTE_EN(0x0000);
CX25840_SET_PAR_MUTE_EN(0x0001);
CX25840_SET_AC97_MUTE_EN(0x0001);
- CX25840_SET_START_MICROCNTL(0x0001); // FW Start
break;
case -1: