jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23710
Joined: Sat Jul 30, 2011 7:41 pm

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Fri Jun 21, 2019 8:30 am

custardpi wrote:
Thu Jun 20, 2019 11:28 pm
I'm sorry for piggybacking on this thread but I felt like since this is still such an active discussion it would be better posting here than creating a new thread.

When looking for ways to cheaply stream HDMI to twitch I came across the Twitch O Matic on hackster.io which gives instructions and code for implementing it. However, those use a Raspi 0 W with a B102 and while the instructions mention that the Raspi 3 can be used with a B101 the instructions and walkthrough also require the use of raspivid, which I read earlier in this thread does not work with with the B101, at least as of April 2018.

Has that changed at all? Is there a viable solution for me to use a Raspi 3 with a B101 and stream to twitch? I am wondering because I already have a Raspi 3 and am about to buy a B101 but if that doesn't work for this I'll need to buy the B102 and a Raspi 0 W. Thanks in advance for any help!
It is always better to start a new thread.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7329
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Fri Jun 21, 2019 9:06 am

custardpi wrote:
Thu Jun 20, 2019 11:28 pm
When looking for ways to cheaply stream HDMI to twitch I came across the Twitch O Matic on hackster.io which gives instructions and code for implementing it. However, those use a Raspi 0 W with a B102 and while the instructions mention that the Raspi 3 can be used with a B101 the instructions and walkthrough also require the use of raspivid, which I read earlier in this thread does not work with with the B101, at least as of April 2018.

Has that changed at all? Is there a viable solution for me to use a Raspi 3 with a B101 and stream to twitch? I am wondering because I already have a Raspi 3 and am about to buy a B101 but if that doesn't work for this I'll need to buy the B102 and a Raspi 0 W. Thanks in advance for any help!
raspivid support has not changed - it's there and believed working, but not supported. If it works for you then fine, but if you have issues then I'm not investigating.

The B101 and B102 only really differ in the connector (the B102 does also allow 4 CSI lanes on a Compute Module, which then allows receiving 1080p60).
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7329
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Fri Jun 21, 2019 9:25 am

chchart wrote:
Fri Jun 21, 2019 5:17 am
Hello!
I am using B101 with RPi 3B+ utilizing yavta. First of all, thank you everyone for active discussion and 6by9 for providing the support for yavta. B101 is connected to a Mac Mini, and it works great!

But, it does not work in Mac's recovery mode. When yavta capture command is run, it would "fail to create pool" and "select timeout." Does anyone have a guess to why it does not work?
I heard that screenshot does not work in the recovery mode because it's outside of the "userspace." Does yavta use mechanism similar to screen capture? I cannot seem to understand, as Pi should still be receiving a video input..

Also, I've tested with the same setup with Raspberry Pi Zero W with B102 bridge using "raspistill" and "raspivid" in Mac's recovery mode, and it works fine. That's why I am curious as to why B101 with yavta does not work.

If someone could explain what yavta does differently from raspivid that might have cause the failure, I would greatly appreciate it!
Thank you in advance.
yavta does very little different from raspivid, except that the Linux kernel is controlling it all.
Please provide the full output from yavta (in code tags). Also the output of "v4l2-ctl --query-dv-timings", and "v4l2-ctl -V" after having run yavta.

The TC358743 chip on the B101/102 takes HDMI and produces CSI2 out. The Pi receives this into a memory buffer via the bcm2835-unicam kernel driver. yavta then configures a pipeline to pass those buffers into the GPUs MMAL system to process the image and render and/or video encode it.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

chchart
Posts: 4
Joined: Fri Jun 07, 2019 6:34 pm

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Fri Jun 21, 2019 5:12 pm

6by9 wrote:
Fri Jun 21, 2019 9:25 am
chchart wrote:
Fri Jun 21, 2019 5:17 am
Hello!
I am using B101 with RPi 3B+ utilizing yavta. First of all, thank you everyone for active discussion and 6by9 for providing the support for yavta. B101 is connected to a Mac Mini, and it works great!

But, it does not work in Mac's recovery mode. When yavta capture command is run, it would "fail to create pool" and "select timeout." Does anyone have a guess to why it does not work?
I heard that screenshot does not work in the recovery mode because it's outside of the "userspace." Does yavta use mechanism similar to screen capture? I cannot seem to understand, as Pi should still be receiving a video input..

Also, I've tested with the same setup with Raspberry Pi Zero W with B102 bridge using "raspistill" and "raspivid" in Mac's recovery mode, and it works fine. That's why I am curious as to why B101 with yavta does not work.

If someone could explain what yavta does differently from raspivid that might have cause the failure, I would greatly appreciate it!
Thank you in advance.
yavta does very little different from raspivid, except that the Linux kernel is controlling it all.
Please provide the full output from yavta (in code tags). Also the output of "v4l2-ctl --query-dv-timings", and "v4l2-ctl -V" after having run yavta.

The TC358743 chip on the B101/102 takes HDMI and produces CSI2 out. The Pi receives this into a memory buffer via the bcm2835-unicam kernel driver. yavta then configures a pipeline to pass those buffers into the GPUs MMAL system to process the image and render and/or video encode it.
Hi 6by9, thank you for your quick reply. I checked back today, and it works as expected. I must have forgot to set the timing query or EDID after RPi booted up. I apologize for asking the question before giving it a second try.
Is it also possible to capture a still (one frame) using yavta? Or the best way would be to ffmpeg to convert h264 to jpeg?
Thank you very much for your help!
Last edited by chchart on Fri Jun 21, 2019 5:42 pm, edited 1 time in total.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7329
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Fri Jun 21, 2019 5:29 pm

chchart wrote:
Fri Jun 21, 2019 5:12 pm
Hi 6by9, thank you for your quick reply. I checked back today, and it works as expected. I must have forgot to set the timing query or EDID after RPi booted up. I apologize for asking the question before giving it a second try.
Is it also possible to capture a still (one frame) using yavta?
Thank you very much for your help!
If you just want a single frame in the native format of the source, then use v4l2-ctl

Code: Select all

v4l2-ctl --set-dv-bt-timings query
v4l2-ctl -v pixelformat=UYVY
v4l2-ctl --stream-mmap=3 --stream-count=1 --stream-to=foo.uyvy
You can add --skip-count=N to skip some frames at the start of the stream. Post process the frame if you want it in a different format.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

chchart
Posts: 4
Joined: Fri Jun 07, 2019 6:34 pm

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Fri Jun 21, 2019 6:11 pm

6by9 wrote:
Fri Jun 21, 2019 5:29 pm
If you just want a single frame in the native format of the source, then use v4l2-ctl

Code: Select all

v4l2-ctl --set-dv-bt-timings query
v4l2-ctl -v pixelformat=UYVY
v4l2-ctl --stream-mmap=3 --stream-count=1 --stream-to=foo.uyvy
You can add --skip-count=N to skip some frames at the start of the stream. Post process the frame if you want it in a different format.
Hi 6by9, thank you for the pointer. I've tried what you suggested and am not getting an output file. The command just returns a '<'. Do you have any suggestion for what to try?

Code: Select all

pi@raspberrypi:~/yavta $ v4l2-ctl --set-dv-bt-timings query
BT timings set
pi@raspberrypi:~/yavta $ v4l2-ctl -v pixelformat=UYVY
pi@raspberrypi:~/yavta $ v4l2-ctl --stream-mmap=3 --stream-count=1 --stream-to=foo.uyvy
<
pi@raspberrypi:~/yavta $ ls
1080P50EDID.txt  file.h264  file.pts  laptop_results.txt  README.md  yavta.c
COPYING.GPL      file.jpg   include   Makefile            yavta      yavta.o
I greatly appreciate your help. Thank you so much.

Sandro6
Posts: 4
Joined: Thu Jul 18, 2019 11:05 pm

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Thu Jul 18, 2019 11:38 pm

Hi Engineer 6by9

An apology in advance, I am new to PI and despite reading your thread on this topic, I have a problem when I send the video and audio through the B101 card

First I would like to reaffirm if what I have read I have done well

1.-GPIO Pines
pin 5 = SD -> Pi GPIO20 PCM_DIN
pin 6 = SCK -> Pi GPIO18 PCM_CLK
pin 7 = WFS -> Pi GPIO19 PCM_FS
And you then need to configure the receiver to slave mode so that it treats PCM_CLK as an input

2.- In the thread pag. 20 I think, I read all these steps.
official clean light stretch
sudo apt-get update
sudo apt-get upgrade -y
SKIP_KERNEL=1 sudo rpi-update
add cma=32M into /boot/cmdline.txt
add dtoverlay=tc358743 into /boot/config.txt
sudo reboot
all fine
Install Yavta, enable everything you said
Even when I do the tests of
v4l2-ctl --set-edid=file=1080P50EDID.txt --fix-edid-checksums
v4l2-ctl --query-dv-timings

Code: Select all

pi@raspberrypi:~ $ v4l2-ctl --set-edid=file=1080P50EDID.txt --fix-edid-checksums 

CTA-861 Header
  IT Formats Underscanned: yes
  Audio:                   yes
  YCbCr 4:4:4:             no
  YCbCr 4:2:2:             no

HDMI Vendor-Specific Data Block
  Physical Address:        3.0.0.0
  YCbCr 4:4:4 Deep Color:  no
  30-bit:                  no
  36-bit:                  no
  48-bit:                  no

CTA-861 Video Capability Descriptor
  RGB Quantization Range:  yes
  YCC Quantization Range:  no
  PT:                      Supports both over- and underscan
  IT:                      Supports both over- and underscan
  CE:                      Supports both over- and underscan
pi@raspberrypi:~ $ v4l2-ctl --query-dv-timings
	Active width: 1280
	Active height: 720
	Total width: 1650
	Total height: 750
	Frame format: progressive
	Polarities: -vsync -hsync
	Pixelclock: 74250000 Hz (60.00 frames per second)
	Horizontal frontporch: 0
	Horizontal sync: 370
	Horizontal backporch: 0
	Vertical frontporch: 0
	Vertical sync: 30
	Vertical backporch: 0
	Standards: 
	Flags: 


My computer (where I want to stream), warns me that it is transmitting

Code: Select all

