Tuesday, July 18, 2017

My Hauppauge 350 stopped working!

At some point recently, my Hauppage card stopped working. I know eventually this card is going to stop working... Thats life, either a bit rot, a blown cap or damage from a power surge will kill this fun little card.

I don't give easily though. Gnomeradio complained it couldn't open '/dev/radio0' and it was right, the device was not present. Time to check the logs....

ivtv: Start initialization, version 1.4.3
ivtv0: Initializing card 0
ivtv0: Autodetected Hauppauge card (cx23415 based)
ivtv0: Unreasonably low latency timer, setting to 64 (was 32)
AVX version of gcm_enc/dec engaged.
AES CTR mode by8 optimization enabled
tveeprom 5-0050: Encountered bad packet header [ff]. Corrupt or not a Hauppauge eeprom.
ivtv0: Unknown model -16636, defaulting to PVR-150
ivtv0: Autodetected Hauppauge WinTV PVR-150
ivtv0: tveeprom cannot autodetect tuner!
ivtv0: No tuner detected, default to NTSC-M

Very odd. I have a PVR-350, not a 150.    I figured there must be some thing I could do by passing the right parameters to the module at load time. MythTV's wiki has a good write up of the module parameters.

Checking the output from 'lspci' I id my card as this device:

04:06.0 Multimedia video controller: Internext Compression Inc iTVC15 (CX23415) Video Decoder (rev 01)

Add this line to /etc/modules since I am lead to believe I might have rev 01 card...

ivtv cardtype=5 radio=1
The next bit of magic is too put the changes in the initramfs image the kernel loads at boot:

sudo update-initramfs -u

Next, reboot and I found that the ivtv module seemed to find that tuner card again.

ivtv: Start initialization, version 1.4.3
ivtv0: Initializing card 0
ivtv0: Autodetected Hauppauge card (cx23415 based)
ivtv0: Unreasonably low latency timer, setting to 64 (was 32)
tveeprom 5-0050: Hauppauge model 48132, rev J323, serial# 7113504
tveeprom 5-0050: tuner model is Philips FM1236 (idx 23, type 2)
tveeprom 5-0050: TV standards NTSC(M) (eeprom 0x08)
tveeprom 5-0050: audio processor is MSP4448 (idx 27)
tveeprom 5-0050: decoder processor is SAA7115 (idx 19)
tveeprom 5-0050: has radio, has IR receiver, has no IR transmitter
ivtv0: Autodetected Hauppauge WinTV PVR-350


So I started up Gnomeradio, and it eventually segfaulted on me.  And it still had no audio.  I see the following the kernel logs before that happened. 

i2c i2c-5: sendbytes: NAK bailout.
tuner-simple 5-0061: i2c i/o error: rc == -5 (should be 4

According to the documentation for the ivtv module, there is other revision of the PVR-350, I have nothing to lose by giving it a shot... I changed the parameters to the ivtv module, and repeated my earlier steps of rebuilding the initramfs and rebooting.

This time, it seems to OK at first:

ivtv: Start initialization, version 1.4.3
ivtv0: Initializing card 0
ivtv0: Autodetected Hauppauge card (cx23415 based)
ivtv0: Unreasonably low latency timer, setting to 64 (was 32)
AVX version of gcm_enc/dec engaged.
AES CTR mode by8 optimization enabled
tveeprom 5-0050: Hauppauge model 48132, rev J323, serial# 7113504
tveeprom 5-0050: tuner model is Philips FM1236 (idx 23, type 2)
tveeprom 5-0050: TV standards NTSC(M) (eeprom 0x08)
tveeprom 5-0050: audio processor is MSP4448 (idx 27)
tveeprom 5-0050: decoder processor is SAA7115 (idx 19)
tveeprom 5-0050: has radio, has IR receiver, has no IR transmitter
ivtv0: Autodetected Hauppauge WinTV PVR-350
saa7115 5-0021: saa7115 found @ 0x42 (ivtv i2c driver #0)
saa7127 5-0044: saa7127 found @ 0x88 (ivtv i2c driver #0)
msp3400 5-0040: MSP4448G-A2 found @ 0x80 (ivtv i2c driver #0)
msp3400 5-0040: msp3400 supports radio, mode is autodetect and autoselect


Success!

And this time gnomeradio works!