User avatar
madnerd
Posts: 10
Joined: Wed Nov 01, 2017 6:43 am
Location: Montpellier, France
Contact: Website Twitter

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

Wed Jan 17, 2018 1:04 pm

In their manual for B101 Auvidea specifies several pinouts - I tried to match those to adafruit.
I recently wired an I2S Audio Out Interface (PCM5102) on a Raspberry Pi Zero

Pinout.xyz was pretty useful (as always).
https://pinout.xyz/pinout/pcm#

I only used 3 pins
[*] I2S Audio Bit Clock (BCK -> PCM CLK) = pin 12/BCM 18
[*] I2S Audio Data In (DIN -> PCM DOUT) = pin 40/BCM 21
[*] I2S Audio Word Clock (LCK -> PCM FS) = pin 35/BCM 19

Since this is audio IN (pin 38/BCM 20)
It looks like your wiring is OK.

Image
Drivers
I never used I2S Audio IN, but for my audio interface I needed to enable an overlay (hifiberry-dac).

Did you compile the I2S module as explained on the Adafruit tutorial ?
Do you see an audio interface when you type?

Code: Select all

arecord -l
If you have already compiled the I2S module, maybe the driver doesn't work for the audio I2S interface on the auvidea B101.
Auvidea Reset and Cable Pins are unclear - Which GPIO shall I connect those?
I don't think this is related to audio.
RESET : Reset the TC58743 chip
CABLE DETECT : pin is HIGH when an HDMI cable is plugged in.

hblanken
Posts: 10
Joined: Fri May 06, 2016 11:43 am

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

Thu Jan 18, 2018 8:50 am

Thanks for the reply - yes I activated all as per the adafruit tutorial. All works as per instructions.

Only thing is that I do not get any audio into the wav file at the very end. It is just silent.

I connected a HDMI camera with inbuilt microphone and I can record mp4 but no wav or mp4 with sound.

Must be some little quirk we are missing here.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5536
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

Thu Jan 18, 2018 9:47 am

If you're using raspivid then it is routing the audio over the csi bus, not i2s. There was a way of extracting that, bit I don't recall it. Basically don't use raspivid for tc358743.
The kernel driver is set up for i2s output. It also exports a v4l2 control indicating whether audio is present or not.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

steeley
Posts: 6
Joined: Fri Jun 22, 2012 3:00 pm

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

Fri Jan 19, 2018 5:46 pm

I got one of these boards about a year ago, and have got round to using it for a project I have next week.

Unfortunately as stated earlier there is some confusion about the reset line which basically means if that it is incorrect it won't work.
Early B101boards seemed to have the wrong design for the reset and need some mods I think.

Despite repeated requests to the manufacturer of the board about this I have had no reply.

if any one has this setup on a PI3 please let us know what you did to get the reset working.

TIA

rocky11
Posts: 2
Joined: Fri Jan 19, 2018 6:22 pm

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

Fri Jan 19, 2018 6:37 pm

Hello,

First of all - thank you all for your commitment and support! I've just read whole topic and saw enormous work you have done :)

I'm afraid that I have an issue with resolutions in EDID. I'm using B102 board with Rpi3, firmware up-to-date.
I've followed the instructions from https://www.linux-projects.org/uv4l/installation/ and my scripts (using v4l2) are able to capture video from HDMI.

Problem is: the maximum resolution I can see on source computer is 720p.
If I understand correctly, I can change Toshiba's EDID by using @6by9 EDID and enable it to capture screen in 1080p resolution, right?

I got EDID file from https://raw.githubusercontent.com/6by9/ ... 50EDID.txt and tried to set it using:

Code: Select all

v4l2-ctl --set-edid=file=1080P50EDID.txt --fix-edid-checksums
However, the VIDIOC_S_EDID: failed: Invalid argument appears. What does it mean? How can i create a valid file?

I would be grateful for any support ;)

hblanken
Posts: 10
Joined: Fri May 06, 2016 11:43 am

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