pi@raspberrypi:~/yavta $ ./yavta --capture=200 -n 3 --encode-to=file.h264 -f UYVY -m -T /dev/video0
We're encoding to file.h264
Device /dev/video0 opened.
Device `unicam' on `platform:unicam 3f801000.csi' (driver 'unicam') is a video capture (without mplanes) device.
stride is 0
stride is now 1280
Video format set: UYVY (59565955) 640x480 (stride 1280) field none buffer size 614400
QUERY_DV_TIMINGS returned 1280x720 pixclk 74250000
Framerate is 60
Video format: UYVY (59565955) 1280x720 (stride 2560) field none buffer size 1843200
vc.ril.isp:in:0(UYVY)(0xeb4120)type: video, fourcc: UYVY bitrate: 0, framed: 0 extra data: 0, (nil) width: 1280, height: 720, (0,0,1280,720) pixel aspect ratio: 0/0, frame rate: 0/0
buffers num: 3(opt 1, min 1), size: 1843200(opt 1843200, min: 1843200), align: 0
Created pool of length 3, size 0
Enable encoder....
Create pool of 3 buffers of size 0 for render
Create pool of 3 buffers of size 0 for encode ip
Create pool of 3 buffers of size 1382400 for encode/render
Writing data to file.h264
Create pool of 8 buffers of size 262144
Sent buffer 0xebe198
Sent buffer 0xebe370
Sent buffer 0xebe548
Sent buffer 0xebe720
Sent buffer 0xebe8f8
Sent buffer 0xebead0
Sent buffer 0xebeca8
Sent buffer 0xebee80
3 buffers requested, V4L2 returned 3 bufs.
length: 1843200 offset: 0 timestamp type/source: mono/EoF
Buffer 0/0 mapped at address 0x71a3e000.
Importing DMABUF 8 into VCSM...
...done. vcsm_handle 73728
Exported buffer 0 to dmabuf 8, vcsm handle 73728
Linking V4L2 buffer index 0 ptr 0xebfba0 to MMAL header 0xeba900. mmal->data 0xC0000003
length: 1843200 offset: 1843200 timestamp type/source: mono/EoF
Buffer 1/0 mapped at address 0x7187c000.
Importing DMABUF 9 into VCSM...
...done. vcsm_handle 77824
Exported buffer 1 to dmabuf 9, vcsm handle 77824
Linking V4L2 buffer index 1 ptr 0xebfc10 to MMAL header 0xebaad8. mmal->data 0xC0000004
length: 1843200 offset: 3686400 timestamp type/source: mono/EoF
Buffer 2/0 mapped at address 0x716ba000.
Importing DMABUF 10 into VCSM...
...done. vcsm_handle 81920
Exported buffer 2 to dmabuf 10, vcsm handle 81920
Linking V4L2 buffer index 2 ptr 0xebfc80 to MMAL header 0xebacb0. mmal->data 0xC0000005
0 (0) [-] none 0 1843200 B 2679.812852 2679.813177 -13513.514 fps ts mono/EoF
1 (1) [-] none 1 1843200 B 2679.813158 2679.829880 3267.974 fps ts mono/EoF
2 (2) [-] none 2 1843200 B 2679.829841 2679.846583 59.941 fps ts mono/EoF
3 (0) [-] none 3 1843200 B 2679.846525 2679.863286 59.938 fps ts mono/EoF
4 (1) [-] none 4 1843200 B 2679.863209 2679.879996 59.938 fps ts mono/EoF
5 (2) [-] none 5 1843200 B 2679.879895 2679.896695 59.930 fps ts mono/EoF
6 (0) [-] none 6 1843200 B 2679.896578 2679.913312 59.941 fps ts mono/EoF
7 (1) [-] none 7 1843200 B 2679.913260 2679.930355 59.945 fps ts mono/EoF
8 (2) [-] none 8 1843200 B 2679.929947 2679.946670 59.927 fps ts mono/EoF
9 (0) [-] none 9 1843200 B 2679.946627 2679.963742 59.952 fps ts mono/EoF
10 (1) [-] none 10 1843200 B 2679.963311 2679.980279 59.938 fps ts mono/EoF
11 (2) [-] none 11 1843200 B 2679.979993 2679.996719 59.945 fps ts mono/EoF
12 (0) [-] none 12 1843200 B 2679.996677 2680.013449 59.938 fps ts mono/EoF
13 (1) [-] none 13 1843200 B 2680.013364 2680.030139 59.927 fps ts mono/EoF
14 (2) [-] none 14 1843200 B 2680.030047 2680.046825 59.941 fps ts mono/EoF
15 (0) [-] none 15 1843200 B 2680.046732 2680.063507 59.934 fps ts mono/EoF
16 (1) [-] none 16 1843200 B 2680.080095 2680.080279 29.973 fps ts mono/EoF
DROPPED FRAME - 233880 and 267243, delta 33363
17 (2) [-] none 17 1843200 B 0.000000 2680.096821 0.001 fps ts mono/EoF
DROPPED FRAME - 267243 and 1615154444, delta 1614887201
18 (0) [-] none 18 1843200 B 2680.096780 2680.113652 -0.001 fps ts mono/EoF
19 (1) [-] none 19 1843200 B 2680.113464 2680.130890 59.938 fps ts mono/EoF
20 (2) [-] none 20 1843200 B 2680.130156 2680.146894 59.909 fps ts mono/EoF
21 (0) [-] none 21 1843200 B 2680.146832 2680.163633 59.966 fps ts mono/EoF
22 (1) [-] none 22 1843200 B 2680.163517 2680.180268 59.934 fps ts mono/EoF
23 (2) [-] none 23 1843200 B 2680.180200 2680.196995 59.941 fps ts mono/EoF
24 (0) [-] none 24 1843200 B 2680.196916 2680.217202 59.823 fps ts mono/EoF
25 (1) [-] none 25 1843200 B 2680.230336 2680.230578 29.922 fps ts mono/EoF
DROPPED FRAME - 384064 and 417484, delta 33420
26 (2) [-] none 26 1843200 B 0.000000 2680.247039 0.001 fps ts mono/EoF
DROPPED FRAME - 417484 and 1615154444, delta 1614736960
27 (0) [-] none 27 1843200 B 2680.246933 2680.263824 -0.001 fps ts mono/EoF
28 (1) [-] none 28 1843200 B 2680.263619 2680.280430 59.930 fps ts mono/EoF
29 (2) [-] none 29 1843200 B 2680.280300 2680.297080 59.948 fps ts mono/EoF
30 (0) [-] none 30 1843200 B 2680.296985 2680.313840 59.934 fps ts mono/EoF
31 (1) [-] none 31 1843200 B 2680.313670 2680.330431 59.934 fps ts mono/EoF
32 (2) [-] none 32 1843200 B 2680.330353 2680.347144 59.941 fps ts mono/EoF
33 (0) [-] none 33 1843200 B 2680.347035 2680.363840 59.945 fps ts mono/EoF
34 (1) [-] none 34 1843200 B 2680.363720 2680.380549 59.934 fps ts mono/EoF
35 (2) [-] none 35 1843200 B 2680.380402 2680.397147 59.945 fps ts mono/EoF
36 (0) [-] none 36 1843200 B 2680.397086 2680.413989 59.938 fps ts mono/EoF
37 (1) [-] none 37 1843200 B 2680.413773 2680.430522 59.927 fps ts mono/EoF
38 (2) [-] none 38 1843200 B 2680.430452 2680.447265 59.956 fps ts mono/EoF
39 (0) [-] none 39 1843200 B 2680.447138 2680.463955 59.930 fps ts mono/EoF
40 (1) [-] none 40 1843200 B 2680.463821 2680.480578 59.941 fps ts mono/EoF
41 (2) [-] none 41 1843200 B 2680.480507 2680.497340 59.930 fps ts mono/EoF
42 (0) [-] none 42 1843200 B 2680.497188 2680.513986 59.948 fps ts mono/EoF
43 (1) [-] none 43 1843200 B 2680.513872 2680.530799 59.938 fps ts mono/EoF
44 (2) [-] none 44 1843200 B 2680.530555 2680.547284 59.941 fps ts mono/EoF
45 (0) [-] none 45 1843200 B 2680.547239 2680.563988 59.938 fps ts mono/EoF
46 (1) [-] none 46 1843200 B 2680.563923 2680.580682 59.938 fps ts mono/EoF
47 (2) [-] none 47 1843200 B 2680.580606 2680.597418 59.941 fps ts mono/EoF
48 (0) [-] none 48 1843200 B 2680.597295 2680.614106 59.920 fps ts mono/EoF
49 (1) [-] none 49 1843200 B 2680.613974 2680.630714 59.956 fps ts mono/EoF
50 (2) [-] none 50 1843200 B 2680.630657 2680.647435 59.941 fps ts mono/EoF
51 (0) [-] none 51 1843200 B 2680.647340 2680.664139 59.941 fps ts mono/EoF
52 (1) [-] none 52 1843200 B 2680.664025 2680.680785 59.934 fps ts mono/EoF
53 (2) [-] none 53 1843200 B 2680.680709 2680.697514 59.938 fps ts mono/EoF
54 (0) [-] none 54 1843200 B 2680.697393 2680.714150 59.938 fps ts mono/EoF
55 (1) [-] none 55 1843200 B 2680.714075 2680.730859 59.945 fps ts mono/EoF
56 (2) [-] none 56 1843200 B 2680.730759 2680.747642 59.938 fps ts mono/EoF
57 (0) [-] none 57 1843200 B 2680.747445 2680.764289 59.930 fps ts mono/EoF
58 (1) [-] none 58 1843200 B 2680.764133 2680.780902 59.923 fps ts mono/EoF
59 (2) [-] none 59 1843200 B 2680.780810 2680.797554 59.963 fps ts mono/EoF
60 (0) [-] none 60 1843200 B 2680.797509 2680.814293 59.884 fps ts mono/EoF
61 (1) [-] none 61 1843200 B 2680.814178 2680.830936 59.992 fps ts mono/EoF
62 (2) [-] none 62 1843200 B 2680.830861 2680.847673 59.941 fps ts mono/EoF
63 (0) [-] none 63 1843200 B 2680.847554 2680.864300 59.905 fps ts mono/EoF
64 (1) [-] none 64 1843200 B 2680.864229 2680.881099 59.970 fps ts mono/EoF
65 (2) [-] none 65 1843200 B 2680.880918 2680.897654 59.920 fps ts mono/EoF
66 (0) [-] none 66 1843200 B 2680.897597 2680.914458 59.956 fps ts mono/EoF
67 (1) [-] none 67 1843200 B 2680.914283 2680.931086 59.930 fps ts mono/EoF
68 (2) [-] none 68 1843200 B 2680.930984 2680.947727 59.877 fps ts mono/EoF
69 (0) [-] none 69 1843200 B 2680.947646 2680.964393 60.017 fps ts mono/EoF
70 (1) [-] none 70 1843200 B 2680.964331 2680.981134 59.934 fps ts mono/EoF
71 (2) [-] none 71 1843200 B 2680.981013 2680.997785 59.945 fps ts mono/EoF
72 (0) [-] none 72 1843200 B 2680.997697 2681.014565 59.938 fps ts mono/EoF
73 (1) [-] none 73 1843200 B 2681.014410 2681.031146 59.834 fps ts mono/EoF
74 (2) [-] none 74 1843200 B 2681.031065 2681.047883 60.042 fps ts mono/EoF
75 (0) [-] none 75 1843200 B 2681.047751 2681.064552 59.930 fps ts mono/EoF
76 (1) [-] none 76 1843200 B 2681.064432 2681.081334 59.948 fps ts mono/EoF
77 (2) [-] none 77 1843200 B 2681.081124 2681.097876 59.909 fps ts mono/EoF
78 (0) [-] none 78 1843200 B 2681.097799 2681.114650 59.970 fps ts mono/EoF
79 (1) [-] none 79 1843200 B 2681.114487 2681.131272 59.923 fps ts mono/EoF
80 (2) [-] none 80 1843200 B 2681.131167 2681.147928 59.952 fps ts mono/EoF
81 (0) [-] none 81 1843200 B 2681.147850 2681.164660 59.941 fps ts mono/EoF
82 (1) [-] none 82 1843200 B 2681.164537 2681.181302 59.927 fps ts mono/EoF
83 (2) [-] none 83 1843200 B 2681.181221 2681.198261 59.938 fps ts mono/EoF
84 (0) [-] none 84 1843200 B 2681.197948 2681.214642 59.784 fps ts mono/EoF
85 (1) [-] none 85 1843200 B 2681.214584 2681.231342 60.111 fps ts mono/EoF
86 (2) [-] none 86 1843200 B 2681.231268 2681.248112 59.938 fps ts mono/EoF
87 (0) [-] none 87 1843200 B 2681.247963 2681.264724 59.898 fps ts mono/EoF
88 (1) [-] none 88 1843200 B 2681.264636 2681.281407 59.977 fps ts mono/EoF
89 (2) [-] none 89 1843200 B 2681.281319 2681.298126 59.941 fps ts mono/EoF
90 (0) [-] none 90 1843200 B 2681.298004 2681.314883 59.934 fps ts mono/EoF
91 (1) [-] none 91 1843200 B 2681.314690 2681.331463 59.930 fps ts mono/EoF
92 (2) [-] none 92 1843200 B 2681.331372 2681.348298 59.945 fps ts mono/EoF
93 (0) [-] none 93 1843200 B 2681.348064 2681.365325 59.909 fps ts mono/EoF
94 (1) [-] none 94 1843200 B 2681.364768 2681.381526 59.866 fps ts mono/EoF
95 (2) [-] none 95 1843200 B 2681.381421 2681.398274 60.049 fps ts mono/EoF
96 (0) [-] none 96 1843200 B 2681.398106 2681.414863 59.934 fps ts mono/EoF
97 (1) [-] none 97 1843200 B 2681.414789 2681.431613 59.941 fps ts mono/EoF
98 (2) [-] none 98 1843200 B 2681.431472 2681.448250 59.941 fps ts mono/EoF
99 (0) [-] none 99 1843200 B 2681.448156 2681.464942 59.938 fps ts mono/EoF
100 (1) [-] none 100 1843200 B 2681.464845 2681.481643 59.920 fps ts mono/EoF
101 (2) [-] none 101 1843200 B 2681.481525 2681.498293 59.952 fps ts mono/EoF
102 (0) [-] none 102 1843200 B 2681.498209 2681.515217 59.938 fps ts mono/EoF
103 (1) [-] none 103 1843200 B 2681.514931 2681.531618 59.801 fps ts mono/EoF
104 (2) [-] none 104 1843200 B 2681.531576 2681.548318 60.078 fps ts mono/EoF
105 (0) [-] none 105 1843200 B 2681.548258 2681.565122 59.945 fps ts mono/EoF
106 (1) [-] none 106 1843200 B 2681.564949 2681.581692 59.913 fps ts mono/EoF
107 (2) [-] none 107 1843200 B 2681.581627 2681.598552 59.959 fps ts mono/EoF
108 (0) [-] none 108 1843200 B 2681.598339 2681.615059 59.837 fps ts mono/EoF
109 (1) [-] none 109 1843200 B 2681.614992 2681.631745 60.049 fps ts mono/EoF
110 (2) [-] none 110 1843200 B 2681.631679 2681.648541 59.927 fps ts mono/EoF
111 (0) [-] none 111 1843200 B 2681.648376 2681.665150 59.891 fps ts mono/EoF
112 (1) [-] none 112 1843200 B 2681.665045 2681.681870 59.992 fps ts mono/EoF
113 (2) [-] none 113 1843200 B 2681.681730 2681.698471 59.934 fps ts mono/EoF
114 (0) [-] none 114 1843200 B 2681.698411 2681.715197 59.948 fps ts mono/EoF
115 (1) [-] none 115 1843200 B 2681.715098 2681.731915 59.927 fps ts mono/EoF
116 (2) [-] none 116 1843200 B 2681.731780 2681.748617 59.945 fps ts mono/EoF
117 (0) [-] none 117 1843200 B 2681.748466 2681.765262 59.930 fps ts mono/EoF
118 (1) [-] none 118 1843200 B 2681.765147 2681.781903 59.948 fps ts mono/EoF
119 (2) [-] none 119 1843200 B 2681.781831 2681.798690 59.938 fps ts mono/EoF
120 (0) [-] none 120 1843200 B 2681.798514 2681.815321 59.941 fps ts mono/EoF
121 (1) [-] none 121 1843200 B 2681.815197 2681.832031 59.941 fps ts mono/EoF
122 (2) [-] none 122 1843200 B 2681.831882 2681.848704 59.934 fps ts mono/EoF
123 (0) [-] none 123 1843200 B 2681.848566 2681.865330 59.938 fps ts mono/EoF
124 (1) [-] none 124 1843200 B 2681.865249 2681.882021 59.941 fps ts mono/EoF
125 (2) [-] none 125 1843200 B 2681.881932 2681.898663 59.941 fps ts mono/EoF
126 (0) [-] none 126 1843200 B 2681.898617 2681.915385 59.934 fps ts mono/EoF
127 (1) [-] none 127 1843200 B 2681.915302 2681.932180 59.934 fps ts mono/EoF
128 (2) [-] none 128 1843200 B 2681.931989 2681.948931 59.927 fps ts mono/EoF
129 (0) [-] none 129 1843200 B 2681.948668 2681.965489 59.956 fps ts mono/EoF
130 (1) [-] none 130 1843200 B 2681.965352 2681.982191 59.938 fps ts mono/EoF
131 (2) [-] none 131 1843200 B 2681.982035 2681.998880 59.941 fps ts mono/EoF
132 (0) [-] none 132 1843200 B 2681.998718 2682.015545 59.941 fps ts mono/EoF
133 (1) [-] none 133 1843200 B 2682.015403 2682.032235 59.934 fps ts mono/EoF
134 (2) [-] none 134 1843200 B 2682.032084 2682.048868 59.948 fps ts mono/EoF
135 (0) [-] none 135 1843200 B 2682.048769 2682.065610 59.934 fps ts mono/EoF
136 (1) [-] none 136 1843200 B 2682.065460 2682.082241 59.913 fps ts mono/EoF
137 (2) [-] none 137 1843200 B 2682.082139 2682.098986 59.956 fps ts mono/EoF
138 (0) [-] none 138 1843200 B 2682.098820 2682.115581 59.948 fps ts mono/EoF
139 (1) [-] none 139 1843200 B 2682.115503 2682.132289 59.941 fps ts mono/EoF
140 (2) [-] none 140 1843200 B 2682.132187 2682.148989 59.938 fps ts mono/EoF
141 (0) [-] none 141 1843200 B 2682.148870 2682.165658 59.941 fps ts mono/EoF
142 (1) [-] none 142 1843200 B 2682.165554 2682.182425 59.938 fps ts mono/EoF
143 (2) [-] none 143 1843200 B 2682.182291 2682.198991 59.748 fps ts mono/EoF
144 (0) [-] none 144 1843200 B 2682.198922 2682.215781 60.129 fps ts mono/EoF
145 (1) [-] none 145 1843200 B 2682.215610 2682.232445 59.923 fps ts mono/EoF
146 (2) [-] none 146 1843200 B 2682.232291 2682.249263 59.948 fps ts mono/EoF
147 (0) [-] none 147 1843200 B 2682.248973 2682.266125 59.945 fps ts mono/EoF
148 (1) [-] none 148 1843200 B 2682.265655 2682.282446 59.945 fps ts mono/EoF
149 (2) [-] none 149 1843200 B 2682.282339 2682.299236 59.938 fps ts mono/EoF
150 (0) [-] none 150 1843200 B 2682.299024 2682.315779 59.934 fps ts mono/EoF
151 (1) [-] none 151 1843200 B 2682.315706 2682.332581 59.945 fps ts mono/EoF
152 (2) [-] none 152 1843200 B 2682.332393 2682.349188 59.927 fps ts mono/EoF
153 (0) [-] none 153 1843200 B 2682.349080 2682.365878 59.927 fps ts mono/EoF
154 (1) [-] none 154 1843200 B 2682.365760 2682.382619 59.952 fps ts mono/EoF
155 (2) [-] none 155 1843200 B 2682.382442 2682.399205 59.945 fps ts mono/EoF
156 (0) [-] none 156 1843200 B 2682.399125 2682.416038 59.941 fps ts mono/EoF
157 (1) [-] none 157 1843200 B 2682.415820 2682.432576 59.898 fps ts mono/EoF
158 (2) [-] none 158 1843200 B 2682.432492 2682.449266 59.981 fps ts mono/EoF
159 (0) [-] none 159 1843200 B 2682.449177 2682.466416 59.934 fps ts mono/EoF
160 (1) [-] none 160 1843200 B 2682.465862 2682.482661 59.934 fps ts mono/EoF
161 (2) [-] none 161 1843200 B 2682.482547 2682.499417 59.934 fps ts mono/EoF
162 (0) [-] none 162 1843200 B 2682.499229 2682.516006 59.945 fps ts mono/EoF
163 (1) [-] none 163 1843200 B 2682.515913 2682.532820 59.938 fps ts mono/EoF
164 (2) [-] none 164 1843200 B 2682.532602 2682.549348 59.920 fps ts mono/EoF
165 (0) [-] none 165 1843200 B 2682.549279 2682.566097 59.963 fps ts mono/EoF
166 (1) [-] none 166 1843200 B 2682.565962 2682.582752 59.941 fps ts mono/EoF
167 (2) [-] none 167 1843200 B 2682.582647 2682.599482 59.934 fps ts mono/EoF
168 (0) [-] none 168 1843200 B 2682.599329 2682.616101 59.945 fps ts mono/EoF
169 (1) [-] none 169 1843200 B 2682.616013 2682.632857 59.938 fps ts mono/EoF
170 (2) [-] none 170 1843200 B 2682.632702 2682.649655 59.920 fps ts mono/EoF
171 (0) [-] none 171 1843200 B 2682.649385 2682.666506 59.941 fps ts mono/EoF
172 (1) [-] none 172 1843200 B 2682.666063 2682.682930 59.959 fps ts mono/EoF
173 (2) [-] none 173 1843200 B 2682.682748 2682.699555 59.934 fps ts mono/EoF
174 (0) [-] none 174 1843200 B 2682.699432 2682.716222 59.938 fps ts mono/EoF
175 (1) [-] none 175 1843200 B 2682.716115 2682.732938 59.941 fps ts mono/EoF
176 (2) [-] none 176 1843200 B 2682.732800 2682.749553 59.934 fps ts mono/EoF
177 (0) [-] none 177 1843200 B 2682.749482 2682.766324 59.945 fps ts mono/EoF
178 (1) [-] none 178 1843200 B 2682.766167 2682.783002 59.934 fps ts mono/EoF
179 (2) [-] none 179 1843200 B 2682.782851 2682.799773 59.938 fps ts mono/EoF
180 (0) [-] none 180 1843200 B 2682.799539 2682.816344 59.923 fps ts mono/EoF
181 (1) [-] none 181 1843200 B 2682.816217 2682.832987 59.959 fps ts mono/EoF
182 (2) [-] none 182 1843200 B 2682.832901 2682.849711 59.938 fps ts mono/EoF
183 (0) [-] none 183 1843200 B 2682.849585 2682.866323 59.938 fps ts mono/EoF
184 (1) [-] none 184 1843200 B 2682.866268 2682.883154 59.941 fps ts mono/EoF
185 (2) [-] none 185 1843200 B 2682.882953 2682.899711 59.934 fps ts mono/EoF
186 (0) [-] none 186 1843200 B 2682.899636 2682.916553 59.941 fps ts mono/EoF
187 (1) [-] none 187 1843200 B 2682.916338 2682.933115 59.873 fps ts mono/EoF
188 (2) [-] none 188 1843200 B 2682.933004 2682.949780 60.002 fps ts mono/EoF
189 (0) [-] none 189 1843200 B 2682.949689 2682.966553 59.934 fps ts mono/EoF
190 (1) [-] none 190 1843200 B 2682.966373 2682.983130 59.938 fps ts mono/EoF
191 (2) [-] none 191 1843200 B 2682.983054 2682.999877 59.948 fps ts mono/EoF
192 (0) [-] none 192 1843200 B 2682.999738 2683.016527 59.938 fps ts mono/EoF
193 (1) [-] none 193 1843200 B 2683.016422 2683.033388 59.938 fps ts mono/EoF
194 (2) [-] none 194 1843200 B 2683.033108 2683.049860 59.930 fps ts mono/EoF
195 (0) [-] none 195 1843200 B 2683.049792 2683.066531 59.938 fps ts mono/EoF
196 (1) [-] none 196 1843200 B 2683.066482 2683.083231 59.916 fps ts mono/EoF
197 (2) [-] none 197 1843200 B 2683.083156 2683.099951 59.974 fps ts mono/EoF
198 (0) [-] none 198 1843200 B 2683.099844 2683.116676 59.923 fps ts mono/EoF
199 (1) [-] none 199 1843200 B 2683.116524 2683.133308 59.952 fps ts mono/EoF
Captured 200 frames in 3.320381 seconds (60.234033 fps, 111023370.369770 B/s).
Total number of frames dropped 4
Releasing vcsm handle 73728
Closing dma_buf 8
Releasing vcsm handle 77824
Closing dma_buf 9
Releasing vcsm handle 81920
Closing dma_buf 10
3 buffers released.
I check the video in h264 format and it has an image (no problems) but no audio.

