[pvrusb2] debugcmd permission denied
Mike Isely
isely at isely.net
Wed Sep 5 13:06:24 CDT 2007
On Wed, 5 Sep 2007, Svein Lindal wrote:
> Hi again. I decided to reinstall everything and try from scratch, just
> to be sure that I get the steps right.
>
> Turns out my wintv-pvr usb2 works out of the box with the kernel
> drivers and firmware, with kind of choppy image though. (which could
> mean I should get the firmware from the cdrom, right????)
I haven't had any reports like that which were solved by changing the
firmware, unfortunately. There were a bunch of fixes last December that
improved video considerably though mainly in the area of solving
corruption issues. Those fixes are definitely in kernel 2.6.21 or later
and IIRC those same fixes got into a bugfix release of 2.6.20.x.
Some related questions: How are you viewing the video? Directly with
mplayer by reading /dev/video0? Or something else? Try cat'ing the
video into a file first then view that with mplayer (or something else).
Does that help?
>
> Trying to extract firmware using fwextract.pl (version from the link)
> does not work.
Is there any identifying information on the CDROM that I can match up?
This is a longshot however, because the only CDROM versions I have are
with devices I have received. Other than that I rely on driver
downloads from Hauppauge's site for firmware extraction. You can also
grab the firmware tarball from dl.ivtvdriver.org; that also has
everything needed for the pvrusb2 driver. I don't have the exact URL
for that handy right now but I'm sure a google search will probably do
the trick there.
I'd like to ensure that fwextract.pl works for all driver releases.
Unfortunately I can't directly do that for CDROM releases since I don't
myself have the CDROMs. Frequently what's on the CDROM for a given
release matches what is downloadable from Hauppauge's web site. But if
it is something unique then I can't do the manual extraction here to
train fwextract.pl since I would still have nothing to train it against.
It would be a great help if you are able to complete the manual
extraction process and then use that with fwextract.pl so we can
generate the missing table entries which can then be plugged into
fwextract.pl for others to benefit.
>
> When I try to run the manual extraction I still get stuck at this point
>
> $ echo "cpufw fetch" > /sys/class/pvrusb2/sn-8674305/debugmd
> bash: /sys/class/pvrusb2/sn-8674305/debugmd: Permission denied
It's debugcmd, not debugmd, and you're not root...
>
> $ sudo 'echo "cpufw fetch" > /sys/class/pvrusb2/sn-8674305/debugmd'
> sudo: echo "cpufw fetch" > /sys/class/pvrusb2/sn-8674305/debugmd:
> command not found
OK, now you're root but the file name is still wrong. However the error
message sounds like it failed to locate the echo program (which is
certainly possible because when run like this the PATH being used is
your normal path and normally echo is probably a built-in for you,
except now when you're trying to be root, I'm guessing).
>
> $ sudo su
> root at w2jb:/home/svein# echo "cpufw fetch" >
> /sys/class/pvrusb2/sn-8674305/debugcmd
> bash: /sys/class/pvrusb2/sn-8674305/debugcmd: Permission denied
Ah, much better. That one should have worked. But...
>
> There is no file named debugcmd in that directory if there is supposed to be?
It should be there - IF you enabled the PVRUSB2 debug interface when you
built the kernel...
>
> This is the contents of the folder:
> /sys/class/pvrusb2/sn-8674305$ ls -l
> total 0
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_audio_bitrate
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_audio_crc
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_audio_emphasis
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_audio_layer
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_audio_mode
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_balance
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_bass
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_brightness
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_channel
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_contrast
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_debug_subsys_mask
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_debug_subsys_stream_mask
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_freq_table_channel
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_freq_table_value
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_frequency
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_hue
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_input
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_mpeg_audio_mode
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_mpeg_audio_mode_extension
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_mute
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_resolution_hor
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_resolution_ver
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_saturation
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_signal_present
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_srate
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_streaming_enabled
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_stream_type
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_treble
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_usb_speed
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_video_aspect
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_video_b_frames
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_video_bitrate
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_video_bitrate_mode
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_video_bitrate_peak
> drwxr-xr-x 2 root root 0 2007-09-05 13:13
> ctl_video_chroma_median_filter_bottom
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_video_chroma_median_filter_top
> drwxr-xr-x 2 root root 0 2007-09-05 13:13
> ctl_video_chroma_spatial_filter_type
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_video_gop_closure
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_video_gop_size
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_video_luma_median_filter_bottom
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_video_luma_median_filter_top
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_video_luma_spatial_filter_type
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_video_median_filter_type
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_video_pulldown
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_video_spatial_filter
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_video_spatial_filter_mode
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_video_standard
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_video_standard_mask_active
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_video_standard_mask_available
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_video_temporal_decimation
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_video_temporal_filter
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_video_temporal_filter_mode
> drwxr-xr-x 2 root root 0 2007-09-05 13:13 ctl_volume
> lrwxrwxrwx 1 root root 0 2007-09-05 13:13 device ->
> ../../../devices/pci0000:00/0000:00:1d.7/usb5/5-1
> lrwxrwxrwx 1 root root 0 2007-09-05 13:14 subsystem -> ../../../class/pvrusb2
> --w------- 1 root root 4096 2007-09-05 13:14 uevent
> -r--r--r-- 1 root root 4096 2007-09-05 13:18 unit_number
> -r--r--r-- 1 root root 4096 2007-09-05 13:18 v4l_minor_number
>
Yeah, this looks a lot like you're missing
CONFIG_VIDEO_PVRUSB2_DEBUGIFC=y in your build. Try checking that.
>
>
> Also, the usbsnoop and decode_log provides 4 files, 2 sets of the ones
> I want I guess?:
> 12559 2007-09-05 12:05 firmware_file-0
> 262144 2007-09-05 12:05 firmware_file-1
> 12559 2007-09-05 12:05 firmware_file-2
> 262144 2007-09-05 12:05 firmware_file-3
The decode_log program just pulls out whatever it finds in the log.
Note that you have matching file sizes here. I'll bet you did two
snoops that are concatenated into the same log. Try diff'ing
firmware_file-0 and firmware_file-2 (or firmware_file-1 and
firmware_file-3) - I'll bet they match.
-Mike
--
| Mike Isely | PGP fingerprint
Spammers Die!! | | 03 54 43 4D 75 E5 CC 92
| isely @ pobox (dot) com | 71 16 01 E2 B5 F5 C1 E8
| |
More information about the pvrusb2
mailing list