libera/#maemo-leste/ Thursday, 2021-10-07

Wizzupbtw - I don't get the charging led pattern on the n90000:19
Wizzupuvos: I have his email, maybe ping him on the pr?00:19
uvosis it enabled?00:20
uvoscould you give me mce log?00:20
uvosuse openrc to stop mce00:20
* Wizzup makes a note to do that tomorrow00:21
Wizzupbtw, something I was wondering about, I wonder if it makes sense to set up syslog in such a way that it is much easier to share debug logs00:21
Wizzupwe could have /var/log/maemo/daemons/mce.log00:21
uvosand run it with mce --verbose --verbose in  a "su -" (ie clean env) root shell00:21
uvosWizzup: not usefull without makeing mce verbose00:21
uvosin this case at least00:21
uvosbut yeah sure00:22
uvosanyhow do that and then plug the charger in and out a couple of times with some time in between, 2 min should od00:22
uvos*do00:22
Wizzupwhy with time in between?00:23
uvosto see if udev is reporting events00:23
uvoser upower00:23
uvosmce will log when it gets upower events00:23
uvosbut they come in infrequently00:23
Wizzuprunning now00:23
uvosalso make sure the pattern is enabled in the first place :P00:24
Wizzupit is00:24
Wizzupuvos: it seems to get the messages right away00:24
Wizzupbut it only seems to change patterns on charger off it seems00:24
Wizzuphmm: mce: LED pattern PatternBatteryCharging deactivated00:25
uvosok00:25
uvosno idea who should be starting the pattern00:25
uvosmaybe the upower module00:25
Wizzupmce00:25
uvosi mean in mce00:25
Wizzupoh00:25
Wizzuphttps://wizzup.org/mce.log00:25
Wizzupbtw:      PatternBatteryCharging = true00:27
uvosyeah sure log also registers it mce: led-dbus: PatternBatteryCharging enabled00:29
uvoshmm00:30
uvossomething is off here00:31
uvosmce: pattern: PatternError, active: 0 comes from led-lysti00:31
uvos(grr annoying legacy modules that dont annouce what module the log statment comes from)00:32
uvosbut the patterns are registerd twice for some reason00:32
uvosnvm00:33
uvosits just really verbose00:33
uvoshttps://github.com/maemo-leste/mce/blob/abc429bef65971274d3fea45cc73ced4d617757e/src/modules/battery-upower.c#L24600:38
uvosits there00:38
uvosmaybe check if it executes this via gdb00:39
uvosif you actviate the pattern via dbus dose it show?00:39
Wizzupsure, let me try00:39
Wizzupdo you have a way to do it handy?00:39
Wizzupah: dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_led_pattern_activate string:"PatternCommunicationIM"00:40
uvosyeah00:40
uvosalso check the policy in mce ini00:40
uvoslooks like it has policy 4: only show pattern if the display is off, or if in acting dead00:41
Wizzupthat is fine I think00:41
uvossure if your not expecting to see it while the display is on ;)00:42
WizzupI am not00:42
Wizzuphm the ts on my n900 is not happy atm00:43
Wizzup(was updating)00:43
Wizzupah, dist-upgrade was required to remove the old rotation support00:44
WizzupI don't see anything when I try to activate the pattern I think00:45
Wizzupwait..00:45
Wizzupmanually activating it works00:45
Wizzupand it disappears on display on, and then comes back when display goes off00:45
Wizzupso something just doesn't trigger it I think in mce upower00:45
uvosWizzup: ok so the dbus call results in the exact same datapipe call here: https://github.com/maemo-leste/mce/blob/abc429bef65971274d3fea45cc73ced4d617757e/src/modules/led-dbus.c#L10100:47
uvosso clearly its not getting here: https://github.com/maemo-leste/mce/blob/abc429bef65971274d3fea45cc73ced4d617757e/src/modules/battery-upower.c#L24600:47
uvosnot sure why that would be00:47
WizzupI can step through it later if you'd like00:47
Wizzupat least I got my droid3 static kernel to boot, tomorrow I will try to load kexecboot00:48
Wizzupthe display not turning on has me a bit worried that my config isn't ok yet though :P00:48
uvosok00:48
uvoswell some progress at least00:48
Wizzupyeah00:48
uvoswait lol00:49
uvosthat execute_datapipe is bullshit00:49
uvosUSE_CACHE00:49
uvosits retiggering the last input pattern00:49
uvoswhich is null in this case00:50
Wizzupah00:50
Wizzupgood eye00:50
uvosok ill fix it tomorrow00:51
Wizzupcool00:51
mighty17[m]tried to run plamo with powervr (on pmOS) and i get https://pastebin.com/rqZAMp6j10:04
mighty17[m]tmlind: maybe you have any clues, are we missing egl extensions again?10:04
uvosWizzup: mce chargeing pattern should be fine now10:50
uvos(once ci finishes building it)10:51
Wizzupuvos: great10:51
Wizzupbtw, is it hard to disable the green led going on by default on the d4, I recall I asked before10:51
Wizzupis this also a 'cpcap magic' thing?10:52
uvosyeah its cpcap magic10:52
Wizzupok10:52
Wizzupit tends to mess with the notifications10:52
uvosthere might be a register10:52
uvosor it might be controlled by cpcap mcu10:52
Wizzupok, no big deal really, just wondered10:52
uvosnever looked10:52
Wizzupregardin cpcap mcu, should we ever try to dump the fw and compile it or something?10:52
Wizzupdecompile*10:53
uvossure10:53
uvosbut idk how10:53
uvosmoto never updated the fw10:53
Wizzupit's a ST Ericsson CPCAP 6556002?10:54
uvosim not sure cpcap even allows you to read it10:54
uvosdepends10:54
uvosthere are 2 versions used10:54
uvosthey are not 100% compatible10:55
Wizzupwell it probably doesn't allow reading, but there are tools that might be able to do it10:55
uvossure10:56
uvosanyhow its a MC13783UG hevaly modified to motorola specs and then oemed by nxp and ericsson10:57
uvoscritically the MC13783UG has no uc10:57
Wizzupfun: The MC13783 supports booting on USB. The boot mode is entered by the USBEN pin being forced high11:02
Wizzupwhich enables the USB transceiver and the VUSB regulator supplied from VINBUS. The 1.5 K pull up is11:02
Wizzupconnected to UDP and the USB transceiver will operate in the mode as determined by the UMOD0 and11:02
WizzupUMOD1 pins.11:02
Wizzupok I suppose maybe just understanding the android src for cpcap might be an easier way to understand what it does11:07
uvossure11:07
uvosit uploades some code snypets to the mcu11:07
uvoscouple 100 bytesworth11:07
uvosand calls these macros11:07
uvosand then enables and disables them11:08
uvosthere is also a mailbox it uses to comunicate with the mcu11:08
Wizzupok11:09
uvosso on n90011:32
uvoswhen the headphone is plugged in11:32
uvoswhere dose this go?11:32
uvosinterface wis11:32
uvose11:32
Wizzuplet me try now11:34
Wizzup/dev/input/event6:RX-51 AV Jack11:36
WizzupSupported events:11:36
Wizzup  Event type 0 (EV_SYN)11:36
Wizzup  Event type 5 (EV_SW)11:36
Wizzup    Event code 2 (SW_HEADPHONE_INSERT) state 011:36
Wizzup    Event code 4 (SW_MICROPHONE_INSERT) state 011:36
Wizzup    Event code 8 (SW_VIDEOOUT_INSERT) state 011:36
WizzupEvent: time 1633599392.339202, type 5 (EV_SW), code 2 (SW_HEADPHONE_INSERT), value 111:36
WizzupEvent: time 1633599392.339202, type 5 (EV_SW), code 4 (SW_MICROPHONE_INSERT), value 111:36
WizzupI think that's it11:37
Wizzuprelated https://wiki.merproject.org/wiki/Adaptations/faq-hadk#Audio_not_routed_to_headphones11:37
uvosthis seams wierd tho11:38
uvosim sure the mainline intention isent to use the evdev interface to report the headphone jack11:38
uvoshow dose this work on laptops11:38
uvosmy pc dosent have sutch an event11:39
Wizzupmaybe acpi or something?11:39
Wizzupactually it might be in alsa directly11:39
Wizzupiirc11:39
uvosdose plugging in the headphone jack on n900 switch pulse to that sink ?11:39
Wizzuphttps://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/55811:40
Wizzupit expects to get it through alsa11:40
parazydOn laptops there's an ACPI event for plug in11:40
Wizzupit seems to be in kernel alsa interface if I read it correctly11:41
parazydYeah in /proc/asound I think11:41
Wizzupdon't know the exact api/interface11:41
uvosok11:42
uvoswell i figured out that you can unmask an intterupt bit and cpcap fires its general intterupt when the hp gets plugged in11:42
uvosthats not enough information by itself (it also fires when its unplugged)11:42
uvosbut now i need to know where the information is even supposed to go11:43
bencohas long as you can read some register, it should be enough11:43
parazydhttp://ix.io/3B5j11:43
uvosi cant11:43
bencohoh11:43
bencohwell11:43
uvosbencoh: i cant there is none11:43
bencohright, you mentioned that before11:43
uvosbencoh: the android kernel dose some werd stuff11:43
uvosbencoh: it comunicates with the mcu11:43
bencohweird in what way?11:43
uvoswell its not that wierd11:43
Wizzuphttps://01.org/linuxgraphics/gfx-docs/drm/sound/designs/jack-controls.html11:43
bencohsounds like something we could do as well I guess11:43
uvosit just communicates with the propriatary fw11:43
Wizzupbtw, looks like kernel makes input devices on my laptop too11:44
Wizzup*through* alsa11:45
Wizzup(probably using the phantom_jack=true)11:45
Wizzupuvos: not sure if you need more pointers but it looks like include/sound/jack.h it helpful, as is sound/soc/soc-jack.c11:49
bencohyeah, alsa uses evdev to report jack events11:49
bencohat least that's how many devices do it11:49
Wizzupyou need to register the jack controls and then use snd_soc_jack_report like other drivers do (grep -r snd_jack_report sound/soc/)11:49
Wizzupbencoh: yeah alsa has an option to do this, but pulse doesn't use that alsa interface, it's just an extra to not have drivers re-implement input devices IIUC11:50
bencohindeed11:50
bencohwell, iiuc as well11:50
bencoh(alsa isn't exactly the simplest linux API ...)11:51
uvosasoc drivers dont use snd_jack_report11:53
Wizzuphuh?11:53
Wizzupthey use snd_soc_jack_report11:53
uvosno existing driver uses that fn11:53
Wizzupwhich is provided by sound/soc/soc-jack.c11:53
uvosasoc drivers a genererally are really ideosnycranous11:53
Wizzuprandom pick from the grep:11:54
Wizzupsound/soc/codecs/rt5645.c:snd_soc_jack_report(rt5645->hp_jack, report, SND_JACK_HEADPHONE);11:54
uvosah snd_soc_jack_report11:55
uvosnot snd_jack_report11:55
uvosok11:55
Wizzupyeah snd_soc_jack_report wraps snd_jack_report11:56
WizzupI had the same confusing when I was grepping just now11:56
uvosok12:01
uvosby assumeing that the jack is empty when the kernel starts i can make something that works at least in a proof of concept way12:02
Wizzupcool12:10
uvosactually its not that simple12:20
uvoswe only have a audio codec not a snd soc driver12:20
uvosand use the generic driver12:20
uvosso we cant snd_soc_card_jack_new12:20
uvosso i need to figure out how to register a jack with the generic soc driver12:20
uvosasoc really is...12:21
uvosdificult to weed through understand12:21
tmlinduvos: oh so you figured out some interrupt happens when pluggin/unplugging the headset?15:29
tmlinduvos: which interrupt is it triggering?15:29
tmlindmighty17[m]: sorry i have really no idea on what all goes wrong with the pvr stuff :( barely have wlroots working15:30
uvosCPCAP_IRQ_HS15:31
uvosmaybe that should not have been so suprizing :P15:31
uvos<&cpcap 9 0>;15:32
uvoson mainline15:32
uvosbut since there is not gpio to read when the irq fires15:33
uvosim not sure how to determine if the headset was plugged or unplugged15:33
tmlindoh ok, maybe that's all there is to it :) we just need the direction15:39
uvoswell the mainline kernel also querys the mcu15:40
uvosbut it looks like this is just to determine what kind of plug15:40
tmlindok15:40
uvosyeah wrt the direction15:40
tmlindi think we just need to read the status register for direction as it's not a gpio controller15:41
uvosok yeah15:41
uvosi need to know if TRIGGER_RISING or TRIGGER_FALLING was the casue of the irq fireing15:42
uvosi guess i have to read the status regsiter myself15:42
uvosor is there an api for that15:42
uvos(other than reading it in the regmap)15:42
tmlindhmm well see what we already do in cpcap_charger_get_ints_state()15:42
uvosok15:43
tmlindsure it will be potentially racy with plugging and unplugging :)15:43
uvosespeccaly if its not hw debounced15:43
tmlindyeah15:43
uvos(duno if it is)15:43
Wizzuphttps://wizzup.org/sigmakey.png getting somewhere...15:52
tmlindWizzup: i bet a beer all it does is enable the gsm frequencies in the nvram reg :) maybe do a tcmdrw dump before and after?15:53
uvoswell hopefully not since that would not be sufficant to remove the simlock15:54
Wizzuptmlind: we will find out soon - this is the droid 3 that is networked locked and will not connect to anything even with the freqs set15:54
WizzupI have 7 more here, so if that works we can try to do those dumps15:55
tmlindok, interesting15:55
Wizzuplooking forward to that beer if it works :P15:55
* dreamer puts stack of droid4s on buZz desk15:55
tmlindyeh me too :)15:55
uvosbut d3 look mutch fancier on a desk15:56
tmlindi'm pretty sure bionic is only connecting to 3g with some sim cards here, not sure why, the frequency should be the same not depending on the operator15:56
tmlinduvos: are you able to use your bionic with 3g?15:56
uvosyes15:57
tmlindok15:57
uvosit worked once on o215:57
uvosbut i cant retest now15:57
uvossince umts network is gohne in germany15:57
tmlindok well i can't see any networks with my sim on bionic for some reason15:57
uvosalso not gsm?15:58
tmlindnot sure if i tried that, my us sim shows another operators network on 3g15:58
Wizzupwell it's definitely reading the 128Mb flash16:03
uvoswhat 128mb flash?16:04
Wizzupdon't know :)16:04
WizzupI'll share the log in a sec16:04
uvosthe lte modem on d4 has 128mb flash16:04
uvosbut...16:04
uvosi gues the qcom modem might too16:04
mighty17[m]<tmlind> "mighty17: sorry i have really no..." <- oh ok, i'll ask xc racer16:06
Wizzupyes, it connected to my XS4ALL network :)16:06
uvoslog usb packets & decompile sigmakey?16:07
Wizzuphttps://wizzup.org/sigmakey-d3-log.txt16:07
Wizzupuvos: yes, would be nice to do one day, but not this day :)16:08
Wizzupmaybe when leste is my daily driver16:08
buZz4droid4s even :P niiiice16:10
uvoslooks like the qcom modem has a H8BCS0QG0MMR16:10
buZz8 core mobile!16:10
buZz:D16:10
The_Niz:)16:11
uvosand android can clearly read it16:11
uvossooo16:11
uvoshmm16:11
Wizzupuvos: yeah it requires a rooted device16:12
uvosthe shit they hide in these things16:12
WizzupI suspect it's a matter of reading certain info like IMEI and up front knowledge about how verizon does things for specific phones16:12
uvos(the phones)16:12
Wizzupand then they have a way to send that key, perhaps to the modem16:12
Wizzupthere is an android gui to enter an unlock key16:13
Wizzupit did also write to the 'security area' so idk what it does exactly16:13
Wizzupbut we can figure it out in the future since I have (counts...) 7 more16:13
* tmlind probably owes another pint of beer16:13
tmlindWizzup: maybe also give it a try on your droid4 to see if it can dump out some info16:14
WizzupI think the software advertises just changing the frequencies on the droid 4, but yeah, can try, I think it requires to be booted to android (of course)16:14
Wizzup(for the d4 specifically, wrt frequencies I mean)16:14
tmlindWizzup: also, i posted a patch to add module options to phy-cpcap-mapphone to expose the mdm6600 to the pc usb port16:14
uvosneat16:15
Wizzupah, cool, so one can run ofono on their pc16:15
uvoswell the gpios wont work16:15
uvosbut sure qmi only16:15
Wizzupright16:15
tmlindthat's for reflashing the modem so two usb uart modes, that's probably what the sigmakey also needs16:16
tmlindhttps://lore.kernel.org/linux-usb/20181206155751.GE39861@atomide.com/16:16
tmlindthen there's another mode not yet implemented that just puts the booted modem to the usb port for pc for qmi16:17
tmlindi think it's just another variation of the mode gpios or something trivial like that16:17
Wizzupsigmakey did everything from adb as far as I can tell16:17
tmlindoh interesting16:17
Wizzupand it requires a rooted android, so it probably uploads software to it to read stuff16:18
tmlindmaybe it did adb reboot bootloader to some modem service mode16:18
Wizzupno, the device was unlocked and then restarted16:18
tmlindhmm16:18
Wizzuponce it did that it also lost the qemu usb, so there's no way it could do more16:18
tmlindfrom android the modem can be put into flash mode yeah16:20
Wizzupso what we can do is stuff all the adb traffic and also somehow try to intercept what sw it uploads to the device and strace it, but that'll be involved16:20
Wizzups/stuff/sniff/16:21
Wizzupbut it also performs some calc on the pc itself afaik16:21
Wizzupin any case we can do this as often as we want for free now16:21
uvosat Wizzups house anyways16:22
uvosdoing it remotely will also be involved16:22
uvosbtw adb works over the network too16:22
uvosso if it really only uses adb16:22
uvos...16:22
tmlindi think it's the update-binary that can be used to reconfigure mdm6600 for flash mode on android, it just uses the /sys entries for gpios to reboot the modme to flash mode16:22
tmlindthe update-binary is there in the modem firmware blob16:23
Wizzupuvos: I think usbip should work, I will try that next16:23
Wizzupit was already confirmed to work on the android forums16:24
Wizzuptmlind: ah16:24
Wizzupuvos: actually qemu has usbredir so that's easier16:24
Wizzupcan work with*16:25
WizzupI remember doing that many years ago to forward a usb cd drive to my home from sofia16:25
Wizzupin any case the point was that this can be done networked16:25
Wizzupotherwise I wouldn't have gotten the damn dongle :p16:25
uvos"forward a usb cd drive to my home from sofia" lol16:26
Wizzupit was slow to rip but it worked :)16:26
dgamer69I'm trying to get decent perfomance on my maemo leste qemu instance16:26
dgamer69and I got reccomended accelerated grphics16:27
Wizzupdgamer69: it will be hard to get that unless you get ownership or your device I fear, if you don't have cpu accel then cpu 3d rendering will be even slower than normal16:27
uvosthat sounds like the least sane way to rip a cd to some place over the network16:27
uvosbut ok :P16:27
Wizzupuvos: yeah, well it was like this, I had this intel nuc at home with my sw, and my laptop with a cd drive in sofia16:27
Wizzupand I had to test ripping16:27
Wizzuponly later I found cdemu which was slightly easier ;)16:27
dgamer69:(16:28
dgamer69nooooooooo16:28
dgamer69https://github.com/knazarov/homebrew-qemu-virgl16:28
Wizzupyou got that to work?16:28
dgamer69not really16:28
dgamer69I get this error:16:28
uvosmaybe try with just the Hypervisor.framework patches16:29
bencohI had a qemu/qxl setup working iirc16:29
bencohlemme check16:29
bencohhaven't tried with leste though16:29
dgamer69Couldn't open libEGL.dylib: dlopen(libEGL.dylib, 5): image not found16:29
Wizzupbencoh: the problem here is that he's on a mac he cannot root or install on what he wants16:29
Wizzupbencoh: so all normal ideas are out of the window16:29
bencohoh, macosx16:29
uvosdgamer69: try without 3d accel16:29
uvosthere is a Hypervisor.framework fork for qemu16:29
dgamer69qemu works without 3d accel16:29
uvossomewhere16:29
bencohI eventually stopped bothering with macosx a year ago16:29
uvosdgamer69: sure but you have not cpu accel either then16:30
tmlindWizzup: the command to reflash mdm6600 is update-binary 3 1 radio.zip, you can repack radio.zip to leave out the w3glte firmware16:30
uvosdgamer69: since it needs patched qemu16:30
dgamer69about a year ago I teid every display option, and they all worked16:30
dgamer69I downloaded patched qemu from homebrew16:30
dgamer69check the github page16:30
uvosyou downloaded 3d accel patched qemu16:30
dgamer69yeah16:30
uvoswith also cpu accel patches16:30
dgamer69I think so16:31
dgamer69possibly?16:31
uvosbut you need a version with just the cpu accell patches16:31
dgamer69why? don't I want 3d acceleration as well?16:31
uvosbecause its not working16:31
uvos dlopen(libEGL.dylib, 5): image not found16:31
dgamer69okay16:31
uvosjust cpu accel wont run into that16:31
uvosand will be fast enoughish16:32
dgamer69but I also want to try to run steam16:32
uvoswell that wont work16:32
uvosand is out of scope here16:32
dgamer69rip16:32
dgamer69I'm trying to find a way16:32
dgamer69regardless I'm curious16:32
Wizzupso it is out of scope, but also steam has a mac port doesn't it?16:32
dgamer69so how do I get the patch?16:32
dgamer69it does16:32
WizzupIf I were you I'd try to just root the device and get admin access16:32
Wizzupbut yeah this is a bit off topic for this channel :p16:33
dgamer69I am able to install steam using homebrew with no admin16:33
dgamer69qemu channel is not responding lmao16:33
dgamer69but whenI run steam, the steam servers are blocked16:36
dgamer69and it gets stuck trying to update16:36
uvosthey filterd the ip addresses16:37
Wizzupor dns16:37
uvosor maybe just the dns requests16:37
dgamer69maybe16:37
uvosif they are dumb16:37
dgamer69our school uses fortinet16:37
Wizzupmaybe we need to re-instate the offtopic channel hehe16:38
dgamer69lmao16:38
dgamer69is there a way to route traffic on a per application basis without admin?16:38
dgamer69I know tor does it16:38
uvosi dont think anyone here knows that mutch about macos16:39
Wizzuphttps://itectec.com/superuser/getting-steam-exe-to-run-through-a-http-proxy/16:39
Wizzupjust google, you'll find it16:39
dgamer69that's for the exe16:39
bencohI used to know quite a bit, but I didn't upgrade past osx.716:39
dgamer69does that work on macos?16:40
bencohso ... I doubt it would help :>16:40
Wizzuphttps://superuser.com/questions/387856/getting-steam-exe-to-run-through-a-http-proxy says it works on os x16:40
Wizzupbut really just read/search before you ask pls ;)16:40
dgamer69oh sorry16:40
Wizzupbencoh: I stopped at os 9 :p16:40
dgamer69but thanks, I will try this16:40
Wizzupdgamer69: np16:40
bencohWizzup: oh, a Classic user! :)16:40
Wizzupyeah mostly 7.6.1 I think16:41
uvosuvos only ever used system 716:41
bencohi went from system ~6 to osx.7, skipping a few updates here and there16:41
WizzupI was basically a kid when I used system 7, and switched to windows at some point16:42
bencoh(funny to think that system6 is older than me)16:42
dgamer69“steam_osx” is damaged and can’t be opened. You should move it to the Trash.16:44
dgamer69why16:44
dgamer69this is the worst16:44
dgamer69nope I got it16:47
Wizzuptmlind: uvos said that you discovered something wrt droid4 memory timing not being entirely within what motorola specced, is that correct?16:50
WizzupI had one or two droid 4 resets in the past ~3 weeks16:50
Wizzupevery time pstore had nothing relevant16:51
uvosthe memory interface registers get ajusted based on the opp. if that means that its out of spec on d4 after kexec remains tbd16:52
uvosunless tmlind as new information16:52
uvosand i was supposed to check the registers on bionic but forgot16:53
uvosi should go do that :P16:53
tmlindyeah so crank up the cpu frequency to full speed before kexec, so we should have the 1.2ghz timings in place for the new kernel16:54
tmlindstill needs to be checked though16:55
uvostmlind: in the mean time maybe push out new kexecboot that dose this16:55
dgamer69hey does anyone know how to forward an application's traffic through a proxy without admin?16:56
uvosalso please ajust it to use the max freq from sysfs instead of using 1.2ghz hardcoded16:56
uvossince rn that would fail on old mapphones like d316:56
tmlinduvos: we already do it, but we only do it for cpu1.. i think that should be enought though afaik they're coupled16:56
tmlindhave not verified though16:56
Wizzuphow would that work in clown boot scenarios where we have already kexec'd before getting to kexecboot?16:57
uvosWizzup: the kexec scrippt16:57
uvoshas to do it16:57
Wizzupdgamer69: there are various ways but I suggest looking at getting admin on your device instead16:57
Wizzupuvos: yeah ok so we do it in two places then16:57
uvosyeah16:57
uvoskexecboot doing it again on the mainlike kernel is not effective16:57
dgamer69how would I even do that? the bootloader is locked so I can't boot into a different os16:57
uvos(or damaging)16:57
tmlinduvos: i made some kind of shell script to dump out all the android timings, depends on rwmem binary16:58
uvostmlind: neat16:58
uvoswhere? :P16:58
Wizzupdgamer69: maybe just google around, I'm sure there are loads of people with a similar situation to yours16:58
tmlinduvos: i'll upload, i dropped the ball when i figured my mz609 has broken memory..16:58
uvosok16:59
dgamer69how to get the admin password?16:59
dgamer69I guess I'll look16:59
uvosgreat that your mz609 has broken memory, that means i have a better change of working mz617 :D16:59
tmlindyeh i want to use mz617 for topo maps with gps for fishing eventually :p17:00
tmlindhmm hopefully my script is not on the flakey mz609..17:00
uvosif so its nbd17:01
uvosits not like its hard to check the registers with the register manual in one hand and rwmem in the other17:01
uvosid be courious if sgx also changes the state17:02
uvossince sgx is the main consumer of memory bandwith17:02
uvosthat would make sense17:02
tmlinduvos: script updloaded to muru.com/linux/d4/d4-dump-emif-android.sh17:03
uvostmlind:17:03
uvosok17:03
tmlinduvos: it assumes rwmem is in /data/local/tmp/17:03
uvosyeah17:03
uvosill need to see if you can fix sgx clocks too17:03
tmlindwhen diffing values, you need to ignore timer regs in the emif17:04
uvosok17:04
tmlindi'm pretty sure we already have 1.2ghz values for both emif1 and 2 but have not verified17:04
tmlindi patched kexecboot scripts to set the speed the same way as d4-dump-emif-android.sh, but not sure if that's really needed17:05
uvoscant hurt17:05
uvosmeanwhile17:10
uvoshp detection works!17:10
uvosbut pulse dosent switch17:10
uvosbut i can see it in dmesg :)17:10
Wizzupsweet17:10
tmlindnice :)17:10
Wizzupuvos: does it also create an input device?17:14
uvosno something is wrong17:41
uvosi have a fn pointer set to  .set_jack in snd_soc_component_driver17:42
uvosbut it never gets called17:42
uvosso the jack isent registerd17:42
uvosim likely just missing something17:42
bencohuvos: hp detection works? wait, so you reused that weird code from android's kernel?17:43
uvosno so right now im just assumeing if the what the irq means17:44
bencohyou use the irq as a toggle?17:44
uvosyeah but it looks like you can infer what way the jack is going via irq direction17:44
uvosi have to check that17:44
bencohlike rising/falling edge?17:44
uvosyeah17:44
uvosthe wierd android code seams to only be needed if you want to know17:44
bencohhmm17:44
uvosif the plug has a mic and buttons and so on17:44
bencohsounds tricky, you should test booting with jack connected/disconnected17:45
bencohto see it if inverts it17:45
bencohif it*17:45
uvosyeah17:45
bencohalso there could be other events17:45
uvosyeah for sure17:45
uvosrn im still strugelling with asoc17:45
bencoh:)17:45
uvosin accutally getting the stuff out to userspace17:45
dgamer69okay I'm back18:09
dgamer69I've determined, with the bootloader locked, there is no good way to get the administrator password18:10
dgamer69so now I'm curious18:10
dgamer69is there a way to make a terminal instance with a keylogger?18:10
Wizzupthis is a bit too off topic I think :)18:11
dgamer69gotcha18:11
dgamer69channel reccomendation?18:11
Wizzupnot really18:18
Wizzupbut keylogging your school machine to get an admin pw is def off topic here :p18:19
dgamer69lmao18:20
dgamer69alright18:20
dgamer69thanks for all the help though!18:20
buZzwhy not buy a computer instead of being a thief18:21
uvoslets not get into this....18:22
dgamer69theif?18:25
dgamer69I'm doing this for my friend who can't afford a gaming computer18:26
dgamer69and how is this theft regardless18:26
uvosmore wierdness18:35
uvosthe cpcap register fires only when the cpcap headphone pga was turned on at least once18:36
uvosas you know you know cpcap turns off the pga when the jack is removed18:36
uvosand fires an itterupt18:36
uvosand then it fires again when its plugged18:36
uvosbut if you disable the pga in kernel it dosent fire an itterupt18:36
uvoswth cpcap18:37
uvoslooks like CPCAP_REG_INTS118:37
uvos(ie itterupt source riseing falling is stable not matter what at least)18:38
Wizzupgetting there18:39
Wizzuphmmm so I updated my n900, and the ts is still weird (-devel)19:39
Wizzupeverything maps to the top button19:39
uvoscheck xinput19:40
Wizzupwhat in particular? matrix?19:40
WizzupCoordinate Transformation Matrix (156):0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.00000019:41
uvoslist-props in general19:41
uvosuh thats bad19:41
Wizzupthe native orientation is landscape I think of this screen19:42
uvosyeah mulitplying everything with 0 will make the event allways be at 0 019:42
uvoswhat dose xinput map-to-output do?19:42
uvosset the Coordinate Transformation Matrix to the identiy matrix first19:42
Wizzup1,0,0 0,1,0 0,0,119:45
uvoswhats that?19:45
uvoswhen dose this appear19:45
Wizzupis that the identity you mean?19:46
uvosyeah ofc the 3x3 identity matrix19:46
uvoswhat you wrote is wrong19:47
uvosyou have to manny 019:47
uvosno nvm19:47
uvosits correct19:47
Wizzupuvos: map to output does that20:10
Wizzup(as well)20:10
buZzhi Guest320:37
Guest3Hey! You are doing interesting things! And when will the beta on the n900 be ready? I'm not a developer, just a user!20:43
WizzupI think the beta is at least a few months out, probably jan 2021 or so?20:47
WizzupI mean it's very much not set in stone, but for the n900 we need a few more things. (1) call audio routing (2) better power management, which relies on (3), (3) newer powervr driver20:48
Wizzup(1) I am working on now, (2) and (3) are more vague but progress has been made20:48
Wizzupand I think currently the n900 touch might be broken on all devices, so I have check what's up with that :)20:48
Wizzupuvos: regarding ^ any idea what could cause this?20:49
WizzupGuest3: anyway it might still be too optimistic, we seem to hit problems everywhere we go, so everything takes time ;)20:50
Wizzupuvos: some libinput vs evdev thing maybe?20:51
Guest3I wish you good luck guys! I've been following the project for a long time! I root for you very much!20:55
Wizzup:)20:56
uvosWizzup: no21:04
uvosits proubly the omap ddx being broken21:04
uvosgimmy xrandr output21:04
Wizzupbut it wasn't a problem with the rotation script21:04
uvosbecause we never installed the script on the n90021:04
Wizzupah.21:04
Wizzup# xrandr21:04
WizzupScreen 0: minimum 800 x 480, current 800 x 480, maximum 800 x 48021:04
WizzupLCD connected primary (normal left inverted right x axis y axis) 800x480      6020.32 +21:04
WizzupTV unknown connection (normal left inverted right x axis y axis) 800x480      6020.32 + 480x800      6020.3221:05
uvosfull output please21:05
uvosor is that it21:05
Wizzupthat's it21:06
uvosWizzup: time to step though https://github.com/maemo-leste/hildon-desktop/blob/1c3b31bca2ab0855f34af1e1a957cbb1cf06f125/src/util/hd-xinput.c#L287 then21:07
uvosor the equivalent in xinput21:07
uvosi would suspect this is wrong https://github.com/maemo-leste/hildon-desktop/blob/1c3b31bca2ab0855f34af1e1a957cbb1cf06f125/src/util/hd-xinput.c#L19721:08
uvosi have had this problem with the omap ddx before21:08
uvos"I think the beta is at least a few months out, probably jan 2021 or so" heh21:22
Wizzupuvos: what do you think? :p21:30
uvosi think its october 2021 allready21:31
uvosbut ymmv21:31
uvosi also think jan 2022 is optimistic21:32
Wizzupuvos: possible yeah21:33
uvosso plugg detection is with asoc-audio-graph-card is impossible21:43
uvosthe only way it can work is if the plug is on a gpio see asoc_simple_init_jack21:44
uvostmlind: ^^^^21:44
uvosso haveing plugg detection based on just a cpcap interrupt and snd_soc_component_driver soc_codec_dev_cpcap.set_jack is only possible if we abandon the generic asoc-audio-graph-card and write a whole driver for cpcap-audio21:45
uvosalso the generic asoc drivers are terribly documented (that is not documented at all)21:46
uvosso that royaly sucks21:46
tmlindheh22:02
uvostmlind: any ideas?22:03
tmlinduvos: keep top level asoc driver generic, add more generic or custom child devices to it?22:04
tmlindthat's what might help with the voice calls22:04
tmlindas linux knows nothing about it really22:04
tmlindwe don't have cpcap-gpio driver as we have not needed it, but i guess it could set that up as another gpio?22:05
uvostmlind: not sure how to approch that22:05
uvoslet me explain the current dilemma:22:05
uvosso i want to snd_soc_jack_report in the cpcap codec in the lower half of the threaded interupt, so i need a snd_soc_jack and i need to register it with the frame work22:07
uvosso far so good22:07
uvosso i need to asoc_simple_init_jack for wich i need to snd_soc_card. snd_soc_card is asoc-audio-graph-card for us.22:11
uvosother drivers like all the sound/soc/intel deal with this by creating a jack and calling set_jack on the codecs snd_soc_component_driver with this jack22:12
uvosthe codec then uses this jack to report its plug state22:12
uvosbut since  asoc-audio-graph-card dosent do this im in bind22:13
uvosi could go a head and create another  snd_soc_card just to report the jack22:13
uvosbut then pulse would not know where to apply the route to22:13
uvosso i really dont see any way forward other than to fork asoc-audio-graph-card to call set_jack on its componants22:15
tmlinduvos: yeah i don't know about that stuff, maybe send an email to kuninori morimoto asking how it should be handled with audio-graph-card?22:15
uvosbut that becomes really messy22:15
tmlindright..22:15
uvosbecause it shares all the componant handling with snd-soc-simple-card22:16
uvosso i would also have to fork snd-soc-simple-card-utils with it22:16
uvosnot great22:16
tmlindyup22:16
tmlindso before heading for a custom codec driver, the voice call stuff we should be able to deal with a separate child device22:17
tmlindright now the voice call codec is a child of mcbsp, while it really should be a child of the cpcap audio driver22:18
uvosyeah22:18
tmlindthat should solve the voice mixer issues22:18
uvosi helps when it dosent get powerd off when there is no audio on mcbsp22:18
tmlindyeah and if we want to add voice recording, we add something else that is a child of mcbsp and listens on the traffic22:19
tmlindso is there some gpio specified for the audio-graph-card binding for set_jack?22:20
uvossimple-card-utils grabs a gpio via of_get_named_gpio_flags for a jack, snd_soc_component_driver.set_jack just gives you a jack to report on see what the rt711 driver and codec do22:23
tmlindmaybe export a notifier function from audio-graph-card that the codec can call?22:24
uvosi gues but that seams like reimplmenting what set_jack seams to be for anywhays22:26
uvosalso i was hoping to not add api to audio-graph-card22:26
tmlindheh22:26
uvosconsidering my merge sucess so far22:26
tmlinduvos: so if you need to call set_jack from audio-graph-card, you need to provide something for the codec to use too?22:28
tmlindsounds like set_jack would be a nice generic feature to add..22:29
uvoshmm not sure if i understand, if audio-graph-card called set_jack on the codec22:29
uvosthe rest would just be in the codec22:29
tmlindi guess i don't follow where you need to call set_jack from..22:30
uvosas it would just call snd_soc_jack_report on the jack it got22:30
uvosfrom the codec22:30
uvosthe codec owns the jack22:30
tmlindok22:30
uvoser from the card22:30
uvosi mean22:30
uvosthe card ie audio-graph-card owns a jack22:30
tmlindok22:30
uvosand we need the jack in the codec22:30
uvosand set_jack gives the codec a jack to use22:30
uvosbut audio-graph-card dosent use it22:31
tmlindmaybe you can add something to find jack22:31
uvosthere is no api in the snd_soc framework to get a previously registerd jack from a snd_soc_card22:37
uvosso no dosent look like thats possible22:37
uvoswith out going and pulling it via private api :P22:37
tmlindyeah kuninori morimoto might have some good ideas there though22:41
tmlindsleepy time here now, ttyl22:44
uvosttyl22:58
Wizzupuvos: is this new h-d already in non-devel btw?23:00
Wizzup(with the touch screen problems on the n900)23:00
uvosWizzup: no23:02
uvosdid you stepp it with gdb23:03
uvosim pretty sure omap ddx's flaky reporting of the display size is the problem23:03
uvoseither way there is likely something wrong on the n900 side consierding xinput is broken too23:04
Wizzupdo you mean map-to-output?23:09
Wizzupyeah23:09
uvosyeah23:09
uvosstep through xinput map-to-output with gdb especcaly what happens in set_transformation_matrix23:10
uvosthat function i just copyed from xinput23:10
uvosand clearly the parameters it calculates are just 023:10
uvosso some input must be 0 too23:10
uvosyou can also trace hildon if you like instead23:11
uvosdosent matter same code23:11
WizzupI'll file a bug report and look at later, there's too much going on :)23:15
uvoswell its pretty severly broken23:15
lelMerlijnWajer opened an issue: https://github.com/maemo-leste/bugtracker/issues/577 (N900 touchscreen is broken with latest -devel hildon-desktop)23:16
uvosmaybe its the wrong crtc23:18
uvoscould you try different values for crtc in --map-to-output $(TSDEVCIE) $(crtc)23:19
uvosi mean it clames that LCD is the "connected primary"23:20
uvosso that would be a bug in and of itself23:20
uvosbut still23:20
Wizzuphow do I get a list of the crtcs?23:22
Wizzupah, --verbose23:22
Wizzupthere is only one crtc it seems23:22
Wizzupuvos: how do I trigger h-d to recalc the matrix23:26
Wizzup(i.e. so I can break and analyse)23:26
uvosyou cant23:26
uvosyou have to start it in gdb23:26
uvosit runs it on starup once23:26
Wizzuplooks like it happens right away when I press the power button23:26
Wizzuplol23:26
uvosoh ok23:26
uvoshmm23:26
uvosoh right h-d reregisters the xinput devices23:27
uvosso that they have a chance to close to save power23:27
uvosyeah thats right/fine23:27
Wizzup(gdb) print crtc_info->x23:33
Wizzup$1 = 023:33
Wizzup(gdb) print crtc_info->y23:33
Wizzup$2 = 023:33
Wizzup(gdb) print crtc_info->width23:33
Wizzup$3 = 023:33
Wizzupheight is empty too23:33
uvosgreat23:34
uvoswhat is in output_info?23:34
uvosoutput_info.name should be interesting23:35
Wizzup(gdb) print output_info->name23:37
Wizzup$6 = 0x7101b8 "LCD"23:37
uvosok23:37
uvosyeah looks broken23:37
uvoson xorgs side23:37
Wizzupint width = DisplayWidth(dpy, DefaultScreen(dpy)); int height = DisplayHeight(dpy, DefaultScreen(dpy));23:38
Wizzupthese are fine though23:38
Wizzup198in hd-xinput.c23:38
Wizzup(gdb) print width23:38
Wizzup$9 = 80023:38
Wizzupyeah so this becomes zero because of 0 / whatever: https://github.com/maemo-leste/hildon-desktop/blob/1c3b31bca2ab0855f34af1e1a957cbb1cf06f125/src/util/hd-xinput.c#L20723:39
uvosyeah23:39
Wizzupso we have to fix the ddx, or have the code treat the screen size being 0 separately ;)23:40
Wizzup*cough*23:40
uvoscheck what output_info->crtc struct RRCrtc contains23:41
uvosmaybe23:41
uvosbut  grasping at straws23:41
uvosbut yes looks like ddx is broken23:42
uvosdose n900 share the same ddx as d4?23:42
uvosi thought it did23:42
uvosso its a bit wierd that it works ok on d423:42
uvosyeah we could sanity check the matrix23:43
uvosand not apply anyhting if its not sane23:43
uvos(ie some axis is 0)23:43
uvostime for sleeping, ttyl23:46
Wizzup(gdb) print output_info->crtc23:47
Wizzup$13 = 6623:47
Wizzuphrm23:47

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!