What I did was see alternatives, look through

Code: Select all

pi@raspberrypi:~ $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: tc358743 [tc358743], device 0: bcm2835-i2s-dir-hifi dir-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
pi@raspberrypi:~ $ sudo arecord -D hw:1,0 -d 25 -f dat test2.wav
Recording WAVE 'test2.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
arecord: pcm_read:2145: read error: Input/output error

and it tells me that the device is installed, and when I send the record command it tells me that there is an error.

I wish with all my being to help me idealize the problem, I know that you are a busy person. Thank you


P.S. Do not install the R. stretch, but the Buster but it worked well

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7329
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Fri Jul 19, 2019 10:40 am

chchart wrote:
Fri Jun 21, 2019 6:11 pm
6by9 wrote:
Fri Jun 21, 2019 5:29 pm
If you just want a single frame in the native format of the source, then use v4l2-ctl

Code: Select all

v4l2-ctl --set-dv-bt-timings query
v4l2-ctl -v pixelformat=UYVY
v4l2-ctl --stream-mmap=3 --stream-count=1 --stream-to=foo.uyvy
You can add --skip-count=N to skip some frames at the start of the stream. Post process the frame if you want it in a different format.
Hi 6by9, thank you for the pointer. I've tried what you suggested and am not getting an output file. The command just returns a '<'. Do you have any suggestion for what to try?

Code: Select all

