version 1.11, 2001/04/06 09:03:54
|
version 1.12, 2001/04/25 15:31:08
|
Line 32
|
Line 32
|
int DecoderGetNavi(struct cvdv_cards *card, u8 *navidata) |
int DecoderGetNavi(struct cvdv_cards *card, u8 *navidata) |
{ |
{ |
if (card->navihead == card->navitail) return 0; |
if (card->navihead == card->navitail) return 0; |
// printk(KERN_DEBUG LOGNAME ": Retreiving NaviPack\n"); |
MDEBUG(3, ": Retreiving NaviPack\n"); |
memcpy(navidata, &card->navibuffer[card->navitail], NAVISIZE); |
memcpy(navidata, &card->navibuffer[card->navitail], NAVISIZE); |
card->navitail += NAVISIZE; |
card->navitail += NAVISIZE; |
if (card->navitail >= NAVIBUFFERSIZE) card->navitail = 0; |
if (card->navitail >= NAVIBUFFERSIZE) card->navitail = 0; |
Line 46 int DecoderQueueNavi(struct cvdv_cards *
|
Line 46 int DecoderQueueNavi(struct cvdv_cards *
|
card->navihead += NAVISIZE; |
card->navihead += NAVISIZE; |
if (card->navihead >= NAVIBUFFERSIZE) card->navihead = 0; |
if (card->navihead >= NAVIBUFFERSIZE) card->navihead = 0; |
if (card->navihead == card->navitail) { |
if (card->navihead == card->navitail) { |
// printk(KERN_DEBUG LOGNAME ": NaviPack buffer overflow\n"); |
MDEBUG(3, ": NaviPack buffer overflow\n"); |
card->navitail += NAVISIZE; |
card->navitail += NAVISIZE; |
if (card->navitail >= NAVIBUFFERSIZE) card->navitail = 0; |
if (card->navitail >= NAVIBUFFERSIZE) card->navitail = 0; |
return 1; |
return 1; |
Line 75 u32 ParseSCR(const u8 *data)
|
Line 75 u32 ParseSCR(const u8 *data)
|
|
|
u32 SetSCR(struct cvdv_cards *card, u32 SCR_base) |
u32 SetSCR(struct cvdv_cards *card, u32 SCR_base) |
{ |
{ |
// printk(KERN_ERR LOGNAME ": SCR in DVD Pack: 0x%08X\n",SCR_base); |
MDEBUG(3, ": SCR in DVD Pack: 0x%08X\n",SCR_base); |
if (DecoderReadByte(card, 0x007) & 0x10) { // SCR already stopped |
if (DecoderReadByte(card, 0x007) & 0x10) { // SCR already stopped |
DecoderWriteByte(card,0x009,SCR_base&0xFF); // Set SCR counter |
DecoderWriteByte(card,0x009,SCR_base&0xFF); // Set SCR counter |
DecoderWriteByte(card,0x00A,(SCR_base>>8)&0xFF); |
DecoderWriteByte(card,0x00A,(SCR_base>>8)&0xFF); |
Line 128 void CloseCard(struct cvdv_cards *card)
|
Line 128 void CloseCard(struct cvdv_cards *card)
|
spin_unlock(&card->timelock); |
spin_unlock(&card->timelock); |
#endif |
#endif |
MargiFlush(card); |
MargiFlush(card); |
printk(KERN_DEBUG LOGNAME ": Closing card\n"); |
MDEBUG(1, ": Closing card\n"); |
card->DecoderOpen = 1; |
card->DecoderOpen = 1; |
DecoderClose(card); |
DecoderClose(card); |
DecoderUnPrepare(card); |
DecoderUnPrepare(card); |
Line 273 void DecoderReadAudioInfo(struct cvdv_ca
|
Line 273 void DecoderReadAudioInfo(struct cvdv_ca
|
audio->valid = audio->ac3.present; |
audio->valid = audio->ac3.present; |
break; |
break; |
} |
} |
printk(KERN_DEBUG LOGNAME ": -- DecoderReadAudioInfo - type/valid %d/%d:\n", card->setup.audioselect, audio->valid); |
MDEBUG(1, ": -- DecoderReadAudioInfo - type/valid %d/%d:\n", card->setup.audioselect, audio->valid); |
if (audio->mpeg.present || audio->ac3.present || audio->pcm.present) |
if (audio->mpeg.present || audio->ac3.present || audio->pcm.present) |
printk(KERN_DEBUG LOGNAME ": Audio - Decoded parameters:\n"); |
MDEBUG(1, ": Audio - Decoded parameters:\n"); |
if (audio->mpeg.present) printk(KERN_DEBUG LOGNAME ": MPEG%s Layer %d, %d kHz, %d kbps, %s, %s%s, %s emphasis\n", |
if (audio->mpeg.present) MDEBUG(1, ": MPEG%s Layer %d, %d kHz, %d kbps, %s, %s%s, %s emphasis\n", |
((audio->mpeg.MPEG2) ? "2" : "1"), |
((audio->mpeg.MPEG2) ? "2" : "1"), |
audio->mpeg.layer, |
audio->mpeg.layer, |
audio->mpeg.samplefreq, |
audio->mpeg.samplefreq, |
Line 286 void DecoderReadAudioInfo(struct cvdv_ca
|
Line 286 void DecoderReadAudioInfo(struct cvdv_ca
|
((audio->mpeg.original) ? "original" : "copy"), |
((audio->mpeg.original) ? "original" : "copy"), |
((audio->mpeg.emphasis == 0) ? "no" : ((audio->mpeg.emphasis == 1) ? "50/15 usec." : ((audio->mpeg.emphasis == 2) ? "invalid" : "J.17"))) |
((audio->mpeg.emphasis == 0) ? "no" : ((audio->mpeg.emphasis == 1) ? "50/15 usec." : ((audio->mpeg.emphasis == 2) ? "invalid" : "J.17"))) |
); |
); |
if (audio->ac3.present) printk(KERN_DEBUG LOGNAME ": AC3 acmod=%d bsmod=%d dialnorm=%d dialnorm2=%d surmixlev=%d mixlevel=%d cmixlev=%d mixlevel2=%d fscod=%d lfeon=%d bsid=%d dsurmod=%d frmsizecod=%d langcod=%d langcod2=%d timecod=%d roomtyp=%d timecod2=%d roomtyp2=%d\n", |
if (audio->ac3.present) MDEBUG(1, ": AC3 acmod=%d bsmod=%d dialnorm=%d dialnorm2=%d surmixlev=%d mixlevel=%d cmixlev=%d mixlevel2=%d fscod=%d lfeon=%d bsid=%d dsurmod=%d frmsizecod=%d langcod=%d langcod2=%d timecod=%d roomtyp=%d timecod2=%d roomtyp2=%d\n", |
audio->ac3.acmod, |
audio->ac3.acmod, |
audio->ac3.bsmod, |
audio->ac3.bsmod, |
audio->ac3.dialnorm, |
audio->ac3.dialnorm, |
Line 306 void DecoderReadAudioInfo(struct cvdv_ca
|
Line 306 void DecoderReadAudioInfo(struct cvdv_ca
|
audio->ac3.roomtyp, |
audio->ac3.roomtyp, |
audio->ac3.timecod2, |
audio->ac3.timecod2, |
audio->ac3.roomtyp2); |
audio->ac3.roomtyp2); |
if (audio->pcm.present) printk(KERN_DEBUG LOGNAME ": LPCM audio_frm_num=%d num_of_audio_ch=%d Fs=%d quantization=%d emphasis=%d mute_bit=%d\n", |
if (audio->pcm.present) MDEBUG(1, ": LPCM audio_frm_num=%d num_of_audio_ch=%d Fs=%d quantization=%d emphasis=%d mute_bit=%d\n", |
audio->pcm.audio_frm_num, |
audio->pcm.audio_frm_num, |
audio->pcm.num_of_audio_ch, |
audio->pcm.num_of_audio_ch, |
audio->pcm.Fs, |
audio->pcm.Fs, |
Line 322 void DecoderReadAuxFifo(struct cvdv_card
|
Line 322 void DecoderReadAuxFifo(struct cvdv_card
|
int layer; |
int layer; |
|
|
struct StreamInfo *stream = &card->stream; |
struct StreamInfo *stream = &card->stream; |
// printk(KERN_DEBUG LOGNAME ": AUX - "); |
MDEBUG(3, ": AUX - %03X ", card->AuxFifo[card->AuxFifoTail]); |
// printk("%03X ", card->AuxFifo[card->AuxFifoTail]); |
|
while (card->AuxFifoHead != card->AuxFifoTail) { |
while (card->AuxFifoHead != card->AuxFifoTail) { |
|
|
layer = (card->AuxFifo[card->AuxFifoTail] >> 8) & 0x07; |
layer = (card->AuxFifo[card->AuxFifoTail] >> 8) & 0x07; |
Line 383 void DecoderReadAuxFifo(struct cvdv_card
|
Line 382 void DecoderReadAuxFifo(struct cvdv_card
|
case 11: |
case 11: |
stream->sh.constrained = data & 0x01; |
stream->sh.constrained = data & 0x01; |
stream->sh.valid = 1; |
stream->sh.valid = 1; |
printk(KERN_DEBUG LOGNAME ": AUX - MPEG1 - %dx%d %s %s fps, %d bps, %d kByte vbv%s\n", stream->sh.hsize, stream->sh.vsize, |
MDEBUG(1, ": AUX - MPEG1 - %dx%d %s %s fps, %d bps, %d kByte vbv%s\n", stream->sh.hsize, stream->sh.vsize, |
((stream->sh.aspectratio == 1) ? "1:1" : |
((stream->sh.aspectratio == 1) ? "1:1" : |
((stream->sh.aspectratio == 2) ? "3:4" : |
((stream->sh.aspectratio == 2) ? "3:4" : |
((stream->sh.aspectratio == 3) ? "9:16" : |
((stream->sh.aspectratio == 3) ? "9:16" : |
Line 497 void DecoderReadAuxFifo(struct cvdv_card
|
Line 496 void DecoderReadAuxFifo(struct cvdv_card
|
data & 0x1F; |
data & 0x1F; |
stream->se.valid = 1; |
stream->se.valid = 1; |
stream->MPEG2 = 1; |
stream->MPEG2 = 1; |
printk(KERN_DEBUG LOGNAME ": AUX - MPEG2 - %dx%d %s %s*%d/%d fps, %d bps, %d kByte vbv%s%s\n", stream->hsize, stream->vsize, |
MDEBUG(1, ": AUX - MPEG2 - %dx%d %s %s*%d/%d fps, %d bps, %d kByte vbv%s%s\n", stream->hsize, stream->vsize, |
((stream->sh.aspectratio == 1) ? "1:1" : |
((stream->sh.aspectratio == 1) ? "1:1" : |
((stream->sh.aspectratio == 2) ? "3:4" : |
((stream->sh.aspectratio == 2) ? "3:4" : |
((stream->sh.aspectratio == 3) ? "9:16" : |
((stream->sh.aspectratio == 3) ? "9:16" : |
Line 568 void DecoderReadAuxFifo(struct cvdv_card
|
Line 567 void DecoderReadAuxFifo(struct cvdv_card
|
|
|
void DecoderReadDataFifo(struct cvdv_cards *card) |
void DecoderReadDataFifo(struct cvdv_cards *card) |
{ |
{ |
// printk(KERN_DEBUG LOGNAME ": DATA - "); |
MDEBUG(3, ": DATA - "); |
while (card->DataFifoHead != card->DataFifoTail) { |
while (card->DataFifoHead != card->DataFifoTail) { |
// printk("%03X ", card->DataFifo[card->DataFifoTail]); |
MDEBUG(3,"%03X ", card->DataFifo[card->DataFifoTail]); |
card->DataFifoTail = (card->DataFifoTail + 1) & FIFO_MASK; |
card->DataFifoTail = (card->DataFifoTail + 1) & FIFO_MASK; |
} |
} |
// printk("\n"); |
MDEBUG(3,"\n"); |
} |
} |
|
|
int DecoderReadNavipack(struct cvdv_cards *card) |
int DecoderReadNavipack(struct cvdv_cards *card) |
Line 591 int DecoderReadNavipack(struct cvdv_card
|
Line 590 int DecoderReadNavipack(struct cvdv_card
|
writeaddr = DecoderReadByte(card, 0x075) & 0xFF; |
writeaddr = DecoderReadByte(card, 0x075) & 0xFF; |
writeaddr |= (DecoderReadWord(card, 0x077) & 0x0FFF) << 8; |
writeaddr |= (DecoderReadWord(card, 0x077) & 0x0FFF) << 8; |
//writeaddr <<= 3; |
//writeaddr <<= 3; |
//printk(KERN_DEBUG LOGNAME ": -- DecoderReadNavipack 0x%08X-0x%08X, ->0x%08X <-0x%08X\n", startaddr, endaddr, writeaddr, card->NaviPackAddress); |
MDEBUG(3, ": -- DecoderReadNavipack 0x%08X-0x%08X, ->0x%08X <-0x%08X\n", |
|
startaddr, endaddr, writeaddr, card->NaviPackAddress); |
|
|
if (DecoderReadByte(card, 0x07B) & 0xC0) { // navi pack available? |
if (DecoderReadByte(card, 0x07B) & 0xC0) { // navi pack available? |
DRAMReadByte(card, card->NaviPackAddress, 1024, navipack, 0); |
DRAMReadByte(card, card->NaviPackAddress, 1024, navipack, 0); |
Line 602 int DecoderReadNavipack(struct cvdv_card
|
Line 602 int DecoderReadNavipack(struct cvdv_card
|
card->NaviPackAddress += 512; // increment in words |
card->NaviPackAddress += 512; // increment in words |
if (card->NaviPackAddress >= endaddr) |
if (card->NaviPackAddress >= endaddr) |
card->NaviPackAddress = startaddr; |
card->NaviPackAddress = startaddr; |
//printk(KERN_DEBUG LOGNAME ": Navipack %02X %02X %02X %02X %02X %02X %02X %02X\n", |
MDEBUG(4, ": Navipack %02X %02X %02X %02X %02X %02X %02X %02X\n", |
// navipack[0], navipack[1], navipack[2], navipack[3], navipack[4], navipack[5], navipack[6], navipack[7]); |
navipack[0], navipack[1], navipack[2], navipack[3], navipack[4], |
if ((!navipack[0]) && (!navipack[1]) && (navipack[2] == 1) && (navipack[3] == 0xBF)) { |
navipack[5], navipack[6], navipack[7]); |
|
if ((!navipack[0]) && (!navipack[1]) && (navipack[2] == 1) && |
|
(navipack[3] == 0xBF)) { |
PacketLength = (navipack[4] << 8) | navipack[5]; |
PacketLength = (navipack[4] << 8) | navipack[5]; |
SubStreamID = navipack[6]; |
SubStreamID = navipack[6]; |
//printk(KERN_DEBUG LOGNAME ": Navipack Len=%d, ID=%d\n", PacketLength, SubStreamID); |
MDEBUG(4, ": Navipack Len=%d, ID=%d\n", PacketLength, SubStreamID); |
i = 7; // start of payload data in navipack[] |
i = 7; // start of payload data in navipack[] |
switch (SubStreamID) { |
switch (SubStreamID) { |
case 0: // Presentation Control Information (PCI) |
case 0: // Presentation Control Information (PCI) |
Line 621 int DecoderReadNavipack(struct cvdv_card
|
Line 623 int DecoderReadNavipack(struct cvdv_card
|
default: |
default: |
break; |
break; |
} |
} |
// } else { |
} else { |
// printk(KERN_DEBUG LOGNAME ": navi pack format error: %02X %02X %02X %02X %02X %02X %02X %02X.\n", |
MDEBUG(4, "navipack format error:%02X %02X %02X %02X %02X %02X %02X %02X\n", |
// navipack[0], navipack[1], navipack[2], navipack[3], navipack[4], navipack[5], navipack[6], navipack[7]); |
navipack[0], navipack[1], navipack[2], navipack[3], navipack[4], |
|
navipack[5], navipack[6], navipack[7]); |
} |
} |
// } else { |
} else { |
// printk(KERN_DEBUG LOGNAME ": no navi pack avail.\n"); |
MDEBUG(4, ": no navi pack avail.\n"); |
} |
} |
return 0; |
return 0; |
} |
} |
Line 635 int AudioStart(struct cvdv_cards *card)
|
Line 638 int AudioStart(struct cvdv_cards *card)
|
{ |
{ |
DecoderReadAudioInfo(card); // detect audio type |
DecoderReadAudioInfo(card); // detect audio type |
if (card->stream.audio.valid) { |
if (card->stream.audio.valid) { |
printk(KERN_DEBUG LOGNAME ": Audio Init in delayed decoder start\n"); |
MDEBUG(1, ": Audio Init in delayed decoder start\n"); |
if (card->AudioInitialized) AudioClose(card); |
if (card->AudioInitialized) AudioClose(card); |
switch (card->setup.audioselect) { |
switch (card->setup.audioselect) { |
case audio_MPEG: // MPEG Audio |
case audio_MPEG: // MPEG Audio |
case audio_MPEG_EXT: // MPEG Audio with ext. |
case audio_MPEG_EXT: // MPEG Audio with ext. |
printk(KERN_DEBUG LOGNAME ": Using MPEG Audio\n"); |
MDEBUG(1, ": Using MPEG Audio\n"); |
AudioInit(card, card->stream.audio.mpeg.samplefreq, 0); |
AudioInit(card, card->stream.audio.mpeg.samplefreq, 0); |
if (card->stream.audio.mpeg.mode == 3) AudioDualMono(card, 2); // left channel only |
if (card->stream.audio.mpeg.mode == 3) AudioDualMono(card, 2); // left channel only |
else AudioDualMono(card, 0); |
else AudioDualMono(card, 0); |
break; |
break; |
case audio_DTS: |
case audio_DTS: |
case audio_LPCM: // Linear Pulse Code Modulation LPCM |
case audio_LPCM: // Linear Pulse Code Modulation LPCM |
printk(KERN_DEBUG LOGNAME ": Using LPCM Audio\n"); |
MDEBUG(1, ": Using LPCM Audio\n"); |
AudioInit(card, 48, 0); // or 96 |
AudioInit(card, 48, 0); // or 96 |
break; |
break; |
case audio_AC3: // AC-3 |
case audio_AC3: // AC-3 |
printk(KERN_DEBUG LOGNAME ": Using AC-3 Audio\n"); |
MDEBUG(1, ": Using AC-3 Audio\n"); |
switch (card->stream.audio.ac3.fscod) { |
switch (card->stream.audio.ac3.fscod) { |
case 0:AudioInit(card, 48, 0); break; |
case 0:AudioInit(card, 48, 0); break; |
case 1:AudioInit(card, 44, 0); break; |
case 1:AudioInit(card, 44, 0); break; |
Line 698 int PTSGetFirstPTS(PTSStorage *store, u3
|
Line 701 int PTSGetFirstPTS(PTSStorage *store, u3
|
void PTSStoreAdd(PTSStorage *store, u32 PTS, u32 AddrB, u32 AddrE) |
void PTSStoreAdd(PTSStorage *store, u32 PTS, u32 AddrB, u32 AddrE) |
{ |
{ |
int new; |
int new; |
|
MDEBUG(3, ": PTSStoreAdd - store in [%d] %08X - %08X\n", store->end, AddrB, AddrE); |
//printk(KERN_DEBUG LOGNAME ": PTSStoreAdd - store in [%d] %08X - %08X\n", store->end, AddrB, AddrE); |
|
|
|
// cheap fix: don't store if address rollover |
// cheap fix: don't store if address rollover |
if ((AddrB & 0x00080000) != (AddrE & 0x00080000)) return; |
if ((AddrB & 0x00080000) != (AddrE & 0x00080000)) return; |
Line 726 int PTSGetPTS (PTSStorage *store, u32 Ad
|
Line 728 int PTSGetPTS (PTSStorage *store, u32 Ad
|
int found; |
int found; |
int search; |
int search; |
|
|
//printk(KERN_DEBUG LOGNAME ": PTSGetPTS - search %08X\n", Addr); |
MDEBUG(3, ": PTSGetPTS - search %08X\n", Addr); |
|
|
if (store->end == store->begin) { |
if (store->end == store->begin) { |
store->LastAddr = Addr; |
store->LastAddr = Addr; |
Line 742 int PTSGetPTS (PTSStorage *store, u32 Ad
|
Line 744 int PTSGetPTS (PTSStorage *store, u32 Ad
|
AddrB = store->AddrB[i]; |
AddrB = store->AddrB[i]; |
AddrE = store->AddrE[i]; |
AddrE = store->AddrE[i]; |
|
|
//printk(KERN_DEBUG LOGNAME ": PTSGetPTS - search in [%d] %08X - %08X\n", i, AddrB, AddrE); |
MDEBUG(3, ": PTSGetPTS - search in [%d] %08X - %08X\n", i, AddrB, AddrE); |
|
|
//If in range, keep it |
//If in range, keep it |
if ((Addr >= AddrB) && (Addr <= AddrE)) { |
if ((Addr >= AddrB) && (Addr <= AddrE)) { |
Line 962 void L64021Intr(struct cvdv_cards *card)
|
Line 964 void L64021Intr(struct cvdv_cards *card)
|
|
|
err = DecoderReadByte(card, 0x095); |
err = DecoderReadByte(card, 0x095); |
if (err & 0x17) { |
if (err & 0x17) { |
printk(KERN_ERR LOGNAME ": Packet Error: 0x%02X\n", err); |
MDEBUG(0, ": Packet Error: 0x%02X\n", err); |
} |
} |
|
|
ISRTime = 0; // TODO system time |
ISRTime = 0; // TODO system time |
Line 1083 void L64021Intr(struct cvdv_cards *card)
|
Line 1085 void L64021Intr(struct cvdv_cards *card)
|
if (vs > 0) vp = (100 * v) / vs; |
if (vs > 0) vp = (100 * v) / vs; |
else vp = 0; |
else vp = 0; |
if (vp > 40) { |
if (vp > 40) { |
printk(KERN_ERR LOGNAME |
MDEBUG(0,": Delayed Video Decoder start\n"); |
": Delayed Video Decoder start\n"); |
|
card->startingV = 0; |
card->startingV = 0; |
DecoderStartDecode(card); |
DecoderStartDecode(card); |
DecoderSetVideoPanic(card, 1, 3); |
//DecoderSetVideoPanic(card, 1, 3); |
// video panic at 3 pictures |
// video panic at 3 pictures |
//DecoderSetVideoPanic(card, 0, DecoderGetVideoESSize(card) / 4); // video panic at 25 percent |
//DecoderSetVideoPanic(card, 0, DecoderGetVideoESSize(card) / 4); // video panic at 25 percent |
} |
} |
Line 1098 void L64021Intr(struct cvdv_cards *card)
|
Line 1099 void L64021Intr(struct cvdv_cards *card)
|
if (as > 0) ap = (100 * a) / as; |
if (as > 0) ap = (100 * a) / as; |
else ap = 0; |
else ap = 0; |
if (ap > 40) { |
if (ap > 40) { |
printk(KERN_ERR LOGNAME |
MDEBUG(0,": Delayed Audio Decoder start\n"); |
": Delayed Audio Decoder start\n"); |
|
AudioSetPlayMode(card, MAUDIO_PLAY); |
AudioSetPlayMode(card, MAUDIO_PLAY); |
if (!AudioStart(card)) { |
if (!AudioStart(card)) { |
card->startingA = 0; |
card->startingA = 0; |
Line 1150 void L64021Intr(struct cvdv_cards *card)
|
Line 1150 void L64021Intr(struct cvdv_cards *card)
|
if ((intr[0] & 0x01) != card->intdecodestatus) { |
if ((intr[0] & 0x01) != card->intdecodestatus) { |
// decode status |
// decode status |
card->intdecodestatus = intr[0] & 0x01; |
card->intdecodestatus = intr[0] & 0x01; |
printk(KERN_ERR LOGNAME |
MDEBUG(0, ": Int - decode status now %s\n", |
": Int - decode status now %s\n", |
|
((card->intdecodestatus) ? |
((card->intdecodestatus) ? |
"running" : "stopped")); |
"running" : "stopped")); |
if (card->intdecodestatus) { // now running |
if (card->intdecodestatus) { // now running |
DecoderSetVideoPanic(card, 1, 3); |
//DecoderSetVideoPanic(card, 1, 3); |
// video panic at 3 pictures |
// video panic at 3 pictures |
card->showvideo = 1; |
card->showvideo = 1; |
} else { // now stopped |
} else { // now stopped |
Line 1176 void L64021Intr(struct cvdv_cards *card)
|
Line 1175 void L64021Intr(struct cvdv_cards *card)
|
} |
} |
} |
} |
if (intr[1] & 0x08) { // SPU Start Code Detected |
if (intr[1] & 0x08) { // SPU Start Code Detected |
printk(KERN_ERR LOGNAME |
MDEBUG(0, ": Int - SPU Start Code Detected\n"); |
": Int - SPU Start Code Detected\n"); |
|
} |
} |
|
|
if (intr[1] & 0x04) { // SCR compare audio |
if (intr[1] & 0x04) { // SCR compare audio |
printk(KERN_ERR LOGNAME |
MDEBUG(0, ": Int - SCR compare audio\n"); |
": Int - SCR compare audio\n"); |
|
DecoderDelByte(card, 0x013, 0x01); |
DecoderDelByte(card, 0x013, 0x01); |
AudioStart(card); |
AudioStart(card); |
} |
} |
Line 1220 void L64021Intr(struct cvdv_cards *card)
|
Line 1217 void L64021Intr(struct cvdv_cards *card)
|
|
|
if (intr[3] & 0x30) { |
if (intr[3] & 0x30) { |
// Audio/Video ES channel buffer underflow |
// Audio/Video ES channel buffer underflow |
//printk(KERN_ERR LOGNAME |
MDEBUG(1,": Int - ES channel buffer underflow\n"); |
// ": Int - ES channel buffer underflow\n"); |
|
if (card->closing) { |
if (card->closing) { |
card->closing = 0; |
card->closing = 0; |
CloseCard(card); |
CloseCard(card); |
Line 1229 void L64021Intr(struct cvdv_cards *card)
|
Line 1225 void L64021Intr(struct cvdv_cards *card)
|
} |
} |
|
|
if (intr[4] & 0x10 ) { // SPU decode error |
if (intr[4] & 0x10 ) { // SPU decode error |
printk(KERN_ERR LOGNAME |
MDEBUG(1,": Int - SPU decode error: (1CA)=0x%02X\n", |
": Int - SPU decode error: (1CA)=0x%02X\n", |
|
DecoderReadByte(card, 0x1CA)); |
DecoderReadByte(card, 0x1CA)); |
DecoderDelByte(card, 0x1A0, 0x01); // SPU decode stop |
DecoderDelByte(card, 0x1A0, 0x01); // SPU decode stop |
DecoderSetByte(card, 0x1A0, 0x01); // SPU decode start |
DecoderSetByte(card, 0x1A0, 0x01); // SPU decode start |
Line 1312 void L64021Intr(struct cvdv_cards *card)
|
Line 1307 void L64021Intr(struct cvdv_cards *card)
|
card->videodelay = 20; |
card->videodelay = 20; |
} |
} |
} |
} |
printk(KERN_ERR LOGNAME ": <<< Pausing %d\n", card->videodelay); |
MDEBUG(0,": <<< Pausing %d\n", card->videodelay); |
} else { |
} else { |
} |
} |
} else { |
} else { |
Line 1323 void L64021Intr(struct cvdv_cards *card)
|
Line 1318 void L64021Intr(struct cvdv_cards *card)
|
} else { |
} else { |
card->videoskip = 3; |
card->videoskip = 3; |
} |
} |
printk(KERN_ERR LOGNAME ": >>> FForward %d\n", card->videoskip); |
MDEBUG(0, ": >>> FForward %d\n", card->videoskip); |
} |
} |
} |
} |
} else { |
} else { |
Line 1412 int L64021RemoveIntr(struct cvdv_cards *
|
Line 1407 int L64021RemoveIntr(struct cvdv_cards *
|
int L64021Reset(struct cvdv_cards *card) { |
int L64021Reset(struct cvdv_cards *card) { |
L64021RemoveIntr(card); // Stop interrupts |
L64021RemoveIntr(card); // Stop interrupts |
// Reset |
// Reset |
printk(KERN_DEBUG LOGNAME ": L64021 Software reset...\n"); |
MDEBUG(1, ": L64021 Software reset...\n"); |
//DecoderSetByte(card, 0x007, 0x20); // reset on |
//DecoderSetByte(card, 0x007, 0x20); // reset on |
DecoderMaskByte(card, 0x007, 0xE2, 0xE2); // reset on |
DecoderMaskByte(card, 0x007, 0xE2, 0xE2); // reset on |
while (!(DecoderReadByte(card, 0x007) & 0x02)) ; // wait until reset is done |
while (!(DecoderReadByte(card, 0x007) & 0x02)) ; // wait until reset is done |
//DecoderDelByte(card, 0x007, 0x20); // reset off |
//DecoderDelByte(card, 0x007, 0x20); // reset off |
DecoderMaskByte(card, 0x007, 0xE2, 0xC2); // reset off |
DecoderMaskByte(card, 0x007, 0xE2, 0xC2); // reset off |
printk(KERN_DEBUG LOGNAME ": L64021 Software reset done.\n"); |
MDEBUG(1, ": L64021 Software reset done.\n"); |
DecoderStopChannel(card); |
DecoderStopChannel(card); |
DecoderStopDecode(card); |
DecoderStopDecode(card); |
DecoderStreamReset(card); |
DecoderStreamReset(card); |
DecoderSetupReset(card); |
DecoderSetupReset(card); |
printk(KERN_INFO LOGNAME ": L64021 Rev. 0x%02X reset successfully.\n", DecoderReadByte(card, 0x0F5)); |
printk(KERN_INFO LOGNAME ": L64021 Rev. 0x%02X reset successfully.\n", |
|
DecoderReadByte(card, 0x0F5)); |
return 0; |
return 0; |
} |
} |
|
|
int L64021Setup(struct cvdv_cards *card) { |
int L64021Setup(struct cvdv_cards *card) { |
printk(KERN_DEBUG LOGNAME ": -- L64021Setup\n"); |
MDEBUG(1, ": -- L64021Setup\n"); |
DecoderWriteByte(card, 0x0C1, 0x88); // |
DecoderWriteByte(card, 0x0C1, 0x88); // |
switch (card->videomode) { |
switch (card->videomode) { |
case NTSC: // NTSC M, N. America, Taiwan, Japan |
case NTSC: // NTSC M, N. America, Taiwan, Japan |
Line 1526 printk(KERN_DEBUG LOGNAME ": -- L64021Se
|
Line 1522 printk(KERN_DEBUG LOGNAME ": -- L64021Se
|
} |
} |
|
|
int L64021Init(struct cvdv_cards *card) { |
int L64021Init(struct cvdv_cards *card) { |
printk(KERN_DEBUG LOGNAME ": -- L64021Init\n"); |
MDEBUG(1, ": -- L64021Init\n"); |
L64021Reset(card); |
L64021Reset(card); |
L64021Setup(card); |
L64021Setup(card); |
VideoSetBackground(card, 1, 0, 0, 0); // black |
VideoSetBackground(card, 1, 0, 0, 0); // black |