#1 Ricoh Webcam Driver - Problem with higher resolutions than 320x240

Closed
opened 2 years ago by RetoBor · 16 comments
RetoBor commented 2 years ago

Hello there,

First of all thank you very much for the recoding of the Ricoh Webcam driver. Great job. You are my hero.

I'm in the phase to get an old Sony Vaio VGN-FZ31Z Laptop back to live with Linux mint. Everything went well so far except the integrated webcam. I had no luck to get it running with the existing ressources on the net until I found your work on the "notabug.org" website. Well done. I am now able to access the camera and it is running with the lower resolution of 320 x 240. If I switch via "cheese" to a higher solution 1280x 1024 I only get a green screen and "out of video bufffer" errors. With skype I was not able to access the camera I assume due to the low resolution. I think skype requires minimum 640x480.

If you have time to have a look at the attached files it would be great. Thank you again for your work.

best regards

Hello there, First of all thank you very much for the recoding of the Ricoh Webcam driver. Great job. You are my hero. I'm in the phase to get an old Sony Vaio VGN-FZ31Z Laptop back to live with Linux mint. Everything went well so far except the integrated webcam. I had no luck to get it running with the existing ressources on the net until I found your work on the "notabug.org" website. Well done. I am now able to access the camera and it is running with the lower resolution of 320 x 240. If I switch via "cheese" to a higher solution 1280x 1024 I only get a green screen and "out of video bufffer" errors. With skype I was not able to access the camera I assume due to the low resolution. I think skype requires minimum 640x480. If you have time to have a look at the attached files it would be great. Thank you again for your work. best regards
64coreCPU commented 2 years ago
Owner

Hi! Thanks for your feedback. There is a small problem here - I do not have hardware with a UVC camera and I will not be able to debug it, but there are some general details. I have a WDM camera and I was able to run it at 640x480 only on the 4.9 kernel. On newer kernels, my camera maxes out at 320x240. It looks like something has changed in the USB subsystem and I can't find a solution yet.

Try the following. Unload the uvcvideo module first, then load the r5u870v2 module. It will upload the firmware to the camera. Then unload the r5u870v2 module and load uvcvideo. In theory, further the camera should be regularly controlled using the uvcvideo module.

Hi! Thanks for your feedback. There is a small problem here - I do not have hardware with a UVC camera and I will not be able to debug it, but there are some general details. I have a WDM camera and I was able to run it at 640x480 only on the 4.9 kernel. On newer kernels, my camera maxes out at 320x240. It looks like something has changed in the USB subsystem and I can't find a solution yet. Try the following. Unload the uvcvideo module first, then load the r5u870v2 module. It will upload the firmware to the camera. Then unload the r5u870v2 module and load uvcvideo. In theory, further the camera should be regularly controlled using the uvcvideo module.
RetoBor commented 2 years ago
Poster

Hi, thank you for your quick response. As far as I know my build in Ricoh webcam has also a WDM chipset. I played around a little bit with your suggested method and I can say that both modules are required and need to be active and loaded to get the camera with minimum resolution of 320x 240 to work. The uvcvideo module alone can not handle it. If I increase the resolution via cheese I get immediatly an error message about an invalid argument to set the video standard. I have the screenshot of the log file attached (sorry - it is in german). Maybe that gives you an idea. I will dig into it later this week.

Thank you again and have a great week.

Hi, thank you for your quick response. As far as I know my build in Ricoh webcam has also a WDM chipset. I played around a little bit with your suggested method and I can say that both modules are required and need to be active and loaded to get the camera with minimum resolution of 320x 240 to work. The uvcvideo module alone can not handle it. If I increase the resolution via cheese I get immediatly an error message about an invalid argument to set the video standard. I have the screenshot of the log file attached (sorry - it is in german). Maybe that gives you an idea. I will dig into it later this week. Thank you again and have a great week.
64coreCPU commented 2 years ago
Owner

Judging by your dmesg, your camera is UVC type. You can also see here https://github.com/p6/R5U87X/blob/master/docs/model_matrix.txt Also open webcam.h file and look at line 500. Everything indicates that your camera is UVC.

If possible, try booting with the 4.9 kernel and see the result.

Judging by your dmesg, your camera is UVC type. You can also see here https://github.com/p6/R5U87X/blob/master/docs/model_matrix.txt Also open webcam.h file and look at line 500. Everything indicates that your camera is UVC. If possible, try booting with the 4.9 kernel and see the result.
RetoBor commented 2 years ago
Poster

You are right, according to this list it should be UVC. So far I don´t like the idea to go back to kernel 4.9, I still hope there are other solutions.

You are right, according to this list it should be UVC. So far I don´t like the idea to go back to kernel 4.9, I still hope there are other solutions.
64coreCPU commented 2 years ago
Owner

I am not suggesting that you switch back to the 4.9 kernel, I am suggesting that you boot from it just for the test.

I am not suggesting that you switch back to the 4.9 kernel, I am suggesting that you boot from it just for the test.
RetoBor commented 2 years ago
Poster

Hi,

It is a complete fresh installation, so I do not have the 4.9 kernel on this machine.
I have tried to add this kernel, but cinnamon 4.8.6 chrashes with this kernel setup. I also tried the v4l2 test bench. So I´m able to control the camera with this tool, I can see the camera picture but only with the lower resolution values 320x240 and less.