Sat Jan 20, 2018 5:33 am

6by9 wrote:
Thu Jan 18, 2018 9:47 am
If you're using raspivid then it is routing the audio over the csi bus, not i2s.
Really, that would be excellent - but now I am really confused. In this thread and several others there was the statement that audio has never been extracted from the B101 rv4. And I have so far not been successful either.

Must I set up the tc358743 kernel driver first?
I am travelling right now, but shall I only do this and it works? With the original board or only with the kernel driver?
raspivid -t 0 -o - | avconv -i pipe:0 -c:v libx264 -preset ultrafast -tune zerolatency -acodec aac -ab 128k -strict experimental -f file.flv
6by9 wrote:
Thu Jan 18, 2018 9:47 am
There was a way of extracting that, bit I don't recall it. Basically don't use raspivid for tc358743.
The kernel driver is set up for i2s output. It also exports a v4l2 control indicating whether audio is present or not.
You are saying, if I would rather like to have audio enabled via i2s, I should not use raspivid? If I use ffmpeg with v4l2 I am not yet successful for audio nor via i2s and csi directly..
6by9 wrote:
Thu Jan 18, 2018 9:47 am
The kernel driver is set up for i2s output. It also exports a v4l2 control indicating whether audio is present or not.
Audio present via i2s? Do we have any further about this?

Thanks so much

ruder
Posts: 8
Joined: Sat Nov 18, 2017 3:48 pm
Location: Rajkot,Gujarat,India.
Contact: Facebook Twitter

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

Fri Feb 02, 2018 3:51 pm

Hello,

is it working for RPi-Cam-Web-Interface with TC358743?
if anyone has tried.
Ty :)

koop_g
Posts: 5
Joined: Sun Jan 14, 2018 2:20 pm

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

Thu Feb 08, 2018 10:28 pm

deleted
Last edited by koop_g on Wed Mar 07, 2018 12:18 pm, edited 1 time in total.

Orbital6
Posts: 138
Joined: Sat Aug 08, 2015 6:32 pm

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

Thu Mar 01, 2018 12:40 pm

Since this is getting a bit of traction again, i'll just drop this. I have a few B102 and B101 Rev 4 boards for sale.

6by9, feel free to remove this if I'm breaking any rules, but hopefully the spread of more tosh ic's will get more interest :)

almatthew
Posts: 3
Joined: Tue Mar 13, 2018 8:15 pm

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

Tue Mar 13, 2018 10:01 pm

I'm attempting to use the raspi_tc358743.c with my B101 board on a Raspberry Pi 3 with raspbian stretch to no avail. First off, I notice that the i2c bus doesn't seem to match the buses I have on the pi, specifically the code is hard-coded to talk to i2c-0, but I've only got /dev/i2c-1. After changing that, I get all sorts of I2C errors and am unable to talk with the device.

raspivid seems to work fine at 720p on my current setup, so I think the device should be talking to the pi. Any help here would be greatly appreciated.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5536
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 Mar 14, 2018 9:56 am

almatthew wrote:
Tue Mar 13, 2018 10:01 pm
I'm attempting to use the raspi_tc358743.c with my B101 board on a Raspberry Pi 3 with raspbian stretch to no avail. First off, I notice that the i2c bus doesn't seem to match the buses I have on the pi, specifically the code is hard-coded to talk to i2c-0, but I've only got /dev/i2c-1. After changing that, I get all sorts of I2C errors and am unable to talk with the device.

raspivid seems to work fine at 720p on my current setup, so I think the device should be talking to the pi. Any help here would be greatly appreciated.
Add

Code: Select all

dtparam=i2c_vc=on
to /boot/config.txt and you will gain /dev/i2c-0.
The SoC has two(*) I2C controllers. i2c-0 is normally reserved for the GPU to talk to the camera and DSI display, but in this case we want Linux to be able to talk to the camera interface.

(*) actually 3, but one is required by the HDMI interface unless you do some very odd things.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

