Skip to contentSkip to conversation

HVR-950Q problem under MythTV

DISCUSSION Bob Cunningham 2 participants 7 messages Oct 29, 2009 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

I just completed a fresh install of MythTV 0.22 RC1 on my fully-updated Fedora 11 system. My tuner is an HVR-950Q, connected to cable. The tuner works fine under tvtime (SD) and xine (HD).

All MythTV functions work, except LiveTV. The problem is that mythfrontend times out waiting for the HVR-950Q to tune to the first station. This appears to be due to the very long HVR-950Q firmware load time, since no errors are reported by the backend.

Unfortunately, mythfrontend has a hard-wired 7 second timeout for most requests sent to the backend. It seems this timeout works fine under normal circumstances for every other tuner MythTV works with.

The following is repeated in dmesg after every attempt:

xc5000: waiting for firmware upload (dvb-fe-xc5000-1.6.114.fw)... usb 1-2: firmware: requesting dvb-fe-xc5000-1.6.114.fw
xc5000: firmware read 12401 bytes.
xc5000: firmware uploading...
xc5000: firmware upload complete...

It looks like the HVR-950Q driver reloads the firmware at every possible opportunity, independent of the hardware state, each time either the SD or HD device is opened, such as when changing from an SD channel on /dev/video0 to an HD channel on /dev/dvb/adapter0. Is this necessary?

Is it possible to tell the driver to ease up on the firmware reloads? I don't mind if the first attempt fails, but the second attempt should succeed (without a reload).

Alternatively, are faster firmware loads possible?

Should I open a bug on this?

#1 lore raw
Quoted 26 lines · Bob Cunningham

I just completed a fresh install of MythTV 0.22 RC1 on my fully-updated Fedora 11 system.  My tuner is an HVR-950Q, connected to cable.  The tuner works fine under tvtime (SD) and xine (HD).

All MythTV functions work, except LiveTV.  The problem is that mythfrontend times out waiting for the HVR-950Q to tune to the first station.  This appears to be due to the very long HVR-950Q firmware load time, since no errors are reported by the backend.

Unfortunately, mythfrontend has a hard-wired 7 second timeout for most requests sent to the backend.  It seems this timeout works fine under normal circumstances for every other tuner MythTV works with.

The following is repeated in dmesg after every attempt:

 xc5000: waiting for firmware upload (dvb-fe-xc5000-1.6.114.fw)... usb 1-2: firmware: requesting dvb-fe-xc5000-1.6.114.fw
 xc5000: firmware read 12401 bytes.
 xc5000: firmware uploading...
 xc5000: firmware upload complete...

It looks like the HVR-950Q driver reloads the firmware at every possible opportunity, independent of the hardware state, each time either the SD or HD device is opened, such as when changing from an SD channel on /dev/video0 to an HD channel on /dev/dvb/adapter0.  Is this necessary?

Quoted 7 lines

Is it possible to tell the driver to ease up on the firmware reloads?  I don't mind if the first attempt fails, but the second attempt should succeed (without a reload).

Alternatively, are faster firmware loads possible?

Should I open a bug on this?

Hello Bob,

