idcidc
Posts: 31
Joined: Thu Jul 09, 2020 7:44 pm

Re: [UPDATED, SOLVED] Why "cheap" Chinese HDMI-to-CSI2 adapters (e.g.18810-1 C779) doesn't provide I2S sound

Sun Aug 09, 2020 4:07 pm

idcidc wrote:
Sat Aug 08, 2020 6:39 am
Any ideas WHY?
I mean how do you think what is detection of TMDS depends on?
It is very difficult to find black cat in dark room, especially if there is no cat there :)
I've carefully examined TMDS signal from camcorder and was very surprised: on C779 camera doesn't send any video until EDID is loaded via v4l2-ctl, while on B100 it starts immediately, even if Raspberry PI not booted.
The next thing I've found that B100 has activities on DDC SCL and SDA caused by camcorder, as it should be according to HDMI manual, immediately after B100's power-up, while C779 does not.

So it looks like there is some problem on C779 with HPDI/HPDO signal processing, will dig deeper...:)

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

Re: [UPDATED, SOLVED] Why "cheap" Chinese HDMI-to-CSI2 adapters (e.g.18810-1 C779) doesn't provide I2S sound

Sun Aug 09, 2020 4:19 pm

No, I wouldn't expect either board to have a baked in edid of any form to send without client intervention.
If the b100 is doing so then Auvidea have done something odd. It possibly hadn't been through a full power cycle to make it forget the edid from a previous run.
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.

idcidc
Posts: 31
Joined: Thu Jul 09, 2020 7:44 pm

Re: [UPDATED, SOLVED] Why "cheap" Chinese HDMI-to-CSI2 adapters (e.g.18810-1 C779) doesn't provide I2S sound

Sun Aug 09, 2020 4:25 pm

As I didn't find any EEPROM on B100, I think it provides no correct EDID after power-on, but as I see DDC activity and TMDS just after this activity I assume that just correct HDMI hot-plug sequence is done: camera sees 5V on DET and starts DDC, and then starts transmitting video via TMDS.

I'll check more deep HPDO/HPDI activity on both boards and then will report.

idcidc
Posts: 31
Joined: Thu Jul 09, 2020 7:44 pm

Re: [UPDATED, SOLVED] Why "cheap" Chinese HDMI-to-CSI2 adapters (e.g.18810-1 C779) doesn't provide I2S sound

Mon Aug 10, 2020 11:08 am

GREAT NEWS!
All works!:)
Auvidea in B100 made some "tweak" in HPDO/HPDI processing which 1)Makes HPDO/DET signal pulled-up to 5V (while TC358743 itself is able to output only 3.3V on HPDO)-this causes stable hotplug while using with laptops etc. C779 provides only "standard" 3V3, which sometimes cause HDMI source doesn't see the board and prevent from starting DDC.
2)DET signal generated by B100 board appears immediately (with small delay) after B100 is powered-up, while C779 enables it's HPDO only if (and after) EDID is loaded. If EDID is purged using v4l2-ctl --clear-edid C779 turns off HPDO even if HPDI (POWER 5V) is active (high).

So unsolved (for C779) problem is insufficient level of DET/HPDO, while it's behavior with HPDO/HPDI is more correct (as for me) than B100.

The problem with "semi-permanent" DET active with no EDID loaded for B100 is in fact that many HDMI sources read EDID from HDMI sink devices like B100 immediately after DET arises and if no correct EDID is provided (as TC358743 is not initialized yet) they will not start TMDS transmission and do mark device as faulty and will not perform attempts to read EDID until DET's lost.
So to make my laptop to see B100 as external HDMI monitor I had to
1. Interconnect everything:)
2. Power up RPI with attached B100.
3. Laptop immediately sees DET and tries to read DDC. This attempt fails and no monitor appeared in Windows' device manager.
4. I've loaded EDID to B100
5. Windows didn't reinitialize it's HDMI OUTPUT, as it assumes that faulty device with no EDID os connected (see step 3)
6. I physically RE-ATTACH HDMI, laptop sees loss of DET and restarts DDC, which successfully finishes, as EDID is already loaded.
7. Now Windows see external HDMI monitor and can output there.

Great thanks to 6by9 for significant help!

Brief conclusion:
C779 may be used after some hardware "patching" while B100 works "out-of-box".

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

Re: [UPDATED, SOLVED] Why "cheap" Chinese HDMI-to-CSI2 adapters (e.g.18810-1 C779) doesn't provide I2S sound

Mon Aug 10, 2020 12:30 pm

Implementation of HPD is down to the board designers. I would have expected it to generally follow the Toshiba reference design, although my datasheet doesn't include such a thing for HPDo/HPDi. It does list both as being 5V tolerant, which is a good thing.

The kernel driver does pulse the HPD line whenever the EDID is changed to tell the source to reinitialise. I haven't studied the HDMI spec closely enough to know the expected state machine to handle such cases. My laptop (Ubuntu x86) certainly always seems to reinitialise when I download a new EDID.

Seeing as this is 3rd party hardware and a mainline Linux driver, my time/effort to get it working is somewhat limited.
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.

idcidc
Posts: 31
Joined: Thu Jul 09, 2020 7:44 pm

Re: [UPDATED, SOLVED] Why "cheap" Chinese HDMI-to-CSI2 adapters (e.g.18810-1 C779) doesn't provide I2S sound

Mon Aug 10, 2020 12:47 pm

6by9 wrote:
Mon Aug 10, 2020 12:30 pm
It does list both as being 5V tolerant, which is a good thing.
I'm not sure about HPDO to be 5V tolerant... "Note 1" which is about 5V tolerance is only for HPDI...
Seeing as this is 3rd party hardware and a mainline Linux driver, my time/effort to get it working is somewhat limited.
Everything already works:) Behavior is predictable-and that's great!
As to my first question about yavta on C779 the problem was I've loaded EDID to C779 just before yavta started. Camcorder didn't have enough time to stabilize output.
If to load EDID via command line, not via shell script and wait for some time (I've checked HDPO on oscilloscope)- then yavta works fine as no signal timings change occurs while capturing.

Return to “Interfacing (DSI, CSI, I2C, etc.)”