almatthew
Posts: 3
Joined: Tue Mar 13, 2018 8:15 pm

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

Wed Mar 14, 2018 11:59 pm

Hi 6by9- I updated the config.txt and now see the i2c-0, thanks. However when I run the raspi_tc358743 program i now see a bunch of i2c errors:

Code: Select all

[email protected]:~ $ /opt/vc/bin/raspi_tc358743
Filename is test_encode.h264
Playing back indefinitely
mmal: i2c_rd: reading register 0x8521 from 0xf failed, err -1

mmal: VI_STATUS to select cfg.data_lanes: 0
mmal: rx_cfg.data_lanes = 1
mmal: Set pack to 0, unpack to 0
mmal: Enable rawcam....
mmal: Enable isp....
mmal: Enable splitter....
mmal: i2c_rd: reading register 0x8521 from 0xf failed, err -1

mmal: VI_STATUS to select cfg.data_lanes: 0
mmal: Selected Sub 720p registers
mmal: i2c_wr: writing register 0x4 from 0xf failed

mmal: i2c_wr: writing register 0x2 from 0xf failed

mmal: i2c_wr: writing register 0x2 from 0xf failed

mmal: i2c_wr: writing register 0x6 from 0xf failed

mmal: i2c_wr: writing register 0x8 from 0xf failed
And that keeps going on for quite awhile. Attempted running as sudo to no effect. Thoughts? Thanks for the help!

ethaniel
Posts: 9
Joined: Sat Dec 16, 2017 9:26 am

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

Thu Mar 22, 2018 11:16 am

6by9 wrote:
Tue Oct 24, 2017 9:24 am
raspivid (and v4l2-ctl if using bcm2835-v4l2) will be saving an H264 elementary stream. Elementary streams have no timestamp or frame rate information within the stream. The application you are using to convert it into a container is therefore having to make an assumption, and that is normally 25fps. 60seconds * 30 / 25 = 72, so I would expect 1min12secs of video.
Add an appropriate flag (normally "-r 30" for avformat or ffmpeg) to tell the application the correct frame rate for the stream.
I am using a B101 and a GoPro Hero 6.

I recorded a video:

Code: Select all

raspivid -t 0 -w 1920 -h 1080 -b 4000000 -o test2.raw
Converted it with -r 30:

Code: Select all