pi@raspberrypi:~/yavta $ v4l2-ctl --set-dv-bt-timings query
BT timings set
pi@raspberrypi:~/yavta $ v4l2-ctl -v pixelformat=UYVY
pi@raspberrypi:~/yavta $ v4l2-ctl --stream-mmap=3 --stream-count=1 --stream-to=foo.uyvy
<
pi@raspberrypi:~/yavta $ ls
1080P50EDID.txt  file.h264  file.pts  laptop_results.txt  README.md  yavta.c
COPYING.GPL      file.jpg   include   Makefile            yavta      yavta.o
I greatly appreciate your help. Thank you so much.
Each < denotes a frame received, so I would have expected a file written with one frame in. I'll frequently use that command for testing.
It's possible it's an off-by-one error, and the first or last frame doesn't get written. Try increasing the count.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7329
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Fri Jul 19, 2019 11:08 am

Sandro6 wrote:
Thu Jul 18, 2019 11:38 pm
I check the video in h264 format and it has an image (no problems) but no audio.
Correct, it's an H264 elementary stream which is inherently video only.
Sandro6 wrote:What I did was see alternatives, look through

Code: Select all

pi@raspberrypi:~ $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: tc358743 [tc358743], device 0: bcm2835-i2s-dir-hifi dir-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
pi@raspberrypi:~ $ sudo arecord -D hw:1,0 -d 25 -f dat test2.wav
Recording WAVE 'test2.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
arecord: pcm_read:2145: read error: Input/output error

and it tells me that the device is installed, and when I send the record command it tells me that there is an error.

I wish with all my being to help me idealize the problem, I know that you are a busy person. Thank you
The device doesn't support sample rate conversion - it'll spit out what it receives.
Check with "v4l2-ctl --list-ctrls" that
a) "audio_present" reports 1.
b) "audio_sampling_rate" is reporting as 48000 if you want to use "-f dat". ("-f cd" if 44100)
I'm guessing it times out after a few seconds, and dmesg has "bcm2835-i2s fe203000.i2s: I2S SYNC error!".
I have seen some odd behaviour where having the Pi audio driver loaded ("dtparam=audio=on" in config.txt) stops it recording, but I haven't dug into why it gets upset (ALSAs not an area I know much about).
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

mafarm
Posts: 1
Joined: Fri Jul 19, 2019 7:37 pm

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Fri Jul 19, 2019 7:53 pm

Hey guys,

Iam new here.
I didn't read the complete thread but most things I have read.
Iam a little bit afraid, because things are not really working for me. Maybe I did something wrong, but this ain't a really easy topic I guess.

So I hope I may ask why things are as they are..
Iam using a Pi 3B+ with the newest Raspbian (Buster) and I tried the instructions from 6by9. Of course I use uv4l.
- Is Buster supported or have I to use an older image?
Something I don't really understand is the thing with the EDID's.
- For what is that really? Do I need the right EDID with that configuration my device (camera) is running? So for example 1080p60 must have a correct EDID, otherwhise it won't run?
- Which cams are supported? I use a "noname" Action cam and that's the only cam that works, but if I start the preview with yavta, it only shows some splitted screens. If I connect a GoPro Hero (2018) it only gets a timeout.

I guess many users like me are a little bit frustrated because you have to have to take care of so many things and when you are not the guy who works with that stuff daily, you get stuck very fast. So my next question:

- Isn't there a "final" tutorial where you don't have to gather different things together? Would be easier for some people I guess.

Greetings from Germany ;-)

Sandro6
Posts: 4
Joined: Thu Jul 18, 2019 11:05 pm

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Tue Jul 23, 2019 6:35 pm

6by9 wrote:
Fri Jul 19, 2019 10:40 am
chchart wrote:
Fri Jun 21, 2019 6:11 pm
6by9 wrote:
Fri Jun 21, 2019 5:29 pm
If you just want a single frame in the native format of the source, then use v4l2-ctl

Code: Select all

v4l2-ctl --set-dv-bt-timings query
v4l2-ctl -v pixelformat=UYVY
v4l2-ctl --stream-mmap=3 --stream-count=1 --stream-to=foo.uyvy
You can add --skip-count=N to skip some frames at the start of the stream. Post process the frame if you want it in a different format.
Hi 6by9, thank you for the pointer. I've tried what you suggested and am not getting an output file. The command just returns a '<'. Do you have any suggestion for what to try?

Code: Select all

pi@raspberrypi:~/yavta $ v4l2-ctl --set-dv-bt-timings query
BT timings set
pi@raspberrypi:~/yavta $ v4l2-ctl -v pixelformat=UYVY
pi@raspberrypi:~/yavta $ v4l2-ctl --stream-mmap=3 --stream-count=1 --stream-to=foo.uyvy
<
pi@raspberrypi:~/yavta $ ls
1080P50EDID.txt  file.h264  file.pts  laptop_results.txt  README.md  yavta.c
COPYING.GPL      file.jpg   include   Makefile            yavta      yavta.o
I greatly appreciate your help. Thank you so much.
Each < denotes a frame received, so I would have expected a file written with one frame in. I'll frequently use that command for testing.
It's possible it's an off-by-one error, and the first or last frame doesn't get written. Try increasing the count.
You are right, just check the parameter evaluated at 1, and record audio.
Greetings from Mexico. If one day I invite you the food you want

Sandro6
Posts: 4
Joined: Thu Jul 18, 2019 11:05 pm

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Fri Jul 26, 2019 2:18 am

Hi Engineer, excuse me again.
Sorry for the EDID file, how does it work?

This is because my video signal from a decoder for my TV works with Interlaced unlike the progressive one designed in its file. I went to https://en.wikipedia.org/wiki/Extended_ ... ation_Data

There I found bit 71 should be modified like this.

Code: Select all

00ffffffffffff005262888800888888
1c150103800000780aEE91A3544C9926
0F505400000001010101010101010101
010101010101011d007251d01e206e28
5500c48e2100001e8c0ad08a20e02d10
103e9600138e2100001e000000fc0054
6f73686962612d4832430a20000000FD
003b3d0f2e0f9e0a2020202020200100
020321434e841303021211012021223c
3d3e1f2309070766030c00300080E300
7F8c0ad08a20e02d10103e9600c48e21
0000188c0ad08a20e02d10103e960013
8e210000188c0aa01451f01600267c43
00138e21000098000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
However, my signal is still bad, what I did after many attempts was to corrupt the EDID with pure "0", forcing the output signal not to work, but still sending me the video file as if it had not corrupted anything.

My Original code is

Code: Select all

v4l2-ctl --set-edid=file=1080P50EDID.txt --fix-edid-checksums 
v4l2-ctl --query-dv-timings
cd yavta
./yavta --capture=300 -n 3 --encode-to=1080orig.h264 -f UYVY -m -T /dev/video0
Thanks Engineer

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7329
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Fri Jul 26, 2019 9:23 am

Sandro6 wrote:
Fri Jul 26, 2019 2:18 am
Sorry for the EDID file, how does it work?
It's a raw dump of an EDID defined in accordance with the HDMI spec. You've linked to the appropriate wiki page below.
Use edid-decode if you want to decode the file into human readable form.
I've yet to come across a sensible editor for EDIDs, so tend to modify them manually.
Sandro6 wrote:This is because my video signal from a decoder for my TV works with Interlaced unlike the progressive one designed in its file.
Interlaced sources are not supported.
Sandro6 wrote:I went to https://en.wikipedia.org/wiki/Extended_ ... ation_Data

There I found bit 71 should be modified like this.

Code: Select all

00ffffffffffff005262888800888888
1c150103800000780aEE91A3544C9926
0F505400000001010101010101010101
010101010101011d007251d01e206e28
5500c48e2100001e8c0ad08a20e02d10
103e9600138e2100001e000000fc0054
6f73686962612d4832430a20000000FD
003b3d0f2e0f9e0a2020202020200100
020321434e841303021211012021223c
3d3e1f2309070766030c00300080E300
7F8c0ad08a20e02d10103e9600c48e21
0000188c0ad08a20e02d10103e960013
8e210000188c0aa01451f01600267c43
00138e21000098000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
Without knowing exactly what you're comparing to, it's hard to say what you've changed. It looks like it is against https://github.com/6by9/yavta/blob/mast ... 50EDID.txt with diffs

Code: Select all

