libera/#maemo-leste/ Sunday, 2022-07-31

Wizzupsure, I'm just waiting for the kernel build to finish to I can test earpiece :)00:00
Wizzupchecking if this phone still has android00:05
Wizzupkernel is almost done00:06
Wizzupuvos: hm, I don't think I get any audio now00:25
Wizzupwait I can hear over earpiece00:25
Wizzupbut indeed the mic does not work00:26
Wizzuphmm...00:27
Wizzupyeah, to be continued00:28
Wizzupuvos: shall I make a fixup commit to disable speaker right pga?11:36
Wizzupuvos: so yeah I think CPCAP_REG_RXOA.CPCAP_BIT_A1_EAR_EN is required at least for the earpiece11:51
Wizzupbut we do have the earpiece pga in your force enable11:52
Wizzupoh yeah, that's why I did hear things :)11:55
Wizzupuvos: yeah ok so we don't enable the mic capture pga's it seems11:56
Wizzupshould I enable the "Left Capture Route", or do something else?11:59
Wizzupcould also just enable Microphone 1 PGA and Microphone 2 PGA11:59
Wizzupuvos: fyi I called this one 5.18.14exp13:17
Wizzupuvos: so on top of my latest patch I also need this:13:47
Wizzuppython regtool.py set CPCAP_REG_CC.CPCAP_BIT_MIC1_CDC_EN 113:47
Wizzupthen earpiece works ok13:47
Wizzupand then headphone works for input, but not for output13:51
Wizzupuvos: so that register is "ADC Right" in the codecs/cpcap.c13:57
Wizzupok, kernel that builds now should work out of the box for speakerphone and handset14:05
Wizzupnot yet for headset, only mic works there14:05
Wizzup(no android dump to compare with)14:05
Wizzupuvos: ok with latest experimental it should work ok for speaker and earpiece15:27
Wizzupuvos: I suspect we should just make the dapm force enable list a little more exhaustive just in case15:28
Wizzupuvos: one time it didn't work, but I had pavucontrol open (the gtk version), maybe that somehow affected it, I did run a reg cmp and there was a small difference15:45
Wizzuphere:http://dpaste.com/3JD7B5Y3D15:45
Wizzupso maybe I should at least also enable the left adc15:45
eloyI was looking into porting FBReader from Fremantle, what is the logical place where the svn repos are located? I could only find this: http://repository.maemo.org/extras/pool/fremantle/free/source/f/fbreader/17:36
uvosok17:48
uvosill try and dump headset at some point17:49
Wizzupeloy: there is no one repos for the svn, but let me search for you19:14
Wizzupeloy: so normally I look at garage.maemo.org but it seems to be down (atm)19:16
eloyah, well thanks already :)19:21
WizzupI asked about garage, let's see19:22
Wizzupeasiest might be to just take the patches (assuming they are patched applied onto orig source) and see if they can be forward ported19:23
Wizzup(assuming you want to use latest fbreader as a base)19:23
Wizzupuvos: ok, that'd be nice19:37
uvosmusscle memory really kills me when using the d4 with android19:54
uvoscapslock/shift, home is not tasknav the menu button is instead19:54
uvosWizzup:20:01
uvoshttp://uvos.xyz/maserati/stockinfo/call20:01
Wizzupthanks20:09
Wizzupand the cpu recording txt, do you know what the output was when recording20:10
Wizzup(I can try to guess, just wondering if you remember)20:10
uvospretty sure i dident change it20:10
uvosie its default - earpiece20:10
eloyWizzup: yeah, I'd like to use the latest. I tried compiling the latest Fremantle source, but I'm running into all kinds of C++ errors, so that sounds like a better approach. Modern compilers are less tolerant I think.20:13
Wizzupeloy: either that or some of the libs it uses changed20:20
Wizzupuvos: ok, ty, will investigate what is needed momentarily for headset20:20
Wizzupuvos: looks like we need CPCAP_REG_RXOA.CPCAP_BIT_ST_HS_CP_EN to be 120:30
uvosWizzup: sensible20:30
uvosdose some widget controll this bit/20:30
uvos?20:30
Wizzupwill check momentarily20:31
eloybtw, the latest status link in the topic here still links to the fourteenth update instead of the sixteenth20:32
Wizzupeloy: fair enough...20:32
Wizzupwe'll have another newspost soon20:33
eloy:D20:34
uvosnewspost: mapphone calls work!!!!!20:35
uvosWizzup: do you know whats needed in sphones pulse output swtiching callback?20:35
uvosi want to takle this nex20:35
uvost20:35
uvosunless you have this laying around20:35
WizzupI looked into the api, but didn't have it working, -yet-20:36
Wizzuplet me find the code20:36
Wizzup5 mins multitasking a bit too much...20:36
uvosno rush20:36
Wizzuphttps://github.com/maemo-leste/sphone/commit/7d58c4577c844a8793c42434c4c80eed766f6197 it was this, but it doesn't work atm, I probably made some mistakes, I didn't debug it at all yet and iirc it hard crashed20:37
Wizzupthat's all I have in any case20:37
uvosWizzup: ok20:38
Wizzupprobably even some string corruption mistake or so20:42
Wizzupbut that should at least be the right pa call :)20:42
Wizzupuvos: so the corresponding entry is "Headset Charge Pump"20:45
WizzupDAPM wise I think we're ok20:45
Wizzup"Headset Right PGA"20:45
Wizzup"Headset Left PGA"20:45
Wizzupuvos: not sure if I see any code at all that sets this reg20:48
Wizzupwell, I see a line that sets it to 020:48
Wizzupmaybe the headset charge pump needs a dapm entry, let me debug20:52
Wizzupgreat now ofono ignored the 'accept call' :D20:53
uvosi mean if its nessecary for the pga to work at all20:53
uvosit should just be set with the pga20:53
uvosimo20:53
Wizzupit is20:53
Wizzup{"HSR", NULL, "Headset Charge Pump"},20:53
Wizzup{"HSL", NULL, "Headset Charge Pump"},20:53
uvosright then i dont see the point of add antoher widget20:53
Wizzupand:20:53
uvoswait the widget exists?20:53
Wizzup{"HSR", NULL, "Headset Right PGA"},20:53
Wizzup{"HSL", NULL, "Headset Left PGA"},20:53
uvosand it dosent set the reg?20:54
Wizzupexists where?20:54
uvosin the widget array20:54
WizzupI think so...20:55
uvosSND_SOC_DAPM_SUPPLY("Headset Charge Pump",20:55
uvosCPCAP_REG_RXOA, CPCAP_BIT_ST_HS_CP_EN, 0, NULL, 0),20:55
uvosyes20:55
uvosCPCAP_BIT_ST_HS_CP_EN20:55
Wizzupright, but it's not in the list, but it is referred to from the widget20:55
uvosit sets the reg20:55
Wizzupit sets it to 0 though?20:55
Wizzupbut yeah, it might set it to 1 later20:55
uvosno it sets it to 0 at startup20:55
Wizzupin any case our current code -does not- set it20:55
Wizzupmaybe it's dapm messing with it, let me try to find out now20:55
uvosbecause the Headset Charge Pump is not active probubly20:56
uvoscheck in debugfs20:56
Wizzupactive dapm wise?20:56
uvosyes20:56
Wizzupyes, I wsa at that point20:56
uvosits a dapm widget20:56
Wizzupand then ofono played a joke on me20:56
uvoshe20:56
Wizzupyeah I think that's it20:57
Wizzupso we just force enable the charge pump?20:57
Wizzup# cat Headset\ Charge\ Pump20:57
WizzupHeadset Charge Pump: Off  in 0 out 0 - R2076(0x81c) mask 0x200 out  "static" "HSL" out  "static" "HSR"20:57
Wizzupweird though, I figured HSR or HSL being forced on would power this up20:57
uvosno20:57
uvosforcing somethign dosent affect the other nodes at all20:57
Wizzupah20:58
uvostheres a special check for that20:58
Wizzupwell, let me build a kernel with added then :)20:58
uvosanyhow setting them on by changeing the struct dosent work either20:58
uvosbecause the chain isent checked for some reason20:58
uvos(that i dont understand at all)20:58
Wizzupright21:00
Wizzuplet me just add this one for now and test21:00
Wizzupbuilding now21:03
eloyokay this might not be the most popular choice here, but I'm amazed that I could clone a NodeJS project on my Droid 4, install a whole bunch of dependencies using npm and run a local webserver that does audio stuff and it just worked flawlessly :D21:03
Wizzup:D21:05
Wizzupeloy: btw garage.maemo.org is back up now, but I can't find fbreader stuff on it (I am not very proficient with garage.maemo.org)21:06
Wizzupuvos: the recording to cpu part I suppose would just reroute the call audio to ... what exactly?21:36
siceloeloy: which source did you want to use? fbreader is closed source since a while ago, iirc21:36
Wizzupsicelo: you sure? I don't think so21:36
Wizzupoh, maybe it is now...21:37
WizzupFBReader is not open-source since 2015. For developers, we offer FBReader SDK: a library that allows creating own ebook readers.21:37
WizzupI have 0.99 locally on my computer, which is foss for sure21:37
eloyyeah, it's sad, but the latest foss version will live on forever :P21:38
Wizzuphttps://fbreader.org/files/desktop/fbreader-sources-0.99.4.tgz this still works at least21:38
sicelo there's not FBReader 2.x :-)21:38
Wizzupuvos: so re: sphone, I will try to fix the rtcom logging now, and then next step I think is to try to make a glib telepathy plugin for calls (and sms, but I want to be able to turn that off)21:39
siceloeloy: anyway, so yes, there was no garage repo for it. using garage was not a requirement.21:39
eloysicelo: I see21:39
Wizzupsicelo: yeah we were just searching for a svn or git repo21:39
Wizzupbut in some cases those don't even exist and it's just a source tarball upload I think21:39
uvosWizzup: the call recording path cant really work at all rn21:40
uvosi just ignore it21:40
uvoswe dont even have the dai to use it21:41
uvosWizzup: so can you switch outputs via pactl?21:41
uvosi dont get i - or pactl is buggy21:41
Wizzupuvos: let me try to do it now21:42
uvospactl list21:42
Wizzupyeah I know how it should work, let me try :)21:42
uvosSink #021:42
uvosok21:42
uvosalsa_output.0.HiFi__hw_Audio_0__sink, Ports: Earpiece: Internal Earpiece (priority: 200)21:42
uvospactl set-sink-port alsa_output.0.HiFi__hw_Audio_0__sink Earpiece21:43
uvosFailure: No such entity21:43
uvos???21:43
uvospactl set-sink-volume alsa_output.0.HiFi__hw_Audio_0__sink 0.121:43
uvosworks21:43
WizzupI am looking at set-sink-port, but it's not clear to me how to ref the sink21:44
eloyWizzup: yeah, so I guess I'll try to extract the Maemo specific stuff from the tarball and add that on top of the latest open source fbreader repo + other deps21:44
uvosalsa_output.0.HiFi__hw_Audio_0__sink works for volume21:44
Wizzupuvos: got it21:44
Wizzuppactl set-sink-port alsa_output.0.HiFi__hw_Audio_0__sink '[Out] Earpiece'21:44
uvosie set-sink-volum21:44
uvosah out21:44
uvossilly21:44
eloymight be worth to look for fbreader forks that occured since 201521:44
Wizzupuvos: yes, silly21:44
Wizzupit also works with number21:45
Wizzuppactl set-sink-port 20 '[Out] Earpiece'21:45
Wizzup(#20 for me)21:45
Wizzup(useless otherwise, just fyi)21:45
uvossure21:45
uvosok21:45
Wizzupso that's probably why my code did not work :)21:45
uvosyeah21:45
Wizzup(the [Out] missing)21:45
Wizzuploll21:45
uvoswe need a real way to figure out what sink to use tho21:46
uvosi gues you can query the default sink somehow21:46
uvoschecking21:46
Wizzupso I think we can probably configure this21:46
Wizzupi.e. we don't need it to be alsa_output.0.HiFi__hw_Audio_0__sink21:46
Wizzupwe have /etc/pulse/leste.pa.d21:47
uvossure but just using the default sink should be fine21:47
Wizzupbut yes, that is another thing my code didn't do yet - enumerate the sinks to find the 'right' one21:47
Wizzupprobably21:47
uvosits alsa_output.0.HiFi__hw_Audio_0__sink in hifi mode21:47
WizzupI would find one that has the ports we want21:47
uvosand changes to alsa_output.0.Voice_Call__hw_Audio_0__sink21:47
uvoswhen in voice call21:47
uvosso that tracks21:47
Wizzupok, latest kernel is in experimental, will test hp21:48
WizzupI need to get a new sd card for my d4 I think, I/O is so slow now21:55
Wizzupkernel upgrade makes the device not usable for some time21:55
Wizzupall I/O just blocks21:55
Wizzupuvos: now CPCAP_REG_RXOA.CPCAP_BIT_HS_L_EN and CPCAP_REG_RXOA.CPCAP_BIT_HS_R_EN need to be set manually22:12
Wizzupmaybe that's a different problem22:12
Wizzupidgi22:15
Wizzupuvos: also if you figure this out, please default to earpiece (ofc hp if hp is plugged) :)22:27
Wizzupnot speaker22:27
uvosWizzup: sphone dose this alleady22:43
uvosit sets earpiece when it switches profiles22:43
uvosofc this dosent do anything atm22:43
Wizzupok23:12
Wizzupright23:12
uvosWizzup: seting routs works now23:22
uvosWizzup: did you change rtcom yet?23:23
uvosif so please push so i can make a sphone release for both23:23
Wizzupnot yet @ rtcom23:24
Wizzupprobably tomorrow23:25
Wizzup:)23:25
uvosWizzup: anyhow new sphone with working audio_route_triggeris on the way https://github.com/maemo-leste/sphone/commit/303cf47d0d0322120044a67136e4510a4b887ee423:29
Wizzupsweet23:30

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