Monday, 2016-07-04

*** tpb has joined #timvideos00:00
mithronueces: there are better / updated (but unfinished) ones at 10:55 PM <@ mithro> https://github.com/mithro/HDMI2USB-misoc-firmware/tree/docs-scripts-update/scripts00:20
tpbTitle: HDMI2USB-misoc-firmware/scripts at docs-scripts-update · mithro/HDMI2USB-misoc-firmware · GitHub (at github.com)00:20
nuecesmithro, thanks00:20
nuecesI get this output after enable the debug input000:42
nueceshttp://dpaste.com/1GBPDMH00:42
tpbTitle: dpaste: 1GBPDMH (at dpaste.com)00:42
nuecesand this when I do a make view  http://dpaste.com/2997DG000:43
tpbTitle: dpaste: 2997DG0 (at dpaste.com)00:43
nuecesdmesg http://dpaste.com/1KKJ3MA00:47
tpbTitle: dpaste: 1KKJ3MA (at dpaste.com)00:47
mithrohey nueces, sorry was still getting up01:28
mithronueces: the failure to set the probe control is normal01:30
mithronueces: Do you have the serial console open when you did a "make view" there is a known bug which causes the first viewing attempt to fail if the serial console is open01:31
*** aom_ has joined #timvideos01:37
nuecesmithro, yes, but I try several times, when the console closed I get this http://img.ctrlv.in/img/16/07/04/5779bdaab6212.png01:40
nueceshttp://dpaste.com/1A9ZS2R this is the make view output01:42
tpbTitle: dpaste: 1A9ZS2R (at dpaste.com)01:42
mithroNobody is using the device at res:720x480 at the moment01:45
mithronueces: What type of output source are you using?01:46
nueceshttp://dpaste.com/23ZSHTP01:47
tpbTitle: dpaste: 23ZSHTP (at dpaste.com)01:47
nuecesI connect the camera recording a [email protected]01:47
nuecesthere is a way to set the input resolution?01:48
mithronueces: the camera is outputting 720x480 which isn't 720p60 (which would be 1280x720)01:48
nuecesthe camera manual specified when it is connect to an HDTV02:14
nueces:/02:14
nuecessorry02:15
nuecesI set the output in auto mode, that should work as the manual say in the same format as the video is recorded02:16
CarlFKnueces: what camera?02:17
nuecessamsung hmx q2002:17
mithronueces: You can set the mode the HDMI2USB advertises as being supported02:18
mithronueces: Try setting that to a value and then unplug/replug the camera02:18
nuecesI did that, but still don't work02:21
nuecessorry, could you explain in more details what you say about set the mode?02:22
nueceshow i could do that?02:24
mithronueces: on the serial console, I think the command is "video_mode <number>" help should tell you02:29
nuecesi did that, but only change the output values02:30
mithronueces: after changing the mode, you may need to change plug/unplug the camera for it to pick it up?02:31
nueceshttp://dpaste.com/3E8CVJB02:32
tpbTitle: dpaste: 3E8CVJB (at dpaste.com)02:32
mithronueces: yeah, it looks like your camera isn't outputting 720p02:33
nueces:/02:34
mithronueces: can you try plugging your camera into a monitor/TV and see what resolution that detects?02:36
mithronueces: your camera might be confused by the HDMI2USB edid and just falling back to the "default" resolution....02:36
nuecesI don't have a tv at home. But tomorrow I going to try that02:38
CarlFKnueces: can you find me the manual on line?  I dont see it at http://www.samsung.com02:38
tpbTitle: Electronics & Appliances: Tablets, Smartphones, TVs | Samsung US (at www.samsung.com)02:38
CarlFKI did find http://www.bhphotovideo.com/c/product/838573-REG/Samsung_HMX_Q20BN_XAA_HMX_Q20_HD_Flash_Camcorder.html02:38
tpbTitle: Samsung HMX-Q20 HD Flash Camcorder (Black) HMX-Q20BN/XAA B (at www.bhphotovideo.com)02:38
CarlFKVideo Format 1280 x 720p / 60 fps02:39
CarlFKso that's encouraging02:39
nuecesCarlFK, http://static.highspeedbackbone.net/pdf/Samsung%20HMX-Q20%20Series%20Manual.pdf02:39
CarlFKnueces: p 101, Set the video resolution.  HD 720/60p (  ): Records in the HD (1280x720/60p) format.02:41
CarlFKdid you do that?02:41
nuecesI trying playing a video recorder in the camera, but with the same result02:41
nuecesyes02:41
CarlFKhmm, can you transfer a video file to your computer?02:42
nuecesyes,02:43
nueceswhen I'm playing a video from the camera and set in the console the video_mode 9 the camera stop playing and after a moment start again02:47
CarlFKI hope you have a linux box...02:47
CarlFK$ mediainfo --Inform="Video;%Height%" 09_07_10.ts02:47
CarlFK72002:47
CarlFKcan you do 'that' /02:48
CarlFK?02:48
nuecesin the console i did a status and the input was first at 720x480, later empty and finally 720x480 again02:48
nueces mediainfo --Inform="Video;%Height%" HDV_0229.MP402:49
nueces72002:49
CarlFKwell thats encouraging02:49
mithronueces: how did you get a .MP4?02:50
nuecesmithro, i connect the camera as usb mass storage02:50
CarlFKmediainfo HDV_0229.MP4  will dump all sorts of fun stuff.. but 720 is all that matters02:50
nueceshttp://dpaste.com/36AGBKK02:51
tpbTitle: dpaste: 36AGBKK (at dpaste.com)02:51
mithronueces: at the moment we only support RGB video, it might be the case that you need YUV 4:2:0 support for it to output 720p - but really everything is just guessing until you can confirm that the camera outputs 720p with something other than the HDMI2USB02:53
nuecesmithro, ok. I will do that tomorrow02:54
CarlFKwell.. if you hook it to a display that supports 1080, I bet the camera is going to send 108002:55
CarlFKhmm. maybe.  I have  a camera here that I think behaves like that...02:55
mithroCarlFK: if the camera only supports 720x480 output, then it will always output that resolution02:56
mithroI know some older/cheap cameras can't output full resolution while still being able to record at it02:57
CarlFKHDMI TV Out  Auto*: The video signals are output in the same format as the recorded file.02:58
CarlFKthat should be 72002:58
nuecesthere is a way to debug the negotiation that the camera do with the board when the camera is connected?03:05
nuecesDMI2USB>debug edid03:05
nueces port has no EDID capabilities03:05
*** sb0 has quit IRC03:13
CarlFKk, I have a similar setup now03:23
nueces:)03:23
CarlFKnueces: debug edid is for a display device plugged into the output (I think)03:23
nuecesok03:24
CarlFKalso, you may be able to just type s to get status03:24
CarlFK(depends on your firmware version)03:24
nuecesyes, I did the firmware upgrade, but it is not permanent, when i unplug the power cord from the board it loose the changes03:26
mithroCarlFK: you seen http://konopas.org/ before?03:27
tpbTitle: KonOpas (at konopas.org)03:27
CarlFKmithro: no.. let me guess, another format of data for me to consume ?03:28
mithroCarlFK: they are a format consumer03:28
CarlFKum.. so why do I want to look at this ?03:29
mithroCarlFK: because they have a "specification for the data formats" - probably terrible but worth 2 minutes poking around03:31
nuecesthanks for the help o/03:31
nuecesbye03:31
mithronueces: Talk to you later in the week I assume03:31
nuecesOk, thanks again for all the work03:32
CarlFKmithro: I have a camera hooked up to an atlys.  I don't ever expect to use it but if you want to look into debugging things03:32
CarlFKlike:03:32
CarlFKHDMI2USB>m 1103:32
CarlFKSetting video mode to 1920x1080 @29Hz03:32
CarlFKHDMI2USB>s03:32
CarlFKinput0:  720x48003:32
mithro720x480 is likely to be interlaced too - which we *definately* don't support yet03:36
mithroCarlFK: what does the camera do when you hook it up to a TV/Monitor?03:36
CarlFKmithro: monitor says 480p03:39
CarlFKI was expecting 1080i03:39
mithroSounds like your camera is outputting 480p then?03:39
CarlFKyep.  fiddled with options, not monitor says 720p ... lets see if I can get the Atlys to see that03:41
CarlFKHDMI2USB>m 903:43
CarlFKSetting video mode to 1280x720 @60Hz03:43
CarlFKHDMI2USB>s03:43
CarlFKinput0:  720x48003:43
CarlFKgoing back to lcd...03:43
mithroIt sounds like 480p is the fallback option?03:44
CarlFKwell, plugged into lcd, it shows 720p03:44
CarlFKso without changing anything on the cam, lcd shows 720p, atlys shows 480, lcd shows 72003:44
CarlFKoh hell...03:45
CarlFKcamera manual http://resources.jvc.com/Resources/00/01/53/15365.PDF  Image quality ... there is no 720p options03:46
CarlFKim not sure why the lcd is showing 720...03:46
mithroCarlFK: what does the lcd actually show? Any more detail then just 720?03:46
CarlFKmithro: "720p 60Hz"03:47
CarlFKmithro: there is nothing in the manual about 720p options.   I kinda think there isn't much point in poking at this more, but happy to if you think there is something to be learned03:54
mithroCarlFK: not at the moment03:54
CarlFKmithro: does this ask the source (cam) renegotiate ?  hdp_toggle 003:56
mithroCarlFK: in theory, no guarentee it actually works03:56
mithroCarlFK: definitely doesn't work on the Atlys03:57
mithro(as the hpd pins are not connected)03:57
*** nueces has quit IRC04:10
mithroaom_: ping?04:13
*** Bertl_zZ is now known as Bertl04:57
mithro_florent_: ping?05:08
*** sb0 has joined #timvideos05:13
*** sb0_ has joined #timvideos05:15
*** sb0 has quit IRC05:15
_florent_mithro: pong05:20
mithro_florent_: How goes things?05:20
mithro_florent_: I wanted to discuss finishing off the rebase/litedram stuff a little more if you have time05:22
_florent_mithro: just sent you a mail05:22
_florent_mithro: but no progress during the weekend here, I'm going to work a bit on it this morning05:23
mithro_florent_: yeah, I guessed you were only testing the opsis_video one05:24
mithro_florent_: Any idea how much work getting the encoder working again might be?05:25
_florent_the encoder will be easy to get working05:26
_florent_I don't think there is too much change here05:26
_florent_maybe just around the DMA05:26
_florent_but I arlready refactored it for the video framebuffer05:27
mithro_florent_: it currently fails because it's trying to import the lamsi dma stuff05:27
_florent_yes possible05:27
_florent_I'll look at that05:27
mithro_florent_: so, my plan for merging is that we get a minimal working version in your opsis-soc repo05:28
_florent_yes05:28
mithro_florent_: I think do a "merge" of the opsis-soc repo into the HDMI2USB-misoc-repo's nextgen branch, replacing most of the existing stuff05:29
mithros/think/then/05:29
_florent_yes, can we just wait a few days before that05:29
mithro_florent_: We then fix up the bits needed so that Atlys and miniSpartan6 work05:29
_florent_I want to get opsis_video and opsis_hdmi2usb working before merging05:30
mithro_florent_: yes, prerequisite for starting the merging is a minimal "opsis_hdmi2usb" working in the opsis-soc repo05:31
mithro_florent_: Do you have Redmere cables for use with the Opsis?05:33
mithro_florent_: The inputs currently have issues which are helped by the amplifier in the Redmere cable05:34
_florent_no I don't have the Redmere cables05:34
mithro_florent_: Properly investigating and understanding that problem is on the todo list once we finish this rework05:34
mithro_florent_: Should I ship you some?05:35
_florent_and with current opsis_video gateware (refactoring), I only hdmi input 1 working, hdmi input 0 was not working05:35
_florent_but I didn't investigate that much05:35
mithro_florent_: I assume you'll compare it to the existing firmware and see if you get the same behaviour05:36
_florent_yes I'm going to do that05:36
mithro_florent_: but the HDMI inputs on the Opsis are more sensitive then the Atlys ones05:36
*** ssk1328 has joined #timvideos05:36
_florent_then we'll see if I need Redmere cable or not05:36
*** Bertl is now known as Bertl_oO05:36
mithroMorning ssk132805:36
ssk1328mithro: I just sent you a big fat mail.05:37
mithrossk1328: Did you figure out how to set the target for quicker bit generation05:37
ssk1328mithro: Morning!05:37
mithrossk1328: yes, just about to read it05:37
ssk1328mithro: Using base target it was taking about 8-9 minutes on my i7 with 8GB of RAM05:37
mithrossk1328: Another option is to try using the "opsis-soc" at https://github.com/enjoy-digital/opsis-soc for the moment05:39
tpbTitle: GitHub - enjoy-digital/opsis-soc: Opsis SoC based on LiteX (at github.com)05:39
mithrossk1328: I'm unsure how long that will take to build (compared to the base target in the HDMI2USB-misoc-firmware)05:39
shenkimithro: what's the difference between the two?05:40
mithroshenki: opsis-soc is based of _florent_'s rewritten litedram and the newer litex (which has updated migen/misoc)05:40
shenkiokay05:41
mithroshenki: It only supports the opsis though05:41
shenkiso it will become HDMI2USB-misoc-firmware once it's finished?05:41
*** sb0_ has quit IRC05:41
mithroshenki: Pretty much05:41
shenkicool05:41
mithro_florent_: I think it's perfectly reasonable to leave out things like the SPI flash support and the FX2 I2C loading stuff until after we do the merging05:42
mithrossk1328: My machine took real    5m15.962s for "opsis_minisoc" target in the opsis-soc repo, but my machine is probably a bit more powerful than your average05:44
mithroactually, we should look at the travis build times05:44
mithroBOARD=opsis TARGET=base seems to take between 6 and 10 minutes on Travis lately05:46
ssk1328mithro: Okay. I might try this opsis_minisoc as well05:46
ssk1328mithro: For now I figured out the problem though05:46
mithrossk1328 / shenki: This is what I used to get me a "lite environment" - https://gist.github.com/mithro/604da515edc1061a77a8ee6c1fe729e605:47
tpbTitle: Script to get all the enjoy-digital repos and set up a conda environment for using them in · GitHub (at gist.github.com)05:47
shenkimithro: so conda is just for a cross binutils, gcc, gdb?05:55
mithroshenki: It also provides a "Python virtualenv" like thing for installing python modules into05:56
shenkiok05:56
mithroshenki: also, all of migen/misoc/lite stuff is Python 3 and needs a recent version of that05:58
mithroshenki: conda provides a newer version of Python 306:01
shenkiok06:15
*** CarlFK has quit IRC06:39
mithroshenki: ping? I have a question about "volatile" meaning with pointers in C code.....06:47
shenkimithro: yup06:47
mithroshenki: https://github.com/timvideos/HDMI2USB-misoc-firmware/pull/266/files#r6941400806:48
tpbTitle: Added heartbeat functionality by ssk1328 · Pull Request #266 · timvideos/HDMI2USB-misoc-firmware · GitHub (at github.com)06:48
*** CarlFK has joined #timvideos06:49
*** ChanServ sets mode: +v CarlFK06:49
mithrossk1328: Did you miss the pattern.{h,c} deliberately?06:49
ssk1328mithro: I didn't get you?06:50
shenkimithro: it's saying the thing that is being pointed to will change06:50
mithrossk1328: in the heartbeat pull request06:51
mithroshenki: so it should be read as a "pointer to a (volatile unsigned int)" ?06:51
shenkihttp://cdecl.ridiculousfish.com/?q=volatile+unsigned+int+*framebuffer06:51
shenkiyes06:51
shenkideclare framebuffer as pointer to volatile unsigned int06:51
ssk1328I haven't made any changes in pattern.c/ pattern.h files if thats what you are asking?06:52
mithrossk1328: https://github.com/timvideos/HDMI2USB-misoc-firmware/pull/266/files#diff-5a0393c8ed31103fa40d44bc7a05f3af06:52
tpbTitle: Added heartbeat functionality by ssk1328 · Pull Request #266 · timvideos/HDMI2USB-misoc-firmware · GitHub (at github.com)06:52
mithroshenki: ahh, I'd forgotten about cdecl06:53
mithroshenki: thanks for the reminder!06:54
shenki:)06:54
shenkithe pointer shouldn't be volatile06:54
ssk1328mithro: I added a small change in pattern.h, this is for initializing framebuffers with some value, which is address to pattern base06:55
*** panther has joined #timvideos06:55
ssk1328mithro: Hence, added PATTERN_FRAMEBUFFER_BASE to pattern.h06:55
*** panther is now known as sab_12306:56
mithroshenki: hrm?06:56
mithrossk1328: Ideally the change to pattern.h should probably be in a separate pull request as I think you are saying it makes sense even without your heartbeat change?06:57
mithrossk1328: color_bar doesn't seem to be used anywhere?06:58
ssk1328mithro: Not used. Correct.06:59
shenkissk1328: can you explain why you made the 'framebuffer' pointer volatile?06:59
mithrossk1328: hrm, I don't think the change to pattern.h is needed?06:59
mithroshenki: you mean, why the frame buffer is pointing to a volatile int?07:00
shenkimithro: yeah07:00
ssk1328shenki: I don't think I have a very good answer for this, I wrote this code, building up on pattern.c, and pattern.c had used a similar definition for defining framebuffer07:02
mithroshenki: do you know why and want to know if ssk1328 does, or is it a genuine query?07:02
shenkimithro: i know why, and i wanted to hear ssk1328's reasoning07:02
mithroshenki: I'm interested to know why you think it is :)07:03
shenkimithro: :)07:03
ssk1328shenki: I don't my reasoning is what you were expecting me to say07:04
shenkicyou can use volatile to ensure memory acess is ordered07:04
shenkibut there's no code in that function that depends on the writes to the memory location being in a certain order07:05
shenkimostly becuase it's not reading or writing to the same location twice07:05
shenkibut also becuase the writes do not have any ordering dependanices between themselves07:05
shenkithat is, we don't care if the top left pixel is written first, or the bottom right07:06
ssk1328shenki: Okay. So if we don't use volatile the os uses some reordering in memory access generally for some optimizations?07:07
shenkithe compiler. this has nothing to do with operating systems07:07
mithrossk1328: s/os/C compiler+optimizer/07:07
ssk1328shenki: Okay07:08
shenkissk1328: yes, the c standard defines what the compiler is allowed to do. it can change the order in which memory accesses appear07:08
shenkissk1328: (as can the cpu memory model, but that doesn't concern us on the CPUs we're playing with, nor on x86)07:08
shenkissk1328: what's your background? have you studied any computer science?07:09
ssk1328shenki: My major is in Microelectronics but I have done courses in Computer Architecture07:09
mithroshenki: So, the reason I think/thought it was declared volatile is because the DMA can be writing to the frame buffer locations at the same time the CPU is accessing/writing to it -- thus two reads from the same memory location are not guaranteed to return the same value...07:09
shenkissk1328: cool! i studied that area a lot07:09
shenkimithro: if we were reading, that might be a good reason to use volatile07:10
shenkissk1328: have a read of this: https://en.wikipedia.org/wiki/Memory_ordering07:10
tpbTitle: Memory ordering - Wikipedia, the free encyclopedia (at en.wikipedia.org)07:10
ssk1328shenki: From what I understand volatile is required in pattern because we are writing text over the actual pattern and we need text to go aon the top of color pattern07:12
mithroshenki: Hrm, I've never seen "asm volatile("" ::: "memory");" before - that seems to be very different to the normal "volatile xyz" type thing?07:13
shenkimithro: that's a memory barrier. that's the "proper" thing to do, in many cases, where doing "volatile xyz" is the sledgehammer approach07:14
shenkissk1328: you don't do that in the function i was revewing07:14
ssk1328shenki: Yeah correct. I guess I should change that.07:15
mithrossk1328: I'm unsure that the volatile is needed in pattern.c either...07:15
mithroMy guess is that _florent_ copied from the hdmi_XXX.c code and didn't remove it....07:16
shenkiit's not a big deal - it probably woudln't have made the code any worse07:16
shenkibut it's good to understand why you're doing things, instead of just copying them :)07:16
mithroActually, I think for consistency we should keep the volatile for now07:16
shenkinak07:17
mithroand then go and cleanup it's usage in all the files07:17
shenkiyou should't do something wrong because someone else is doing it wrong07:17
*** aom_ has quit IRC07:17
shenkiit's your code review tho :)07:17
mithroshenki: If you are going to do something wrong, do it consistently wrong everywhere :)07:17
ssk1328Seems like I am not making this change for now07:18
shenki:/07:19
mithrossk1328: Good habit if we do something like this is to log a github issue07:19
mithrossk1328: So, please log a Github issue with something like "Clean up the usage of volatile in the lm32 firmware" add some details and links to where it is used and maybe a link to this conversation in the logs07:21
ssk1328mithro: okay07:24
CarlFKmithro: update on  https://plus.google.com/u/0/101817321389198875733/posts/AwubvKxLk7E?pid=6302268158548946674&oid=10181732138919887573307:40
mithroCarlFK: does it work on older versions?07:41
CarlFKdifferent Atlys, different lcd, same firmware rev, can't repoduce the noise07:41
mithroCarlFK: IE can you pinpoint when it started doing that?07:41
mithroCarlFK: can you try different Atlys, same LCD, same firmware?07:41
CarlFKsorry - it is all in a box on its way to NY07:42
mithroCarlFK: I assume you will eventually get access to it again at some point?07:42
CarlFKmithro: in 3 of 4 days.07:43
CarlFK3 or 4...07:43
mithroCarlFK: Nothing is going to happen in the next 3 or 4 days which fixes that deliberately :P07:44
CarlFKmithro: it seemed odd that it only happened on output1.07:45
mithroCarlFK: output 2 is the little micro HDMI connector right?07:45
CarlFKI call them 0 and 1.  1 is the little micro07:46
mithroCarlFK: sorry yeah07:46
mithroThe micro HDMI connector is unamplified07:46
mithroCarlFK: are you using a redmere cable there?07:46
CarlFKmithro: no redmere.07:47
mithroCarlFK: use a redmere and see if it cleans it up?08:15
CarlFKmithro: that's worth a shot.    assuming I can remember to bring some with me ...08:17
mithroCarlFK: worth checking if different firmware revisions also cause it more or less08:18
mithrosab_123: consistency is one of the most important things in coding08:56
sab_123mithro, ok08:56
*** sab_123 has quit IRC11:44
*** sab_123 has joined #timvideos11:45
Neuron1k@ssk1328 When we are discuting about memory: great paper by Drepper https://www.akkadia.org/drepper/cpumemory.pdf It gives good insight about how CPU uses memory and caches.12:31
*** miselin has quit IRC13:14
*** nueces has joined #timvideos13:24
*** ssk1328 has quit IRC14:04
*** ssk1328 has joined #timvideos15:48
*** miselin has joined #timvideos15:50
*** miselin has joined #timvideos15:50
*** sab_123 has quit IRC15:57
*** nueces_ has joined #timvideos16:13
*** nueces has quit IRC16:15
*** nueces_ is now known as nueces16:47
*** nueces_ has joined #timvideos17:23
*** nueces has quit IRC17:25
*** nueces_ is now known as nueces17:29
*** ssk1328 has quit IRC18:04
*** Bertl_oO is now known as Bertl_zZ19:38
*** springermac has quit IRC22:20
*** springermac has joined #timvideos22:21
*** CarlFK has quit IRC22:28

Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!