dave@dave-VirtualBox:~/Pi/yavta$ diff rubbishedid.txt 1080P50EDID.txt 
8c8
< 003b3d0f2e0f9e0a2020202020200100
---
> 003b3d0f2e0f1e0a2020202020200100
which has changed one value in descriptor 4. edid-decode tells me that this has absolutely no effect.
You were looking for byte (or bit) 71? Why? What were you thinking it was doing?
Sandro6 wrote:However, my signal is still bad, what I did after many attempts was to corrupt the EDID with pure "0", forcing the output signal not to work, but still sending me the video file as if it had not corrupted anything.
With an invalid EDID the source has to guess at what to send, and that is totally down to their implementation.
VGA60 is mandatory, therefore that is one default. The DRM subsystem in the kernel will add the DMT standard resolutions up to 1024x768 (https://github.com/raspberrypi/linux/bl ... id.c#L4838).
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Sandro6
Posts: 4
Joined: Thu Jul 18, 2019 11:05 pm

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Sun Jul 28, 2019 3:23 am

Hi Engineer, with the Edit-decode it helped me a lot to verify my edit codes.
However I had to use this format, compared to the edit that provided us

Code: Select all

Original
00ffffffffffff005262888800888888
1c150103800000780aEE91A3544C9926
0F505400000001010101010101010101
010101010101011d007251d01e206e28
5500c48e2100001e8c0ad08a20e02d10
103e9600138e2100001e000000fc0054
6f73686962612d4832430a20000000FD
003b3d0f2e0f1e0a2020202020200100
020321434e841303021211012021223c
3d3e1f2309070766030c00300080E300
7F8c0ad08a20e02d10103e9600c48e21
0000188c0ad08a20e02d10103e960013
8e210000188c0aa01451f01600267c43
00138e21000098000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000

Code: Select all

modific for read
00ffffffffffff00
5262888800888888
1c15010380000078
0aEE91A3544C9926
0F50540000000101
0101010101010101
010101010101011d
007251d01e206e28
5500c48e2100001e
8c0ad08a20e02d10
103e9600138e2100
001e000000fc0054
6f73686962612d48
32430a20000000FD
003b3d0f2e0f1e0a
202020202020014f
020321434e841303
021211012021223c
3d3e1f2309070766
030c00300080E300
7F8c0ad08a20e02d
10103e9600c48e21
0000188c0ad08a20
e02d10103e960013
8e210000188c0aa0
1451f01600267c43
00138e2100009800
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000028
With this code.
cd edid-decode
./edid-decode 1080P50EDID.txt

The output of the code you provide us is this.

Code: Select all

EDID version: 1.3
Manufacturer: TSB Model 8888 Serial Number 2290649088
Made in week 28 of 2011
Digital display
Image size is variable
Gamma: 2.20
RGB color display
First detailed timing is preferred timing
Display x,y Chromaticity:
  Red:   0.6396, 0.3300
  Green: 0.2998, 0.5996
  Blue:  0.1503, 0.0595
  White: 0.3125, 0.3291
Established timings supported:
Standard timings supported:
Detailed mode: Clock 74.250 MHz, 708 mm x 398 mm
               1280 1390 1430 1650 hborder 0
                720  725  730  750 vborder 0
               +hsync +vsync 
               VertFreq: 60 Hz, HorFreq: 45000 Hz
Detailed mode: Clock 27.000 MHz, 531 mm x 398 mm
                720  736  798  858 hborder 0
                480  489  495  525 vborder 0
               +hsync +vsync 
               VertFreq: 59 Hz, HorFreq: 31468 Hz
Monitor name: Toshiba-H2C
Monitor ranges (invalid): 59-61Hz V, 15-46kHz H, max dotclock 150MHz
Has 1 extension blocks
Checksum: 0x4f (valid)

CTA extension block
Extension version: 3
29 bytes of CTA data
  Video data block
    VIC   4 1280x720@60Hz 16:9 (native) HorFreq: 45000 Hz Clock: 74.250 MHz
    VIC  19 1280x720@50Hz 16:9  HorFreq: 37500 Hz Clock: 74.250 MHz
    VIC   3 720x480@60Hz 16:9  HorFreq: 31469 Hz Clock: 27.000 MHz
    VIC   2 720x480@60Hz 4:3  HorFreq: 31469 Hz Clock: 27.000 MHz
    VIC  18 720x576@50Hz 16:9  HorFreq: 31250 Hz Clock: 27.000 MHz
    VIC  17 720x576@50Hz 4:3  HorFreq: 31250 Hz Clock: 27.000 MHz
    VIC   1 640x480@60Hz 4:3  HorFreq: 31469 Hz Clock: 25.175 MHz
    VIC  32 1920x1080@24Hz 16:9  HorFreq: 27000 Hz Clock: 74.250 MHz
    VIC  33 1920x1080@25Hz 16:9  HorFreq: 28125 Hz Clock: 74.250 MHz
    VIC  34 1920x1080@30Hz 16:9  HorFreq: 33750 Hz Clock: 74.250 MHz
    VIC  60 1280x720@24Hz 16:9  HorFreq: 18000 Hz Clock: 59.400 MHz
    VIC  61 1280x720@25Hz 16:9  HorFreq: 18750 Hz Clock: 74.250 MHz
    VIC  62 1280x720@30Hz 16:9  HorFreq: 22500 Hz Clock: 74.250 MHz
    VIC  31 1920x1080@50Hz 16:9  HorFreq: 56250 Hz Clock: 148.500 MHz
  Audio data block
    Linear PCM, max channels 2
      Supported sample rates (kHz): 48 44.1 32
      Supported sample sizes (bits): 24 20 16
  Vendor-specific data block, OUI 000c03 (HDMI)
    Source physical address 3.0.0.0
    Supports_AI
  Extended tag: Video capability data block
    YCbCr quantization: No Data (0)
    RGB quantization: Selectable (via AVI Q) (1)
    PT scan behaviour: Support both over- and underscan (3)
    IT scan behaviour: Support both over- and underscan (3)
    CE scan behaviour: Support both over- and underscan (3)
Basic audio support
3 native detailed modes
Detailed mode: Clock 27.000 MHz, 708 mm x 398 mm
                720  736  798  858 hborder 0
                480  489  495  525 vborder 0
               -hsync -vsync 
               VertFreq: 59 Hz, HorFreq: 31468 Hz
Detailed mode: Clock 27.000 MHz, 531 mm x 398 mm
                720  736  798  858 hborder 0
                480  489  495  525 vborder 0
               -hsync -vsync 
               VertFreq: 59 Hz, HorFreq: 31468 Hz
Detailed mode: Clock 27.000 MHz, 531 mm x 398 mm
               1440 1478 1602 1716 hborder 0
                240  244  247  262 vborder 0
               -hsync -vsync interlaced 
               VertFreq: 60 Hz, HorFreq: 15734 Hz
Checksum: 0x28 (valid)
ok, this "fine" but the code

Code: Select all

$ v4l2-ctl --set-edid=file=1080P50EDID.txt --fix-edid-checksums 
$ v4l2-ctl --query-dv-timings
VIDIOC_QUERY_DV_TIMINGS: failed: Numerical result out of range
	Active width: 0
	Active height: 0
	Total width: 0
	Total height: 0
	Frame format: progressive
	Polarities: -vsync -hsync
	Pixelclock: 0 Hz
	Horizontal frontporch: 0
	Horizontal sync: 0
	Horizontal backporch: 0
	Vertical frontporch: 0
	Vertical sync: 0
	Vertical backporch: 0
	Standards: 
	Flags: 

but I try is to modify the Type of "Frame Format: Interlaced."

What I did first was to modify the first part of the EDID, (not extension CTA-881)
with this code

Code: Select all

00ffffffffffff00
5262888800888888
1c15010380000078
0aEE91A3544C9926
0F50540010000101
0101010101010101
010101010101011d
007251d01e206e28
5500c48e21000090
8c0ad08a20e02d10
103e9600138e2100
001e000000fc0054
6f73686962612d48
32430a20000000FD
003b3d0f2e0f1e0a
20202020202000ce
verific with Edid-decode

Code: Select all

pi@raspberrypi:~/edid-decode $ ./edid-decode sinext.txt
EDID version: 1.3
Manufacturer: TSB Model 8888 Serial Number 2290649088
Made in week 28 of 2011
Digital display
Image size is variable
Gamma: 2.20
RGB color display
First detailed timing is preferred timing
Display x,y Chromaticity:
  Red:   0.6396, 0.3300
  Green: 0.2998, 0.5996
  Blue:  0.1503, 0.0595
  White: 0.3125, 0.3291
Established timings supported:
  1280x768i@87Hz 5:3 HorFreq: 35522 Hz Clock: 44.900 MHz
Standard timings supported:
Detailed mode: Clock 74.250 MHz, 708 mm x 398 mm
               1280 1390 1430 1650 hborder 0
                720  725  730  750 vborder 0
               -hsync -vsync digital composite interlaced 
               VertFreq: 60 Hz, HorFreq: 45000 Hz
Detailed mode: Clock 27.000 MHz, 531 mm x 398 mm
                720  736  798  858 hborder 0
                480  489  495  525 vborder 0
               +hsync +vsync 
               VertFreq: 59 Hz, HorFreq: 31468 Hz
Monitor name: Toshiba-H2C
Monitor ranges (invalid): 59-61Hz V, 15-46kHz H, max dotclock 150MHz
Checksum: 0xce (valid)

"modific" Established timings supported:
1280x768i@87Hz 5:3 HorFreq: 35522 Hz Clock: 44.900 MHz
"and"
-hsync -vsync digital composite interlaced

to compared with code 1080P50EDID.txt

Code: Select all

pi@raspberrypi:~ $ v4l2-ctl --set-edid=file=sinext.txt --fix-edid-checksums 
pi@raspberrypi:~ $ v4l2-ctl --query-dv-timings
VIDIOC_QUERY_DV_TIMINGS: failed: Numerical result out of range
	Active width: 0
	Active height: 0
	Total width: 0
	Total height: 0
	Frame format: progressive
	Polarities: -vsync -hsync
	Pixelclock: 0 Hz
	Horizontal frontporch: 0
	Horizontal sync: 0
	Horizontal backporch: 0
	Vertical frontporch: 0
	Vertical sync: 0
	Vertical backporch: 0
	Standards: 
	Flags: 
pi@raspberrypi:~ $ cd yavta
pi@raspberrypi:~/yavta $ ./yavta --capture=200 -n 3 --encode-to=sinext.h264 -f UYVY -m -T /dev/video0
We're encoding to sinext.h264
Device /dev/video0 opened.
Device `unicam' on `platform:unicam 3f801000.csi' (driver 'unicam') is a video capture (without mplanes) device.
stride is 0
stride is now 1280
Video format set: UYVY (59565955) 640x480 (stride 1280) field none buffer size 614400
Video format: UYVY (59565955) 640x480 (stride 1280) field none buffer size 614400
Unable to get frame rate: Inappropriate ioctl for device (25).
vc.ril.isp:in:0(UYVY)(0x1d62120)type: video, fourcc: UYVY bitrate: 0, framed: 0 extra data: 0, (nil) width: 640, height: 480, (0,0,640,480) pixel aspect ratio: 0/0, frame rate: 0/0
buffers num: 3(opt 1, min 1), size: 614400(opt 614400, min: 614400), align: 0
Created pool of length 3, size 0
Enable encoder....
Create pool of 3 buffers of size 0 for render
Create pool of 3 buffers of size 0 for encode ip
Create pool of 3 buffers of size 460800 for encode/render
Writing data to sinext.h264
Create pool of 8 buffers of size 262144
Sent buffer 0x1d6c198
Sent buffer 0x1d6c370
Sent buffer 0x1d6c548
Sent buffer 0x1d6c720
Sent buffer 0x1d6c8f8
Sent buffer 0x1d6cad0
Sent buffer 0x1d6cca8
Sent buffer 0x1d6ce80
3 buffers requested, V4L2 returned 3 bufs.
length: 614400 offset: 0 timestamp type/source: mono/EoF
Buffer 0/0 mapped at address 0x7251b000.
Importing DMABUF 8 into VCSM...
...done. vcsm_handle 241664
Exported buffer 0 to dmabuf 8, vcsm handle 241664
Linking V4L2 buffer index 0 ptr 0x1d6dba0 to MMAL header 0x1d68900. mmal->data 0xC0000003
length: 614400 offset: 614400 timestamp type/source: mono/EoF
Buffer 1/0 mapped at address 0x7236a000.
Importing DMABUF 9 into VCSM...
...done. vcsm_handle 245760
Exported buffer 1 to dmabuf 9, vcsm handle 245760
Linking V4L2 buffer index 1 ptr 0x1d6dc10 to MMAL header 0x1d68ad8. mmal->data 0xC0000004
length: 614400 offset: 1228800 timestamp type/source: mono/EoF
Buffer 2/0 mapped at address 0x722d4000.
Importing DMABUF 10 into VCSM...
...done. vcsm_handle 249856
Exported buffer 2 to dmabuf 10, vcsm handle 249856
Linking V4L2 buffer index 2 ptr 0x1d6dc80 to MMAL header 0x1d68cb0. mmal->data 0xC0000005
0 (0) [-] none 0 614400 B 4376.045542 4376.056272 -12820.513 fps ts mono/EoF
1 (1) [-] none 1 614400 B 4376.056245 4376.073017 93.432 fps ts mono/EoF
2 (2) [-] none 2 614400 B 4376.072929 4376.089611 59.938 fps ts mono/EoF
3 (0) [-] none 3 614400 B 4376.089620 4376.106952 59.913 fps ts mono/EoF
4 (1) [-] none 4 614400 B 4376.106295 4376.122968 59.970 fps ts mono/EoF
5 (2) [-] none 5 614400 B 4376.122979 4376.139741 59.938 fps ts mono/EoF
6 (0) [-] none 6 614400 B 4376.139663 4376.156332 59.938 fps ts mono/EoF
7 (1) [-] none 7 614400 B 4376.156345 4376.173128 59.945 fps ts mono/EoF
8 (2) [-] none 8 614400 B 4376.173034 4376.189704 59.920 fps ts mono/EoF
9 (0) [-] none 9 614400 B 4376.189715 4376.206472 59.948 fps ts mono/EoF
10 (1) [-] none 10 614400 B 4376.206399 4376.223091 59.938 fps ts mono/EoF
11 (2) [-] none 11 614400 B 4376.223081 4376.239797 59.945 fps ts mono/EoF
12 (0) [-] none 12 614400 B 4376.239765 4376.256454 59.938 fps ts mono/EoF
13 (1) [-] none 13 614400 B 4376.256448 4376.273161 59.941 fps ts mono/EoF
14 (2) [-] none 14 614400 B 4376.273132 4376.289878 59.938 fps ts mono/EoF
15 (0) [-] none 15 614400 B 4376.289817 4376.306507 59.934 fps ts mono/EoF
16 (1) [-] none 16 614400 B 4376.306499 4376.323176 59.945 fps ts mono/EoF
17 (2) [-] none 17 614400 B 4376.323183 4376.339950 59.938 fps ts mono/EoF
18 (0) [-] none 18 614400 B 4376.339868 4376.356601 59.934 fps ts mono/EoF
19 (1) [-] none 19 614400 B 4376.356550 4376.373374 59.945 fps ts mono/EoF
20 (2) [-] none 20 614400 B 4376.373235 4376.389992 59.934 fps ts mono/EoF
21 (0) [-] none 21 614400 B 4376.389918 4376.406633 59.941 fps ts mono/EoF
22 (1) [-] none 22 614400 B 4376.406604 4376.423322 59.930 fps ts mono/EoF
23 (2) [-] none 23 614400 B 4376.423286 4376.439999 59.945 fps ts mono/EoF
24 (0) [-] none 24 614400 B 4376.439970 4376.456669 59.938 fps ts mono/EoF
25 (1) [-] none 25 614400 B 4376.456654 4376.473344 59.938 fps ts mono/EoF
26 (2) [-] none 26 614400 B 4376.473337 4376.490159 59.941 fps ts mono/EoF
27 (0) [-] none 27 614400 B 4376.490038 4376.506720 59.877 fps ts mono/EoF
28 (1) [-] none 28 614400 B 4376.506774 4376.523461 59.751 fps ts mono/EoF
29 (2) [-] none 29 614400 B 4376.523389 4376.540200 60.187 fps ts mono/EoF
30 (0) [-] none 30 614400 B 4376.556815 4376.556907 29.917 fps ts mono/EoF
31 (1) [-] none 31 614400 B 0.000000 4376.573515 -0.012 fps ts mono/EoF
32 (2) [-] none 32 614400 B 4376.590140 4376.590247 0.012 fps ts mono/EoF
DROPPED FRAME - -81078246 and 544598, delta 81622844
33 (0) [-] none 33 614400 B 0.000000 4376.606867 -0.012 fps ts mono/EoF
34 (1) [-] none 34 614400 B 4376.623541 4376.623632 0.012 fps ts mono/EoF
DROPPED FRAME - -81078246 and 577999, delta 81656245
35 (2) [-] none 35 614400 B 0.000000 4376.640239 -0.012 fps ts mono/EoF
36 (0) [-] none 36 614400 B 4376.640173 4376.656912 0.012 fps ts mono/EoF
DROPPED FRAME - -81078246 and 594631, delta 81672877
37 (1) [-] none 37 614400 B 4376.656858 4376.673614 59.934 fps ts mono/EoF
38 (2) [-] none 38 614400 B 4376.673546 4376.690260 59.923 fps ts mono/EoF
39 (0) [-] none 39 614400 B 4376.690225 4376.706932 59.956 fps ts mono/EoF
40 (1) [-] none 40 614400 B 4376.706909 4376.723675 59.938 fps ts mono/EoF
41 (2) [-] none 41 614400 B 4376.723593 4376.740340 59.938 fps ts mono/EoF
42 (0) [-] none 42 614400 B 4376.740275 4376.756998 59.945 fps ts mono/EoF
43 (1) [-] none 43 614400 B 4376.756959 4376.773682 59.938 fps ts mono/EoF
44 (2) [-] none 44 614400 B 4376.773644 4376.790377 59.934 fps ts mono/EoF
45 (0) [-] none 45 614400 B 4376.790332 4376.807068 59.923 fps ts mono/EoF
46 (1) [-] none 46 614400 B 4376.807013 4376.823744 59.948 fps ts mono/EoF
47 (2) [-] none 47 614400 B 4376.823694 4376.840401 59.948 fps ts mono/EoF
48 (0) [-] none 48 614400 B 4376.840464 4376.857094 59.630 fps ts mono/EoF
49 (1) [-] none 49 614400 B 4376.857061 4376.873768 60.252 fps ts mono/EoF
50 (2) [-] none 50 614400 B 4376.873745 4376.890455 59.938 fps ts mono/EoF
51 (0) [-] none 51 614400 B 4376.890429 4376.907145 59.938 fps ts mono/EoF
52 (1) [-] none 52 614400 B 4376.907120 4376.923830 59.913 fps ts mono/EoF
53 (2) [-] none 53 614400 B 4376.923796 4376.940506 59.966 fps ts mono/EoF
54 (0) [-] none 54 614400 B 4376.940480 4376.957159 59.938 fps ts mono/EoF
55 (1) [-] none 55 614400 B 4376.957163 4376.973864 59.941 fps ts mono/EoF
56 (2) [-] none 56 614400 B 4376.973846 4376.990522 59.941 fps ts mono/EoF
57 (0) [-] none 57 614400 B 4376.990529 4377.007235 59.941 fps ts mono/EoF
58 (1) [-] none 58 614400 B 4377.007214 4377.023883 59.934 fps ts mono/EoF
59 (2) [-] none 59 614400 B 4377.023897 4377.040593 59.941 fps ts mono/EoF
60 (0) [-] none 60 614400 B 4377.040582 4377.057252 59.934 fps ts mono/EoF
61 (1) [-] none 61 614400 B 4377.057264 4377.073967 59.945 fps ts mono/EoF
62 (2) [-] none 62 614400 B 4377.073948 4377.090623 59.938 fps ts mono/EoF
63 (0) [-] none 63 614400 B 4377.090632 4377.107328 59.938 fps ts mono/EoF
64 (1) [-] none 64 614400 B 4377.107316 4377.123986 59.938 fps ts mono/EoF
65 (2) [-] none 65 614400 B 4377.123999 4377.140697 59.941 fps ts mono/EoF
66 (0) [-] none 66 614400 B 4377.140683 4377.157356 59.938 fps ts mono/EoF
67 (1) [-] none 67 614400 B 4377.157366 4377.174063 59.941 fps ts mono/EoF
68 (2) [-] none 68 614400 B 4377.174051 4377.190724 59.934 fps ts mono/EoF
69 (0) [-] none 69 614400 B 4377.190734 4377.207461 59.941 fps ts mono/EoF
70 (1) [-] none 70 614400 B 4377.207420 4377.224090 59.930 fps ts mono/EoF
71 (2) [-] none 71 614400 B 4377.224101 4377.240810 59.948 fps ts mono/EoF
72 (0) [-] none 72 614400 B 4377.240785 4377.257457 59.938 fps ts mono/EoF
73 (1) [-] none 73 614400 B 4377.257469 4377.274204 59.938 fps ts mono/EoF
74 (2) [-] none 74 614400 B 4377.274154 4377.290830 59.934 fps ts mono/EoF
75 (0) [-] none 75 614400 B 4377.290836 4377.307565 59.945 fps ts mono/EoF
76 (1) [-] none 76 614400 B 4377.307521 4377.324191 59.934 fps ts mono/EoF
77 (2) [-] none 77 614400 B 4377.324203 4377.340952 59.945 fps ts mono/EoF
78 (0) [-] none 78 614400 B 4377.340888 4377.357562 59.934 fps ts mono/EoF
79 (1) [-] none 79 614400 B 4377.357572 4377.374333 59.938 fps ts mono/EoF
80 (2) [-] none 80 614400 B 4377.374257 4377.390933 59.934 fps ts mono/EoF
81 (0) [-] none 81 614400 B 4377.390938 4377.407713 59.948 fps ts mono/EoF
82 (1) [-] none 82 614400 B 4377.407626 4377.424298 59.923 fps ts mono/EoF
83 (2) [-] none 83 614400 B 4377.424305 4377.441003 59.956 fps ts mono/EoF
84 (0) [-] none 84 614400 B 4377.440993 4377.457664 59.923 fps ts mono/EoF
85 (1) [-] none 85 614400 B 4377.457673 4377.474372 59.952 fps ts mono/EoF
86 (2) [-] none 86 614400 B 4377.474357 4377.491063 59.938 fps ts mono/EoF
87 (0) [-] none 87 614400 B 4377.491042 4377.507764 59.934 fps ts mono/EoF
88 (1) [-] none 88 614400 B 4377.507726 4377.524442 59.938 fps ts mono/EoF
89 (2) [-] none 89 614400 B 4377.524410 4377.541123 59.938 fps ts mono/EoF
90 (0) [-] none 90 614400 B 4377.541093 4377.557962 59.941 fps ts mono/EoF
91 (1) [-] none 91 614400 B 4377.557779 4377.574480 59.930 fps ts mono/EoF
92 (2) [-] none 92 614400 B 4377.574460 4377.591189 59.948 fps ts mono/EoF
93 (0) [-] none 93 614400 B 4377.591144 4377.607892 59.938 fps ts mono/EoF
94 (1) [-] none 94 614400 B 4377.607827 4377.624552 59.941 fps ts mono/EoF
95 (2) [-] none 95 614400 B 4377.624511 4377.641229 59.938 fps ts mono/EoF
96 (0) [-] none 96 614400 B 4377.641195 4377.657915 59.938 fps ts mono/EoF
97 (1) [-] none 97 614400 B 4377.657880 4377.674601 59.934 fps ts mono/EoF
98 (2) [-] none 98 614400 B 4377.674562 4377.691267 59.945 fps ts mono/EoF
99 (0) [-] none 99 614400 B 4377.691246 4377.707975 59.938 fps ts mono/EoF
100 (1) [-] none 100 614400 B 4377.707930 4377.724631 59.938 fps ts mono/EoF
101 (2) [-] none 101 614400 B 4377.724613 4377.741331 59.941 fps ts mono/EoF
102 (0) [-] none 102 614400 B 4377.741300 4377.758017 59.927 fps ts mono/EoF
103 (1) [-] none 103 614400 B 4377.757981 4377.774687 59.948 fps ts mono/EoF
104 (2) [-] none 104 614400 B 4377.774665 4377.791384 59.938 fps ts mono/EoF
105 (0) [-] none 105 614400 B 4377.791350 4377.808050 59.934 fps ts mono/EoF
106 (1) [-] none 106 614400 B 4377.808032 4377.824765 59.945 fps ts mono/EoF
107 (2) [-] none 107 614400 B 4377.824718 4377.841417 59.930 fps ts mono/EoF
108 (0) [-] none 108 614400 B 4377.841399 4377.858107 59.948 fps ts mono/EoF
109 (1) [-] none 109 614400 B 4377.858083 4377.874781 59.938 fps ts mono/EoF
110 (2) [-] none 110 614400 B 4377.874766 4377.891490 59.941 fps ts mono/EoF
111 (0) [-] none 111 614400 B 4377.891450 4377.908163 59.938 fps ts mono/EoF
112 (1) [-] none 112 614400 B 4377.908134 4377.924977 59.938 fps ts mono/EoF
113 (2) [-] none 113 614400 B 4377.924823 4377.941491 59.920 fps ts mono/EoF
114 (0) [-] none 114 614400 B 4377.941500 4377.958282 59.963 fps ts mono/EoF
115 (1) [-] none 115 614400 B 4377.958187 4377.974866 59.927 fps ts mono/EoF
116 (2) [-] none 116 614400 B 4377.974868 4377.991583 59.948 fps ts mono/EoF
117 (0) [-] none 117 614400 B 4377.991551 4378.008231 59.941 fps ts mono/EoF
118 (1) [-] none 118 614400 B 4378.008235 4378.024980 59.938 fps ts mono/EoF
119 (2) [-] none 119 614400 B 4378.024919 4378.041620 59.938 fps ts mono/EoF
120 (0) [-] none 120 614400 B 4378.041601 4378.058345 59.945 fps ts mono/EoF
121 (1) [-] none 121 614400 B 4378.058286 4378.074967 59.934 fps ts mono/EoF
122 (2) [-] none 122 614400 B 4378.074970 4378.091706 59.938 fps ts mono/EoF
123 (0) [-] none 123 614400 B 4378.091655 4378.108349 59.934 fps ts mono/EoF
124 (1) [-] none 124 614400 B 4378.108339 4378.125048 59.938 fps ts mono/EoF
125 (2) [-] none 125 614400 B 4378.125021 4378.141699 59.945 fps ts mono/EoF
126 (0) [-] none 126 614400 B 4378.141704 4378.158428 59.941 fps ts mono/EoF
127 (1) [-] none 127 614400 B 4378.158387 4378.175077 59.941 fps ts mono/EoF
128 (2) [-] none 128 614400 B 4378.175072 4378.191796 59.934 fps ts mono/EoF
129 (0) [-] none 129 614400 B 4378.191756 4378.208515 59.938 fps ts mono/EoF
130 (1) [-] none 130 614400 B 4378.208443 4378.225170 59.927 fps ts mono/EoF
131 (2) [-] none 131 614400 B 4378.225123 4378.241926 59.952 fps ts mono/EoF
132 (0) [-] none 132 614400 B 4378.241808 4378.258516 59.934 fps ts mono/EoF
133 (1) [-] none 133 614400 B 4378.258490 4378.275254 59.945 fps ts mono/EoF
134 (2) [-] none 134 614400 B 4378.275181 4378.291857 59.913 fps ts mono/EoF
135 (0) [-] none 135 614400 B 4378.291858 4378.308599 59.963 fps ts mono/EoF
136 (1) [-] none 136 614400 B 4378.308544 4378.325237 59.930 fps ts mono/EoF
137 (2) [-] none 137 614400 B 4378.325225 4378.341977 59.948 fps ts mono/EoF
138 (0) [-] none 138 614400 B 4378.341908 4378.358598 59.941 fps ts mono/EoF
139 (1) [-] none 139 614400 B 4378.358591 4378.375399 59.941 fps ts mono/EoF
140 (2) [-] none 140 614400 B 4378.375280 4378.391956 59.920 fps ts mono/EoF
141 (0) [-] none 141 614400 B 4378.391960 4378.408701 59.952 fps ts mono/EoF
142 (1) [-] none 142 614400 B 4378.408646 4378.425366 59.930 fps ts mono/EoF
143 (2) [-] none 143 614400 B 4378.425328 4378.442037 59.945 fps ts mono/EoF
144 (0) [-] none 144 614400 B 4378.442012 4378.458753 59.938 fps ts mono/EoF
145 (1) [-] none 145 614400 B 4378.458695 4378.475427 59.941 fps ts mono/EoF
146 (2) [-] none 146 614400 B 4378.475380 4378.492167 59.934 fps ts mono/EoF
147 (0) [-] none 147 614400 B 4378.492062 4378.508767 59.945 fps ts mono/EoF
148 (1) [-] none 148 614400 B 4378.508746 4378.525460 59.938 fps ts mono/EoF
149 (2) [-] none 149 614400 B 4378.525431 4378.542158 59.934 fps ts mono/EoF
150 (0) [-] none 150 614400 B 4378.542116 4378.558863 59.934 fps ts mono/EoF
151 (1) [-] none 151 614400 B 4378.558800 4378.575554 59.938 fps ts mono/EoF
152 (2) [-] none 152 614400 B 4378.575484 4378.592193 59.938 fps ts mono/EoF
153 (0) [-] none 153 614400 B 4378.592164 4378.608948 59.952 fps ts mono/EoF
154 (1) [-] none 154 614400 B 4378.608850 4378.625570 59.930 fps ts mono/EoF
155 (2) [-] none 155 614400 B 4378.625532 4378.642263 59.945 fps ts mono/EoF
156 (0) [-] none 156 614400 B 4378.642216 4378.658998 59.938 fps ts mono/EoF
157 (1) [-] none 157 614400 B 4378.658903 4378.675621 59.927 fps ts mono/EoF
158 (2) [-] none 158 614400 B 4378.675585 4378.692321 59.945 fps ts mono/EoF
159 (0) [-] none 159 614400 B 4378.692269 4378.708988 59.938 fps ts mono/EoF
160 (1) [-] none 160 614400 B 4378.708951 4378.725731 59.945 fps ts mono/EoF
161 (2) [-] none 161 614400 B 4378.725635 4378.742378 59.938 fps ts mono/EoF
162 (0) [-] none 162 614400 B 4378.742317 4378.759243 59.945 fps ts mono/EoF
163 (1) [-] none 163 614400 B 4378.759009 4378.775721 59.909 fps ts mono/EoF
164 (2) [-] none 164 614400 B 4378.775685 4378.792408 59.966 fps ts mono/EoF
165 (0) [-] none 165 614400 B 4378.792369 4378.809163 59.938 fps ts mono/EoF
166 (1) [-] none 166 614400 B 4378.809053 4378.825761 59.938 fps ts mono/EoF
167 (2) [-] none 167 614400 B 4378.825737 4378.842415 59.938 fps ts mono/EoF
168 (0) [-] none 168 614400 B 4378.842418 4378.859104 59.948 fps ts mono/EoF
169 (1) [-] none 169 614400 B 4378.859103 4378.875795 59.934 fps ts mono/EoF
170 (2) [-] none 170 614400 B 4378.875786 4378.892512 59.941 fps ts mono/EoF
171 (0) [-] none 171 614400 B 4378.892470 4378.909179 59.938 fps ts mono/EoF
172 (1) [-] none 172 614400 B 4378.909154 4378.925874 59.938 fps ts mono/EoF
173 (2) [-] none 173 614400 B 4378.925838 4378.942593 59.938 fps ts mono/EoF
174 (0) [-] none 174 614400 B 4378.942522 4378.959207 59.938 fps ts mono/EoF
175 (1) [-] none 175 614400 B 4378.959204 4378.975906 59.945 fps ts mono/EoF
176 (2) [-] none 176 614400 B 4378.975889 4378.992623 59.934 fps ts mono/EoF
177 (0) [-] none 177 614400 B 4378.992575 4379.009370 59.930 fps ts mono/EoF
178 (1) [-] none 178 614400 B 4379.009256 4379.025978 59.948 fps ts mono/EoF
179 (2) [-] none 179 614400 B 4379.025939 4379.042737 59.941 fps ts mono/EoF
180 (0) [-] none 180 614400 B 4379.042625 4379.059330 59.930 fps ts mono/EoF
181 (1) [-] none 181 614400 B 4379.059306 4379.076052 59.948 fps ts mono/EoF
182 (2) [-] none 182 614400 B 4379.075990 4379.092717 59.938 fps ts mono/EoF
183 (0) [-] none 183 614400 B 4379.092674 4379.109384 59.938 fps ts mono/EoF
184 (1) [-] none 184 614400 B 4379.109359 4379.126032 59.934 fps ts mono/EoF
185 (2) [-] none 185 614400 B 4379.126043 4379.142810 59.938 fps ts mono/EoF
186 (0) [-] none 186 614400 B 4379.142729 4379.159398 59.930 fps ts mono/EoF
187 (1) [-] none 187 614400 B 4379.159408 4379.176117 59.956 fps ts mono/EoF
188 (2) [-] none 188 614400 B 4379.176095 4379.192850 59.927 fps ts mono/EoF
189 (0) [-] none 189 614400 B 4379.192777 4379.209532 59.945 fps ts mono/EoF
190 (1) [-] none 190 614400 B 4379.209461 4379.226221 59.938 fps ts mono/EoF
191 (2) [-] none 191 614400 B 4379.226145 4379.242887 59.938 fps ts mono/EoF
192 (0) [-] none 192 614400 B 4379.242828 4379.259623 59.941 fps ts mono/EoF
193 (1) [-] none 193 614400 B 4379.259514 4379.276254 59.930 fps ts mono/EoF
194 (2) [-] none 194 614400 B 4379.276197 4379.292972 59.941 fps ts mono/EoF
195 (0) [-] none 195 614400 B 4379.292882 4379.309684 59.934 fps ts mono/EoF
196 (1) [-] none 196 614400 B 4379.309569 4379.326283 59.927 fps ts mono/EoF
197 (2) [-] none 197 614400 B 4379.326247 4379.342956 59.959 fps ts mono/EoF
198 (0) [-] none 198 614400 B 4379.342931 4379.359680 59.938 fps ts mono/EoF
199 (1) [-] none 199 614400 B 4379.359615 4379.376367 59.938 fps ts mono/EoF
Captured 200 frames in 3.330746 seconds (60.046605 fps, 36892633.859912 B/s).
Total number of frames dropped 3
Releasing vcsm handle 241664
Closing dma_buf 8
Releasing vcsm handle 245760
Closing dma_buf 9
Releasing vcsm handle 249856
Closing dma_buf 10
3 buffers released.

But when I keep inserting with this code. He doesn't send anything as if he hadn't selected anything. If it wasn't too much trouble, could you help me thanks Engineer

my image to out this
Image
Attachments
fail.png
imagfail
fail.png (255.01 KiB) Viewed 1650 times

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7329
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Mon Jul 29, 2019 10:50 am

Sandro6 wrote:
Sun Jul 28, 2019 3:23 am
but I try is to modify the Type of "Frame Format: Interlaced."
Interlaced video is not supported on the B101 connected to the Pi. The bcm2835-unicam driver will reject any attempt to select it, but by the looks of it your source isn't producing anything anyway.

There is no standard way of signalling field order over a CSI2 interface. If you can't identify the fields then you can't deinterlace it.
The way that the TC358743 has chosen to do it is not easily supportable on the Pi SoC, therefore it will not work.
(There is a thread where the ADV7282M analogue video to CSI2 chip has been made to produce interlaced video successfully but it has an alternate way of signalling the field information, and that we can handle).

For the moment forget your current HDMI source. Connect something reliable (eg another Pi) to the B101 and prove that works. If it does then I'm afraid you're on your own fighting you current HDMI source to produce something sensible.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

DanR
Posts: 33
Joined: Fri Jan 18, 2013 1:20 pm

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Wed Jul 31, 2019 10:52 am

Sometimes upon boot up after I issue the command to set the EDID and setup the timings I get no output from the TC358743, or more precisely a capture that consists of no output. I can see after multiple reboots that sometimes when I query the log status that the system says it needs 3 CSI-TX Lanes and this is when it all fails. When it boots up and shows it needing 2 CSI-TX lanes all is well. I've added the log output below. Do you have any idea on how I can force the system to either reset or reconfigure to need 2 lanes??

Cheers, Dan

Code: Select all

Status Log:

   [  590.606038] unicam 3f801000.csi1: =================  START STATUS  =================
   [  590.607738] tc358743 0-000f: -----Chip status-----
   [  590.608357] tc358743 0-000f: Chip ID: 0x00
   [  590.608969] tc358743 0-000f: Chip revision: 0x00
   [  590.608978] tc358743 0-000f: Reset: IR: 1, CEC: 1, CSI TX: 0, HDMI: 0
   [  590.608983] tc358743 0-000f: Sleep mode: off
   [  590.608989] tc358743 0-000f: Cable detected (+5V power): yes
   [  590.609513] tc358743 0-000f: DDC lines enabled: yes
   [  590.610033] tc358743 0-000f: Hotplug enabled: yes
   [  590.610645] tc358743 0-000f: CEC enabled: no
   [  590.610651] tc358743 0-000f: -----Signal status-----
   [  590.610656] tc358743 0-000f: TMDS signal detected: yes
   [  590.610661] tc358743 0-000f: Stable sync signal: yes
   [  590.610666] tc358743 0-000f: PHY PLL locked: yes
   [  590.610672] tc358743 0-000f: PHY DE detected: yes
   [  590.619212] tc358743 0-000f: Detected format: 1920x1080p50.0 (2640x1125)
   [  590.619225] tc358743 0-000f: horizontal: fp = 0, -sync = 720, bp = 0
   [  590.619233] tc358743 0-000f: vertical: fp = 0, -sync = 45, bp = 0
   [  590.619239] tc358743 0-000f: pixelclock: 148500000
   [  590.619248] tc358743 0-000f: flags (0x0):
   [  590.619254] tc358743 0-000f: standards (0x0):
   [  590.619264] tc358743 0-000f: Configured format: 1920x1080p50.0 (2640x1125)
   [  590.619270] tc358743 0-000f: horizontal: fp = 0, -sync = 720, bp = 0
   [  590.619277] tc358743 0-000f: vertical: fp = 0, -sync = 45, bp = 0
   [  590.619283] tc358743 0-000f: pixelclock: 148500000
   [  590.619290] tc358743 0-000f: flags (0x0):
   [  590.619296] tc358743 0-000f: standards (0x0):
   [  590.619301] tc358743 0-000f: -----CSI-TX status-----
   [  590.619308] tc358743 0-000f: Lanes needed: 3
   [  590.619313] tc358743 0-000f: Lanes in use: 3
   [  590.619930] tc358743 0-000f: Waiting for particular sync signal: no
   [  590.620542] tc358743 0-000f: Transmit mode: no
   [  590.621162] tc358743 0-000f: Receive mode: no
   [  590.621776] tc358743 0-000f: Stopped: no
   [  590.621782] tc358743 0-000f: Color space: RGB 888 24-bit
   [  590.622303] tc358743 0-000f: -----HDMI status-----
   [  590.622309] tc358743 0-000f: HDCP encrypted content: no
   [  590.622315] tc358743 0-000f: Input color space: RGB full range
   [  590.622946] tc358743 0-000f: AV Mute: off
   [  590.623476] tc358743 0-000f: Deep color mode: 8-bits per channel
   [  590.625981] tc358743 0-000f: HDMI infoframe: Auxiliary Video Information (AVI), version 2, length 13
   [  590.625991] tc358743 0-000f:     colorspace: RGB
   [  590.625999] tc358743 0-000f:     scan mode: No Data
   [  590.626007] tc358743 0-000f:     colorimetry: ITU709
   [  590.626015] tc358743 0-000f:     picture aspect: No Data
   [  590.626024] tc358743 0-000f:     active aspect: Same as Picture
   [  590.626033] tc358743 0-000f:     itc: No Data
   [  590.626041] tc358743 0-000f:     extended colorimetry: xvYCC 601
   [  590.626049] tc358743 0-000f:     quantization range: Full
   [  590.626058] tc358743 0-000f:     nups: Unknown Non-uniform Scaling
   [  590.626066] tc358743 0-000f:     video code: 31
   [  590.626074] tc358743 0-000f:     ycc quantization range: Limited
   [  590.626082] tc358743 0-000f:     hdmi content type: Graphics
   [  590.626091] tc358743 0-000f:     pixel repeat: 0
   [  590.626103] tc358743 0-000f:     bar top 0, bottom 0, left 0, right 0
   [  590.626111] unicam 3f801000.csi1: -----Receiver status-----
   [  590.626118] unicam 3f801000.csi1: V4L2 width/height:   1920x1080
   [  590.626124] unicam 3f801000.csi1: Mediabus format:     0000100a
   [  590.626131] unicam 3f801000.csi1: V4L2 format:         RGB3
   [  590.626137] unicam 3f801000.csi1: Unpacking/packing:   0 / 0
   [  590.626142] unicam 3f801000.csi1: ----Live data----
   [  590.626147] unicam 3f801000.csi1: Programmed stride:      0
   [  590.626154] unicam 3f801000.csi1: Detected resolution: 0x0
   [  590.626162] unicam 3f801000.csi1: Write pointer:       00000000
   [  590.626169] unicam 3f801000.csi1: ==================  END STATUS  ==================

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7329
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Wed Jul 31, 2019 11:13 am

DanR wrote:
Wed Jul 31, 2019 10:52 am
Sometimes upon boot up after I issue the command to set the EDID and setup the timings I get no output from the TC358743, or more precisely a capture that consists of no output. I can see after multiple reboots that sometimes when I query the log status that the system says it needs 3 CSI-TX Lanes and this is when it all fails. When it boots up and shows it needing 2 CSI-TX lanes all is well. I've added the log output below. Do you have any idea on how I can force the system to either reset or reconfigure to need 2 lanes??
The number of lanes required is purely down to the bitrate of the incoming HDMI data, and there is a small allowance for the blanking period too.
Each CSI2 lane is configured to run at 972Mbits/s if I remember my numbers correctly.
1080P50 UYVY requires 1920*1080*16*50 = 1.65888Mbit/s - works
1080P60 UYVY requires 1920*1080*16*60 = 1.990656Mbit/s - won't work.
1080P50 RGB3 requires 1920*1080*24*50 = 2.48832Mbit/s - won't work
1080P60 RGB3 requires 1920*1080*24*60 = 2.985984Mbit/s - won't work

Your log dumps out that you are trying to do 1080P50 RGB3

Code: Select all

  [  590.626131] unicam 3f801000.csi1: V4L2 format:         RGB3
so that's why it is failing.

The standard overlay limits the unicam driver to 2 lanes, so the start_streaming call should fail if the driver requests more lanes than this. There is the option to add "4lane=1" to the dtoverlay line to request the use of more lanes for the CM CAM1 interface, but that will require them to actually be wired up and functioning correctly too.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

DanR
Posts: 33
Joined: Fri Jan 18, 2013 1:20 pm

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Wed Jul 31, 2019 12:10 pm

Ah ha, nicely spotted!! I've now set the index to 11 and then forced the pixelformat to UYVY and it seems to be working. It's almost like the auto detect just isn't working 100% of the time but I could be wrong. Anyway many many thanks for your help, it's much appreciated!!

Kind Regards,

Dan

DanR
Posts: 33
Joined: Fri Jan 18, 2013 1:20 pm

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Fri Aug 02, 2019 8:50 am

Hiya all,

I have a question on the 1080P50EDID.txt file, upon loading it into an EDID editor I found the CEA data block seems to have the 1920x1080P50 entry in Video Descriptor 14 (I used the Deltacast EDID and manually entered and then double checked the hex data). My question is what is set in the CEA block that says to use the 1920x1080 P50 settings, does the source just switch to the highest listed setting or is there something I'm missing? There is another setting above each of the Video Descriptors in the CEA block called Native, so I would have thought this would be the one enabled for the 1920x1080 setting but it's not. I've searched around and cannot find any decent information on the CEA block setup which matches the data in the 1080P50EDID.txt file, I must be missing something so any pointers would be ever so greatly appreciated!!

Kind Regards, Dan

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7329
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Fri Aug 02, 2019 10:54 am

DanR wrote:
Fri Aug 02, 2019 8:50 am
I have a question on the 1080P50EDID.txt file, upon loading it into an EDID editor I found the CEA data block seems to have the 1920x1080P50 entry in Video Descriptor 14 (I used the Deltacast EDID and manually entered and then double checked the hex data). My question is what is set in the CEA block that says to use the 1920x1080 P50 settings, does the source just switch to the highest listed setting or is there something I'm missing? There is another setting above each of the Video Descriptors in the CEA block called Native, so I would have thought this would be the one enabled for the 1920x1080 setting but it's not. I've searched around and cannot find any decent information on the CEA block setup which matches the data in the 1080P50EDID.txt file, I must be missing something so any pointers would be ever so greatly appreciated!!
1080P50EDID.txt was hand edited in the early days where I just wanted a Pi to be able to select those modes via tvservice.

My experience is that EDID parsing is almost entirely up to the source as to which mode to choose, as long as it is specified somewhere in the EDID. The order of the modes seems arbitrary, with only the native flag having any specific meaning.
Reformatting 1080P50EDID.txt to a raw format and passing it to the Pi as the display's EDID, DRM parses it and reports modes in a sorted order:

Code: Select all

  modes:
        name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)
  1280x720 60 1280 1390 1430 1650 720 725 730 750 74250 flags: phsync, pvsync, 2D; type: preferred, driver
  1920x1080 50 1920 2448 2492 2640 1080 1084 1089 1125 148500 flags: phsync, pvsync, 2D; type: driver
  1920x1080 30 1920 2008 2052 2200 1080 1084 1089 1125 74250 flags: phsync, pvsync, 2D; type: driver
  1920x1080 30 1920 2008 2052 2200 1080 1084 1089 1125 74176 flags: phsync, pvsync, 2D; type: driver
  1920x1080 25 1920 2448 2492 2640 1080 1084 1089 1125 74250 flags: phsync, pvsync, 2D; type: driver
  1920x1080 24 1920 2558 2602 2750 1080 1084 1089 1125 74250 flags: phsync, pvsync, 2D; type: driver
  1920x1080 24 1920 2558 2602 2750 1080 1084 1089 1125 74176 flags: phsync, pvsync, 2D; type: driver
  1280x720 60 1280 1390 1430 1650 720 725 730 750 74250 flags: phsync, pvsync, 2D; type: driver
  1280x720 60 1280 1390 1430 1650 720 725 730 750 74176 flags: phsync, pvsync, 2D; type: driver
  1280x720 50 1280 1720 1760 1980 720 725 730 750 74250 flags: phsync, pvsync, 2D; type: driver
  1280x720 30 1280 3040 3080 3300 720 725 730 750 74250 flags: phsync, pvsync, 2D; type: driver
  1280x720 30 1280 3040 3080 3300 720 725 730 750 74176 flags: phsync, pvsync, 2D; type: driver
  1280x720 25 1280 3700 3740 3960 720 725 730 750 74250 flags: phsync, pvsync, 2D; type: driver
  1280x720 24 1280 3040 3080 3300 720 725 730 750 59400 flags: phsync, pvsync, 2D; type: driver
  1280x720 24 1280 3040 3080 3300 720 725 730 750 59341 flags: phsync, pvsync, 2D; type: driver
  720x576 50 720 732 796 864 576 581 586 625 27000 flags: nhsync, nvsync, 2D; type: driver
  720x576 50 720 732 796 864 576 581 586 625 27000 flags: nhsync, nvsync, 2D; type: driver
  720x480 60 720 736 798 858 480 489 495 525 27027 flags: nhsync, nvsync, 2D; type: driver
  720x480 60 720 736 798 858 480 489 495 525 27027 flags: nhsync, nvsync, 2D; type: driver
  720x480 60 720 736 798 858 480 489 495 525 27000 flags: phsync, pvsync, 2D; type: driver
  720x480 60 720 736 798 858 480 489 495 525 27000 flags: nhsync, nvsync, 2D; type: driver
  720x480 60 720 736 798 858 480 489 495 525 27000 flags: nhsync, nvsync, 2D; type: driver
  720x480 60 720 736 798 858 480 489 495 525 27000 flags: nhsync, nvsync, 2D; type: driver
  640x480 60 640 656 752 800 480 490 492 525 25200 flags: nhsync, nvsync, 2D; type: driver
  640x480 60 640 656 752 800 480 490 492 525 25175 flags: nhsync, nvsync, 2D; type: driver
