libera/#maemo-leste/ Tuesday, 2022-05-03

buZzmornin'13:49
Wizzupyo13:51
buZzoh man, i realized i own a second droid4 last night13:52
buZztried it out for battery behaviour a bit, seems -tons- better than the 'new' battery in my other one13:52
buZz-but- dmesg still shows unable to detect the battery type13:52
buZzyet both are legit EB41 , as far as i can tell13:53
buZzandroid is happy with the batteries too, so i'm starting to think that cpcap-battery.c detection isnt working13:53
buZzWizzup: do you have leste running on a droid4 with legitimate EB41? could you give dmesg output? i'm curious , or pastebin /sys/class/power_supply/battery/uevent or something13:54
WizzupI don't have one with EB41 here atm13:54
buZzalrighty, maybe someone else?13:59
buZzor droid3 with original battery perhaps?13:59
WizzupI will have to check13:59
buZzno hurry14:11
buZzi wonder what the 'POWER_SUPPLY_TEMP' even means15:10
buZz'336' its outputting here during a charge15:10
Wizzupprobably 37C15:11
Wizzuperr15:11
Wizzup33C15:11
buZzoh, /10 , yeah that could work15:13
buZzanyone else online with a recent leste that would like to share dmesg or /sys/class/power_supply/battery/uevent ?16:20
buZzspecifically while aware of batterytype16:20
buZzoh impressive16:23
buZz'mplayer -nosound -fs -loop 0 bla.mp4' seems to almost fully lockup a droid4?16:24
buZzah, its using 'gl_nosw' as video output :)16:24
buZz-vo sdl works :)16:25
buZzpff, this battery in my second droid4 is somekinda superbattery?17:56
buZzor maybe i'm finally seeing all those powersavings work :D17:56
buZzbeen playing video on fullscreen with sw decoding and scaling for 90 minutes , with screen always on17:57
buZzbattery still at ~50%17:57
bencohso basically ... ~550mA for video decoding + display17:58
buZzseems so, just put up backlight to max brightness17:58
buZztrying to get a full calibration cycle in ;)17:58
bencohdon't you use the gpu video output btw?17:59
bencohscaling is gpu-accelerated17:59
bencoh(and it works great)17:59
buZzeh, i use -vo x11 now even18:00
buZzwhich gpu video output did you mean?18:00
buZz-vo xv?18:00
buZzi dont usually play video on the droid418:00
buZzbencoh: do you run leste on your device?18:01
buZz16:20:42 < buZz> anyone else online with a recent leste that would like to share dmesg or /sys/class/power_supply/battery/uevent ?18:01
buZz16:20:55 < buZz> specifically while aware of batterytype18:01
buZz^^18:01
bencohbuZz: yeah, I run leste18:05
bencohI should share my mpv config file (not now though)18:06
Wizzupuvos: btw did you saw my q yersterday about why the audio would work for tmlind ?18:06
buZzbut that request?18:06
buZzbencoh: i'm trying to see the cpcap-battery.c work well for anyone to detect a battery :)18:06
bencohI don't have it right now - oh and I use stable, not -devel18:06
buZzthats ok, should be in stable too18:07
bencohwell, will see when I get a hold of it then :)18:07
bencoh(do ping me in a few hours)18:07
uvoshi Wizzup18:12
uvosno sorry18:12
uvosill read the logs18:12
uvosbuZz: eeprom is exposed in sysfs18:12
buZzeeprom? did you mean nvmem?18:13
buZzthere's no nvmem exposed in sysfs on the cpcap entries18:13
uvosits a eeprom chip18:13
uvosbut yeah its exposed via nvmem if18:13
buZzdid you know the cpcap driver isnt even depending on nvmem?18:13
uvosyes i know18:13
uvoswait ill try to explain18:14
buZzerror even specifically says 'NULL device, cant find battery'18:14
uvosyes i know18:14
buZzon legitimate EB4118:14
uvosi added that18:14
buZzi'm gonna add 'detected EB41' stuff to it aswell, once i can see it even detect something :P18:15
uvosno dont18:15
uvosi allready did18:15
buZzoh, its not in the code18:15
uvosit just got lost18:15
uvosyeah i know it got lost18:15
buZzi ment adding it to the code18:15
uvosi have pachtes18:15
uvosim currently preparing 5.16 for lestee18:15
uvosbuZz: we cant parse anything from the eeprom, its some unkown binary format thats processed by a propriary deamon on android, that motorola replaced the normal android one with18:16
uvosbuZz: additionally we also blacklist the one wire bus driver that the eeprom is on18:16
buZzhttps://github.com/maemo-leste/droid4-linux/blob/wip/n900/maemo-5.15-cleaned-up/drivers/power/supply/cpcap-battery.c  <- this is the one on leste now btw18:16
buZznot what i linked yesterday18:16
buZzuvos: oh you're saying it -never- worked?18:16
uvoswe blacklist the bus dirver because this bus has to coninously be scanned to be in spec (as to support hot plugging)18:17
uvosunfortionally the means the device can never sleep18:17
buZzline 424 looks weird, and 437 line and on is the detection code18:17
uvoswe would have to change the way the bus driver works18:17
buZzso the nvmem driver?18:17
uvosno18:18
uvosthe bus driver18:18
uvosanyhow so yeah i never worked on leste18:18
uvoson my device it only works because i dont have it blacklisted18:18
buZzit* i assume :)18:18
uvosbut instead i rmmod the driver late in boot18:19
buZzbut you're not using a motorola battery i thought?18:19
uvosthen it works18:19
buZzbut 'glued in lipo' ?18:19
uvosbuZz: on one device18:19
buZzah ok18:19
buZzrmmod sounds fine18:19
uvosnot really18:19
uvosits a bad hack18:19
uvosanyhow theres nothing wrong with cpcap_battery really18:21
uvosjust the other drivers need work (ie charger needs to negotiate and the bus driver thing)18:21
uvosWizzup: tmlind afaik never used calls at all, as oposed to sms/ mobile data18:25
uvosWizzup: there is no way i can work18:26
uvos*it18:26
lelIMbackK closed a pull request: https://github.com/maemo-leste/mce/pull/55 (some small typo)18:27
Wizzupuvos: I think he did when I met him18:32
uvosWizzup: well its impossible with public code18:33
uvoshere ill update the bug sec18:33
uvosWizzup: https://github.com/maemo-leste/bugtracker/issues/58419:07
Wizzupmaybe we need to update the issue since even speakerphone doesn't fully work right19:12
Wizzupah you wrote that before19:12
uvosanyhow geting this behave right is quite the exercise in alsa expertise, i havent been able to make it work19:16
uvosand the fokls on the alsa/asoc ml where not able to help unfortionalty19:17
uvosor maybe im just missing how this is supposed to be implemented19:17
uvosno driver in mainline seams to have this setup19:18
uvosas far as i can tell19:18
uvosbut other devices must have the same problem19:18
uvoslike the pp should have the same issue iiuc how it works in hw, havent look at its driver19:18
Wizzupok19:23
Wizzup>19:23
WizzupAnyhow if you patch the kernel to allow writes on regmaps and set CPCAP_REG_RXCOA appropriately while in a call the call audio will work absolutely fine in every way.19:23
WizzupI guess that would be worth a shot19:23
WizzupDo you have a patch to that effect somewhere19:24
uvosWizzup: no but if you look in the kernel where the regmap debugfs is implemented19:26
uvosthe file has a really obivous name but i dont recall19:27
uvostheres a comment and a line you need to uncomment to make the regmaps wirtable from userspace19:27
freemangordonthis would be a terrible hack19:28
uvossure yeah19:29
uvosits just for debuging19:29
freemangordonwhat I don;t understand is why kernel assumes voice if to be not used19:29
uvosit has no way of knowing its used19:29
freemangordonso, modem is using it without kernel knowing that?19:30
uvosyeah the kernel cant tell when the modem is playing something19:30
uvosreally whenever the kernel routes the audio to the modem it must assume that the modem is doing something19:31
uvosbut the framework dosent make this easy19:31
freemangordonok, but does modem have sound driver?19:31
uvosno and the concept dosent make sense, the modem audio isent connected to cpu19:31
freemangordonhow,s that related?19:31
freemangordon(connected to cpu)19:32
uvoshow is it not related?19:32
uvoswhat would a kernel driver for modem audio even do?19:32
freemangordonprovide the bits needed to control power etc19:32
uvospower to what?19:32
uvosthe modem19:32
uvosthe modem driver dose that19:32
freemangordonnot only19:32
uvosanyhow in a way yes the solution is to write a modem audio driver sorta19:33
uvosjust one that dosent really comunicate with the modem19:33
uvosbut makes the framework happy19:33
freemangordonmhm19:33
uvosas i wrote in the bug19:33
Wizzupfreemangordon: of course it's a hack but if it helps just -testing- to see if voice calls work, I think that's nice...19:35
Wizzupand also something I could use :)19:35
freemangordonah19:36
bencohis the mic directly connected to modem on d4? or only the speaker?19:38
uvosboth mics are directly connected ot the modem19:38
freemangordonvute :)19:39
freemangordon*cute19:39
uvoshowever the modem cant use them19:39
uvoswithout the cpus consent19:39
uvosthe cpu neds to setup the route in cpcap19:39
bencohwhich is nice19:39
bencoh(no spying modem)19:39
freemangordonwell...19:39
uvoson d4 and bionic (but not d3)19:39
uvosthe lte modem can setup the routes and route the mic to the modem19:40
uvosbut it cant route the mic to itself19:40
bencohgah ...19:40
uvosonly to the qcom modem19:40
uvos(3g)19:40
bencohsounds silly19:40
uvosso only the d3 is truely safe if the modems coperate19:40
uvosbencoh: its just by accident19:40
bencohhaha19:40
uvosbencoh: the 3g modem has its own pmic19:40
uvosthe 4g modem is connected to cpcap because it uses it as its pmic19:40
uvosbtw the 4g modem's regulator is off on mainline19:41
uvosso really it cant do anything19:41
bencohI see :)19:41
Wizzupuvos: ok well if you have any hints re: what file that'd be heplful19:59
uvosWizzup: drivers/base/regmap/regmap-debugfs.c20:17
uvos#undef REGMAP_ALLOW_WRITE_DEBUGFS20:17
uvos#ifdef REGMAP_ALLOW_WRITE_DEBUGFS20:17
uvos/*20:17
uvos * This can be dangerous especially when we have clients such as20:17
uvos * PMICs, therefore don't provide any real compile time configuration option20:17
uvos * for this feature, people who want to use this will need to modify20:17
uvos * the source code directly.20:17
uvos */20:17
Wizzupok20:40
Wizzupmaybe we need to enable this for us20:40
sicelocallaudiod could possibly be used to toggle the register(s) when a call is established21:30
Wizzupwhat is this?21:33
siceloPreviously it was wys. It's used to handle calls when you need more than just routing audio21:37
Wizzupwys?21:38
siceloYes. Librem5 used it in the early stages of phosh21:38
Wizzupok, I don't know what wys is still21:38
Wizzupuvos: ok so I guess we just change the undef into define21:39
DPAEssentially, wys pipes some audio audio inputs to some audio outputs when there is a call (which it knows using dbus), and uses pulseaudio to do so. THe oudio devices involved are usually the modem, the speakers, and the microphone.21:49
DPAI think callaudiod just changes some audio controls / routing instead, and may not be applicable everywhere, but I'm not entirely sure.21:50
uvosthis is not applicable to mapphones no real routing has to be done by cpu or pulse or pipewire, its all in hw21:58
uvosi dont think enabling writable regmaps is sane for anything except on a dev machine to write a better audio dirver/ setup21:59
uvoslooking at source: callaudio just switches around pulse mixer values22:01
uvossame thing sphone allready dose22:01
uvosthere is no problem with this part, see phinephone22:02
bencohbuZz: http://pastebin.notk.org/pastebin.php?show=f6583f02c22:39
bencohbuZz: http://pastebin.notk.org/pastebin.php?show=m1871afb5 battery (I changed mine a few years ago, so I'm not sure it's a legit one)22:40
bencoh(hmm, chargefull=1371886 seems kinda low to me ...)22:41
uvosthats really good for a oem battery22:41
bencohseriously?22:42
uvosi think thats around the best oem battery i have22:42
uvosand i have like 1022:42
uvosyeah22:42
bencoh:/22:42
uvosi mean they are all over 10 years old22:42
bencohI dunno, don't they produce those for other products as well?22:42
uvosor rather 8 the youngest i have is 8 yo22:42
uvosbencoh: no22:42
bencohah22:42
bencohdoomed ...22:42
uvosnot really since any lipo cell will do :)22:43
uvosthe d4 having screw terminals makes this easy22:43
buZzbencoh: 1.3Ah ? yeah pretty ok23:14
buZzi do think we can shove more Ah in the same space23:15
buZzbencoh: ahhh, mpv supports GLES video acceleration! nice23:15
bencohwell, n900's polarcell holds ~1400mAh, and it's smaller, so ... yeah23:17
bencohbuZz: I haven't looked back since I configured it (mpv/gles)23:17
buZzbencoh: well i learnt today, the battery detection is 100% disfunctional atm :)23:18
buZzto get it working we need a rmmod in init script somewhere23:18
buZzas far as i understand it23:18
bencoh?23:21
buZzhttps://www.toptal.com/developers/hastebin/raw/acikefujan23:21
buZzthat last sentence , 'i' should be 'it'23:24
bencohoh, that23:28

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