samir_sogay
Posts: 17
Joined: Tue Jun 18, 2013 9:05 am

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

Mon Mar 28, 2016 3:52 pm

This past couple of weeks I have been experimenting with the TC to find out ways to edit the EDID to support resolutions upto 1080p25 but after using raspi_tc358743.c (after making changes in config.txt), raspivid never works (throws different different errors) and raspi_tc358743.c does work but video keeps on flickering (maybe monitor is 50Hz or video source is 50Hz). Just yesterday I did a fresh install of Jessie and hooked up a camera and it works. I can run raspivid any number of times. The whole time I was experimenting with another RPi as source and it never worked properly. Probably RPi (as source) HDMI signal doesn't break cleanly, I have to shut down Pi and reconnect it to make it work. Another thing is that as soon as I add dtparam=i2c1=on, dtparam=i2c_arm=on and dtparam=i2c_vc=on in config.txt, raspi_tc358743.c works but raspivid stops working. I have to find a way for raspivid and raspi_tc358743.c to work together so that via raspi_tc358743.c I can enforce EDID and then run raspivid. Any suggestions.
@6by9 Is there any parameter in raspi_tc358743.c which sets the frame rate to 60. I couldn't find any.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7929
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 Mar 28, 2016 10:24 pm

samir_sogay wrote:This past couple of weeks I have been experimenting with the TC to find out ways to edit the EDID to support resolutions upto 1080p25 but after using raspi_tc358743.c (after making changes in config.txt), raspivid never works (throws different different errors) and raspi_tc358743.c does work but video keeps on flickering (maybe monitor is 50Hz or video source is 50Hz). Just yesterday I did a fresh install of Jessie and hooked up a camera and it works. I can run raspivid any number of times. The whole time I was experimenting with another RPi as source and it never worked properly. Probably RPi (as source) HDMI signal doesn't break cleanly, I have to shut down Pi and reconnect it to make it work. Another thing is that as soon as I add dtparam=i2c1=on, dtparam=i2c_arm=on and dtparam=i2c_vc=on in config.txt, raspi_tc358743.c works but raspivid stops working. I have to find a way for raspivid and raspi_tc358743.c to work together so that via raspi_tc358743.c I can enforce EDID and then run raspivid. Any suggestions.
@6by9 Is there any parameter in raspi_tc358743.c which sets the frame rate to 60. I couldn't find any.
Using a Pi as a source is not the best plan. The Pi normally only reads the EDID info on boot, so if you're fiddling with it then you'll need to be rebooting your source Pi regularly (you can get it to reread using tvservice, but that's another story).
The EDID also needs to be programmed into the TC358743 BEFORE booting the source Pi (ie raspi_tc358743 already run).
Use a Bluray player or similar that supports HDMI hotplug fully.

Flickering sounds like the renderer may be trying to display the metadata buffers. What firmware are you running? I don't think all of my changes have been pushed, so you really need to be using my test firmware. I've got a couple more changes to get pushed so I'll look to getting everything merged into the main releases to make that easier.

Mixing and matching raspivid and raspi_tc358743 is going to cause issues. You don't state which revision of Pi you have - the GPIO setup varies.
For raspi_tc358743 you need to enable i2c_vc=on within config.txt - no other settings should be required. That does not set the pinmuxing correctly which is what the camera_i2c script was fixing. (There is now a device tree overlay available that alters the default pin muxing, so adding "dtoverlay=i2c0-bcm2708,sda0_pin=28,scl0_pin=29" to config.txt means that i2c0 is muxed to the correct pins for a Pi B+ or Pi2. raspivid will still undo that setup though).

raspivid will always fully reprogram the TC358743 when run, and that includes the EDID. If you want to work on altering the EDID, use solely raspi_tc358743.

I think you're confused on what sets the framerate. The source reads the EDID that the chip advertises and chooses the mode from that that it likes best and will run with it. There is nothing within the Pi code that will change that framerate or resolution. Also please note my previous comments that 1080P60 is not going to work as it exceeds the bandwidth available down the 2 lane CSI2 bus. 720P60 should be possible.
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.

samir_sogay
Posts: 17
Joined: Tue Jun 18, 2013 9:05 am

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

Wed Mar 30, 2016 4:50 pm

Thanks for your inputs. I have restarted my experiments with the parameters you mentioned. I am using your test firmware with RPi 2.
Below is the video taken when Toshiba connected to a Camera and raspi_tc358743 run
https://dl.dropboxusercontent.com/u/922 ... efault.mp4

Below is the video taken when Toshiba connected to a Camera and raspi_tc358743 (compiled with #define WIDTH 1920, #define HEIGHT 1080) run
https://dl.dropboxusercontent.com/u/922 ... 0frame.mp4

Below is the video taken when Toshiba connected to a Camera and raspi_tc358743 (compiled with #define WIDTH 1920, #define HEIGHT 1080 and modified EDID advertising Native resolution as 1080p25) run. The output hangs for some reason within seconds needing a reboot but it does alter the source resolution
https://dl.dropboxusercontent.com/u/922 ... 25EDID.mp4

After removing the parameters in config.txt
Below is the video taken with raspivid with connected RPi with hdmi_group=1, hdmi_mode=33 1080p25 resolution and it works perfectly.(h264 converted to mp4 after trimming)
https://dl.dropboxusercontent.com/u/922 ... 080p25.mp4

Below is the video taken with raspivid with connected RPi with hdmi_group=1, hdmi_mode=34 1080p30 resolution and video is distorted.(h264 converted to mp4 after trimming)

Below is the EDID obtained on source RPi after connecting the Toshiba and running raspi_tc358743 (default)
https://dl.dropboxusercontent.com/u/922 ... y9EDID.dat

Below is the EDID obtained on source RPi after connecting the Toshiba and running raspi_tc358743 with EDID edited to support 1080p25
https://dl.dropboxusercontent.com/u/922 ... 25EDID.dat

What I can infer from these tests is that Toshiba can handle max 1080p25 with RPi and that the modified EDID does alter the source resolution. Is there a way to have an App that would be a mashup of raspivid i.e. video recording with the various options and raspi_tc358743 which would set the EDID to 1080p25?

Also, is there any reason why my RPi 2 has only 120mb RAM? GPU RAM is 128MB. Is it because of the test firmware?

MaximilianBrunner
Posts: 7
Joined: Thu Feb 04, 2016 9:42 pm

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

Wed Apr 06, 2016 7:01 am

Hello samir_sogay,
try using MMAL_ENCODING_BGR24 instead of MMAL_ENCODING_I420 in line 730. This should solve your color issues.
Hope I could help
Max

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7929
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 06, 2016 9:34 am

MaximilianBrunner wrote:Hello samir_sogay,
try using MMAL_ENCODING_BGR24 instead of MMAL_ENCODING_I420 in line 730. This should solve your color issues.
Hope I could help
Max
Sorry, that sounds like my bad. I updated raspi_tc358743.c on my branch as noted here, but still haven't pushed the firmware update to Pi Towers or my RPiTest repo. I'm not sure why the image is flickering quite that badly - I'll have a look, but hopefully updating the firmware will solve that anyway.
I'll try to get the firmware changes pushed both ways tonight, but otherwise reverting the top change on the userland tree ("244121c raspi_tc358743: Add in ISP component to convert from RGB to I420") should get back to the old scheme with RGB24 going from rawcam to video_render.

Re 128MB RAM: My test firmwares don't have all the fixups that the official releases do. To produce those requires making 3 firmware builds and running magic scripts over them to calculate offsets and things. That's why my builds really are only for test purposes :)
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: 7929
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 Apr 08, 2016 7:54 pm

Magic done and "sudo rpi-update" should get the fix for the ISP component converting RGB888 to I420 - I'm in the process of testing that out on a Pi2 with the TC358743 and my latest version of raspi_tc358743.c

I'm not pushing my hacked version of video_render that ignores the the codec side info signified frames as it's not nice and not really necessary (you could filter it in the app, but I didn't complete that code path).

As it's come via the official route you should get the correct amount of memory, and allow you to use gpu_mem in config.txt to set the amount assigned to the GPU.

edit: I've also cleaned my RPiTest repo to remove the now redundant firmware images.
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.

Y3S
Posts: 2
Joined: Mon Apr 18, 2016 10:14 am

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

Mon Apr 18, 2016 10:29 am

Last weekend I successfully got the raspi_tc358743 running but I wonder now whether it is (or will be) possible to create a H264 stream instead of displaying the HDMI input directly on the screen?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7929
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 Apr 18, 2016 1:14 pm

Y3S wrote:Last weekend I successfully got the raspi_tc358743 running but I wonder now whether it is (or will be) possible to create a H264 stream instead of displaying the HDMI input directly on the screen?
viewtopic.php?f=38&t=120702&start=50#p932523
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.

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

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

Mon Apr 18, 2016 9:39 pm

I didn't get any notification emails about new posts here so i had no idea there has been relatively lots of chatter!

I've got my head back into this project and have been printing out timestamps at the point of capture (with raspivid) - some interesting results, i'll post more tomorrow.

I'm wondering though if there's something clear that i'm missing: I'm trying to use a windows 10 machine as the hdmi source for the tosh, but about 70% of the time i can't get the tosh recognised as a display, and can't figure out the pattern to making it work - when it does work, i don't seem to have done anything obvious. Any ideas? I've tried rebooting both machines, pulling power out the pi, etc.

EDIT: using another pi as the hdmi source works every time. Still can't get a mac or windows machine to work reliably (yet).

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

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

Fri Apr 22, 2016 2:01 pm

EDIT: i thought issue from original post below was taken care of, but the program only works when i write 0x0000 to 0x0004 before calling it.

MORE EDIT: is the edid still advertising 1080p30~ ? Some devices i think are still defaulting to 1080p~. Also I just tried using my ps4 as source, and then a sony DVD player (neither with hdcp turned on) but all i see on both raspivid and raspi_tc358743 is a black screen. Using another pi as source works. Am i missing something? I think this may be a negotiation problem as rebooting my ps4 outputs data but it's all messed up as seen here, the thing is i've memorised key strokes to change the resolution and reboot the pi incase it was necessary, but the changes at the source are not being updated, and it's confirmed by the tosh saying it's seeing 1080p (0x8521).

Similar to my post above, i'm starting to think there's some issues with negotiation and the edid if it's still advertising 1080p, since the ps4 defaults to it when plugged into the tosh.

ORIGINAL POST:
Just installed a fresh copy of raspbian, bumped to 4.4 and installed 6by9's app. calling 'raspi_tc358743' with camera_i2c as:

Code: Select all

gpio -g mode 0 in
gpio -g mode 1 in
gpio -g mode 0 in
gpio -g mode 0 alt0
gpio -g mode 1 in
gpio -g mode 1 alt0
#shutdown
gpio -g write 5 1
#LED
gpio -g write 21 1
(i'm on a pi1) prints:

Code: Select all

mmal: Set pack to 0, unpack to 0
mmal: Set rx_timing
mmal: Enable rawcam....
mmal: output p_fmt_commit...
mmal: buffer size is 2764800 bytes, num 8
mmal: Create connection....
mmal: Create connection....
mmal: Enable connection...
mmal: buffer size is 2764800 bytes, num 8
mmal: Enable connection...
mmal: buffer size is 1382400 bytes, num 1
mmal: All done. Start streaming...
mmal: View!
mmal: Stopping streaming...
The only problem is, nothing is showing on my pi's output. Am i doing something stupid?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7929
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 Apr 22, 2016 4:44 pm

Orbital6 wrote:EDIT: i thought issue from original post below was taken care of, but the program only works when i write 0x0000 to 0x0004 before calling it.

MORE EDIT: is the edid still advertising 1080p30~ ? Some devices i think are still defaulting to 1080p~. Also I just tried using my ps4 as source, and then a sony DVD player (neither with hdcp turned on) but all i see on both raspivid and raspi_tc358743 is a black screen. Using another pi as source works. Am i missing something? I think this may be a negotiation problem as rebooting my ps4 outputs data but it's all messed up as seen here, the thing is i've memorised key strokes to change the resolution and reboot the pi incase it was necessary, but the changes at the source are not being updated, and it's confirmed by the tosh saying it's seeing 1080p (0x8521).

Similar to my post above, i'm starting to think there's some issues with negotiation and the edid if it's still advertising 1080p, since the ps4 defaults to it when plugged into the tosh.
Yes, I think the EDID is advertising multiple resolutions - viewtopic.php?f=38&t=120702&start=25#p892609

Code: Select all

HDMI:EDID found CEA format: code 4, 1280x720p @ 60Hz (native)
HDMI:EDID found CEA format: code 19, 1280x720p @ 50Hz
HDMI:EDID found CEA format: code 3, 720x480p @ 60Hz
HDMI:EDID found CEA format: code 2, 720x480p @ 60Hz
HDMI:EDID found CEA format: code 7, 1440x480i @ 60Hz
HDMI:EDID found CEA format: code 6, 1440x480i @ 60Hz
HDMI:EDID found CEA format: code 1, 640x480p @ 60Hz
That doesn't include 1080P though :?
What's meant to happen is that the EDID is downloaded to the 358743 and it is then commanded to pulse the hotplug line so the source rereads the EDID and switches resolution appropriately. Whether the source does or not is a different question - I certainly see my TV resync when hotplug is pulsed (I've got sources plugged into a Yamaha receiver, output into a splitter that feeds both the 358743 and my Sony TV)
Orbital6 wrote:ORIGINAL POST:
Just installed a fresh copy of raspbian, bumped to 4.4 and installed 6by9's app. calling 'raspi_tc358743' with camera_i2c as:

Code: Select all

gpio -g mode 0 in
gpio -g mode 1 in
gpio -g mode 0 in
gpio -g mode 0 alt0
gpio -g mode 1 in
gpio -g mode 1 alt0
#shutdown
gpio -g write 5 1
#LED
gpio -g write 21 1
(i'm on a pi1) prints:

Code: Select all

mmal: Set pack to 0, unpack to 0
mmal: Set rx_timing
mmal: Enable rawcam....
mmal: output p_fmt_commit...
mmal: buffer size is 2764800 bytes, num 8
mmal: Create connection....
mmal: Create connection....
mmal: Enable connection...
mmal: buffer size is 2764800 bytes, num 8
mmal: Enable connection...
mmal: buffer size is 1382400 bytes, num 1
mmal: All done. Start streaming...
mmal: View!
mmal: Stopping streaming...
The only problem is, nothing is showing on my pi's output. Am i doing something stupid?
Possibly not - I did add the ISP component into the mix on my tree. Please try reverting the top change on userland - "raspi_tc358743: Add in ISP component to convert from RGB to I420". Whether that will then play nicely with top of tree firmwares is another question (otherwise we need some other mechanism for not forwarding the CODEC_SIDEINFO buffers to video_render).
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.

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

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

Fri Apr 22, 2016 5:21 pm

6by9 wrote:Yes, I think the EDID is advertising multiple resolutions - viewtopic.php?f=38&t=120702&start=25#p892609

Code: Select all

HDMI:EDID found CEA format: code 4, 1280x720p @ 60Hz (native)
HDMI:EDID found CEA format: code 19, 1280x720p @ 50Hz
HDMI:EDID found CEA format: code 3, 720x480p @ 60Hz
HDMI:EDID found CEA format: code 2, 720x480p @ 60Hz
HDMI:EDID found CEA format: code 7, 1440x480i @ 60Hz
HDMI:EDID found CEA format: code 6, 1440x480i @ 60Hz
HDMI:EDID found CEA format: code 1, 640x480p @ 60Hz
That doesn't include 1080P though :?
What's meant to happen is that the EDID is downloaded to the 358743 and it is then commanded to pulse the hotplug line so the source rereads the EDID and switches resolution appropriately. Whether the source does or not is a different question - I certainly see my TV resync when hotplug is pulsed (I've got sources plugged into a Yamaha receiver, output into a splitter that feeds both the 358743 and my Sony TV)
Then i am very confused. I would be less confused if i knew why the tosh was recognised by windows a few times then never again, and why the ps4 worked (i sent you the screenshot about 3 months ago) and now i get the artifacts shown in the link above.

In your opinion does this sound like issues relating to the tosh or would these be purely source issues? I still can't get this dvd player to work (just a black output) even though it's not got hdcp.

Windows and ps4 working few times then never again confuses the hell out of me.

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

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

Sun Apr 24, 2016 4:24 pm

6by9 wrote: What's meant to happen is that the EDID is downloaded to the 358743
Does this happen at boot time for the tosh? Or do i need to run something special for the edid to be present?
6by9 wrote: and it is then commanded to pulse the hotplug line so the source rereads the EDID and switches resolution appropriately.
...
I certainly see my TV resync when hotplug is pulsed
Does this happen automatically at boot time for the tosh? I have a feeling this isn't happening in certain states since i just can't seem to get many sources to recognise the tosh.

6by9 wrote: (I've got sources plugged into a Yamaha receiver, output into a splitter that feeds both the 358743 and my Sony TV)
I'm keen on getting a splitter, which one are you using?

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

Sun Apr 24, 2016 6:42 pm

Orbital6 wrote:
6by9 wrote: What's meant to happen is that the EDID is downloaded to the 358743
Does this happen at boot time for the tosh? Or do i need to run something special for the edid to be present?
https://github.com/6by9/userland/blob/h ... 743.c#L426
Orbital6 wrote:
6by9 wrote: and it is then commanded to pulse the hotplug line so the source rereads the EDID and switches resolution appropriately.
...
I certainly see my TV resync when hotplug is pulsed
Does this happen automatically at boot time for the tosh? I have a feeling this isn't happening in certain states since i just can't seem to get many sources to recognise the tosh.
https://github.com/6by9/userland/blob/h ... 743.c#L318
HPD = Hot Plug Detect
This is actually a mild annoyance as HPD being pulsed on every run of raspi_tc358743 forces my devices to resync every time, and it means the Tosh isn't provided with an EDID until first run.
I'm still plodding along with V4L2, and that should be better as the TC358743 driver will be loaded at kernel boot and configure the Tosh (although I still haven't worked through what the default EDID is), and it never fully reiniitialises again until next kernel reboot (or module reload).
Orbital6 wrote:
6by9 wrote: (I've got sources plugged into a Yamaha receiver, output into a splitter that feeds both the 358743 and my Sony TV)
I'm keen on getting a splitter, which one are you using?
The finest Ebay could buy. http://www.ebay.co.uk/itm/2-Output-1-In ... 0781902431 (other vendors are available)
It does the trick for being able to see what the Tosh is getting, but I haven't worked through whether it merges EDIDs from the 2 devices or selects one, and I haven't fully studied the behaviour on CEC and ARC.
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.

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

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

Mon Apr 25, 2016 12:42 pm

6by9 wrote: https://github.com/6by9/userland/blob/h ... 743.c#L426
...
This is actually a mild annoyance as HPD being pulsed on every run of raspi_tc358743 forces my devices to resync every time, and it means the Tosh isn't provided with an EDID until first run.
...
I'm still plodding along with V4L2, and that should be better as the TC358743 driver will be loaded at kernel boot and configure the Tosh
So does the source (in this instance, a windows machine) not see a 'second monitor' ('toshiba-h2c' under display settings) until the EDID is uploaded to the tosh?

I'm making the assumption that there is activity on HPD after the EDID uploaded?

I'm starting to wonder if the specific hardware (hotplug detect) I have is crapping out, I'll probably try a reflow this time next week if i can't make any progress.
6by9 wrote: (although I still haven't worked through what the default EDID is)
...

Code: Select all

HDMI:EDID found CEA format: code 4, 1280x720p @ 60Hz (native)
HDMI:EDID found CEA format: code 19, 1280x720p @ 50Hz
HDMI:EDID found CEA format: code 3, 720x480p @ 60Hz
HDMI:EDID found CEA format: code 2, 720x480p @ 60Hz
HDMI:EDID found CEA format: code 7, 1440x480i @ 60Hz
HDMI:EDID found CEA format: code 6, 1440x480i @ 60Hz
HDMI:EDID found CEA format: code 1, 640x480p @ 60Hz
That list you wrote - is that what you need confirming by analysing the EDID? If that list is confirmed then what is the current issue with the EDID? I am keen on getting my hands dirty though i may need pointing in the right direction, (I am aware of Samir's progress a page or two ago).
6by9 wrote: The finest Ebay could buy. http://www.ebay.co.uk/itm/2-Output-1-In ... 0781902431
It does the trick for being able to see what the Tosh is getting, but I haven't worked through whether it merges EDIDs from the 2 devices or selects one, and I haven't fully studied the behaviour on CEC and ARC.
Thanks very much, ordered it last night. Should be interesting if this fixes the 'invisible output' issue i'm having.

MaximilianBrunner
Posts: 7
Joined: Thu Feb 04, 2016 9:42 pm

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

Tue Apr 26, 2016 3:27 pm

I attached the EDID info as my Mac sees it.
Toshiba-H2C.txt.zip
(2.74 KiB) Downloaded 271 times
It is the same for raspivid & raps_tc258743. This is why 6by9 called it TOSHH2C_DAFAULT_EDID?
I can successfully manipulate it and make my source adapt to it.
Now I just have learn how to use the CSI2-stream it with MMAL or OpneMax.
Is it possible to get interlaced input to work with this technologies? Can someon point me in the right direction for doing this?
Sorry for asking to many questions but what is that rawcam MMAL component or how dose it differ from the camera component? Do we have the code for that?

Thanks, Max.

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

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

Tue Apr 26, 2016 3:51 pm

MaximilianBrunner wrote:I attached the EDID info as my Mac sees it.
Toshiba-H2C.txt.zip
It is the same for raspivid & raps_tc258743.
Thank you Max,

May i ask, is your Mac seeing the toshiba output as a monitor 'Toshiba-H2C' as soon as you plug the hdmi cable into the mac?

i.e. Do you turn on your RPi with toshiba unit attached, attach hdmi cable from toshiba unit to macbook and bam, your mac see's the second output monitor?

I ask this because i was speaking to Vade, and he said this was not the case.

MaximilianBrunner
Posts: 7
Joined: Thu Feb 04, 2016 9:42 pm

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

Tue Apr 26, 2016 6:11 pm

May i ask, is your Mac seeing the toshiba output as a monitor 'Toshiba-H2C' as soon as you plug the hdmi cable into the mac?
I have to run the program once to get it recognized as a display. But form there on out it works. I can even turn off the Pi, as long there is power to the Pi it gets recognized.

When I turn off the power to the Pi have to run the program again, so no permanent memory on my Auvidea board.
So yes it just works even through my chain of adapters (MiniDisplay -> DVI -> HDMI)

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

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

Tue Apr 26, 2016 6:36 pm

MaximilianBrunner wrote: I have to run the program once to get it recognized as a display.
Do you mean, you plug in your mac to the toshiba board, and the mac can't see the toshiba board as an output until you run raspivid? How can you run raspivid if your source (mac) can't see the toshiba board? when i try exactly this setup i just get:

Code: Select all

mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates


MaximilianBrunner
Posts: 7
Joined: Thu Feb 04, 2016 9:42 pm

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

Tue Apr 26, 2016 7:03 pm

I had the same problem with a Canon camera but i didn't get the chance jet to test it with the new raspi_tc358743 program. 6by9's program uses an other mmal source component to access the CSI2 stream.

The error you posted is the same as if no source is plugged in.
I thought my camera just could not handle any resolution advertised by the EDID (no 1080i) refusing to output at all but that would be very unusual for a PC.

Sorry for being unable to help you any further. For now I can just guide you back to the basics:
+ edit your dtparam in /boot/config.txt <--- a good source of error for raspivid & raspi_tc358743
+ pin setup according to you Pi model
+ GPU memory 128MB minimum.
+ enable camera interface
Last edited by MaximilianBrunner on Wed Apr 27, 2016 4:17 pm, edited 2 times in total.

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

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

Tue Apr 26, 2016 7:36 pm

MaximilianBrunner wrote:I had the same problem with a Canon camera but i didn't get the chance jet to test it with the new raspi_tc358743 program jet. 6by9's program uses an other mmal source component to access the CSI2 stream.

The error you posted is the same as if no source is plugged in.
I thought my camera just could not handle any resolution advertised by the EDID (no 1080i) refusing to output at all but that would be very unusual for a PC.
But i'm trying to re-create your setup with a mac as a source. When i run raspivid i get that output, and nothing is output (though log doesn't show any errors) with 6by9's app. So i was asking you, when you plugged in your mac and it was not recognising the toshiba board, did you just run 6by9's app with no video output, with a 2nd + run that worked from then on?

I have a nice helper script i wrote that can dump the EDID on the tosh, i can see what's on there at first boot (an EDID i haven't decoded) and what's there after first run of raspivid (correct EDID minus the first byte at 0x8c00 is 86 instead of 20). I'm starting to wonder if the B100 board has a design / hardware fault.

MaximilianBrunner
Posts: 7
Joined: Thu Feb 04, 2016 9:42 pm

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

Wed Apr 27, 2016 4:01 pm

I have a nice helper script i wrote that can dump the EDID on the tosh, i can see what's on there at first boot (an EDID i haven't decoded) and what's there after first run of raspivid (correct EDID minus the first byte at 0x8c00 is 86 instead of 20).
My B101 board has the same last-byte error but I think it might be a software issue.

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

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

Wed Apr 27, 2016 4:23 pm

MaximilianBrunner wrote:
But i'm trying to re-create your setup with a mac as a source. When i run raspivid i get that output, and nothing is output (though log doesn't show any errors) with 6by9's app.
Dose it run through until it says "View!" or dose it get stuck in-between?
Yeah, with 6by9's app it gets to view and closes but nothing changes. I'm using the b100 not the b101 so i'm trying to find out if this is an issue with the b100.

If you're telling me the following is correct then i'm sure it's the b100:
A ) you have a b101;
B ) you plug b101 to your mac;
C ) everything is turned on and mac does NOT recognise another monitor output
D ) you run 6by9's app and it gets to view and finishes;
E ) THEN your mac see's an output;
F ) you run 6by9's app again and the video shows.