It has chosen 1280x720 by default as that is flagged as native, so should be the highest quality for the display (others would be judged to be scaled).

I have a modified version of 1080P50EDID.txt with mode 31 (1080P50) set as native. Even with this the Pi firmware chooses 1280x720 because the detailed timings match that, and detailed timings are viewed as likely to be more accurate than the list of VICs. Then again the firmware's EDID parser is a right pain with the way it handles choosing modes!
Currently the firmware is configured to pass the chosen mode up to KMS via the kernel command line, therefore it ends up making similar decisions. Actually without that, DRM also takes the detailed timings as preferred over the native VIC. Updating the detailed timings for your preferred mode would therefore be sensible.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

DanR
Posts: 33
Joined: Fri Jan 18, 2013 1:20 pm

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Fri Aug 02, 2019 11:12 am

Thanks for the info, I'm going to set 1920x1080P50 as Native as that's really what we want and the source generally has that setting or 1920x1080P60 which the 3B+ can't handle. I'll leave the other mode of 1280x720 in there as other sources might only support that. I can then query the input video type and adjust the capture settings based upon the input. I think that should do the job, just rambling now so I'll shut up.

Thanks again, much appreciated, Dan

apparat
Posts: 6
Joined: Sat Apr 28, 2018 10:34 pm

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Sun Aug 04, 2019 10:37 pm

