System_Error has joined #maemo-leste
vadparaszt has quit [Ping timeout: 272 seconds]
Rodney_ has joined #maemo-leste
vadparaszt has joined #maemo-leste
Rodney_ has quit [Read error: No route to host]
Langoor has quit [Remote host closed the connection]
xmn has quit [Quit: ZZZzzz…]
xmn has joined #maemo-leste
vectis has quit [Ping timeout: 256 seconds]
vectis has joined #maemo-leste
Langoor has joined #maemo-leste
branon has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
branon has joined #maemo-leste
branon has quit [Client Quit]
branon has joined #maemo-leste
Wikiwide has quit [Remote host closed the connection]
Wikiwide has joined #maemo-leste
Wikiwide has quit [Remote host closed the connection]
Wikiwide has joined #maemo-leste
vadparaszt has quit [Quit: Connection error?!]
vizimajac has joined #maemo-leste
joerg has quit [Ping timeout: 246 seconds]
joerg has joined #maemo-leste
ceene has joined #maemo-leste
xmn has quit [Ping timeout: 240 seconds]
leste has quit [Remote host closed the connection]
<freemangordon> dsc_: please consider adding timestamps in the logs
<freemangordon> scratch that, I'll implement it
Wikiwide has quit [Remote host closed the connection]
Wikiwide has joined #maemo-leste
akossh has joined #maemo-leste
amunizp has joined #maemo-leste
fab_ has joined #maemo-leste
Livio has joined #maemo-leste
pere has quit [Ping timeout: 264 seconds]
System_Error has quit [Ping timeout: 260 seconds]
System_Error has joined #maemo-leste
amunizp has quit [Quit: Not sure what quit means.]
Livio has quit [Ping timeout: 240 seconds]
pere has joined #maemo-leste
pere has quit [Ping timeout: 252 seconds]
sunshavi has quit [Ping timeout: 256 seconds]
sunshavi has joined #maemo-leste
Livio has joined #maemo-leste
kona_ has joined #maemo-leste
kona has quit [Ping timeout: 255 seconds]
pere has joined #maemo-leste
kiva has joined #maemo-leste
<kiva> should Maemo Leste be year 2039 compatible? Has anybody noticed that it is shorter time ti to 32-bit time bug than N900 release date?
<sicelo> most likely not (fully) compatible yet. Debian has fixed this only recently.
<kiva> Actually is that reason why default clock app crash in Pinephone, when try change time?
<Wizzup> that seems unlikely
<dsc_> this removes AccountChannelPtr too, which is suppose to linger around
<dsc_> I can get rid of AccountChannelPtr but it requires some changes to Tp
<dsc_> and possibly affects other parts of conversations too
<dsc_> the reason AccountChannelPtr stays around is to represent a persistent channel that you have not yet joined
<dsc_> I talked about this earlier how architecturally the config stuff should be removed from lib/tp.cpp, I was talking about this
<dsc_> I think 0.7.15 will segfault due to this commit
<dsc_> yes, after leaving a groupchat it will segfault
<dsc_> so I will work on tp for the next few days and untangle some stuff
<freemangordon> dsc_: ok, great, just keep in mind I am MIA for 2 weeks starting Friday. Please do not break conversations too much while I am on holiday :p
<dsc_> the changes required to make lib/tp.cpp more self-contained will be large and breakage might be present
<dsc_> we can choose to keep the current arch for now and I do an easy fix
<freemangordon> yeah, I understand
<freemangordon> I was kidding anyways
<dsc_> ok :)
<dsc_> yes ill do my best ^^
<freemangordon> but won;t be able to either test or make fixes
kiva has quit [Quit: Client closed]
<freemangordon> dsc_: https://pastebin.com/xwcPJV0j
<freemangordon> something is broken when saving date_last_message
<freemangordon> I put some more traces
<freemangordon> this https://pastebin.com/SknCviHd, should not affect the result
<freemangordon> I wonder if channel gets properly inited on logoff/logon
<freemangordon> like, I see configSave(), but no configRead()
<dsc_> is `channels[channel_str]->date_last_message;` ever set?
<freemangordon> channels[channel_str]->date_last_message = epoch;
<freemangordon> lemme push, you'll see
<dsc_> unsure if I should look because ill probably be removing AccountChannel today
<freemangordon> ok
<freemangordon> still, I'll push the logger changes
<dsc_> is the issue its not being saved to cfg?
<freemangordon> rather it is not read back
<freemangordon> test case is:
<freemangordon> receive remote message, but not read it (so it is not marked as read on the server)
<freemangordon> reconnect the account (so unread messages are delivered as scrollback)
n900 has quit [Ping timeout: 255 seconds]
<freemangordon> that unread message is duplicated, because timestamp check fails, as date_last_message is 0 (as seen oin the lofs)
<freemangordon> *logs
<dsc_> right
<freemangordon> I suspect channel settings are not re-read on logon
<dsc_> yes
<dsc_> AccountChannelPtr(new AccountChannel);
<dsc_> look for this one
<freemangordon> yeah, I understand
<dsc_> right
<freemangordon> but now you're going to remove that, I see no reason to fix it
<dsc_> and configRead() is only in the constructor
<dsc_> of TelepathyAccount
<freemangordon> mhm
<freemangordon> I saw that
<dsc_> will fix :)
<freemangordon> great! ok, lets push few fixes to haze and purple-fb
ceene has quit [Remote host closed the connection]
fab_ has quit [Quit: fab_]
xmn has joined #maemo-leste
<Wizzup> so from my pov apart from the random audio issues where the kernel doesn't set what it should set in calls, the voicecall mgr stuff is working well on my d4
<Wizzup> I'll make a PR with the various fixes
<Wizzup> but we still need to figure out the kernel audio issues and then we could move a conversations release to stable too
<Wizzup> (and then we can more easily break -devel)
<Wizzup> I just don't know how to go around debugging this kernel issue
<Wizzup> uvos: would you agree that switching PA UCM profiles back to HiFi and back to Phone Call should ideally set the regs up properly again?
<freemangordon> Wizzup: If we are to release conversations to stable, the bug I reported ^^^ shall be fixed
<freemangordon> but it is up to you and dsc_ to decide
<Wizzup> ok, I don't know what the bug is that you mean, but keep in mind that current conversations stable is like months behind devel
<Wizzup> like it'll probably segfault when going online/offline or something
<Wizzup> (in some edge case)
<Wizzup> in any case it's all moot until we figure out the kernel audio issue
<Wizzup> I suppose we could decide to debug this, or we can go straight to 6.6 and try to figure out why it doesn't work there
<freemangordon> no, it will not update last message received timestgamp going offline->online, leading to duplicated scrollback of the unread messages
<dsc_> i can aim for a stable next week
<dsc_> if needed
<dsc_> wait, what day is it even...
<freemangordon> wednesday
<dsc_> thanks ;x
<freemangordon> :)
<Wizzup> ok
<Wizzup> well, any suggestions on how to try to debug the call issues I would appreciate
<dsc_> yes I think we can do a stable soon
<Wizzup> since it's also (a similar bug) the only blocker for 6.6 or 6.8 (i forget) kernel
<freemangordon> Wizzup: I guess tmlind is to the rescue :)
<Wizzup> I am not sure if he has a lot of time recently
<Wizzup> also for 6.1 (which is not pretty old) it might not be that worth it
<Wizzup> which is now*
n900 has joined #maemo-leste
<Wizzup> I guess we would need some trace of all alsa state changes or something
<Wizzup> maybe cpcap_input_*_mux_set_enum or something will override what's currently set during voice call
<Wizzup> must be some race with userspace somehow
fab_ has joined #maemo-leste
Livio has quit [Ping timeout: 264 seconds]
Livio has joined #maemo-leste
<Wizzup> uvos: should I not see 'VOICE CALL' in dmesg whenever I switch ucm in pavucontrol?
<freemangordon> AFAIK this is logged by the modem driver when modem reports incoming call
<Wizzup> no this happens in cpcap_voice_call
<freemangordon> but don;t quote me on that one
<freemangordon> lemme grep
<Wizzup> sound/soc/codecs/cpcap.c
<Wizzup> no need to grep
<Wizzup> the problem is that bits CPCAP_BIT_MB_ON1R and CPCAP_BIT_MB_ON1L are somehow unset when we are in the actual call
<Wizzup> and from my understanding
<Wizzup> modem -> ofono -> sphone acts on voice call -> starts ringing -> when picked up -> sphone tells PA to switch to voice call UCM
<Wizzup> and this switch I believe is what should trigger all the right settings to be set, including the DAPM hack for which we print 'VOICE CALL"
<Wizzup> but apparently switching UCM *does not* trigger cpcap_voice_call
<freemangordon> maybe put printk in cpcap_voice_set_tdm_slot
<Wizzup> cpcap_voice_set_tdm_slot is what calls cpcap_voice_call
<freemangordon> mhm
<Wizzup> yeah so you think this prevents this from being set when we're not in a call?
<Wizzup> there's so much jargin in alsa kernel land it's mind boggling :(
<Wizzup> jargon
<freemangordon> but cpcap_voice_set_tdm_slot can return before calling cpcap_voice_call
<Wizzup> yes exactly
<Wizzup> but what is tdm slot even
<freemangordon> TDM is time division multiplexing, but what it means in this context I have NFC
<Wizzup> well I guess the function makes it pretty clear
<Wizzup> so somehow in the timeslot setting we also actually set up the call regs
<Wizzup> I am not sure why cpcap_voice_set_tdm_slot even needs to check if we are in a call, I guess because it needs to be able to unset somehow?
<freemangordon> I would trace if cpcap_voice_set_tdm_slot() gets called at all
<Wizzup> because us switching UCM from voice call to HiFi or vice versa isn't related to this level
<Wizzup> well I know that during calls I typically see 'VOICE CALL'
<freemangordon> so, if it is called but returns early, then yo should check why
<Wizzup> I was just hoping I wouldn't have to keep calling myself just to see how some of this works
<freemangordon> just put printk() every other source line
<Wizzup> also I wonder if those errors are actually logged
<Wizzup> or if some alsa debug value is missing
<freemangordon> dev_err() is logged
<freemangordon> but I don;t see error printed on calls to regmap
<freemangordon> not sure if regmap will print error
<Wizzup> well this is called from alsa code
<Wizzup> see static const struct snd_soc_dai_ops cpcap_dai_voice_ops
<freemangordon> yes, I know
<freemangordon> thats why I said to check if it is called at all when voice fails
<Wizzup> and yes it is
<Wizzup> since 'VOICE CALL' is always printed
<freemangordon> ah
<Wizzup> and there's some race going on
<freemangordon> sorry, my bad
<Wizzup> so I think sound/soc/codecs/motmdm.c calls snd_soc_dai_set_tdm_slot
<Wizzup> so maybe this has a better clue
<freemangordon> I was left with the impression that sometimes there is no "VOICE CALL" message
<Wizzup> ha the return value of motmdm_enable_primary_dai is ignored
<Wizzup> freemangordon: I will have to triple check, but I am pretty sure that is always set
<freemangordon> ok, ok
<Wizzup> in codecs/motmdm.c see:
<Wizzup> if (enable) motmdm_enable_primary_dai(ddata->component);
<Wizzup> else motmdm_disable_primary_dai(ddata->component);
<Wizzup> so it ignores the error tha we bubble up all the way from regmap sets
n900 has quit [Ping timeout: 256 seconds]
<Wizzup> I think we should fix that regardless
<freemangordon> why it is called at all from motmdm? isn;t ALSA supposed to call it
<Wizzup> motmdm is the codec, so I guess that is part of alsa
<Wizzup> I don't know what the graph of what uses what is here
<freemangordon> but it shoudl not call that function directly, no?
<freemangordon> I am as lost as you are perhaps
<Wizzup> the codec seems to find ngsm serdev and see what the call state is
<Wizzup> this is managed from /* Read the voice status from dlci1 and let user space handle rest */
<Wizzup> static int motmdm_init_voice_dlci(struct motmdm_driver_data *ddata)
<Wizzup> it seems
<Wizzup> well and of course motmdm_soc_probe
<freemangordon> well, I remember motmdm handling calls state
<freemangordon> motmdm_enable_primary_dai() is called on incoming call, IIRC
<Wizzup> the motmdm codec also registers dtmf/call noise cancel and call volume
<freemangordon> see motmdm_voice_get_state
<Wizzup> yes, this is what enables or disables the dai
<Wizzup> so I guess there is no way to trigger it from userspace then
<freemangordon> mhm
<Wizzup> or perhaps there is, just not with our ucm
<Wizzup> I suspect there is some race not that voicecall-manager is in play, and somehow the delay makes it worse
<Wizzup> like if the ucm is set before or after the kernel performs all of this
<freemangordon> sounds plausible
<freemangordon> I wonder if we shall remove the call to snd_soc_dai_set_tdm_slot() and somehow tie it to UCM
<Wizzup> we'd need some mixer/control in alsa to toggle this
<freemangordon> yes, I know
<Wizzup> there's also the whole DAPM hack that we have to do anything, which I still don't really understand, but I think the point is that because the audio does not go through userspace routing, alsa decides that we don't actually use/need it
<Wizzup> and we haven't found a way to tell alsa not to do it other than force-enable dapm pins/paths
<freemangordon> which obviously does not work properly
<Wizzup> well it works ok for us now
<Wizzup> but yes it's not ideal
<freemangordon> as voice calls are not the only issue we have
<freemangordon> no, mafw suffers as well
<Wizzup> mafw suffers a lot more than other HiFi though
<Wizzup> so maybe best to not conflate the issues
<Wizzup> also killing mafw-renderer makes it work again when it's restarted, so there's other stuff going on there
<freemangordon> I doubt mafw does something bad, as it uses PA
<Wizzup> fine, but mpv with pa usually works fine after audio call
<Wizzup> and this is not the result of DAPM I am quite sure
<freemangordon> ok
<Wizzup> it could be however that the tdm from before the call is not saved
<Wizzup> and this might throw off PA and then everything else
<freemangordon> but commenting out line 549 in motmdm makes it working properly
<freemangordon> besides that call audio is funny
<Wizzup> what tag/branch are you on
<freemangordon> I guess master, lemme check
<Wizzup> 549 for me is:
<Wizzup> struct cpcap_audio *cpcap = snd_soc_component_get_drvdata(component);
<Wizzup> oh wait, wrong file :)
<Wizzup> 549 for me is:
<Wizzup> strncmp(state, "1,4,0", 5) || /* incoming call */
<Wizzup> well, !strncmp
<freemangordon> yes, that one
<Wizzup> I think this just means that by completely nerfing call audio you don't run into the problem
<freemangordon> mhm
<freemangordon> there *is* audio though
<Wizzup> actually, we could look at this soon if you want
<Wizzup> we can check the CPREG_REG_CDI reg
<freemangordon> just sounds funny for both sides
<Wizzup> and see what the time stuff is set to
<Wizzup> and see if it gets set back properly after the call
<Wizzup> my bet is no
<freemangordon> because frequency seems off
<Wizzup> and this is why you have the issues
<freemangordon> right
<Wizzup> like this force samples rates I think
<Wizzup> see cpcap_voice_set_tdm_slot's cpcap_set_samprate
<freemangordon> right
<Wizzup> there's a bunch of dev_dbg that we're missing out on for sound/soc/codecs/cpcap.c
<Wizzup> wonder how we can get those
<Wizzup> like:
<Wizzup> dev_dbg(component->dev, "HiFi setup HW params: rate=%d", rate
<Wizzup> return cpcap_set_samprate(cpcap, CPCAP_DAI_HIFI, rate);
<freemangordon> I think they are compiled-out
<Wizzup> I always forget how this works :)
<Wizzup> but it seems like component->dev might be what we could enable/filter on in debug msgs
<freemangordon> I don;t think we have CONFIG_DYNAMIC_DEBUG=y
<Wizzup> maybe we should...
<freemangordon> no
<freemangordon> that'd put too much overhead
<freemangordon> just compile your kernel
<freemangordon> that's what I do when developing
<Wizzup> it's very inconvenient when you have 5-6 devices but I suppose
<freemangordon> or, simply change dev_dbg to printk or dev_err :)
<Wizzup> I don't think there'd be a lot of overhead at all
<Wizzup> but ymmv
<Wizzup> internet seems to say the overhead is quite low
<Wizzup> it also seems to be default on for most distros
<freemangordon> what about memory overhead?
<freemangordon> most distros do not run on n900 :)
<Wizzup> I doubt there would be any?
<Wizzup> what else memory would need to be stored?
<Wizzup> 8 chars for filename?
<freemangordon> * number of files
<Wizzup> still nothing
<freemangordon> well, I think we shall not enable unnecessary features that are used rarely
<freemangordon> but...
<freemangordon> I know it is inconvenient, but compiling the kernel is not that hard and you have to do it anyways when making changhes
<Wizzup> I don't mind compiling my own kernel, it's just nice to make our (earlt debugging) life easier
<Wizzup> it's not just compiling, it's also shutting off,removing sd card, copying dtb/dts, kernel, modules to the right path, depmod -a
<Wizzup> and booting again
<Wizzup> but yeah.
<freemangordon> no, why?
<freemangordon> I copy zImage/modules through ssh
<freemangordon> and just reboot
<freemangordon> you don;t need another dtb usually
<freemangordon> just zImage/modules
<Wizzup> still a lot of effort, more than just 'make'
<freemangordon> and you cannot avoid it
<Wizzup> with dynamic debug you can ;)
<freemangordon> no, you can only get traces
<freemangordon> but can fix nothing :)
<Wizzup> yes, this helps a ton with reporting issues and even having users debug stuff for/with us
<Wizzup> but nevermind, I don't care enough to continue going down this path
<freemangordon> me neither
<freemangordon> so if you decide this shall be enabled... ok
<freemangordon> I am just sharing my opinion
n900 has joined #maemo-leste
<freemangordon> dsc_: btw, what about just getting the timestamp of the last message for that channel in rtcom db instead of storing it in QSettings?
<d4dsc> tp.cpp is not aware of the last rtcom entry so it would need to query for it
<d4dsc> sure, could do
<d4dsc> it would query for every incoming message, could cache it
<d4dsc> query itself is ro
<d4dsc> *is grouped by group-uid and then order by timestamp
<Wizzup> uvos: sicelo: is there a reason our current devel kernel is 6.1.67 but our maemo-6.1.y branch is on 6.1.80?
<Wizzup> ah, I see, the dtses do not build..
Livio has quit [Ping timeout: 255 seconds]
Livio has joined #maemo-leste
System_Error has quit [Remote host closed the connection]
System_Error has joined #maemo-leste
System_Error has quit [Remote host closed the connection]
System_Error has joined #maemo-leste
<Wizzup> [ 418.496276] mot-mdm6600-codec 4806a000.serial:modem:audio-codec@2: motmdm_send_command: sending U1848AT+CLVL=0
<Wizzup> [ 418.520446] mot-mdm6600-codec 4806a000.serial:modem:audio-codec@2: motmdm_receive_data: received: +CLVL:OK
<Wizzup> ok that works :)
<Wizzup> uvos: pushed to vcm-fixes, this fixes all issues except for sound, which I am looking at now.
<Wizzup> uvos: on sphone that is
fab_ has quit [Quit: fab_]
<Wizzup> I can't believe this worked in sphone every time, hrm
<Wizzup> tmlind: uvos: freemangordon: here are some dmesg logs from my droid 4 when I get called, I called myself three times and made three different logs of the relevant parts: https://wizzup.org/dirlist/maemo-leste/call-dmesg-logs/
<Wizzup> That is done using:
<Wizzup> echo 'file cpcap.c +p' > /sys/kernel/debug/dynamic_debug/control
<Wizzup> echo 'file motmdm.c +p' > /sys/kernel/debug/dynamic_debug/control
<Wizzup> and then using dmesg -w, and I cut off the timestamps to make diffing easier
<Wizzup> There's a lot of suspicious stuff there...
<Wizzup> the main thing to note is that apparently we handle ciev=1,4,0 twice in every log, but in the one where it doesn't work, it comes a lot later
<Wizzup> that is:
<Wizzup> mot-mdm6600-codec 4806a000.serial:modem:audio-codec@2: motmdm_voice_get_state: ciev=1,4,0
<Wizzup> When it is working we got from 1,4,0 to 1,2,0 to 1,0,0 (done)
<Wizzup> when I get no good audio it goes from 1,4,0 to 1,2,0 to 1,0,0 to 1,4,0 to 1,2,0 and again to 1,2,0
<Wizzup> And I can assure you I didn't call myself twice
arno11 has joined #maemo-leste
<Wizzup> I'm confused
<Wizzup> Also the problem is extra apparent when you see the 'VOICE CALL 1' goes to 'VOICE CALL 0' and again to 'VOICE CALL 1'
<Wizzup> and the same happens with HiFi : it's mute 0 (ringtone), then to 1 (muted), but basicaly it immediately goes back to mute 0 (unmuted)
<Wizzup> I don't know if this is userspace doing something weird but ... it's quite strange
n900 has quit [Ping timeout: 268 seconds]
<Wizzup> I will add n_gsm.c to dynamic debug too
DFP has quit [Quit: Leaving]
n900 has joined #maemo-leste
n900 has quit [Ping timeout: 264 seconds]
<Wizzup> great, with n_gsm.debug set to 255 I can't reproduce it anymore so far
System_Error has quit [Remote host closed the connection]
System_Error has joined #maemo-leste
<Wizzup> here are some new logs with n_gsm enabled: https://wizzup.org/dirlist/maemo-leste/call-dmesg-logs/new/
<Wizzup> n_gsm debug enabled*
<Wizzup> here there's only 'VOICE CALL' 1/0 once for every session
n900 has joined #maemo-leste
<Wizzup> freemangordon: got a suggestion for a name for our dialer?
<Wizzup> rtcom-dialer?
<Wizzup> in fremantle it's rtcom-call-ui
<Wizzup> but that's the actual binary
n900 has quit [Ping timeout: 264 seconds]
<freemangordon> Wizzup: sorry, just get home, will read the logs tomorrow
<Wizzup> all good
akossh has quit [Remote host closed the connection]
n900 has joined #maemo-leste
arno11 has left #maemo-leste [#maemo-leste]
System_Error has quit [Remote host closed the connection]
System_Error has joined #maemo-leste
System_Error has quit [Read error: Connection reset by peer]
System_Error has joined #maemo-leste
xmn has quit [Ping timeout: 260 seconds]
Livio has quit [Ping timeout: 268 seconds]
Wikiwide has quit [Remote host closed the connection]
Wikiwide has joined #maemo-leste
ungeskriptet has quit [Ping timeout: 255 seconds]
vizimajac has quit [Ping timeout: 240 seconds]