I can do that up to step E. doing that using raspivid instead of 6by9's app fails at step D.
MaximilianBrunner wrote:
I have a nice helper script i wrote that can dump the EDID on the tosh, i can see what's on there at first boot (an EDID i haven't decoded) and what's there after first run of raspivid (correct EDID minus the first byte at 0x8c00 is 86 instead of 20).
My B101 board has the same last-byte error but I think it might be a software issue.
It may well be intended. your dump decoded the edid ok so i guess it's nothing to worry about.

MaximilianBrunner
Posts: 7
Joined: Thu Feb 04, 2016 9:42 pm

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

Tue May 03, 2016 3:10 pm

If you're telling me the following is correct then i'm sure it's the b100:
A ) you have a b101;
B ) you plug b101 to your mac;
C ) everything is turned on and mac does NOT recognise another monitor output
D ) you run 6by9's app and it gets to view and finishes;
E ) THEN your mac see's an output;
F ) you run 6by9's app again and the video shows.
Steps A, B and C are correct but my mac sees an output in step D already and the screen is shown on the Pi in the resolution requested by the EDID.
If I let raspi_tc358743, raspivid or raspiyuv run till the end the output disappears on the mac again. But if i cancel raspi_tc358743 while its running with ctrl + C, the output stays until one program runs through or the power is disconnected.

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

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

Tue May 03, 2016 7:19 pm

MaximilianBrunner wrote: Steps A, B and C are correct but my mac sees an output in step D already and the screen is shown on the Pi in the resolution requested by the EDID.
If I let raspi_tc358743, raspivid or raspiyuv run till the end the output disappears on the mac again. But if i cancel raspi_tc358743 while its running with ctrl + C, the output stays until one program runs through or the power is disconnected.
Thanks for your response Maximilian, I do appreciate the help. I found out that the B100 in particular had an issue with the board itself, and i have since fixed the issue. Thanks again for the assistance, i am now seeing the correct behaviour at last!

Return to “Graphics, sound and multimedia”