Is it possible to access the uncompressed frames from within yavta but still h264-encode to a file/socket?

I'm using yavta to stream the output of a pc to a server with more computational power for ocr with tesseract.
Instead of using a full streaming protocol, I just modified yavta to write the raw h264 stream to a tcp socket instead of a file.
The h264 codec isn't optimal for encoding of text (tesseract has difficulties recognizing text below a certain font size due to compression).
Since the text area of my stream is only about 20 percent of the full screen size (1920x1080x25fps) and only 1 bit per pixel, it should be possible to stream this part of the video via ethernet.
But I also need the rest of the screen (h264 quality is sufficient here), so just capturing only the text area of the screen isn't an option.

Basically I want both, h264 and forward the raw output of a sub area (reduced to 1 bpp).

Thanks in advance

Tanner1pl
Posts: 3
Joined: Sun Aug 18, 2019 7:08 pm

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Sun Aug 18, 2019 7:28 pm

Hello, I have an issue which might be a bug - tested on both Auvidea B101/3b+ and B102/Zero with two blackmagic camers - Pocket 4K and Micro Cinema Camera. I assume hardware works good, as other video sources are captured properly.

My issue - video captured has broken colors - like way too much green and pink.
Colors are fine when I use different camera or any other video source - so B101 and B102 are fine. Also, when I connect these blackmagic cameras to TV - they works good. Also many hdmi cables tested.