ffmpeg -r 30  -i test2.raw   -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -acodec aac -ab 128k -strict experimental   -vcodec copy -f flv /var/www/html/out.mp4
(I used -f flv because I'll be streaming to youtube live once this is fixed)

And it's still slow. Here it is (you can notice that the seconds move slower than they should):
https://www.youtube.com/watch?v=L3E3X-UIfhw

Any ideas?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5536
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

Thu Mar 22, 2018 11:25 am

ethaniel wrote:
Thu Mar 22, 2018 11:16 am
6by9 wrote:
Tue Oct 24, 2017 9:24 am
raspivid (and v4l2-ctl if using bcm2835-v4l2) will be saving an H264 elementary stream. Elementary streams have no timestamp or frame rate information within the stream. The application you are using to convert it into a container is therefore having to make an assumption, and that is normally 25fps. 60seconds * 30 / 25 = 72, so I would expect 1min12secs of video.
Add an appropriate flag (normally "-r 30" for avformat or ffmpeg) to tell the application the correct frame rate for the stream.
I am using a B101 and a GoPro Hero 6.

I recorded a video:

Code: Select all

raspivid -t 0 -w 1920 -h 1080 -b 4000000 -o test2.raw
Converted it with -r 30:

Code: Select all

ffmpeg -r 30  -i test2.raw   -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -acodec aac -ab 128k -strict experimental   -vcodec copy -f flv /var/www/html/out.mp4
(I used -f flv because I'll be streaming to youtube live once this is fixed)

And it's still slow. Here it is (you can notice that the seconds move slower than they should):
https://www.youtube.com/watch?v=L3E3X-UIfhw

Any ideas?
Firstly, as stated so many times, using raspivid with the B101 is unsupported. In many ways I don't care about what does and does not work with it.
What output mode is your GoPro producing? I have no idea. 30fps was a guess.
raspivid can save the timestamps to a file. Add "-pts timecodes.txt" to the command line. mkvmerge can merge those in "mkvmerge -o video.mkv --timecodes 0:timecodes.txt video.h264" (thanks to ethanol100 for sorting that).
ffmpeg may be able to do a similar thing, but I'm not going to investigate it. Alternatively it may be happy enough to take the mkv file in as the video source.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

ethaniel
Posts: 9
Joined: Sat Dec 16, 2017 9:26 am

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

Thu Mar 22, 2018 1:47 pm

6by9 wrote:
Thu Mar 22, 2018 11:25 am
Firstly, as stated so many times, using raspivid with the B101 is unsupported.
Thank you for this.

I have managed to get an almost perfect 25fps live stream to youtube from Auvidea b101 on my raspberry pi 3.
Here is the command:

Code: Select all

modprobe bcm2835-v4l2
ffmpeg  -f video4linux2 -framerate 25 -video_size 1920x1080 -i /dev/video0 \
  -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -acodec aac -ab 128k -strict experimental \
  -vcodec h264_omx -s 1920x1080  -r 25 -g 50 -vb 2500k -maxrate 2500k -preset veryslow -tune stillimage \ 
  -f flv rtmp://a.rtmp.youtube.com/live2/***
  

ialpert
Posts: 16
Joined: Fri Mar 30, 2018 1:10 pm

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

Wed Apr 04, 2018 2:37 pm

After reading 15 pages here I decided to try it on RPI 3B+ (2018) but not much luck so far... I only connected 15pin camera, I use B101 rev 4 and it has 8 wires for GPIO but no instructions how to connect them to the board (8 to 40 map)


1. I got hdmi_hack branch and compiled it

Code: Select all

setting GPIO for board revsion: a020d3
Failed: don't know how to set GPIO for this board!
2. Edited ./camera_i2c and added a020d3 because it does not have 3B+ board defined, but I guess it is the same as 3...
3. Set a couple of missing utils and interface so


$ v4l2-ctl --set-edid=file=1080P50EDID.txt --fix-edid-checksums

Code: Select all

CEA-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

CEA-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
VIDIOC_S_EDID: failed: Inappropriate ioctl for device



4. With loaded driver, I can get so image output but the resolution or frequency seems to be way off, I see screen multiplied 4 times and shaking

sudo modprobe bcm2835-v4l2



$ sudo vcdbg log msg

Code: Select all

001927.200: brfs: File read: /mfs/sd/bcm2710-rpi-3-b-plus.dtb
001927.225: Loading 'bcm2710-rpi-3-b-plus.dtb' to 0x46f730 size 0x463c
002042.705: brfs: File read: 17980 bytes
002044.943: brfs: File read: /mfs/sd/config.txt
002045.487: dtparam: i2c_arm=on
002054.930: dtparam: audio=on
002067.212: dtparam: i2c_arm=on
002076.540: dtparam: i2c_vc=true
003231.018: Device tree loaded to 0x2effb500 (size 0x4a7f)
003233.057: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined
004635.379: vchiq_core: vchiq_init_state: slot_zero = 0xe6d80000, is_master = 1
004640.272: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
004647.324: TV service:host side not connected, dropping notification 0x00000002, 0x00000001, 0x00000010
054236.890: camsubs: Looking for camera 0: i2c_port = 0, led gpio = 134, power enable gpio = 133
054237.612: camsubs: Camera not found
054237.648: camsubs: Looking for camera 0: i2c_port = 0, led gpio = 134, power enable gpio = 133
054238.367: camsubs: Camera not found
054238.404: camsubs: Looking for camera 0: i2c_port = 0, led gpio = 134, power enable gpio = 133
054238.930: camsubs: Camera found OK
054241.415: gpioman: gpioman_get_pin_num: pin CAMERA_LED not defined
054243.066: brfs: File read: 1713 bytes

userland $ ./build/bin/raspivid -t 5000 --width 1280 --height 720 -md 1
Gives a black screen


I also have https://lintestsystems.com/products/picapture-hd1 and it works out of the box but image quality (especially text from computer/media player) is not that great



So far I got zero help from Auvidea, so maybe you can help me?

NavioB
Posts: 15
Joined: Thu Apr 20, 2017 5:16 pm

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

Thu Apr 05, 2018 8:41 am

Not a developer but need some info please if you do not mind.

I simply want to use this board to stream video from My gopro at 720p. WIll this work out of the box ?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5536
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

Thu Apr 05, 2018 9:11 am

If you are wanting to use the TC348743 then there is no out of the box solution at present.

There are 3 independent things discussed here. Please don't mix and match as it will not work.

Ignore raspivid and bcm2835-v4l2 - both are using the firmware driver, it has significant limitations and will only accept 720P.

raspi_tc358743 should work if you configure your Pi hardware correctly (enable i2c0 etc). You have full source for the userspace code there, so knock yourselves out.

The kernel driver should be merged in the next couple of weeks (a request from my boss), at which point there should be a simple dtoverlay line to enable the TC358743. You will still need to understand some of the detail of how HDMI works, and what downloading an EDID means, but the forked version of yavta sorts out most of the timing related stuff for you (it doesn't handle dynamic resolution changes though).
None of it is currently set up to receive audio, although it should be possible to link across to the I2S interface and configure it appropriately.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

ialpert
Posts: 16
Joined: Fri Mar 30, 2018 1:10 pm

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

Thu Apr 05, 2018 3:40 pm

6by9 wrote:
Thu Apr 05, 2018 9:11 am
If you are wanting to use the TC348743 then there is no out of the box solution at present.
Thank you for the reply! Just thought since people here report some success stories there are steps defined already...
6by9 wrote:
Thu Apr 05, 2018 9:11 am
There are 3 independent things discussed here. Please don't mix and match as it will not work.
6by9 wrote:
Thu Apr 05, 2018 9:11 am
Ignore raspivid and bcm2835-v4l2 - both are using the firmware driver, it has significant limitations and will only accept 720P.
Ok, I was under the impression that utils if your repo is good and I would only avoid built-in tools.
6by9 wrote:
Thu Apr 05, 2018 9:11 am
raspi_tc358743 should work if you configure your Pi hardware correctly (enable i2c0 etc). You have full source for the userspace code there, so knock yourselves out.
One of the posts suggests compiling the kernel -- I tied it but the device won't boot. I think it is because kernel should use source and config for RPI3 B+, not just 3. Is compiling a kernel the right solution if I want a /dev/videoX device? I want to use v4l aware utils like GStreamer etc..
6by9 wrote:
Thu Apr 05, 2018 9:11 am
The kernel driver should be merged in the next couple of weeks (a request from my boss), at which point there should be a simple dtoverlay line to enable the TC358743. You will still need to understand some of the detail of how HDMI works, and what downloading an EDID means, but the forked version of yavta sorts out most of the timing related stuff for you (it doesn't handle dynamic resolution changes though).
None of it is currently set up to receive audio, although it should be possible to link across to the I2S interface and configure it appropriately.
Anything I can try right now? Is unicam branch for 4.14 the one you are going to merge?

I have B101 rev 4 that has 8 pins (4 for audio) but if you can point out how to connect them? It seems without GPIO you have only 1 chance to capture anything, then TC should be reset.


So maybe I can take unicam branch for 4.14 and bcm2710-rpi-3-b-plus.dts and anything else that needs to be provided for 3B+ and steps from https://gist.github.com/maditnerd/01195 ... 1682f1727b and try again? \

I'm new to the embedded world and it frustrates me a bit that some manufacturers take zero efforts to support their products or maybe just assume it is so obvious what to do once you bought the module.

Thank you for all your hard work here!

rwl4
Posts: 1
Joined: Fri Apr 06, 2018 3:03 pm

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

Fri Apr 06, 2018 3:14 pm

I've been having an issue connecting any of my cameras to my B101. They all end up looking like the picture in the screenshot. I can see movement in the video, but it's heavily distorted.

My current setup is: Sony FDR-X3000 -> B101 rev 4 -> Raspberry Pi 3 B+.

I also tried with a Raspberry Pi 3 with the same result.

I've been scouring this thread for an answer and haven't seen this particular issue addressed.

Any ideas? Thank you!
b101_distortion.jpg
b101_distortion.jpg (196.49 KiB) Viewed 1523 times

ialpert
Posts: 16
Joined: Fri Mar 30, 2018 1:10 pm

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

Sat Apr 07, 2018 11:22 am

rwl4 wrote:
Fri Apr 06, 2018 3:14 pm
I've been having an issue connecting any of my cameras to my B101. They all end up looking like the picture in the screenshot. I can see movement in the video, but it's heavily distorted.

My current setup is: Sony FDR-X3000 -> B101 rev 4 -> Raspberry Pi 3 B+.

I also tried with a Raspberry Pi 3 with the same result.

I've been scouring this thread for an answer and haven't seen this particular issue addressed.

Any ideas? Thank you!

b101_distortion.jpg

Looks like 1080p to me, what command you use? I Have B101 rev 4 -> Raspberry Pi 3 B+ too and only managed to get 720 with it so far, here are 15 pages of what to try...

- Did you try https://www.linux-projects.org/2017/07/ ... -tc358743/ ?
- Did you manage to wire it properly? Otherize it seems to work (if it ever works) only once then you need to restart

ialpert
Posts: 16
Joined: Fri Mar 30, 2018 1:10 pm

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

Sat Apr 07, 2018 11:19 pm

This

Code: Select all

'a020d3'|'a02082'|'a22082')
echo "Raspberry Pi3"
# https://www.raspberrypi.org/forums/viewtopic.php?f=38&t=120702&start=100
# "Direct i2c1 to GPIO44&45."
# Pins 44&45 Alt1=i2c0, alt2=i2c1
# i2c0 can be on pins 0 and 1, so make sure they are not set to alt0
gpio -g mode 0 in
gpio -g mode 1 in
# i2c1 can be on pins 0 and 1, so make sure they are not set to alt0
gpio -g mode 2 in
gpio -g mode 3 in
gpio -g mode 28 in
gpio -g mode 29 in
# i2c on these pins
gpio -g mode 44 in
gpio -g mode 44 alt1
gpio -g mode 45 in
gpio -g mode 45 alt1
#shutdown
# you need this one: https://github.com/6by9/rpi3-gpiovirtbuf
#gpio -g write 41 1
./rpi3-gpiovirtbuf s 133 1
#LED
#gpio -g write 32 1
i2cdetect -y 0
;;
Has nothing to do with hardware reset for B101, right? Is it for device communication? There are... 40pins so 133, even 44 is a bit out of range.
Image

I'm able to get a 720p picture from both raspivid and raspi_tc358743 but I'm not able to upload EDID

Code: Select all

CEA-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

CEA-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
VIDIOC_S_EDID: failed: Inappropriate ioctl for device


I know, Dave, you said the driver is going to .be merged in a couple of weeks, but maybe there is a change I can build a kernel for 3B+?

ialpert
Posts: 16
Joined: Fri Mar 30, 2018 1:10 pm

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

Wed Apr 11, 2018 12:43 pm

I bought Compute Module 3 (CM3) to try more options and was able to compile the kernel, however dmesg reports:

Code: Select all

[ 3959.778053] tc358743 4-000f: i2c_rd: reading register 0x14 from 0xf failed
[ 3960.784012] tc358743 4-000f: i2c_rd: reading register 0x14 from 0xf failed
[ 3960.818080] tc358743 4-000f: i2c_rd: reading register 0x14 from 0xf failed
[ 3961.824030] tc358743 4-000f: i2c_rd: reading register 0x14 from 0xf failed
[ 3961.858099] tc358743 4-000f: i2c_rd: reading register 0x14 from 0xf failed
[ 3962.864044] tc358743 4-000f: i2c_rd: reading register 0x14 from 0xf failed
[ 3962.898110] tc358743 4-000f: i2c_rd: reading register 0x14 from 0xf failed
[ 3963.904053] tc358743 4-000f: i2c_rd: reading register 0x14 from 0xf failed
[ 3963.938120] tc358743 4-000f: i2c_rd: reading register 0x14 from 0xf failed
[ 3964.944075] tc358743 4-000f: i2c_rd: reading register 0x14 from 0xf failed
[ 3964.978144] tc358743 4-000f: i2c_rd: reading register 0x14 from 0xf failed
[ 3965.984196] tc358743 4-000f: i2c_rd: reading register 0x14 from 0xf failed
[ 3966.018262] tc358743 4-000f: i2c_rd: reading register 0x14 from 0xf failed
[ 3967.024115] tc358743 4-000f: i2c_rd: reading register 0x14 from 0xf failed
[ 3967.058201] tc358743 4-000f: i2c_rd: reading register 0x14 from 0xf failed
Are those missing wiring from the B102 board to IO? Or it is internal wiring that is mentioned here:

https://www.raspberrypi.org/documentati ... -camera.md


Thank you in advance

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5536
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 Apr 11, 2018 1:48 pm

Sorry, the simple answer is that I'm working on getting this all merged at present, and diverting from that effort to try and aid individuals will just slow that process down.

wrt Compute Modules, yes you'll need links on the CMIO, and are likely to need to add your own device tree config (Linux not firmware) in order to get it to correctly talk to the device.
The error message you are seeing just means that it isn't getting an ACK back on the I2C transaction as the device isn't connected as it expects. It's actually a bug in the TC358743 driver that allows it to work at all - the probe message happens to return 0 as the correct value, and the error code is also 0.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

ialpert
Posts: 16
Joined: Fri Mar 30, 2018 1:10 pm

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

Mon Apr 16, 2018 2:10 pm

I finally got something running on RPI 3 (old model) -- no wires used for GPIO only routing from ./camera_i2c

Using GStreamer and yavta

Code: Select all


yavta -f UYVY  -n 3   --encode-to=-  -m -T /dev/video0  -R   --capture    |	gst-launch-1.0  fdsrc	! h264parse 	! rtph264pay config-interval=1 pt=96	! gdppay		! tcpserversink host=0.0.0.0 port=5000

# 	It seems with Yavta this is not needed? 264 goes as is
#	! omxh264dec                                                \
#	! omxh264enc  control-rate=variable target-bitrate=800000   \

and

Code: Select all

gst-launch-1.0 -v tcpclientsrc host=192.168.1.149 port=5000  ! gdpdepay !  rtph264depay ! decodebin ! videoconvert ! osxvideosink sync=false
to recive it on mac


I'm working with Roku and it only works with 720p, I had to set resolution manually there.

Questions:

0. Is there a way to edit EDID data and try to force 1080p30 (not 50 or 60) or 720p60? so the device will know that 1080 is simply not possible. It works perfectly with a computer when I set 1080p 25 or 30Gz

1. Is there a way to capture with same results but without yavta? Meaning right from GStreamer, maybe v4l2src? I seem to be able to run pipeline but can't decode it on the client. There is no need for OMX encoding, yavta already encoded video data with hardware acceleration, right?

I don't know if it is related but performance downgrades over time, it works perfectly for a few minutes and then getting worse. Still, CPUs are around ~15% and it seems to be enough memory for everything. GPU memory is set to 128

2. Is it hard to implement dynamic resolution change in yavta? when I switch from UI to video or back I got the full blue (sometimes black) screen and have to restart everything



Thank you!

Return to “Graphics, sound and multimedia”

Who is online

Users browsing this forum: No registered users and 7 guests