Hi, It is a complete fresh installation, so I do not have the 4.9 kernel on this machine. I have tried to add this kernel, but cinnamon 4.8.6 chrashes with this kernel setup. I also tried the v4l2 test bench. So I´m able to control the camera with this tool, I can see the camera picture but only with the lower resolution values 320x240 and less.
64coreCPU commented 2 years ago
Owner

I made some changes to the code. Due to changes in kernels newer than 4.9, the packet length in URB was calculated incorrectly. Because of this, packets were returned with an error on WDM. I don't have UVC hardware, but check to see if the problem is solved.

I made some changes to the code. Due to changes in kernels newer than 4.9, the packet length in URB was calculated incorrectly. Because of this, packets were returned with an error on WDM. I don't have UVC hardware, but check to see if the problem is solved.
RetoBor commented 2 years ago
Poster

Thumbs up, it works - congrats! great job ! It works perfect with "cheese" and also with "zoom" up to the maximum possible resolution of 1280x1024. Only skype has issues. It uses the camera somehow only with 640x480. I will try that out later if I can improve that.

Thanks a lot for your support to get this old system back to live !

Thumbs up, it works - congrats! great job ! It works perfect with "cheese" and also with "zoom" up to the maximum possible resolution of 1280x1024. Only skype has issues. It uses the camera somehow only with 640x480. I will try that out later if I can improve that. Thanks a lot for your support to get this old system back to live !
64coreCPU commented 2 years ago
Owner

Thank you for your feedback too. At the expense of skype - take a look at dmesg. r5u870v2 outputs debug messages when programs try to probe or set the camera resolution. What camera resolutions is it trying to set?

Thank you for your feedback too. At the expense of skype - take a look at dmesg. r5u870v2 outputs debug messages when programs try to probe or set the camera resolution. What camera resolutions is it trying to set?
RetoBor commented 2 years ago
Poster

Hi, I haven´t found any messages from skype or zoom related to the driver. If I use the skype Browser version it uses the higher resolution. It is just the Linux app which can not use the higher values. Also I have checked the skype config files and the database without success. I assume it is somewhere stored in a binary file format. I will keep you on track.

Have a good weekend.

Hi, I haven´t found any messages from skype or zoom related to the driver. If I use the skype Browser version it uses the higher resolution. It is just the Linux app which can not use the higher values. Also I have checked the skype config files and the database without success. I assume it is somewhere stored in a binary file format. I will keep you on track. Have a good weekend.
64coreCPU commented 2 years ago
Owner

I tested [skypeforlinux] and came to the conclusion that it does not work due to not implemented functions VIDIOC_G_STD, VIDIOC_S_STD and VIDIOC_QUERYSTD. I don't know how to determine the standard of our cameras, so I just added a dummy as a workaround and now skype is capturing the image from the camcorder. My webcam has a maximum resolution of 640x480, so I ask you to test your camera to capture 1280x1024 on skype.

I tested [skypeforlinux] and came to the conclusion that it does not work due to not implemented functions VIDIOC_G_STD, VIDIOC_S_STD and VIDIOC_QUERYSTD. I don't know how to determine the standard of our cameras, so I just added a dummy as a workaround and now skype is capturing the image from the camcorder. My webcam has a maximum resolution of 640x480, so I ask you to test your camera to capture 1280x1024 on skype.
RetoBor commented 2 years ago
Poster

Hi I don´t know how to get a dummy camera into the system. Have configured it as a loopback device => v4l2loopback ? I tested a seperate webcam plugged in via USB and it worked immediatley with the highest resolution. It is a kind of weired.

Hi I don´t know how to get a dummy camera into the system. Have configured it as a loopback device => v4l2loopback ? I tested a seperate webcam plugged in via USB and it worked immediatley with the highest resolution. It is a kind of weired.
64coreCPU commented 2 years ago
Owner

Not. I just expose 0 as the video standard. Update the module and check how it works now.

Not. I just expose 0 as the video standard. Update the module and check how it works now.
RetoBor commented 2 years ago
Poster

Hi, I have updated the module, but I have got the same behaviour. Skype for Linux can not handle the higher resolution. The browser version of skype can handle it, also Zoom and cheese. It seems to be a problem of the configuration of the skype app

Hi, I have updated the module, but I have got the same behaviour. Skype for Linux can not handle the higher resolution. The browser version of skype can handle it, also Zoom and cheese. It seems to be a problem of the configuration of the skype app
64coreCPU commented 2 years ago
Owner

I have no more ideas for further action. Sorry :( Anyway, on my camera, skype didn’t start capturing from the camera at all until I made a dummy for standards in the driver.

I have no more ideas for further action. Sorry :( Anyway, on my camera, skype didn’t start capturing from the camera at all until I made a dummy for standards in the driver.
RetoBor commented 2 years ago
Poster

Thank you for all your efforts. I will write a note to microsoft, maybe they have an idea.

Thank you for all your efforts. I will write a note to microsoft, maybe they have an idea.
Sign in to join this conversation.
No Label
No Milestone
No assignee
2 Participants
Loading...
Cancel
Save
There is no content yet.