In order to avoid the firmware reloading condition, you need to add a modprobe option called "no_poweroff=1" for the xc5000 driver to your modprobe.conf file and then reboot your computer. I agree that this is a very annoying workaround, but have not had a chance to try to find another solution (the i2c master in the au0828 hardware is poorly designed and this same problem occurs in Windows but the problem is not as noticeable because the Windows application doesn't as aggressively power down the tuner).

Also, in order for the video to be rendered properly, you need to make sure your capture resolution for LiveTV mode and the various capture modes is set to 720x480 (the default in MythTV is 480x480). Without this change, the picture will appear to be vertically stretched. This is actually a bug in MythTV not properly handling analog capture products that do not have an onboard hardware scaler (I did work in 0.22 to get the analog support working but have not had an opportunity to fix this bug yet).

If you still have trouble, feel free to reply to this message.

Cheers,

Devin

Signature · 2 lines
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
#2 lore raw
Quoted 37 lines · Devin Heitmueller
Quoted 26 lines · Bob Cunningham

I just completed a fresh install of MythTV 0.22 RC1 on my fully-updated Fedora 11 system. My tuner is an HVR-950Q, connected to cable. The tuner works fine under tvtime (SD) and xine (HD).

All MythTV functions work, except LiveTV. The problem is that mythfrontend times out waiting for the HVR-950Q to tune to the first station. This appears to be due to the very long HVR-950Q firmware load time, since no errors are reported by the backend.

Unfortunately, mythfrontend has a hard-wired 7 second timeout for most requests sent to the backend. It seems this timeout works fine under normal circumstances for every other tuner MythTV works with.

The following is repeated in dmesg after every attempt:

xc5000: waiting for firmware upload (dvb-fe-xc5000-1.6.114.fw)... usb 1-2: firmware: requesting dvb-fe-xc5000-1.6.114.fw
xc5000: firmware read 12401 bytes.
xc5000: firmware uploading...
xc5000: firmware upload complete...

It looks like the HVR-950Q driver reloads the firmware at every possible opportunity, independent of the hardware state, each time either the SD or HD device is opened, such as when changing from an SD channel on /dev/video0 to an HD channel on /dev/dvb/adapter0. Is this necessary?

Quoted 7 lines

Is it possible to tell the driver to ease up on the firmware reloads? I don't mind if the first attempt fails, but the second attempt should succeed (without a reload).

Alternatively, are faster firmware loads possible?

Should I open a bug on this?

Hello Bob,

Quoted 8 lines

In order to avoid the firmware reloading condition, you need to add a modprobe option called "no_poweroff=1" for the xc5000 driver to your modprobe.conf file and then reboot your computer. I agree that this is a very annoying workaround, but have not had a chance to try to find another solution (the i2c master in the au0828 hardware is poorly designed and this same problem occurs in Windows but the problem is not as noticeable because the Windows application doesn't as aggressively power down the tuner).

For F11, I appended the line "options xc5000 no_poweroff=1" to /etc/modprobe.d/local.conf

Rather than power down (shudder), I did the following:
1. Unplug HVR-950Q
2. rmmod xc5000
3. modprobe xc5000 no_poweroff=1
4. Plug in HVR-950Q

Quoted 8 lines

Also, in order for the video to be rendered properly, you need to make sure your capture resolution for LiveTV mode and the various capture modes is set to 720x480 (the default in MythTV is 480x480). Without this change, the picture will appear to be vertically stretched. This is actually a bug in MythTV not properly handling analog capture products that do not have an onboard hardware scaler (I did work in 0.22 to get the analog support working but have not had an opportunity to fix this bug yet).

Done.

Quoted 5 lines

If you still have trouble, feel free to reply to this message.

Cheers,

Devin

All is well with the world: The tuner is tuning, MythTV is mythic, and I am a vidiot.

Thanks!

#3 lore raw
Quoted 8 lines · Bob Cunningham

For F11, I appended the line "options xc5000 no_poweroff=1" to /etc/modprobe.d/local.conf

Rather than power down (shudder), I did the following:
1. Unplug HVR-950Q
2. rmmod xc5000
3. modprobe xc5000 no_poweroff=1
4. Plug in HVR-950Q

You would be shocked how many people have trouble with those four steps. So now I just tell people to reboot.

Quoted 2 lines

All is well with the world: The tuner is tuning, MythTV is mythic, and I am a vidiot.

That's great. Bear in mind that I only did a minimal amount of burn-in under MythTV, so if you see other issues, please speak up. I basically did enough to get rid of the segfaults, show the user video, and cleanup a couple of errors in the mythbackend.log (by implementing the hue and saturation controls).

Devin

Signature · 2 lines
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
#4 lore raw
Quoted 16 lines · Devin Heitmueller
Quoted 8 lines · Bob Cunningham

For F11, I appended the line "options xc5000 no_poweroff=1" to /etc/modprobe.d/local.conf

Rather than power down (shudder), I did the following:
1. Unplug HVR-950Q
2. rmmod xc5000
3. modprobe xc5000 no_poweroff=1
4. Plug in HVR-950Q

You would be shocked how many people have trouble with those four steps. So now I just tell people to reboot.

Quoted 2 lines

All is well with the world: The tuner is tuning, MythTV is mythic, and I am a vidiot.

Quoted 7 lines

That's great. Bear in mind that I only did a minimal amount of burn-in under MythTV, so if you see other issues, please speak up. I basically did enough to get rid of the segfaults, show the user video, and cleanup a couple of errors in the mythbackend.log (by implementing the hue and saturation controls).

Devin

I spoke too soon: Switching between SD and HD channels (or vice-versa) always works the first time, but generally dies the next time I try. The behavior is very inconsistent: If I switch from SD to HD 720p or higher, the tuner goes away the next time I try to tune an SD channel. If I switch between SD and 480i HD channels, I can do so up to 4 times before it stops working.

I can switch among SD channels with no problem, and I can switch between HD channels of any resolution with no problem. Only switching back and forth between HD and SD causes the problem, and it always happens, sooner or later.

Is there a way to force a "quick & dirty" device reinitialization? Right now, I'm killing mythfrontend and mythbackend, re-plugging the HVR-950Q, and restarting mythbackend and mythfrontend. Probably overkill. Is there an easier way?

-BobC

#5 lore raw
Quoted 12 lines · Bob Cunningham

I spoke too soon: Switching between SD and HD channels (or vice-versa) always works the first time, but generally dies the next time I try.  The behavior is very inconsistent:  If I switch from SD to HD 720p or higher, the tuner goes away the next time I try to tune an SD channel.  If I switch between SD and 480i HD channels, I can do so up to 4 times before it stops working.

I can switch among SD channels with no problem, and I can switch between HD channels of any resolution with no problem.  Only switching back and forth between HD and SD causes the problem, and it always happens, sooner or later.

Quoted 4 lines

Is there a way to force a "quick & dirty" device reinitialization?  Right now, I'm killing mythfrontend and mythbackend, re-plugging the HVR-950Q, and restarting mythbackend and mythfrontend.  Probably overkill.  Is there an easier way?

In this context, we are not talking about SD versus HD - we're talking about analog versus digital. You should have no trouble switching between SD ATSC channels and HD ATSC channels (since the hardware literally cannot tell the difference). However, it's not *too* surprising to find issues going back and forth between analog and digital.

Are you sure you put both the analog and digtial video sources into the same recording group? If not, it's possible that MythTV will attempt to use both the analog and digtial parts of the card at the same time, which is not permitted by the hardware.

Devin

Signature · 2 lines
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
#6 lore raw
Quoted 18 lines · Devin Heitmueller
Quoted 12 lines · Bob Cunningham

I spoke too soon: Switching between SD and HD channels (or vice-versa) always works the first time, but generally dies the next time I try. The behavior is very inconsistent: If I switch from SD to HD 720p or higher, the tuner goes away the next time I try to tune an SD channel. If I switch between SD and 480i HD channels, I can do so up to 4 times before it stops working.

I can switch among SD channels with no problem, and I can switch between HD channels of any resolution with no problem. Only switching back and forth between HD and SD causes the problem, and it always happens, sooner or later.

Quoted 4 lines

Is there a way to force a "quick& dirty" device reinitialization? Right now, I'm killing mythfrontend and mythbackend, re-plugging the HVR-950Q, and restarting mythbackend and mythfrontend. Probably overkill. Is there an easier way?

Quoted 6 lines

In this context, we are not talking about SD versus HD - we're talking about analog versus digital. You should have no trouble switching between SD ATSC channels and HD ATSC channels (since the hardware literally cannot tell the difference). However, it's not *too* surprising to find issues going back and forth between analog and digital.

If I wait at least 30 seconds between changing channels, the lockups rarely occur. I'm wondering if this may be a MythTV issue related to buffering, rather than an HVR-950Q issue.

I rarely watch LiveTV, and I'm using it now only to validate all my channels against the EPG content (correct XMLID), after which this shouldn't be a problem.

Quoted 4 lines

Are you sure you put both the analog and digtial video sources into the same recording group? If not, it's possible that MythTV will attempt to use both the analog and digtial parts of the card at the same time, which is not permitted by the hardware.

They are in the same group, and the digital side is opened "only when needed" (no EIT scan unless tuned).

Quoted 1 line

Devin

-BobC