Looks more like TC358743 doesn't recognize format/config of video coming from blackmagic - it sends clear 10bit 1080p@25fps 4.2.2 video which can be recorded using external recorder. Looks very similar (if not exactly) like issue with YCrCb vs RGBFull pixel formatting. Has anyone faced this issue and found solution? :)

Code: Select all

raspivid -t 5000 -w 1920 -h 1080 -fps 25 -o test.h264
Zrzut-ekranu-2019-08-18-o-21.12.59.jpg
Zrzut-ekranu-2019-08-18-o-21.12.59.jpg (135.14 KiB) Viewed 1275 times

While image coming out from camera is fine, like here on preview LCD or when I connect monitor/TV to camera.
68800270_360682631267652_8322857960573239296_n.jpg
68800270_360682631267652_8322857960573239296_n.jpg (56.52 KiB) Viewed 1275 times

manmathan74
Posts: 2
Joined: Mon Aug 19, 2019 6:29 am

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Mon Aug 19, 2019 6:35 am

Hi All,

I just bought the board - b101 v4. but it looks like there is no straight forward instructions to install and get it working.
I have tried some of the instructions but not working.
Is there a specific step by step instruction to get the board working in 3b+?

Appreciate the support

manmathan74
Posts: 2
Joined: Mon Aug 19, 2019 6:29 am

Re: HDMI to CSI-2 via TC358743 on kernel 4.1

Mon Aug 19, 2019 6:56 am

Hi All,
Can someone help? I am trying to get the B101 v4 board to work on Pi 3b+ but am lost with so many point on this forum. Is there a step by step on this board?

Thanks,

Return to “Graphics, sound and multimedia”