Firefly开源社区

打印 上一主题 下一主题

[Linux] Camera dose not work on linux

39

积分

0

威望

0

贡献

技术小白

积分
39

Camera dose not work on linux

发表于 2019-3-8 11:08:07      浏览:7909 | 回复:1        打印      只看该作者   [复制链接] 楼主
hello

I am testing   S5K4ECGX camera on firefly RK3128 board.
The camera works fine on android system, but it does not work on linux system.
On linux system, I checked the followings
1) /dev/video0 is exist.
2) v4l2-ctl -d /dev/video0 --all

  1. firefly@firefly:~/test-v4l2$ v4l2-ctl -d /dev/video0 --all
  2. [64736.020928] s5k4ec_back_3(rk_cam_sensor:1228): generic_sensor_ioctl cmd(0x3) is unknown !
  3. [64736.020928]
  4. [64736.123828] rk818_ldo8: operation not allowed
  5. [64736.192541] rk818_ldo4: operation not allowed
  6. Driver Info (not using libv4l2):
  7.         Driver name   : rk312x-camera
  8.         Card type     : s5k4ec_back_3-0_100_100
  9.         Bus info      :
  10.         Driver version: 0.1.14
  11.         Capabilities  : 0x04000001
  12.                 Video Capture
  13.                 Streaming
  14. Video input : 0 (Camera: ok)
  15. Format Video Capture:
  16.         Width/Height      : 800/600
  17.         Pixel Format      : 'NV12'
  18.         Field             : None
  19.         Bytes per Line    : 1200
  20.         Size Image        : 720000
  21.         Colorspace        : JPEG
  22.         Transfer Function : Default (maps to sRGB)
  23.         YCbCr/HSV Encoding: Default (maps to ITU-R 601)
  24.         Quantization      : Default (maps to Full Range)
  25. Crop Capability Video Capture:
  26.         Bounds      : Left 0, Top 0, Width 2592, Height 1944
  27.         Default     : Left 0, Top 0, Width 0, Height 0
  28.         Pixel Aspect: 1944/2592
  29. Crop Capability Video Output:
  30.         Bounds      : Left 0, Top 0, Width 2592, Height 1944
  31.         Default     : Left 0, Top 0, Width 0, Height 0
  32.         Pixel Aspect: 1944/2592
  33. Crop: Left 0, Top 0, Width 0, Height 0
  34.                                 0x0098090d (menu)   : min=0 max=4 default=0 value=0
复制代码


