[pvrusb2] Audio distortion - WinTV-HVR 1900
isely at isely.net
Sun Nov 14 21:06:07 CST 2010
On Wed, 10 Nov 2010, Michael Strecke wrote:
> I'm using a Hauppauge WinTV-HVR 1900 under Ubuntu 04.10 LTS.
> This device needs a 16 KB firmware, so I had to compile the pvrusb2
> kernel module.
> The device works reasonably well, except for the following problem:
> A few weeks ago, I made my first timer-controlled recordings (from the
> composite input) using crontab, simply by copying /dev/video0 to a file.
> Every 20 - 30 recordings, the audio is distorted. This distortion
> remains during the entire recording. The next recording (with the same
> audio settings) is normal again.
> I wrote a small stress test script which records small files with a
> duration of 30 secs with a pause of 10 secs. The result is similar: Most
> recordings are ok. Audio distortion in every 20th to 30th file.
> Lowering the v4l2 volume setting had no effect.
> I was able to test a second unit, with similar results.
> The distortion does not sound like clipping (audio input level too
> high). I presume the audio encoder in the device does not start properly
> at times.
Sounds like a good guess
> Is this a known problem? Any hints on how to prevent it?
The pvrusb2 driver doesn't control the audio chip *directly*, rather it
operates another driver that is part of v4l-dvb which handles the part.
For the device you have, that should be the cx25840.ko module. This
module is not a part of the pvrusb2 driver, so even if you install the
latest standalone pvrusb2 driver you're still running the same
underlying cx25840.ko module.
That cx25840.ko module has undergone changes over time - it might be
worthwhile to move up to a later version of that module. You may be
running a pretty old kernel with an old version of that module...
There are multiple ways to do this. You could grab a recent snapshot of
v4l-dvb and compile that against your kernel. How well that works
depends somewhat on the kernel you are running as the interfaces between
v4l-dvb and the kernel have been moving targets for a while. (Much of
the extra code in the pvrusb2 standalone driver is conditionally
compiled stuff to adapt to various kernel versions.)
You could also try running a later kernel. You don't even need to set
up a kernel from your distribution. You could build a vanilla kernel
from kernel.org and try that - that's actually how I usually run here.
> My current work-around is a script that "records" all the time, but only
> writes to disk according to a time schedule. I create a test file after
> starting the script. If the distortion is present (which happens here as
> well), I restart the script (thus closing and reopening the connection
> to /dev/video0). If the audio is clear, all other recordings during that
> session are ok, too (at least so far).
Sounds like fun. Not. :-(
isely @ isely (dot) net
PGP: 03 54 43 4D 75 E5 CC 92 71 16 01 E2 B5 F5 C1 E8
More information about the pvrusb2