IRC log of #maemo for Friday, 2016-12-23

*** florian has quit IRC00:19
*** flo_lap is now known as florian00:19
*** florian_kc has joined #maemo00:19
*** pagurus has quit IRC00:48
*** Pali has quit IRC00:49
*** Kilroo has quit IRC01:02
DocScrutinizer05  with full 12Mpts init log (rigol.wfm)01:09
*** louis__ has quit IRC01:10
*** louisdk has quit IRC01:10
*** RzR has quit IRC02:05
*** RzR has joined #maemo02:06
*** L29Ah has joined #maemo02:10
*** florian has quit IRC02:23
*** florian has joined #maemo02:32
*** peterbjornx has joined #maemo02:35
*** florian has quit IRC02:41
*** peterbjornx has quit IRC02:52
*** agomez{M} has quit IRC03:02
*** platicus has quit IRC03:02
*** agomez{M} has joined #maemo03:04
*** platicus has joined #maemo03:04
*** peterbjornx has joined #maemo03:04
*** platicus has quit IRC03:06
*** agomez{M} has quit IRC03:06
*** platicus has joined #maemo03:06
*** agomez{M} has joined #maemo03:06
*** Kabouik_ has joined #maemo03:13
*** dafox has joined #maemo03:14
*** platicus has quit IRC03:15
*** agomez{M} has quit IRC03:15
*** platicus has joined #maemo03:15
*** agomez{M} has joined #maemo03:15
*** Kabouik has quit IRC03:16
*** L29Ah has left #maemo03:19
_maniac_rip my n900, left as temporary pawn for taxi driver who just sprinted off without waiting for money.03:20
_maniac_I guess he'll enjoy my gentoo chroot there.03:20
*** _maniac_ has left #maemo03:20
*** L29Ah has joined #maemo03:20
*** dafox has quit IRC03:37
*** RzR has quit IRC04:02
*** RzR has joined #maemo04:02
*** peterbjornx has quit IRC04:29
*** robink_ has quit IRC04:37
*** robink has joined #maemo04:43
*** e has joined #maemo04:47
*** Kilroo has joined #maemo05:29
*** florian__ has joined #maemo05:33
*** florian_kc has quit IRC05:37
*** lxp1 has joined #maemo06:01
*** lxp has quit IRC06:04
*** DocScrutinizer05 has quit IRC07:34
*** DocScrutinizer05 has joined #maemo07:34
*** CatButts has joined #maemo08:40
*** TheKit has quit IRC09:14
*** TheKit has joined #maemo09:18
*** Pali_ has joined #maemo09:47
*** geaaru has joined #maemo09:55
sixwheeledbeastMaybe would have been better to pawn your leg, at least you have another one...09:57
KotCzarnyi think he left already09:58
KotCzarnybut friggin taxi driver stealing n900? the hell with the world we live in09:58
xessomeone was a bit drunken...or both of them09:59
*** Pali_ is now known as Pali10:04
*** troulouliou_div2 has joined #maemo10:09
*** heroux has quit IRC10:27
*** heroux has joined #maemo10:27
*** ShadowJK has joined #maemo10:34
*** florian__ is now known as florian10:39
*** ecloud is now known as ecloud_wfh11:01
*** troulouliou_div2 has quit IRC11:10
*** krnlyng has quit IRC11:19
*** shentey has joined #maemo11:21
*** troulouliou_div2 has joined #maemo11:26
DocScrutinizer05for N900 bitbang outbound data with SoC TVOUT_EN while TVOUT set to GPIO-OUT:GND/low11:27
*** troulouliou_div2 has quit IRC11:29
DocScrutinizer05to read inbound, use ECI_AD and/or comparator N4008:ECI1:GPMC_nWP-H1 and/or N4007:ECI0:GPMC_nBE1-H311:31
DocScrutinizer05particularly the latter seems very suited11:32
*** krnlyng has joined #maemo11:32
DocScrutinizer05prolly already also used to detect holdbutton-press11:34
DocScrutinizer05ECI is basically just holdbutton fast morse ;-)11:34
DocScrutinizer05such software solution will be 100% compatible to Neo900 too11:37
DocScrutinizer05for implementation details: you need a kernel IRQ handler listening to interrupts (rising and falling edge) on GPMC_nBE1 pon H3, and push timestamps to a stack for a worker thread to analyze and decode them, and convert them to data (I'm guessing now) available via /dev/ECI and kevent11:40
*** L29Ah has left #maemo11:40
DocScrutinizer05for TX a realtime scheduled userland task might do11:41
DocScrutinizer05the ECI phone TX bursts are not time critical re their starting point, and they have a relatively short duration during which the userland task can hog the CPU completely to avoid intra-burst timing getting messed up by scheduler task switching11:42
DocScrutinizer05and even when a higher prio system interrupt will eventually mess up a burst, nothing too bad will happen11:44
DocScrutinizer05just make sure to disable your own RX IRQs during TX ;-)11:44
DocScrutinizer05well, for TWOUT_EN they won't even fire on hw level, so that's no issue11:45
DocScrutinizer05bota bene: without proper initialization a ECI headset will "act dead"11:46
DocScrutinizer05nota, even11:46
DocScrutinizer05atk: ^^^ how about that? ;-)11:47
DocScrutinizer05Pali: you also might be mildly interested11:47
DocScrutinizer05Pali: except for the "PHY layer" the solution is pretty platform agnostic11:48
DocScrutinizer05TV_OUT controls MICBIAS *fast*, and GPMC_nBE1-H3 is any generic input that can cause an IRQ on HS mic ring MICBIAS getting pulled to GND (and ideally also on returning from GND to level)11:50
DocScrutinizer05worst case you can emulate the latter via ALSA record ;-)11:50
*** louisdk has joined #maemo11:56
*** louis__ has joined #maemo11:56
DocScrutinizer05s/ TV_OUT / TVOUT_EN / 2 above12:08
DocScrutinizer05hint: TVOUT_EN = GPIO4012:12
*** troulouliou_div2 has joined #maemo12:54
DocScrutinizer05well, that's age old and may be very useful to 'RE' the high level details of ECI, but it's based on a dedicated NCU for controlling the PHY access to the mic line12:55
atkDocScrutinizer05: if anything, that can be used as a base, I'll try to work out why it was never accepted12:55
atkI see12:55
DocScrutinizer05so when you see e.g in my tests, in that sourcecode you may see something like ECI_write_2bytes(0b00100000, 0b00000000)12:58
atkIt's weird, when I google "ECI" or "Enhancement Control Interface" I get nothing relevantz12:59
DocScrutinizer05well, except this is a screenshot of a HS reply, so you rather see a ECIread() == 0b00100000; ECIread() == 0b00000000;13:00
atkI see13:00
DocScrutinizer05yeah, there is *very* little publicly available docs anout ECI13:01
*** troulouliou_div2 has quit IRC13:01
atkSo these inline controls in earphones actually have logic in them?13:01
atkand it's a two way protocol? This seems like a lot of work just to reuse legacy 3.5mm jacks for data transfer :P13:02
DocScrutinizer05yes, single wire bidir serial13:02
DocScrutinizer05well, they use the same for e.g SIM data, for battery embedded gas gauges (bq27000, HDQ protocol) and whatnot else13:04
atkSo I can get my hands on a headset pretty easily, and can probably work some things out from that kernel driver, I presume I'd need to get one of those extremely rare beagle bone boards to do the software side of the deal on?13:04
DocScrutinizer05actually SIM SWP is even way more complex since it uses two independent channels on one wire: master mudulates volatge while concurrently slave modulates current13:05
DocScrutinizer05don't you have a N900?13:05
DocScrutinizer05a N900 will work excellent for this13:06
DocScrutinizer05while on BeagleBoard the hardware is missing13:06
atkI see13:06
atkso N900 does this in software too?13:06
infoboti heard schematics is
DocScrutinizer05N900 doesn't do this so far, that's the point13:07
DocScrutinizer05it *could* do it with the right software13:07
atkAh, cool13:08
DocScrutinizer05my tests are done with a N97-mini and a genuine (inknown type) Nokia multibutton headset13:08
atkMy scope should also be able to manage this too. So I just need a headset and then work out how to deal with that part of the kernel :P Should be fun.13:11
DocScrutinizer05~literal schematics13:12
infobot"schematics" is ""13:12
DocScrutinizer05~schematics is also
infobotokay, DocScrutinizer0513:12
DocScrutinizer05 my test setup13:15
*** LauRoman has quit IRC13:15
DocScrutinizer05(without scope probe attached yet, goes to the yellow clip)13:15
DocScrutinizer05note how you can tell apart pulses sent by HS from pulses sent by phone, by the different "GND" level which is lower for the HS pulses13:17
DocScrutinizer05note how in the latter the two short pulses after the 4ms intitial one are from HS, they are lower voltage13:21
DocScrutinizer05and have that tiny "mark" on beginning of falling edge:
DocScrutinizer05which in fact is the initial slight voltage drop to be seen in
DocScrutinizer05your first task would be to find the "IDENTIFY-YOURSELF" command the phone sends at very beginning of a headset plugged in, in the existing ECI, and compare to to deduce the actual bit coding and byte frame (AIUI one startbit(1), and a stop-startbit separator(01) only on multibyte bursts)13:28
DocScrutinizer05the sigle bit seems to be encoded as either 1 low 4 high (unit 100us?) or 4 low 1 high13:29
DocScrutinizer05err sorry, rather it's 4h1l  or 1h4l13:30
DocScrutinizer05startbit is 4h1l it seems13:30
DocScrutinizer05you don't see the leading 4h since the line is h all the time when inactive13:31
DocScrutinizer05when sending 2 bytes, I seem to see a 4l1h stop bit at end of first byte, and the usual 4h1l start bit following it. then the second 8 bit follow13:33
*** LauRoman has joined #maemo13:42
DocScrutinizer05even though this looks to me like startbit(1) [data]00001111   >>WHATSTHIS???(1timeunit-h,1timeunit-l)=startbit_with shirt-hightime?(1)<<  [data]00000000  <finish>; so has NO stopbit13:42
DocScrutinizer05I'd expect you find a "IDENTIFY" (owtte) command in the existing ECI sources, of a value like 0x0f00 or 0xf0ff13:43
DocScrutinizer05oops sorry, I slipped13:46
DocScrutinizer05startbit(1) [data]00001111   >>WHATSTHIS???(1timeunit-h,1timeunit-l)=startbit_with shirt-hightime?(1)<<  [data]01011010  <finish>13:48
DocScrutinizer05so a value like 0x0f5a or 0xf0a513:50
DocScrutinizer05let's define startbit=100us-high + 100us-low; bit1= 400us-high + 100us-low; bit0= 100us-high + 400us-low  --- just as a working hypothesis13:53
DocScrutinizer05and data frame format = 1 startbit, 8 data bits, no stop bit13:54
DocScrutinizer05hmm, make that 80us and 320us13:56
DocScrutinizer05doesn't matter I guess. And easy to tune in source later on13:57
DocScrutinizer05anyway, to send out a pulse, you toggle the TVOUT_EN pin for the duration of the low-pulse you want to send (while making sure TVOUT is low, this shouldn't be a problem I hope. should be default as long as TV not enabled). Inbound data you receive on ECI0 aka GPMC_nBE1 pin H3 (I think it's already there somewhere as either ECI0 or ECI1 sys or dev node, however you rather want a IRQ kernel handler on it)14:02
DocScrutinizer05IroN900:~# find /sys -iname '*eci*'14:03
DocScrutinizer05eci0 and 1 are read-only, so I guess they must be the inputs for the two comparators N4007 and N4008, which conveniently connect to ECI0 and ECI1 in schematics too ;-)14:08
DocScrutinizer05so what you want to read is /sys/devices/platform/nokia-av/eci114:08
DocScrutinizer05or rather monitor with your IRQ handler14:09
DocScrutinizer05of course for a mere POC you could also poll with a period of 80us14:10
DocScrutinizer05hmm, prolly rather 50us14:11
DocScrutinizer05IroN900:/sys/devices/platform/nokia-av# time (for (( i=0; i<40; i++ )); do cat eci0 eci0 eci0 eci0 eci0 eci0 eci0 eci0 eci0 eci0 eci0 eci0 eci0 eci0 eci0 eci0 eci0 eci0 eci0 eci0; done >/dev/null)14:18
DocScrutinizer05real    0m0.593s14:18
DocScrutinizer05so this thing already polls @ 70us14:20
DocScrutinizer05should be able to read out a HS response raw data (to a real file instead of /dev/null)14:20
DocScrutinizer05I'm pretty sure you can optimize the overhead quite a lot, though in the end you do _not_ want to poll if this shall be a useful thing14:22
*** auenf has quit IRC14:27
*** auenf has joined #maemo14:27
*** Konsieur has joined #maemo14:30
DocScrutinizer05IroN900:/sys/devices/platform/nokia-av# time (for (( i=0; i<1000; i++ )); do read r <eci0; echo -n "$r:"; done >/dev/null)14:30
DocScrutinizer05real    0m0.546s14:30
*** Kabouik_ has quit IRC14:33
*** shentey has quit IRC14:47
Palihere is source code of nokia-av driver from stock nokia n900 kernel:
Paliand here is rx51_set_eci_mode function:
Paliso it change RX51_ECI_SWITCH_1_GPIO and RX51_ECI_SWITCH_2_GPIO gpios14:57
Pali#define RX51_ECI_SWITCH_1_GPIO17814:57
Pali#define RX51_ECI_SWITCH_2_GPIO18214:57
DocScrutinizer05looks good. while my tests with `` IroN900:/sys/devices/platform/nokia-av# while :; do for f in eci0 eci1 detect type /sys/devices/platform/soc-audio/eci_mode madc; do echo -n "$f:`cat $f`  "; done;echo;done ยดยด yield very puzzling results - I suspect mce-or-whatever interferes15:02
DocScrutinizer05puzzling results are: ECI0 always "0" while detect goes "4" -> "2" when pressing the hold button15:04
*** spinal84 has quit IRC15:04
DocScrutinizer05and even madc is always at around 4 or 515:04
DocScrutinizer05I already thought my headset was defect until I noticed the detect value change15:05
Palino, nobody in Maemo is doing anything with eci_mode sysyfs15:05
Paliat least not in stock PR1.315:05
DocScrutinizer05then those nodes provide not at all what their names suggest15:06
Paligrepped rootfs of PR1.3 /mnt/n900/{bin,lib,sbin,usr/lib,usr/bin,usr/sbin}15:06
DocScrutinizer05madc=4 means what? a 100mV on micbias?15:07
PaliADCIN4 - Battery size indicator15:08
DocScrutinizer05and even if that was true, how the heck does "detect" notice holdbutton press while madc doesn't change value?15:08
DocScrutinizer05not ADCIN415:08
DocScrutinizer05value = 415:09
Palithat madc sysfs returns value fomr ADCIN215:10
PaliADCIN2 - ECI AD15:10
Paliand that value = 4 is RAW value15:11
PalimV = RAW * 147 / 6015:11
Paliso it is 9.8mV15:13
DocScrutinizer05doesn't make sense15:13
DocScrutinizer05madc is always 4 or 5 no matter if I push holdbutton or not15:14
DocScrutinizer05so whatever `cat /sys/devices/platform/nokia-av/madc` shows, it's quite evidently not the voltage on mic line of AV jack15:15
*** zGrr has joined #maemo15:16
Palido you have mic bias enabled?15:17
DocScrutinizer05use my cmdline, see for yourself! :: cd /sys/devices/platform/nokia-av; while :; do for f in eci0 eci1 detect type /sys/devices/platform/soc-audio/eci_mode madc; do echo -n "$f:`cat $f`  "; done;echo;done15:17
Palibecause alsaped maemo daemon is automatically disabling it when headset is plugged15:17
Paliok, going to test15:17
DocScrutinizer05Pali: it detects holdbutton press, and holdbutton shorts micbias to GND15:17
DocScrutinizer05so yes, obviously (and according to my MICBIAS is enabled15:18
DocScrutinizer05stock kernel here!15:20
DocScrutinizer05with CSSU15:21
DocScrutinizer05the invincible rationale being: when holdbutton press gets detected (see value of "detect" 4->2) then the value of madc *must* go down from a high value to maybe 4 or 5, if madc shows the voltage of micbias15:23
DocScrutinizer05madc not changing at all while value of detect changes with holdbutton status indicated madc is bogus15:24
DocScrutinizer05I'd also expect eci0 to be 1 as long as hold button not pressed. It's always 015:25
DocScrutinizer05conclusion: kernel driver fubar15:26
DocScrutinizer05eci is 1 as long as no hs plugged at all15:26
DocScrutinizer05sth is fuxored there15:27
Palimadc here is about 6815:31
DocScrutinizer05ohmmy! I guess I know what's happening. I suspect `cat detect` enables micbias, checks button status, and disables micbias again15:31
Paliand sometimes when I push button then madc is 13515:31
Palibut just sometimes15:31
DocScrutinizer05I wondered why the cmdline takes that looooong15:32
Paliand if I start pressing button to quick madc goes above 21015:32
DocScrutinizer05that's not ok for sure15:32
KotCzarnysome counter?15:32
Palisee what is cat detect doing:
Paliit changes those GPIOs15:33
DocScrutinizer05with headset unplugged, my madc is at 1024 around15:33
KotCzarnycheck if it changes with the rate you are pressing15:33
DocScrutinizer05Pali: so quite possibly my micbias is NOT enabled all the time15:34
DocScrutinizer05Pali: and it seems yours isn't as stable as it's supposed to be, as well15:35
DocScrutinizer05the dependency on push speed is from R-C charging of micbias voltage buffer cap15:35
Palibah!! cat detect disable mic bias15:36
Palisee alsamixer -c 015:36
DocScrutinizer05something's totally messed up in there15:36
DocScrutinizer05yes, see what I said above: obviously cat detect enables micbias to run the tests and then disables it again15:36
Palinow when mic bias is always enabled, then madc is about 31715:37
Paliand when I press button it is about 6815:37
DocScrutinizer05now that makes sense :-)15:37
DocScrutinizer05how would I enable micbias?15:38
Palialsamixer -c 015:38
Paliand find "jack bias"15:38
Paliand use 'm' key15:38
Palito switch between on/off15:38
KotCzarnyoscp uses micbias to detect button presses on nokia headsets15:39
KotCzarnys/micbias/jack bias/15:39
infobotKotCzarny meant: oscp uses jack bias to detect button presses on nokia headsets15:39
DocScrutinizer05amixer -c 0 scontrols|grep -i bias15:39
Palilooks like nobody in maemo is accessing /sys/devices/platform/nokia-av/detect15:40
Pali(only /usr/lib/testserver/modules/handlers/
Pali(but whole testserver is irrelevant there as it is not running in normal Maemo)15:41
Palihm... so 160mV and 780mV?15:42
DocScrutinizer05amixer -c 0 cset name='Jack Bias Switch' 115:44
Palianyway, CSSU in some version automatically enable jack bias after inserting headset with mic15:45
DocScrutinizer05DAMMIT! phonecall, no audio. I guess it tried to use a headset thats not there15:47
DocScrutinizer05I should start to use a test device for such experiments again15:48
*** louisdk has quit IRC15:54
*** louis__ has quit IRC15:54
DocScrutinizer05Pali: do you know what autodetect sysnode does?16:15
DocScrutinizer05in /sys/devices/platform/nokia-av/autodetect16:15
Paliyes, it just control variable autodetect16:17
Paliand that is used only here:
Paliwhen set to zero then that headph_handler is noop16:17
*** L29Ah has joined #maemo16:19
DocScrutinizer05HAH! after boot, with hs plugged in:  eci0:1  eci1:1  detect:3  type:2  /sys/devices/platform/soc-audio/eci_mode:1  madc:102316:19
*** florian has quit IRC16:20
PaliI updated
Palinow cssu can boot without /proc/bootreason and /dev/twl4030-adc16:21
DocScrutinizer05plug-cycled, NOW we're talking! :)
DocScrutinizer05Pali: (cssu) excellent, that stuff is pretty much pointless, particularly the twl4030-adc for BSI test battery16:23
Paliwe need to also get rid off /proc/component_version and /sys/class/gpio-swich16:24
DocScrutinizer05I *guess* bootreason makes some sense for deciding if to re-use an existing PIN or ask for it again16:24
PaliI mean, maemo cssu can boot without those files16:25
Paliif files are provided they are used16:25
DocScrutinizer05meh /proc/component_version16:25
DocScrutinizer05what the heck?!16:26
Paliif not, then fallback mechanism is used (e.g. /proc/cpuinfo or /proc/atags) or hardcoded strings, eg. bootreason is pwr_key16:26
DocScrutinizer05compiled in to kernel (DT?)16:26
Palicomponent version is key/value file16:26
Paliwith data from NOLO16:26
Palipassed via ATAGs16:26
DocScrutinizer05ATAGs my headache16:27
Paliand nolo pass just: board name, hw revision, nolo version and boot mode16:27
Paliand boot mode is either "normal" or "update"16:27
Paliand some rcS script check for "update" and enter into different runlevel16:27
DocScrutinizer05I wonder how hard it could get to completely replace NOLO by uboot16:27
Paliwhen just softup via usb is running16:28
Palialready tried to replace NOLO with uboot16:28
Paliand I failed16:28
DocScrutinizer05yeah I know16:28
DocScrutinizer05wonder why, though16:28
Pali1. problem is size 100kB16:28
Paliuboot is big :-(16:28
Pali2. problem uboot has broken onenand support (or had in ~~ 2012)16:29
Pali3. problem uboot has broken omap3 usb16:29
Pali4. problem no idea which hw initialization is needed to implement16:30
DocScrutinizer05sounds nasty16:30
Paliwe have no idea what it is doing... probably some SSI/modem init is needed too...16:30
DocScrutinizer05isn't there a working uboot for pandora and beagleboard?16:31
DocScrutinizer05oooh modem init16:31
Paliand at that time in uboot was no support for spi... so no display init code16:31
Palipandora and beagleboard is probably working fine with uboot16:31
Palibut thse do not have nokia's SSI modem16:31
DocScrutinizer05yeah sure16:32
Paliuboot is working fine on n900, just it needs to be loaded by nolo :-)16:32
DocScrutinizer05but... the modem should get initialized only lated, by kernel16:32
KotCzarnyglue uboot to nolo16:32
KotCzarnyor nolo to uboot16:32
Palinolo can flash fw for modem...16:32
Paliso there is big blob in nolo for that16:33
Paliand no idea if some init is really not needed...16:33
PaliKotCzarny: see first problem about size16:33
DocScrutinizer05are you sure modem flashing done by nolo?16:33
Palieither by nolo or via some RPC16:33
DocScrutinizer05I thought it's done along softupd foo16:34
Palisoftupd can do that16:34
Palibut nolo too!16:34
Paliand via usb cable to flasher-3.5 nolo exports some strange protocol for modem flashing status16:34
DocScrutinizer05I see16:35
Paliwhich is different from other notification16:35
DocScrutinizer05yep, of course. It's Nokia shit16:35
Palievery status information to flasher-3.5 has one format, just modem flashing status has different16:35
Paliit is string based (for flasher-3.5)16:35
Palibut some f-bus is probably used in nolo and softupd16:36
DocScrutinizer05this? 3.pdf16:36
DocScrutinizer05possibly for flashing even M-Bus, not F-Bus16:38
Paligoing to look at that protocol16:39
DocScrutinizer05 - Nokia F-Bus Protocol made simple.html16:39
Paliand compare it with what I sniffed and implemented in 0xFFFF16:39
Palino, protocol is totally different16:41
DocScrutinizer05check Phoenix flashers16:41
DocScrutinizer05sorry for the useless link16:42
DocScrutinizer05not much info but for sure the right protocol we're looking for16:44
DocScrutinizer05*all* nokia phones use that protocol16:44
Paliwhat softupd thing uses different protocool16:44
DocScrutinizer05either via serial (M-bus, F-bus, whatever) or via USB with some wrapper protocol aiui16:44
DocScrutinizer05yeah softupd is not using phoenix protocol, they use something they made up for maemo16:45
DocScrutinizer05I however bet they embedded the phoenix protocol into softupd for BB5-modem flashing16:46
Palianyway, phoenix IIRC uses same protocol for n90016:46
Paliand it uses that testserver16:46
DocScrutinizer05quite possible, yes16:47
DocScrutinizer05BSI crap16:47
DocScrutinizer05"lab battery"16:47
PaliI have some information that FIASCO format is some BB5 format16:48
DocScrutinizer05at least that explains CAL16:50
DocScrutinizer05CAL looks *very much* like invented for modem "filesystem"16:51
DocScrutinizer05and this is what Phoenix modifies for stuff like ALS calibration etc16:52
Paliit uses testserver for that16:52
Paliand testserver has plugin for als16:52
DocScrutinizer05quite possible16:52
Paliso this probably access CAL16:52
PaliIIRC nolo does not export any access to CAL over usb16:52
PaliI already tried to do anything...16:53
Palialso no "backup" support seems to be in NOLO16:53
DocScrutinizer05yeah, no Nokia phone has that, prolly considered a security feature16:59
DocScrutinizer05anyway seems ECI0 is working like supposed, when enabling micbias. So would you know how to control TVOUT_EN?17:00
Paliin sound/soc/omap/rx51.c is: #define RX51_TVOUT_SEL_GPIO4017:05
Paliit is this gpio?17:05
Palithat is exported to alsa17:07
DocScrutinizer05much overhead to toggle itt17:08
Paliwhen rx51_jack_func is RX51_JACK_TVOUT then RX51_TVOUT_SEL_GPIO is set to 117:08
Paliotherwise to 017:08
Palibut should be possible to control it via /sys/class/gpio17:09
Palias any other gpio17:09
DocScrutinizer05I want to create 0.8ms pulses on this GPIO17:09
DocScrutinizer05err 0.08ms17:10
DocScrutinizer05I can poll eci0 with almost 2000/s17:10
Palibah, linux kernel refuse to export it :-(17:11
Pali# echo 40 > /sys/class/gpio/export17:11
Palibash: echo: write error: Device or resource busy17:11
Paliprobably because that alsa driver already has it for its own17:12
DocScrutinizer05also I just realized I did a decimal error, 2000/s is factor 10 too slow for ECI still17:13
DocScrutinizer05Pali: you looked into the ECI stuff I pstaed a few hours ago?17:16
Paliyes, I have seen it17:17
DocScrutinizer05Pali: I assume stuff like (syslog) "kernel: [ 5615.435241] slide (GPIO 71) is now open" is driven by a kernel IRQ handler? how hard would it be to implement that (or something similar, maybe not to syslog but to a sort of netlink or whatever pipe) for eci0?17:23
Pali/sys/class/gpio/ already supports it17:25
Palivia poll on sysfs17:25
Palibut that sound driver refuse to do it17:25
DocScrutinizer05wait, sorry?17:26
DocScrutinizer05you're not referring to eci0 now, do you?17:26
PaliI mean that gpio 4017:26
Paliwith # echo 40 > /sys/class/gpio/export17:26
DocScrutinizer05aka TVOUT_EN?17:26
Palibut that should work for any gpio number17:27
KotCzarnysome years ago i saw a project using vga card as a fm radio generator17:27
Pali[13:57:36] <Pali> #define RX51_ECI_SWITCH_1_GPIO                17817:27
Pali[13:57:41] <Pali> #define RX51_ECI_SWITCH_2_GPIO                18217:27
Palithose gpios are also owned by sound driver17:28
DocScrutinizer05so not exactly trivial to add an IRQ handler listening to that GPIO178 aka eci0, right?17:29
Palilooks like not17:30
Palimaybe some debug interface could exist...17:30
DocScrutinizer05though actually on hw level IRQ is sort of unentangled and orthogonal to GPIO-IN/OUT17:30
DocScrutinizer05a process doing i/o via GPIO doesn't need to know or care about an IRQ set up for that GPIO, and vice versa17:31
DocScrutinizer05particularly for input17:32
Palisome info is there: cat /sys/kernel/debug/gpio17:43
*** cyphase has quit IRC17:58
*** cyphase has joined #maemo18:03
DocScrutinizer05o.O !!!   "gpio-61  (eci0                ) in  hi irq-221 edge-both"18:08
DocScrutinizer05YES! URQ edge-both, exactly what we need18:08
DocScrutinizer05in that IRQ handler simply get the current (relative) systime in microsecond precision, the level of the GPIO (low or high) and send both as one line of text to a socket or fifo (depth max 100 lines) of sorts, for some userland process to analyze and conver it to ECI data18:11
DocScrutinizer05usually that "userland process" is called worker thread18:12
DocScrutinizer05and actually runs in kernel domain still18:12
*** cyphase has quit IRC18:14
DocScrutinizer05UGH, should be a wakeup IRQ though#18:14
DocScrutinizer05irq-221 edge-both wakeup18:15
Pali2.6.28 kernel does not support poll() syscall for gpio :-(18:16
Palithis is upstream kernel18:17
Palisearch for /sys/class/gpio/gpioN/18:17
Palithis is probably enough for upstream kernel18:17
Palibut not for maemo 2.6.2818:17
DocScrutinizer05not sure about that "wakeup", it seems a lot of IRQ don't have it while I'd think they would need to. So maybe it's not what I think it is18:17
*** cyphase has joined #maemo18:19
DocScrutinizer05Pali: afaik kernel IRQ handlers should be chainable18:19
DocScrutinizer05so when a IRQ-handler A is already registered for IRQ42 and you register a IRQ-handler B for same IRQ42, then the kernel should call *both*, no?18:20
Palibut kernel gpio library does not allow it18:20
DocScrutinizer05seems it creates a /dev/input device18:21
DocScrutinizer05Dec 23 16:05:53 IroN900 kernel: [ 4663.989837] headphone (GPIO 177) is now connected18:22
DocScrutinizer05Dec 23 16:05:54 IroN900 kernel: [ 4665.067871] input: headset button as /class/input/input618:22
DocScrutinizer05how 'realtime' could that get?18:23
DocScrutinizer05IroN900:/sys/devices/platform/nokia-av# Dec 23 16:05:48 IroN900 kernel: [ 4658.466400] headphone (GPIO 177) is now disconnected18:23
DocScrutinizer05Dec 23 16:05:48 IroN900 ke_recv[1548]: device_removed:2695: udi: /org/freedesktop/Hal/devices/computer_logicaldev_input_118:23
DocScrutinizer05Dec 23 16:05:49 IroN900 mce[830]: Error accessing /dev/input/event4 (condition: 16). Ignoring18:23
DocScrutinizer05Dec 23 16:05:49 IroN900 mce[830]: Error when reading from /dev/input/event4: No such device18:23
Palihm... that input file is created after inserting headphones...18:24
DocScrutinizer05IOW would events in /dev/input/event* have timestamps?18:24
PaliI think input events have timestamps18:24
DocScrutinizer05then we're already done, no? :-D18:24
Palibut that input device reports only one thing18:25
DocScrutinizer05unless that input device has "debouncing" or shit18:25
Paliwhen headset button is pressed18:25
Paliand it reports after 1s18:25
Paliuseless for now...18:25
Palithis is that code18:26
DocScrutinizer05I see, it *does* >>"debouncing" or shit<<18:27
Palimaybe easier would be to patch nokia-av.c and recompile just nokia-av.ko18:28
Paliwhat all is needed?18:29
Paliwould not be easier to implement everything in that nokia-av.ko driver?18:30
DocScrutinizer05however it seems is *exactly* the location where should happen: IRQ handler sends a worker thread a timestamped event, worker thread decodes the timing and converts the raw data into nice bytes, then sends those to /dev/input*18:30
DocScrutinizer05yes, exactly what you said while I typed slowly18:30
DocScrutinizer05basically what we need is not much different to the debounce function there18:31
Paliok, after we decode it into bytes.. those bytes are then raw ECI protocol?18:31
Paliand switching micbias on/off is other direction?18:32
Palihm... so it needs correct timing18:32
Paliand is nokia-av.ko initializing ECI? or we need to implement it?18:33
PaliI see that nokia-av.ko already is doing with micbias18:33
DocScrutinizer05correct timing only really relevant intra-byte TX18:34
DocScrutinizer05I'd think the ECI protocil high level is really userland lib thing18:35
DocScrutinizer05incl initialization18:35
DocScrutinizer05no idea how HARM is doing it (or if at all)18:36
DocScrutinizer05I *think* N9/HARM knows and speaks ECI18:36
DocScrutinizer05they use a hw "UART" in TPS65951 that is absolutely undocumented18:37
DocScrutinizer05TI prolly inplemented it into TPS65951 on nokia's special request18:38
DocScrutinizer05for N918:38
DocScrutinizer05now if only I hadn't killed my N9, I could test18:39
DocScrutinizer05waaait, I should also be able to test it on N950, no?18:39
Palimaybe yes18:39
PaliI think easy solution would be to add support for poll() syscall on /sys/devices/platform/nokia-av/eci018:42
Paliand /sys/devices/platform/nokia-av/eci118:42
Paliwhich are needed? both of them?18:43
DocScrutinizer05Oh Nokia F U!! N950 is AHJ18:43
DocScrutinizer05eci0 is needed18:44
Palieci1 too?18:44
DocScrutinizer05it doesn't even detect the headset when I plug it in18:45
DocScrutinizer05eci1 is for detection only18:45
DocScrutinizer05not related to ECI protocol18:46
Palihm... I cannot find any eci headset now :-( I have just original nokia n900 headset and then some old nokia headset with pop-in-port (not jack)18:46
DocScrutinizer05eci1 goes 0 whenever a jack with a mic impedance < ~8k Ohm gets plugged in18:47
DocScrutinizer05oops < 15k18:48
DocScrutinizer05 22k/(22k+6k8)=X/(X+4k7)18:50
DocScrutinizer05aka X=22k * (4k7/6k8)18:51
DocScrutinizer05also note that this only works when ECI5 switches mux to this comparator, and that disconnects micbias and replaces it by the 4k7 to 2V518:52
DocScrutinizer05so a mere detector thing for detection phase after plugin18:52
DocScrutinizer05though of arguable value, given we also have madc18:53
DocScrutinizer05anyway not needed for ECI protocol18:54
VajbKotCzarny: i checked local auction sites and it seems that t500 and x220 r about the same price 150-300 depending of the seller...18:56
KotCzarnyx220 is a few gens higher18:56
KotCzarnyit would be like you were looking for t520 ;)18:57
Vajbinteresting that they r about the same price then18:58
KotCzarnysmaller is more expensive18:58
Vajbx220 is smaller?18:59
KotCzarnyx series is ultraportable18:59
KotCzarnyt series is normal work machines18:59
Vajbt520 330e18:59
KotCzarnyforget 330e19:00
KotCzarnyunless they b0rk the series numbers, but afair it was like that always19:00
KotCzarnyie t60/x60, t500/x20019:00
KotCzarnyi got mine cheap when some company was upgrading from t500 laptops to t54019:01
Vajbyes. Im going to check one store which used to sell their old business laptops19:02
Vajblast time i visite there were some lenovo machines around 150e. Can't recall the number tho19:03
KotCzarnyi bught direct via local classifieds site, 2nd hand stores usually add their markup19:03
Vajbe series is low end i suppose?19:03
KotCzarnyyup, you only want t or x19:04
KotCzarnydepending if you want screen size or mobility19:04
KotCzarnyi dont remember if newer x series accomodated for dvd slot19:04
KotCzarnybut having it you can swap it for 2nd hdd, which is much more useful19:04
KotCzarnyin that case you want t series (or a dock)19:05
Vajbi saw docks for sale for 30e19:05
KotCzarnyfirst get a machine19:05
Vajbi suppose they come with win7 at least...19:06
Vajbi've had it with vista19:06
KotCzarnydepends, some with vista, some with win719:06
KotCzarnyit was a switching period19:07
Vajbi c19:07
Vajband well vista eol will be next year anyway19:08
KotCzarnyyou can grab win7_64 boxed version, then install whenever you like19:09
DocScrutinizer05DAMN AHJ!! I can swap center pin and sleeve of my AV-cable hookup in my test setup - BUT that doesn't work since the earphones (red and white plug of AV cable) also are connected to sleeve of the 3.5mm jack :-/19:09
DocScrutinizer05still I don't get it why it doesn't work19:11
Vajboh t series is 64bit?19:11
KotCzarnymost core2duos are19:11
KotCzarnyif not all ;)19:11
Vajbi c19:11
KotCzarnyand you can always change the cpu19:12
KotCzarnyas its socketed (soldered in x)19:12
KotCzarnyyou should write all those requirements on your check-list19:13
Vajbi don't have much requirements :)19:13
Vajbi just have to be cheap and snappy19:13
KotCzarnyadd ssd to the list19:14
Vajboh yes that will kill the cheap bit19:14
KotCzarnyssd drives are reusable19:14
KotCzarnyyou can always move it from/to19:14
Vajbok i'll make some notes so t or x serie ssd19:15
KotCzarnyyou can get it with hdd and just buy ssd yourself (then move hdd to the bay)19:15
Vajbr they all core2duo because i think i saw some sold as i5?19:15
KotCzarnyt500 are from core2duo era, i think t510 or t520 was the first ones with intel iX19:16
KotCzarnyyeah, all t500 are core2duo19:16
KotCzarnyt510 are i5/i719:17
Vajbah i think they were some others then19:17
KotCzarnywell, t4xx series are similar to t5xx, but using smaller screen19:18
KotCzarnyso you might hunt those too19:18
KotCzarny(14" vs 15")19:18
Vajbok, no versions with 17"?19:19
KotCzarnynot in the normal thinkpad series19:20
Vajbok i think i'll go with t series because my laptop just sits on the table always19:20
Vajbnext week im going to that store and see what they have also im keeping my eye on auction site, but it seems the amount will be about 150e eventually19:22
*** louisdk has joined #maemo19:23
KotCzarnyor just be patient and look for it in the nearest 6 months19:23
*** louis__ has joined #maemo19:23
KotCzarnyacer still works, so no rush19:23
Vajbyup, thx bbl19:23
KotCzarnyand you can put 10e/month into 'new laptop fund of vajb'19:23
Vajbhehe yeah19:24
Vajband acer works but vista not so much19:24
KotCzarnygo xp?19:24
*** ced117_ has quit IRC19:25
*** zGrr has quit IRC19:44
KotCzarnyum, wrong chan19:56
*** cyphase has quit IRC19:58
*** cyphase has joined #maemo20:04
*** spinal84 has joined #maemo20:07
*** pagurus has joined #maemo20:11
*** pagurus has quit IRC20:18
Vajbis xp still supported?20:19
KotCzarnyi think there was some hack20:20
Vajbi'll see if i can find vista disk and try repair20:21
Vajbsfc found some weird registry issues20:22
Vajbumm come again?20:27
Vajbshouldn't be20:27
Vajbi've used trendmicro house call + ms antivirus also two scanners for rootkits and three for malware20:28
KotCzarnyvista + 2 av programs? no wonder its slow as molasses20:29
Vajbtrendmicro is just online scanner which i use occasionally to get second opinion20:30
sicelo-what are you using xp for?20:30
Vajbsicelo-: it was just suggestion to replace vista20:31
Vajbi have vista which refuses to update itself20:31
sicelo-xp won't update at all :)20:31
KotCzarnybtw. that windows update fail also happens on w720:31
Vajbso problem solved :p20:31
KotCzarnyit's m$ fault20:31
VajbKotCzarny: yes i know, but there is a tool to fix it from ms. Sadly it is not working under vista20:32
Vajbspeaking of "forcing users to switch"20:33
KotCzarnyi've had w7 systems stuck on 'checking for updates' no matter what i've tried20:33
Vajbthere used to be ms fixit tool which worked with vista, but that is no more. Instead they offer .diagcap and that works in w7 and up20:33
KotCzarnyyup, there is a tool for w7 too. didnt work often20:34
sicelo-i feel like reinstalling my X40 - i've been using Debian Testing with KDE. Not happy with KDE (akregator crashes too often). Not sure if I should go back to Gnome or go with lxde/xfce :-/20:34
Vajbi like cmd apt-get i can see what is happening that good looking knight rider rip off doesn't tell much20:35
KotCzarnysicelo: use lxde? or even fluxbox? or mate?20:35
KotCzarnyno need to reinstall, just switch DE20:35
sicelo-lxde vs. xfce .. whis is usually bette?20:35
KotCzarnyyou definitely want something light20:35
KotCzarnyboth are fine20:35
KotCzarnyso up to your liking20:36
sicelo-reinstall because i want to see if i 'solve' the hibernation issue20:36
sicelo-tbh both Gnome and KDE have been fine performance-wise on the X40 :)20:36
Vajbi think i've used both. Crunchbang has xfce i think20:36
sicelo-will look at fluxbox a bit more20:36
Vajbboth r too bloated for my system20:37
Vajbi like the feature that i can get to menu from anywhere on background20:38
Vajb1,3ghz amd tb20:38
Vajbaround 700mb of ram20:38
Vajbsome geforce 5x series agb display card20:39
KotCzarnytry fluxbox20:39
sicelo-mine is 1.4GHz, 1GB RAM, on-board graphics. i find gnome/kde perfectly useable. anyway, i am happy with N900 performance, so ... :)20:40
Vajbit is kind of sad that cpu power nowadays is "limitless"20:40
*** L29Ah has quit IRC20:40
KotCzarnyits not ;)20:40
Vajbno one bothers to optimize20:40
Vajbespecially web pages20:41
Vajbmy puter used to be fine in flash6 time20:41
Vajbi could browse anything and watch the videos20:41
KotCzarnyi had 1ghz tb too20:41
KotCzarnystill have that cpu in the closet probably20:41
*** cyphase has quit IRC20:42
Vajbtake it in use20:43
Vajbplay with puppy linux20:43
KotCzarnyi can send it to you if you want20:43
Vajbi got laptop which had busted hdd so i installed puppy into usb memory and it was lightning fast20:43
KotCzarnyfor me it's only thinkpads + my gaming rig20:44
KotCzarnyand remember, i have and use and love my x4020:44
KotCzarnypentium-m single core @1.2ghz, 1.5gb ram20:44
Vajbyet another lenovo?20:44
KotCzarnyonly thing that makes it fly is hdd20:44
KotCzarnyssd i mean20:44
sicelo-same here20:44
KotCzarnynope. original ibm :P20:44
Vajboh i see20:45
sunshaviKotCzarny: You have more power than my compaq evo n600c20:45
sicelo-i would love to up the RAM to 1.5GB as well. currently have 1GB20:45
Vajbpentium m? Mobile? That low end processor serie?20:45
Vajbi'd love to have some 512mb sdram20:46
Vajbwas there ever 1024mb?20:46
KotCzarnybase(soldered) 512megs, and 1gb module20:46
Vajboh so basically i could have 3gigs of memory 0.020:46
*** cyphase has joined #maemo20:47
sicelo-i'm used to debian now (blame N900) ... what other distro could i try (not Ubuntu/Mint) ...20:47
Vajbmb has 3 slots20:47
KotCzarnysicelo: devuan?20:47
KotCzarnyif you like cmdline/scripts and doing most things by hand slackware20:47
Vajbsicelo-: try crunchbang follower20:47
Vajbcan't remember the name20:47
KotCzarnyif you like things compiled for your setup, gentoo20:47
sicelo-compiling on X40 .. sounds like fun :)20:48
KotCzarnyever heard of distcc? ;)20:48
sicelo-never looked at it in detail20:48
KotCzarnyessentially you need same gcc/g++ on other machine and network20:49
KotCzarnyand its like your compiling capabilities multiplied. but in case of x40 (single core) preprocessing takes most of the time20:49
KotCzarnyhmm, i might've lied about 1gb sdram (forgot x40 uses ddr1)20:51
Vajbwell actually i meant sdram sticks to my desktop ;)20:53
KotCzarnyyeah, that's what i meant20:53
KotCzarnythought x40 uses sdram (and i have 1gb stick in it)20:53
Vajbah i see20:53
Vajbi thin i have 256+256+12820:54
KotCzarnycheck if you can get x40/x60/x61 cheap enough20:54
Vajbthink too20:54
sicelo-verdict about Arch?20:56
sunshavisicelo: i am an arch user20:57
Vajbtried once long time ago didn't instantly fell in love20:57
sunshavinice for me, but when ready i am going to move to bsd for avoiding the systemd issue20:57
sunshaviI have more than 10 years using it.20:57
sunshaviBut distro is not important when using emacs. Distro is just a boot loader20:58
Vajbcare to buy vowel? BSOD20:59
DocScrutinizer05(re AHJ vs OMTP)  and again >>F U Apple and whoever was involved in chosing to have the most interference sensitive signal (mic) on **SLEEVE**!!!<<20:59
sicelo-i have also thought about bsd .. but maybe when i get to reinstall my box (which i've been wanting to do for 12+ months now)21:00
* DocScrutinizer05 suggests swapping sleeve and center pin for RCA/Cinch jacks too, just "necause we can"21:00
sicelo-wonder if i shouldn't try slackware instead for now :-/21:01
sunshavinice thing about arch is pkgs are always up to date. so probably my way is going to be pacbsd21:01
KotCzarnysicelo, you dont have to reinstall, with linux you can have multiple systems on one drive21:09
sicelo-i don't have large HDD though21:12
KotCzarny8gb per os should be fine these days, unless specifically finetuned21:13
*** florian has joined #maemo21:37
*** louisdk has quit IRC21:51
*** louis__ has quit IRC21:51
*** cyphase has quit IRC22:03
*** cyphase has joined #maemo22:08
*** Oksanaa has joined #maemo22:10
OksanaaAnybody got mscim to work? I installed mscimswitcher, mscim-hangul, mscim-tables-ja, and all I got is "mscim=no virtual keyboard"22:12
*** Oksanaa has left #maemo22:14
sicelo-perhaps OT: a day or two ago i mentioned that i had problems with USB on the X40 .. incidentally, USB devices are nicely detected if I plug it in the cardbus adapter, then suspend the system.23:00
*** CraigEr has quit IRC23:03
*** CraigEr has joined #maemo23:03
*** pkill9 has quit IRC23:13
*** me has joined #maemo23:54
*** me is now known as Guest8075923:55
*** Guest80759 is now known as pkill923:55
*** pkill9 has quit IRC23:58
*** me has joined #maemo23:58
*** me is now known as Guest3946623:58
*** Guest39466 is now known as pkill923:58
*** cyphase has quit IRC23:59

Generated by 2.15.1 by Marius Gedminas - find it at!