3) mplayer tv:// -tv driver=v4l2:fps=30:width=800:height=600:device=/dev/video0
  1. #################################### terminal log
  2. MPlayer2 2.0-728-g2c378c7-4 (C) 2000-2012 MPlayer Team
  3. Cannot open file '/home/firefly/.mplayer/input.conf': No such file or directory
  4. Failed to open /home/firefly/.mplayer/input.conf.
  5. Cannot open file '/etc/mplayer/input.conf': No such file or directory
  6. Failed to open /etc/mplayer/input.conf.

  7. Playing tv://.
  8. Detected file format: TV
  9. Selected driver: v4l2
  10. name: Video 4 Linux 2 input
  11. author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
  12. comment: first try, more to come ;-)
  13. v4l2: ioctl get standard failed: Inappropriate ioctl for device
  14. Selected device: s5k4ec_back_3-0_100_100
  15. Capabilities:  video capture  streaming
  16. supported norms:
  17. inputs: 0 = Camera;
  18. Current input: 0
  19. Current format: NV12
  20. v4l2: ioctl set format failed: Invalid argument
  21. v4l2: ioctl set format failed: Invalid argument
  22. v4l2: ioctl set format failed: Invalid argument
  23. v4l2: ioctl set format failed: Invalid argument
  24. v4l2: ioctl set format failed: Invalid argument
  25. v4l2: ioctl set format failed: Invalid argument
  26. v4l2: ioctl set format failed: Invalid argument
  27. v4l2: ioctl set format failed: Invalid argument
  28. tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
  29. v4l2: ioctl enum norm failed: No data available
  30. Error: Cannot set norm!
  31. Selected input hasn't got a tuner!
  32. v4l2: ioctl queue buffer failed: Invalid argument
  33. v4l2: ioctl set mute failed: Invalid argument
  34. v4l2: 0 frames successfully processed, 0 frames dropped.
  35. Opening as detected format "TV" failed.
  36. Failed to recognize file format.


  37. Exiting... (End of file)
  38. firefly@firefly:~$


  39. ########################### dmsg
  40. [65117.624086] s5k4ec_back_3(rk_cam_sensor:1228): generic_sensor_ioctl cmd(0x3) is unknown !

  41. [65117.732006] Cam_Powerdowm
  42. [65117.732104] rk818_ldo8: operation not allowed
  43. [65117.801175] rk818_ldo4: operation not allowed
  44. [65117.840305] ret: 0
  45. [65123.125091] rk312x-camera rk312x-camera.33: Format (YV12) not found
  46. [65123.125136] rk_cam_cif(2226):RK_Camera(version:
  47. [65123.125231] rk_cam_cif(2231):(NV12)-YUV420 NV12
  48. [65123.125250] rk_cam_cif(2231):(NV16)-YUV422 NV16
  49. [65123.125265] rk_cam_cif(2231):(NV21)-YUV420 NV21
  50. [65123.125280] rk_cam_cif(2231):(NV61)-YUV422 NV61
  51. [65123.125297] rk_cam_cif(2314):
  52. rk_camera_try_fmt..2314.. ret = -22
  53. [65123.125612] rk312x-camera rk312x-camera.33: Format (YU12) not found
  54. [65123.125637] rk_cam_cif(2226):RK_Camera(version:
  55. [65123.125655] rk_cam_cif(2231):(NV12)-YUV420 NV12
  56. [65123.125670] rk_cam_cif(2231):(NV16)-YUV422 NV16
  57. [65123.125694] rk_cam_cif(2231):(NV21)-YUV420 NV21
  58. [65123.126061] rk_cam_cif(2231):(NV61)-YUV422 NV61
  59. [65123.126076] rk_cam_cif(2314):
  60. rk_camera_try_fmt..2314.. ret = -22
  61. [65123.126240] rk312x-camera rk312x-camera.33: Format (UYVY) not found
  62. [65123.126258] rk_cam_cif(2226):RK_Camera(version:
  63. [65123.126270] rk_cam_cif(2231):(NV12)-YUV420 NV12
  64. [65123.126281] rk_cam_cif(2231):(NV16)-YUV422 NV16
  65. [65123.126291] rk_cam_cif(2231):(NV21)-YUV420 NV21
  66. [65123.126301] rk_cam_cif(2231):(NV61)-YUV422 NV61
  67. [65123.126312] rk_cam_cif(2314):
  68. rk_camera_try_fmt..2314.. ret = -22
  69. [65123.126455] rk312x-camera rk312x-camera.33: Format (YUYV) not found
  70. [65123.126472] rk_cam_cif(2226):RK_Camera(version:
  71. [65123.126484] rk_cam_cif(2231):(NV12)-YUV420 NV12
  72. [65123.126494] rk_cam_cif(2231):(NV16)-YUV422 NV16
  73. [65123.126505] rk_cam_cif(2231):(NV21)-YUV420 NV21
  74. [65123.126515] rk_cam_cif(2231):(NV61)-YUV422 NV61
  75. [65123.126526] rk_cam_cif(2314):
  76. rk_camera_try_fmt..2314.. ret = -22
  77. [65123.126665] rk312x-camera rk312x-camera.33: Format (RGB4) not found
  78. [65123.126682] rk_cam_cif(2226):RK_Camera(version:
  79. [65123.126694] rk_cam_cif(2231):(NV12)-YUV420 NV12
  80. [65123.126704] rk_cam_cif(2231):(NV16)-YUV422 NV16
  81. [65123.126715] rk_cam_cif(2231):(NV21)-YUV420 NV21
  82. [65123.126725] rk_cam_cif(2231):(NV61)-YUV422 NV61
  83. [65123.126736] rk_cam_cif(2314):
  84. rk_camera_try_fmt..2314.. ret = -22
  85. [65123.126863] rk312x-camera rk312x-camera.33: Format (RGB3) not found
  86. [65123.126880] rk_cam_cif(2226):RK_Camera(version:
  87. [65123.126891] rk_cam_cif(2231):(NV12)-YUV420 NV12
  88. [65123.126902] rk_cam_cif(2231):(NV16)-YUV422 NV16
  89. [65123.126912] rk_cam_cif(2231):(NV21)-YUV420 NV21
  90. [65123.126922] rk_cam_cif(2231):(NV61)-YUV422 NV61
  91. [65123.126933] rk_cam_cif(2314):
  92. rk_camera_try_fmt..2314.. ret = -22
  93. [65123.127222] rk312x-camera rk312x-camera.33: Format (BGR) not found
  94. [65123.127240] rk_cam_cif(2226):RK_Camera(version:
  95. [65123.127266] rk_cam_cif(2231):(NV12)-YUV420 NV12
  96. [65123.127277] rk_cam_cif(2231):(NV16)-YUV422 NV16
  97. [65123.127287] rk_cam_cif(2231):(NV21)-YUV420 NV21
  98. [65123.127298] rk_cam_cif(2231):(NV61)-YUV422 NV61
  99. [65123.127309] rk_cam_cif(2314):
  100. rk_camera_try_fmt..2314.. ret = -22
  101. [65123.127484] rk312x-camera rk312x-camera.33: Format (BGR) not found
  102. [65123.127524] rk_cam_cif(2226):RK_Camera(version:
  103. [65123.127539] rk_cam_cif(2231):(NV12)-YUV420 NV12
  104. [65123.127550] rk_cam_cif(2231):(NV16)-YUV422 NV16
  105. [65123.127560] rk_cam_cif(2231):(NV21)-YUV420 NV21
  106. [65123.127571] rk_cam_cif(2231):(NV61)-YUV422 NV61
  107. [65123.127582] rk_cam_cif(2314):
  108. rk_camera_try_fmt..2314.. ret = -22
  109. [65123.134858] systemd-journald[326]: no db file to read /run/udev/data/+platform:rk312x-camera.33: No such file or directory
  110. [65123.136009] systemd-journald[326]: no db file to read /run/udev/data/+platform:rk312x-camera.33: No such file or directory
  111. [65123.137185] systemd-journald[326]: no db file to read /run/udev/data/+platform:rk312x-camera.33: No such file or directory
  112. [65123.138280] systemd-journald[326]: no db file to read /run/udev/data/+platform:rk312x-camera.33: No such file or directory
  113. [65123.139365] systemd-journald[326]: no db file to read /run/udev/data/+platform:rk312x-camera.33: No such file or directory
  114. [65123.140451] systemd-journald[326]: no db file to read /run/udev/data/+platform:rk312x-camera.33: No such file or directory
  115. [65123.141504] systemd-journald[326]: no db file to read /run/udev/data/+platform:rk312x-camera.33: No such file or directory
  116. [65123.142593] systemd-journald[326]: no db file to read /run/udev/data/+platform:rk312x-camera.33: No such file or directory
  117. [65123.425308] s5k4ec_back_3(rk_cam_sensor:1035): v4l2_control id(0x980909) is invalidate
  118. [65123.488644] ret: 0
  119. [65123.616549] Cam_Powerdowm
  120. firefly@firefly:~$
复制代码


what can i check the others ?
thanks for any help .
回复

使用道具 举报

3750

积分

17

威望

18

贡献

官方团队

Rank: 9Rank: 9Rank: 9

积分
3750
发表于 2019-3-14 09:22:38        只看该作者  沙发
rk3128 cannot support S5K4ECGX camera on linux system
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表