~tomf


#1 Labels with "@" in them do not render correctly 11 months ago

Comment by ~tomf on ~martijnbraam/numberstation

#56 Half startup time by disabling media links *before* opening /dev/video* 11 months ago

Comment by ~tomf on ~martijnbraam/Megapixels

I have locally commented out https://git.sr.ht/~martijnbraam/megapixels/tree/5ad97d03f6370dbb891aa17e2fb178270b35f48e/item/src/io_pipeline.c#L171-173 and noticed that https://todo.sr.ht/~martijnbraam/Megapixels/38 now occurs.

https://todo.sr.ht/~martijnbraam/Megapixels/38 currently doesn't occur because the second ov5640 startups uses the 720p mode, which doesn't look blue.

But when https://git.sr.ht/~martijnbraam/megapixels/tree/5ad97d03f6370dbb891aa17e2fb178270b35f48e/item/src/io_pipeline.c#L171-173 is commented out, the driver starts in the default mode, then switches to 720p, and something about that leaves the camera in the wrong colourspace. This is a ov5640 bug I'm looking into.

#1 Labels with "@" in them do not render correctly 11 months ago

Ticket created by ~tomf on ~martijnbraam/numberstation

#Steps to reproduce

$ numberstation otpauth://totp/Biscuits:foo%40example.com?secret=uaqvphgzqy46rrrbjdnqmfg6zzmafjfh&issuer=Bar

#Expected

The TOTP entry is listed as "Biscuits: foo@example.com"

#Actual

The TOTP entry is listed as "Biscuits: foo%40example.com"

I think the issue is that the label is URL-encoded, but numberstation does not perform URL-decoding.

#56 Half startup time by disabling media links *before* opening /dev/video* 11 months ago

Ticket created by ~tomf on ~martijnbraam/Megapixels

While working on the ov5640 driver, I noticed that upon Megapixels startup, the ov5640 driver will:

  • perform startup (~3-5s incl. firmware write)
  • perform a power cycle (ov5640_s_power)
  • perform another startup (~3-5s incl. firmware write, since the power cycle wipes the firmware)

This can be observed via dmesg as follows:

#Steps to reproduce

  1. Follow firmware kernel messages: dmesg -w | grep ov5640 | grep -E '(firmware|fw)'
  2. Start Megapixels

#Expected

Firmware is loaded once.

#Actual

Firmware is loaded twice:

[14592.413991] ov5640 5-004c: firmware upload success
[14592.473156] ov5640 5-004c: fw started after 50 ms
[14593.325037] ov5640 5-004c: ov5640_set_power_on: set power on called
[14595.831087] ov5640 5-004c: firmware upload success
[14595.889088] ov5640 5-004c: fw started after 50 ms

Note that "ov5640_set_power_on: set power on called" is a log line from a local patch I am using.

This can also be observed by sight/timer, by commenting out https://git.sr.ht/~martijnbraam/megapixels/tree/5ad97d03f6370dbb891aa17e2fb178270b35f48e/item/src/io_pipeline.c#L171-173 and observing that startup is faster.

For me, this speeds up Megapixels startup from ~11s to ~6s. (I have WIP ov5640 patches to bring that down further to 1-3s.)

#The mechanism

I believe this is happening because:

  1. open("/dev/video1", ...) is called early in Megapixels, which triggers ov5640 to start. https://git.sr.ht/~martijnbraam/megapixels/tree/5ad97d03f6370dbb891aa17e2fb178270b35f48e/item/src/device.c#L87
  2. Disabling the link triggers the driver to power off. https://git.sr.ht/~martijnbraam/megapixels/tree/5ad97d03f6370dbb891aa17e2fb178270b35f48e/item/src/io_pipeline.c#L171-173
  3. Setting the format triggers ov5640 to start again. https://git.sr.ht/~martijnbraam/megapixels/tree/5ad97d03f6370dbb891aa17e2fb178270b35f48e/item/src/io_pipeline.c#L196

A fix would be to move (2) before (1). This could fix the issue because nothing would trigger the driver to powerdown, and thus ov5640 would only be started once.

#53 autofocus doesn't work/uploaded firmware didn't start 11 months ago

Comment by ~tomf on ~martijnbraam/Megapixels

See https://forum.pine64.org/showthread.php?tid=13939&pid=97682#pid97682 for a workaround.

tl;dr after Megapixels loads, touch your screen. This will trigger a firmware load, which (if you had the same issue I had) will cause autofocus to begin.

Please reply with whether this workaround works for you.