libera/#maemo-leste/ Tuesday, 2023-01-17

uvos__rafael2k_: theres nothing to debug09:28
uvos__its as designed09:28
uvos__https://github.com/maemo-leste/maemo-statusmenu-volume/blob/b205df8ce10fc03ada25c7baff538d46ebf07923/src/item.c#L49909:30
uvos__you could add support for a special value here "default" that makes the applet query pa for the default sink and use that09:31
rafael2k_but it is ok it does not work?09:36
rafael2k_volume just does not change09:36
rafael2k_if it changed the default I would be happy09:37
uvos__rafael2k_: yes because the stream it changes is set in that config file09:46
uvos__and that stream only exists on mapphones09:46
uvos__moveing that config file into leste-config is one option, but just asking pa what the correct stream is is better (since it gets that from ucm)09:47
uvos__however support for the config file must remain09:47
uvos__since pa might not allways know in voice call mode09:47
uvos__depending on how the device implements voice calls09:47
rafael2k_I think using default would be fine as a start, no?10:03
rafael2k_(or add some setup to a pinephone specific config?)10:03
rafael2k_I don't really get it10:04
uvos__change should be: query pa for the default sink if the key it checks on the line linked above dosent exist10:05
rafael2k_right10:05
uvos__you can check the sphone pa module on how to query pa for defaults10:05
rafael2k_tks11:05
Wizzupwe need to make the volume applet better in any case11:08
Wizzupwe need separate streams for speaker, headphone, bt sets, in call audio (speaker), in call audio (hp/earpiece)11:15
Wizzups/streams/volumes/11:16
Wizzupuvos__: any suggestions for a partition to install leste on, on the tablets?12:45
uvos__not really12:49
uvos__you can user userdata but that breaks android12:49
uvos__or you can use emtstorage12:49
uvos__but then android breaks mainline by trying to format it fat12:49
uvos__either way it sucks12:50
uvos__all other partitons are to small really12:50
Wizzupok, so I'd have to override android install then12:52
uvos__yeah and im not even sure you can flash to any of these12:54
uvos__i dimmly remember flashing linux to some small 200mb partition12:54
uvos__to then have it shuffle itself over to emtstorage12:54
uvos__either way its painfull12:54
Wizzupso which partition do we need to keep?12:54
uvos__well mbm and mbmloader for one xD12:55
uvos__i think the partion i used initally was cdrom12:56
uvos__its small 200 mb or so12:56
uvos__but android dosent need it at all12:56
uvos__http://uvos.xyz/maserati/stockinfo/partitions/xt894.txt12:56
uvos__mz617 layout is simmular12:56
uvos__android needs eveything above system and userdata to boot12:57
uvos__besides cdrom and bpsw (dosnt exist on mz617)12:57
Wizzupright, I think I might just nuke android from this flash and install leste for testing12:58
uvos__above logo.bin is permanent brick territory12:58
uvos__problem with nukeing android is12:58
uvos__that mainline cant really charge the tablet12:58
Wizzupno?12:58
uvos__the tablets have another chargeing chip12:58
uvos__ you can charge it via the same cpcap charger12:59
uvos__but its really slow12:59
uvos__and on mz617 cant make it12:59
uvos__power consumption is higher than cpcap-chargers current limit12:59
uvos__becasue we cant turn off the pannel12:59
uvos__i would recommend goint with emt13:00
uvos__since android charge mode will still work13:00
Wizzupemt = emstorage?13:02
WizzupI suppose the other thing I can do is hook it up to a lab supply, but yeah, then I need to take it apart13:02
uvos__Wizzup: btw volumes13:41
uvos__Wizzup: not the applet is fine13:41
uvos__Wizzup: none of that is the applets concern13:41
uvos__that was extream nokia anti pattern13:41
uvos__the applet just changes whatever is the currently active stream13:42
uvos__pa is resposable (and dose) restore volumes13:42
uvos__now we do need some settings applet or so to change specific volumes even when not active13:43
uvos__but thats not the status applet13:43
uvos__and pavucontrol-qt is fine for this purpose for now anyhow13:43
uvos__the noika setup was particually insane13:43
uvos__because the status applet only restored the call volumes13:44
Wizzupbut quite prctical for the user13:44
Wizzupbut yeah13:44
uvos__all other volumes where somehwere else13:44
uvos__thats just insane implementation13:44
uvos__not sure how the user case who restores volumes13:44
uvos__*cares13:44
Wizzupsure, who is not a problem13:45
uvos__right an its pa13:45
uvos__(dose so allready :)13:45
uvos__)13:46
uvos__so the volume applet needs no changes13:46
Wizzupok13:46
rafael2kour tentative camera app: https://github.com/piggz/harbour-pinhole/14:34
rafael2kwill test it at night after my daughter sleeps14:34
freemangordonuvos: afaik stock nokia pplet restores all volumes14:42
freemangordonnot only call volume14:42
Wizzuprafael2k: sweet14:50
uvos__freemangordon: no14:54
uvos__it only stores call volume14:54
uvos__it stores no other volumes14:54
uvos__look in git history14:54
uvos__idk who dose everything else14:54
Wizzupthat is re'd applet14:54
uvos__but its not the applet14:54
freemangordonwell, this is REed code14:54
Wizzupnot necessarily what nokia did14:54
Wizzupright14:54
uvos__ok14:54
uvos__well then it was re'd wrong14:55
uvos__at the very least14:55
uvos__anyhow pa dose it so it dosent matter14:55
freemangordonwhich was using module StreamRestore2 which was missing in upstream PA14:55
uvos__sure14:55
freemangordonso I had no option but to remove that14:55
uvos__remove where?14:55
freemangordonalso, in fremantle various streams are tagged with 'maemo-...'14:56
freemangordonremove from the code14:56
uvos__it works in practice on leste right now for call audio14:56
uvos__pa restores stream volume on ucm switch14:56
uvos__also port switch14:56
uvos__but thats less important14:56
freemangordonok14:56
freemangordonthat's great14:57
freemangordonwe also somehow have to imlement support for volume stepa14:57
freemangordon*steps14:57
uvos__hmm14:57
uvos__steps?14:57
Wizzupcan't it just step 5%?14:57
uvos__thats what the volume applet dose14:58
uvos__in its code14:58
freemangordonyes14:58
uvos__not sure what else would be needed14:58
freemangordonbut it should take the parameters to calculate the number of steos from the stream14:58
freemangordon*steps14:58
uvos__pretty sure this is what happens14:58
freemangordonnot really, as I am not aware anybody setting those parameters14:58
freemangordonunless I am missing something14:59
freemangordonsec, will show you what I mean14:59
freemangordonugh, seems someone removed the code15:00
freemangordonthis: https://github.com/maemo-leste/maemo-statusmenu-volume/blob/d6c3ffa8de080e82fe66881163594da2ca73ce19/src/item.c#L97315:02
uvos__this is unnesscary15:02
uvos__since ucm tels pa how manny steps there are15:02
uvos__and it translates this into a 0-1 float15:02
uvos__so the applet dosent have to care about this at all15:02
freemangordonso it is in UCM?15:02
uvos__(i remove it)15:02
freemangordonso, we have 5 steps while in call and 20 otherwise(for example)?15:03
freemangordonuvos__: ^^^ ?15:03
uvos__yes - no, so in ucm you can set how manny steps there are15:04
uvos__but this affects alsa only15:04
uvos__pa just gives 0-1 range15:04
uvos__and rounds to the nearest alsa step15:04
uvos__but if you want that behavior you only need to have the applet set 0.2 0.4 etc15:04
uvos__when in call15:04
freemangordonand how do you control that?15:04
freemangordonhardcode?15:04
uvos__same way as that code, check what stream your controlling15:05
uvos__the applet allready and still knows if its call audio or not15:05
freemangordonyes, but how does applet know on how many steps to divide that range per particular stream?15:06
uvos__i could check what alsa control pa is using, pa exposes this15:07
freemangordonbecause the code you removed was getting that info from stream properties15:07
uvos__then it comes from ucm15:07
freemangordonso, if ucm supports custom properties per stream, then we shall restore the removed code in some shape to get it from there15:08
uvos__no15:08
uvos__im pretty sure you can change pas behavior anyhow15:08
freemangordoninstead of hardcoding the number of steps per stream15:08
freemangordonok, if that's the case yes15:08
uvos__pa rounds15:09
uvos__need to check what happens to the volume of the stream15:10
freemangordonbut please, do POC and try to make a configuration in which we have to press volume up only 5 times to go from 0 to 100% while in call and 20 times when not15:10
uvos__well chanigng call audio volume dosent work anyhow15:10
uvos__so15:10
uvos__that should work first15:10
freemangordonugh15:10
uvos__before we deal with this comperatively unimportant detail15:10
freemangordonany idea why?15:10
uvos__yes15:10
freemangordonsure, not something urgent15:10
uvos__pa has no idea there is any audio15:10
freemangordonheh15:10
uvos__so it refuses to change anything15:10
freemangordonpasstrough15:11
uvos__since there is nothing to change15:11
freemangordonI guess thats some alsa thing15:11
uvos__its the same thin as allways15:11
uvos__the omap4 has no idea call audio is active on mapphones15:12
uvos__since its not involved15:12
freemangordonok15:12
freemangordonbut, this is d4 specific, no?15:13
uvos__sure15:13
uvos__and pp15:13
freemangordonah15:13
uvos__so everywhere call audio works in the first place15:13
uvos__d4 + freinds ofc15:13
uvos__they are alle the same15:13
freemangordonso, do we need some PA module that is aware of USB audio? or?15:14
uvos__there is no usb audio15:14
freemangordonah15:14
uvos__the audio dosent enter the procesor at all15:14
freemangordondirectly from the modem to the earpiece?15:14
uvos__yes15:14
uvos__we need some module that fakes a active stream i gues15:14
freemangordonomg15:14
freemangordonyeah15:14
freemangordonbut, we already have kernel modem audio device on d4, no?15:15
uvos__no not really15:15
freemangordonI would say it should take care of that15:15
uvos__not like that15:15
uvos__no idea if fakeing a active stream is ok in alsa15:15
freemangordonok, I admit this is out of my area of expertise15:16
uvos__the kernel framework is kinda not ready for this15:16
uvos__we have this problem alle the time there15:16
freemangordonmaybe we shall ask upstream how to proceed15:16
uvos__it dosent uderstand that its mixer is controlling audio that its not playing or reciveing15:17
freemangordonumm, wait, is that what all HW mixers do?15:17
freemangordon*isn;t15:17
uvos__no15:17
uvos__hw mixers allways have a stream that comes from the kernel somewhere15:18
freemangordonanalog mixers I mean15:18
uvos__oh sure, but those old devices dont use asoc15:18
uvos__if you have a classic alsa driver you can just implement random controlls15:18
freemangordondon;t tell me upstream kernel has no support for analog mixer/amplifier15:18
uvos__im not15:19
freemangordoncan;t we use that?15:19
uvos__but in the asoc framework no15:19
uvos__we have asoc driver15:19
uvos__:P15:19
freemangordonumm15:19
freemangordonwhat about another driver?15:19
uvos__sure you can write another driver15:20
uvos__or rather replace the asoc one15:20
freemangordonhmm15:21
freemangordonwe have simple amplifier for start15:22
freemangordonit won;t help15:22
freemangordonbut, at least might give us a clue how to write a driver that has analog ports only15:22
freemangordonuvos__: what about if we add volume support to simple-audio-amplifier?15:32
freemangordonhow is volume actually controlled?15:32
freemangordonAT commands?15:32
freemangordonalso, I see no such requirement that asoc component must be digital only15:33
freemangordonsee simple-audio-amplifier/simple-audio-mux15:33
uvos__freemangordon: this isent the problem at all15:35
uvos__the mixer is there15:35
uvos__its just linux thinks its not active15:35
uvos__because it is connected to the omap415:35
uvos__its jsut also connected to something else entirely that might need it15:36
uvos__this is about pm purposes15:36
uvos__and then we have pa15:36
uvos__that only thinks streams are active it it is involved15:36
uvos__it has no concept at all of a stream that isent inside of pa15:36
freemangordonuvos__: see simple amplifier15:36
freemangordonyou can attach vcc to it15:37
uvos__no15:37
uvos__you can not15:37
freemangordonyes, see the bindiongs15:37
freemangordon*bindings15:37
freemangordonhttps://elixir.bootlin.com/linux/v6.1.6/source/Documentation/devicetree/bindings/sound/simple-audio-amplifier.yaml#L2415:37
uvos__yes but then you broke audio pm15:37
uvos__its not that simple15:37
freemangordonwhy? vcc is enabled for as long as amplifier is needed in the cirrent routing, no?15:37
freemangordon*current15:38
freemangordonI am not saying it is simple15:38
uvos__yes but there are manny manny devices and there are coplex interactions when witch are needed15:38
uvos__the problem is we can tell this system that chain is needed because of the modem15:38
uvos__*that a chain15:38
uvos__we could just reimplement this system (that the asoc frame work provides)15:39
uvos__by writeing a classic alsa driver but we absolutly do not want to need to do that15:39
freemangordonok, but that we shall describe the chains in DTS, no?15:39
uvos__no15:40
freemangordon*but then15:40
uvos__the chains are created in the cpcap driver15:40
uvos__dts is only tangentally involved15:40
freemangordonright, but you can attach simple amplifier in DT15:40
freemangordonto the cpcap driver output sptream15:40
freemangordon*stream15:40
uvos__there is no stream15:40
freemangordonoh, wait15:40
uvos__the amp is cpcap15:41
freemangordondo you say that nobody knows when a call audio is started?15:41
uvos__yes15:41
uvos__alsa dosent know15:41
uvos__or asoc rather15:41
freemangordonI see15:41
uvos__and there is no standart way to tell it15:41
Wizzupunless we activatie something in alsa with ucm15:41
uvos__no15:41
Wizzupcan it not flip some call switch?15:42
uvos__the problem is that the asoc framework has no concept of a stream being active unless its activate by a root dai15:42
uvos__afaik15:42
freemangordonI see15:42
freemangordonumm... maybe we can fake a microphone?15:43
freemangordonmicrophone input that is15:43
uvos__maybe something like that15:43
uvos__anyhow this is a different problem than pa15:43
uvos__even if the kernel knows15:43
freemangordonand attach amplifier to it15:43
uvos__pa dosent care15:43
uvos__pa just cares about its own streams15:43
freemangordonyeah, I am talking about kernel15:43
uvos__it wont let you just change volumes of hw mixers15:43
uvos__it dosent have support for hw mixing at all15:43
Wizzupwhy do all banks require android apps now grrrrr15:44
freemangordonhow that works in fremanlte on n900?15:44
Wizzupsorry offtopic15:44
uvos__freemangordon: no idea15:44
freemangordonit has analog amplifier for sure15:44
uvos__freemangordon: presumably they had pa modules that do unnatural stuff15:44
freemangordonI don;t think so15:45
freemangordonlike, they had15:45
freemangordonbut not in that regard15:45
uvos__also on n900 its not so hard15:45
freemangordoncome on15:45
uvos__since the audio allways passes though pa15:45
uvos__and the cpu15:45
freemangordonright, but you have preamplifiers and whatnot15:45
uvos__so15:45
freemangordonexposed as alsa controls15:45
uvos__on n900 you need only feed modem audio into pa as a mic15:46
uvos__and it will work15:46
uvos__since the cpu gets the audio15:46
freemangordonright15:46
uvos__and the modem is just a dai15:46
uvos__so its "easy"15:46
freemangordonwell, it does not work like that on fremantle (thay have pa module for the modem afaik)15:46
freemangordonthat feeds the data to pa15:47
uvos__ok but the point is pa sees the audio15:47
uvos__on d4 there is no audio to see15:47
freemangordonright15:47
freemangordonI agree15:47
freemangordonbut, imagine if you have an analog amplifier you have to control with alsa15:47
freemangordonyou have a register that controls the volume15:47
freemangordonhow would you present that to the kernel?15:48
freemangordonno dai, nothing15:48
uvos__well if you do it via asoc15:48
uvos__the kernel wont care unless you also tell it some dai is feeding it and that dai is playing15:49
uvos__or you can write a classic alsa driver15:49
freemangordonso, why do we have asoc driver then if it is not fit for the purpose?15:50
freemangordontell me again, why don;t we want to write alas driver for the modem?15:53
freemangordon*alsa15:53
uvos__how would that help15:53
uvos__who would controll the registers? the "modem" driver or the asoc audio drivers15:54
freemangordonmhm15:54
freemangordonmodem driver15:54
uvos__they need to control the same registers at different times15:54
uvos__thats insane15:54
freemangordonok, no idea then15:55
uvos__just have a modem driver that fakes a dai15:55
uvos__but no idea if thats ok15:55
freemangordonhow android kernel does it?15:55
uvos__for upstream15:55
uvos__userspace just walks over registers15:56
freemangordonI don;t think we can fake a dai15:56
freemangordonlike, kernel will expect audio data at some point I guess15:56
uvos__no idea15:57
uvos__i think you might be able to get away with this15:57
uvos__major hack ofc15:57
freemangordonhmm, I wonder how mcbsp is supposed to work15:57
freemangordoniirc it has the same 'pass-through' mode15:57
uvos__no idea16:31
SuperMarioSFHello there.17:47
SuperMarioSFI'm back from Shenzhen, and I have a established way to send package globally now.17:47
SuperMarioSFWizzup, plz check email17:47
Wizzupwill do in a bit :)17:48
SuperMarioSF;)17:48
Wizzupuvos: maybe mz615 is easier testing wise (because it has microsd card slot)19:00
vandysJust posted https://github.com/maemo-leste/bugtracker/issues/695 but will close if somebody here can help.  How to enable telephony on Pinephone w. install of latest nightly build?19:23
norayri found flickrdemo program that comes with nokia license.19:28
norayri read it but i didn't understand if i can derive from it and publish.19:28
norayri really need a flickr app on maemo.19:29
bencohhttp://maemo.org/packages/view/quickflickr/ maybe? seems free/opensource19:31
bencohit's quite old though, I'd be kinda surprised if the same API still works19:32
Wizzupwe have no libsharing yet19:48
Wizzupjfyi19:48
Wizzupvandys: let's see, did you install beowulf or chimaera?19:49
Wizzupas in, what was the image name?19:49
dsc_https://plak.infrapuin.nl/selif/xpfzjbxu.mp420:28
dsc_this is using neural machine translation for local translations20:30
dsc_so works without internet20:30
dsc_it was a bit annoying to get this to run on this old hardware...20:31
dsc_xD20:31
dsc_seems like I forgot the word 'is' -- too tired :D20:36
uvosdsc_: awsome20:36
uvosdsc_: care to package that?20:36
dsc_sure thing its here: https://github.com/maemo-leste-extras/maemo-translate20:37
dsc_but still creating proper packages atm., should be in the repos tomorrow (?)20:37
uvosdsc_: that would be great20:37
uvosi use gt on d4 often20:37
dsc_nice, this one doesnt require any internet ^^20:38
uvosyeah it sounds sweet :)20:38
dsc_it uses a library I created earlier: https://github.com/kroketio/kotki20:39
dsc_brb sleeping20:40
bencohdsc_: kotki looks awesome :)21:45

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