**** BEGIN LOGGING AT Thu Jun 09 02:59:57 2011 Jun 09 04:02:14 freesmartphone.org: 03morphis 07cornucopia * r7fe6a120f3c4 10/fsogsmd/src/plugins/modem_qualcomm_palm/channel.vala: fsogsmd: modem_qualcomm_palm: be more verbose in error case within channel opening Jun 09 04:47:36 freesmartphone.org: 03morphis 07cornucopia * rac401f272ba4 10/fsogsmd/src/plugins/modem_qualcomm_palm/channel.vala: fsogsmd: modem_qualcomm_palm: use plain sleep again as otherwise it does not work probably Jun 09 04:56:21 freesmartphone.org: 03morphis 07cornucopia * ra7672fadf0eb 10/fsogsmd/src/plugins/modem_qualcomm_palm/channel.vala: fsogsmd: modem_qualcomm_palm: add missing posix namespace name Jun 09 05:23:30 moin Jun 09 05:29:26 moin Jun 09 05:29:44 and night Jun 09 05:30:14 :) Jun 09 05:36:37 put on yout tin foil hats! Solar storms approaching Jun 09 05:38:35 mrmoku: look out for aurora, might be visible in Bavaria Jun 09 05:38:44 hehe Jun 09 05:38:57 no kidding Jun 09 05:39:04 I can already see it http://git.freesmartphone.org/?p=aurora.git;a=summary ;) Jun 09 05:39:13 hehe Jun 09 05:39:20 DocScrutinizer: yeah, heard that too Jun 09 05:40:08 funny part is we're down south enough to see it - more to the north night is not dark enough ;-P Jun 09 05:48:07 hmm... that looks wrong Jun 09 05:48:08 catch ( SpawnError e ) Jun 09 05:48:08 { Jun 09 05:48:08 warning( @"Can't spawn aplay: $(strerror(errno))" ); Jun 09 05:48:09 throw new FreeSmartphone.Device.AudioError.PLAYER_ERROR( "Can't play song %s: %s".printf( name, Alsa.strerror( res ) ) ); Jun 09 05:48:51 catching SpawnError and using Alsa.strerror ... Jun 09 05:49:33 umm Jun 09 05:50:32 not that the rest of it looked any sane to me Jun 09 05:51:46 I would have thought that using aplay is something you'd consider sane :) Jun 09 05:52:21 I'm getting nausea on throw new foo.bar.boo Jun 09 05:53:04 couldn't this critter throw with old rocks at least? Jun 09 05:53:49 * DocScrutinizer obviously is no OO-man Jun 09 05:54:50 the whole syntax looks bewildering Jun 09 05:55:13 warning( @" WTF?! Jun 09 05:55:51 $(strerror Jun 09 05:56:05 * DocScrutinizer starts to feel sick Jun 09 05:57:16 gues that's this vala thing Jun 09 05:57:46 or maybe a weird mix of bash, java, and c# ? Jun 09 05:58:44 I don't know java and c# Jun 09 05:58:52 but I started to actually like the vala syntax Jun 09 05:59:11 help me out, why was fso-2 written in vala again? Jun 09 05:59:28 because python sucks when it comes to speed at least Jun 09 05:59:53 well yeah, that is more the reasons why it got rewritten Jun 09 05:59:58 so that's an argument for assembler as well ;-P Jun 09 06:00:04 not why it was rewritten in vala Jun 09 06:00:45 at least assembler wouldn't cause this slightly sick nausea feeling in my guts Jun 09 06:00:47 DocScrutinizer: what would you have choosen? Jun 09 06:00:57 nah Jun 09 06:01:23 and dont' tell me assembler because I would not believe you ;) Jun 09 06:01:37 tbh? C, as it's a good label to stick on the box, no other reason Jun 09 06:01:58 that's the point Jun 09 06:02:14 vala is C in the end Jun 09 06:02:34 I honestly doubt anybody dares to touch FSO-2 for that vala bit Jun 09 06:02:35 and as mickey|office is not a fluent C programm choosing plain C was not an option for him Jun 09 06:03:14 DocScrutinizer: that's not true... Gnutoo touches it... I touch it... dos1 touches it... morphis completely dived into it... playya_ is into it Jun 09 06:03:30 you well got my point though Jun 09 06:03:40 sure Jun 09 06:03:51 for example TAsn won't touch it :P Jun 09 06:04:02 as he's a stubborn C-only man ;) Jun 09 06:04:14 and I can't sell this stuff to e.g. meego Jun 09 06:04:25 but if you look at it from the pov of who did most of the work Jun 09 06:04:32 vala was quite a logical decision Jun 09 06:04:42 hmm Jun 09 06:04:45 maybe, no clue about that Jun 09 06:04:53 not even a clue about vala Jun 09 06:05:19 but it's hard to get anybody even look at the sources, if only to demonstrate how kevents work Jun 09 06:06:50 it's always hard to make somebody look at (and understand) sources in a language he/she does not know Jun 09 06:06:56 I have NFC what warning( @"Can't spawn aplay: $(strerror(errno))" ); really is meant to do Jun 09 06:07:24 for example I'm having an even harder time to understan some python code... even though I did some very light-weight python programing already Jun 09 06:08:10 sure, when it was for me and my way, linux was written in modula Jun 09 06:08:17 DocScrutinizer: and it's not that we have a bunch of volunteers for SHR C-Code waiting for tasks to be given btw. Jun 09 06:09:18 maybe you had a few more when it was in C Jun 09 06:44:44 moin Jun 09 06:46:00 moin JaMa|Wrk Jun 09 06:48:38 * JaMa|Wrk has almost all stuff packed Jun 09 06:48:50 only pc is still connected and ap on Jun 09 06:53:43 JaMa|Wrk: from when to when will you be gone? Jun 09 07:01:46 I still dont have connection at home (and keys from roof) so maybe from tomorrow to 18 July Jun 09 07:05:56 ok Jun 09 07:27:33 * mrmoku off to a client Jun 09 08:01:15 SHR: 03Martin.Jansa 07shr-chroot * r2ddd39f8c5d9 10/ (16 files in 8 dirs): bitbake: upgrade Jun 09 08:05:41 SHR: 03Martin.Jansa 07shr-chroot * r12a95daabbab 10/ (16 files in 8 dirs): bitbake: add patch persist_data: Add back code to retry in the case of locked database errors Jun 09 08:54:17 hi I cannot bitbake fsodeviced on shr-unstable with chroot http://paste.pocoo.org/show/403306/ Jun 09 09:01:40 using fso-autorev? Jun 09 09:02:51 because there should be b7e1c25ae69d249e7f0fb3de1f8adc4ca58149e5 SRCREV.. Jun 09 09:36:30 SHR: 03Martin.Jansa 07meta-smartphone * re332258bcd9c 10/meta-shr/conf/distro/include/preferred-shr-versions.inc: preferred-shr-versions: set SRCREV_pn-gobject-introspection* Jun 09 09:43:37 No not using fso-aurorev. Sorry to answer so late suffered an RL interrup and after that I had to be sure of the answer Jun 09 10:33:00 jluis: as is it oe HEAD? Jun 09 10:34:08 jluis: you don't have this commit http://git.openembedded.org/cgit.cgi/openembedded/commit/recipes/freesmartphone/cornucopia.inc?id=5c43457a77b279a996b737efbc2f3d9a77f1e7a1 Jun 09 10:35:36 jluis: so you're missing incompatible vala and cornucopia versions and you need http://git.freesmartphone.org/?p=cornucopia.git;a=commit;h=319253c5e91067544ebefc8028ca2d764037eae8 Jun 09 10:48:09 JaMa|Wrk,I have compiled it afrer upgrading openembedded and shr-unstable and checking the commit in cornucopia.inc Jun 09 10:48:59 surelly my previous make update missed some commits :/ Jun 09 14:59:06 hi GNUtoo Jun 09 14:59:24 hi Jun 09 14:59:31 I made many phone calls today Jun 09 14:59:36 it seem better than yesterday Jun 09 14:59:50 you know alsa better than me... when does it error with device busy? Jun 09 14:59:50 still some little buffer underrun but they are handled Jun 09 14:59:53 great Jun 09 14:59:58 no idea Jun 09 15:00:02 I need more context Jun 09 15:00:06 gta02 Jun 09 15:00:12 incoming call Jun 09 15:00:16 ah? Jun 09 15:00:19 you press accept Jun 09 15:00:24 ok Jun 09 15:00:28 where do you get that? Jun 09 15:00:33 and fsodeviced gets device busy from alsa when it tries to set the mixer Jun 09 15:00:35 for gsm Jun 09 15:00:53 I don't know well the control API Jun 09 15:00:57 ok Jun 09 15:00:59 but I know the PCM API Jun 09 15:01:27 * GNUtoo is already using the n900 as daily phone now Jun 09 15:01:33 very nice :-) Jun 09 15:01:35 * GNUtoo needs to import his contacts Jun 09 15:01:55 note that I do not make intensive use of phone calls Jun 09 15:02:05 I do not call often Jun 09 15:03:03 doc may have some hints, also look at twinkle alsa backend Jun 09 15:03:40 I would have thought the control api is not blocking Jun 09 15:04:16 where is the details? Jun 09 15:04:17 *are Jun 09 15:04:23 do you have the log? Jun 09 15:04:45 hmmm Jun 09 15:04:49 could it be the PCM Jun 09 15:04:59 and not the control API? Jun 09 15:05:12 device.setAllMixerControls( allscenarios[scenario].controls ); Jun 09 15:05:12 like you have a ringtone that occupy the card Jun 09 15:05:25 is clearly control... and there I get the exception Jun 09 15:05:28 /var/log/fsoaudiod.log says what exactly Jun 09 15:05:30 device or resource busy Jun 09 15:05:36 ok Jun 09 15:05:37 fsodeviced.log Jun 09 15:05:41 but exact line? Jun 09 15:06:01 2011-06-08T17:18:03.623657Z [WARN] fsodeviced : Failed to update scenario 'gsmhandset' to get changes: Device or resource busy Jun 09 15:06:09 ok Jun 09 15:06:18 let me look Jun 09 15:06:36 var res = card.elem_write( control.value ); Jun 09 15:06:36 if ( res < 0 ) Jun 09 15:06:36 throw new SoundError.DEVICE_ERROR( "%s".printf( Alsa.strerror( res ) ) ); Jun 09 15:06:42 is the part that throws the exception Jun 09 15:06:48 #define EBUSY 16 /* Device or resource busy */ Jun 09 15:06:57 strace it Jun 09 15:07:06 ok, moment Jun 09 15:07:06 don't forget the -f Jun 09 15:07:15 I can decode ioctls Jun 09 15:07:53 ok... have to build it for gta02 Jun 09 15:07:58 ok Jun 09 15:20:42 GNUtoo: gah... under strace it works :/ Jun 09 15:21:01 ~lart timing issues Jun 09 15:21:01 * apt puts timing issues into a headlock and administers a mighty noogie, rubbing half of timing issues's hair of Jun 09 15:21:02 timing issues then Jun 09 15:21:05 :) Jun 09 15:21:16 then maybe retry Jun 09 15:21:18 that is to say Jun 09 15:21:22 catch error Jun 09 15:21:25 goto retry Jun 09 15:21:36 but only retry a certain number of time Jun 09 15:21:39 or something like that Jun 09 15:21:40 I tried that... did a loop and retried 5 times Jun 09 15:21:50 without waiting though Jun 09 15:21:50 and? Jun 09 15:21:53 and all 5 tries fail Jun 09 15:21:55 ah ok Jun 09 15:22:01 exponential backoff? Jun 09 15:22:06 like in networking Jun 09 15:22:18 ? Jun 09 15:22:55 btw. Jun 09 15:22:55 underrun!!! (at least 1317.742 ms long) Jun 09 15:23:00 n900? Jun 09 15:23:04 gta02 Jun 09 15:23:07 ok Jun 09 15:23:13 output of fsodeviced I saw under strace Jun 09 15:23:17 ok Jun 09 15:23:18 while playing the ringtone Jun 09 15:23:20 ok Jun 09 15:23:23 SHR: 03Martin.Jansa 07meta-smartphone * rf37d05ca7450 10/meta-nokia/recipes-bsp/udev/ (6 files in 2 dirs): meta-nokia: drop udev bbappend now when devtmpfs is preferred Jun 09 15:23:25 * mrmoku changes the nice -10 Jun 09 15:23:36 lol Jun 09 15:23:49 maybe change the nice of aplay instead Jun 09 15:23:51 anyway Jun 09 15:24:00 exponential backoff is for retries Jun 09 15:24:06 each time you retry Jun 09 15:24:09 you sleep longer Jun 09 15:24:16 like **2 Jun 09 15:24:16 ok Jun 09 15:24:33 I think it was in the ethernet protocol Jun 09 15:24:37 for handling collisions Jun 09 15:34:41 GNUtoo: don't think so... ethernet has random retry AFAIK. many other protocols use exponential though -- typical SMTP daemon settings for example Jun 09 15:34:59 yes it's random Jun 09 15:35:10 but there is also an exponential backoff in the randomness Jun 09 15:35:55 In Ethernet networks, the algorithm is commonly used to schedule retransmissions after collisions. Jun 09 15:35:59 http://en.wikipedia.org/wiki/Exponential_backoff Jun 09 15:36:38 basically you increase the number of slots Jun 09 15:36:45 I see Jun 09 15:36:48 and choosing the slot is random Jun 09 15:37:00 slot is in time Jun 09 15:37:35 * mrmoku won't get *that* complicated ;) Jun 09 15:38:09 anyways, I don't think that would be a good idea here. even if it helped, it would only kludge around the issue, rather than finding and fixing it... Jun 09 15:39:06 it's simple Jun 09 15:39:12 sleep += foo Jun 09 15:39:12 righto, but we want to switch to fsoaudiod anyway and that would at least give people back a working phone meanwhile Jun 09 15:39:28 Posix.usleep( 10 ^ retry_count ); Jun 09 15:39:32 is what I'm trying now Jun 09 15:42:26 mrmoku: found your "device busy" reason now? Jun 09 15:42:34 * DocScrutinizer reads backscroll Jun 09 15:43:17 DocScrutinizer: no :/ Jun 09 15:43:54 hmm Jun 09 15:44:03 switching to speaker and back makes it work it seems Jun 09 15:44:29 DocScrutinizer: is the alsa control api blocking on simul access like the pcm one? Jun 09 15:44:59 hmm... I doubt that's the problem.. Jun 09 15:45:11 mrmoku, maybe try simplier userspace tests: Jun 09 15:45:14 GNUtoo: did not help with 10 retries Jun 09 15:45:20 like many concurent alsactl -f foo restore Jun 09 15:45:44 try to see if fsoaudiod openning something already blocks it Jun 09 15:45:55 or try with lsof, proc/pid/fd Jun 09 15:46:11 mrmoku: (block) dunno, I guess you can select this by some parameter bits on open(), as usual Jun 09 15:46:14 how can you try without receiving a call? Jun 09 15:47:11 mrmoku: see hooks "manpage", there's an option to lock controls Jun 09 15:48:27 ok Jun 09 15:48:57 so I guess you can choose on a function-call level whether to lock or not Jun 09 15:49:46 for snd_pcm_open() there's BLOCK / NONBLOCK iirc Jun 09 15:49:59 expect to see same for ctrl Jun 09 15:50:34 I toldya yesterday I suspect a race ;-) Jun 09 15:51:06 check the ringtone-player code Jun 09 15:52:06 I'd not be surprised to find it using its own ctrl interface implementation and opening ctrl in BLOCK mode Jun 09 15:52:15 DocScrutinizer: ringtone player is spawning aplay Jun 09 15:52:33 that's unrelated, aplay doesn't access ctrl Jun 09 15:52:48 indeed Jun 09 15:53:03 it's about how ringtone-player is doing scenario switching Jun 09 15:53:11 that's why I fail to understand it is ringtone related Jun 09 15:53:22 it does nor Jun 09 15:53:25 not Jun 09 15:53:34 duh, what?!? Jun 09 15:53:55 hmm Jun 09 15:54:15 will check in 5min when bacto kbdk Jun 09 15:54:38 touchpad? Jun 09 15:54:45 I hate it when that happens Jun 09 15:55:47 meh, maybe just a cursor-left typo Jun 09 15:56:08 left instead of space Jun 09 16:00:13 kbd :) Jun 09 16:00:25 well n900 has a kbd too Jun 09 16:00:41 but I can't check fso code here Jun 09 16:14:55 DocScrutinizer: it does not change the controls on incoming calls for the ringtone :P Jun 09 16:22:18 gah, alsa api docs are sooo extensive :P Jun 09 16:26:00 2011-06-09T03:06:35.018474Z [DEBUG] fsodeviced : elem_write( 50:'DAI Mode':1:0 ) card=neo1973gta02 Jun 09 16:26:07 that's the control that fails Jun 09 16:27:12 * mrmoku dinner Jun 09 16:29:45 is there a trick to building 2.6.39 in chroot build env? bitbake linux-2.6.39 still tries to build 2.6.37 in shr-unstable for me Jun 09 16:30:28 jeepingben: bitbake linux-openmoko-2.6.39 Jun 09 16:30:41 thanks Jun 09 16:30:51 but it will mess with your feeds Jun 09 16:31:21 ie 2.6.37 modules will be removed from your installed image with next opkg upgrade Jun 09 16:31:50 thats ok, I'll be working on my testing FR, so it isnt a problem to start over Jun 09 16:31:57 ok Jun 09 16:33:18 captainigloo, ^^^ JaMa|Off is not Off Jun 09 16:34:06 JaMa|Off, hi Jun 09 16:34:10 hi.. Jun 09 16:34:22 could you(when you have the time) change the niceness of enlightenment Jun 09 16:34:23 mrmoku: ok, that's a decent clue Jun 09 16:34:23 not really off yet, but leaving soon (waiting only for test build) Jun 09 16:34:39 like from -10 to -2 or to 0 Jun 09 16:34:47 GNUtoo: I'll be without home workstation online since tomorrow.. Jun 09 16:34:53 -2 is ok according to DocScrutinizer Jun 09 16:35:05 mrmoku: I think the bug in wm8753 driver been exactly about setting DAI mode Jun 09 16:35:13 JaMa|Off, until when? Jun 09 16:35:17 GNUtoo: I've seen it here yesterday.. but really no time to do it now Jun 09 16:35:28 when will you have the time Jun 09 16:35:35 because I've no time either to do it right now Jun 09 16:35:36 GNUtoo: 1,5 month .. returning 17-18 July Jun 09 16:35:44 ouch Jun 09 16:35:45 ok Jun 09 16:36:00 I guess mrmoku or me will have to do it then Jun 09 16:36:58 maybe I'll get connection before leaving to US.. but it's not sure Jun 09 16:37:02 have a good offline time Jun 09 16:37:06 thanks Jun 09 16:37:12 vacations? Jun 09 16:37:48 or move to the US Jun 09 16:37:56 vacations after 24.6. but before that I have to finish flat and stupid dayjob project.. Jun 09 16:38:01 ok Jun 09 16:49:43 PaulFertser: DAI mode anything? Jun 09 16:49:51 DocScrutinizer: ahem? Jun 09 16:50:07 * PaulFertser needs to read the backlog. Jun 09 16:50:10 PaulFertser: I seem to recall there's been some bug in driver for wm8753? Jun 09 16:50:24 DocScrutinizer: not DAI related. Jun 09 16:50:28 oh Jun 09 16:50:47 DocScrutinizer: the bug was with some powersaving that resulted in necessity to set some parameter twice for gsm<->bluetooth communication. Jun 09 16:50:48 I'm pretty sure we had problems with DAI switching before Jun 09 16:51:20 like switching DAI freezes driver, or sth Jun 09 16:51:50 kills the kernel Jun 09 17:00:40 PaulFertser: I also recall that twiddle-some-ctrl thing that was related to wolfson's magic handling the powersaving based on guesswork about the audio path used Jun 09 17:01:28 tbh I always thought this magic is completely ill placed in a kernel driver Jun 09 17:02:51 in my book it's clearly a high level management "heuristics" that would usually go to userland and interface the chip via some proper API Jun 09 17:04:16 DocScrutinizer: well, if something can easily be deduced by the kernel driver, why not get it there? Jun 09 17:04:42 as this clearly fails the definition of "easily" :-) Jun 09 17:04:50 DocScrutinizer: most probably it was a bug in the driver not properly establishing some relationship between controls. Or some minor omission in API worth fixing. Jun 09 17:05:03 I have never really investigated it, unfortunately. Jun 09 17:05:50 DAI switching could kill the kernel but i'm not sure if that bug is still there. I think when i started i fixed at least one of that kind. Jun 09 17:05:56 PaulFertser: the driver has to deduce about needed function blocks based on what we tell it about value of some mux and other controls Jun 09 17:06:51 this implies the driver is at least as smart as I am ;-P Jun 09 17:06:52 DocScrutinizer: i kinda trust the ASoC folks as they have clearly seen more different devices than me and have quite some kernel hacking experience. I think their framework is mostly correct. Jun 09 17:07:25 indeed it may be mostly correct, but I question the basic concept Jun 09 17:08:11 which, for all I know, been around the mantra of "drivers have no intelligence, they export as basic a control of the hw as possible" OWTTE Jun 09 17:09:48 also violates the best practice requirement of drivers exporting a most comprehensive control to API Jun 09 17:10:14 well, alas a lot of drivers violate that rule Jun 09 17:10:47 and always it bites your ass sooner or later Jun 09 17:12:01 freesmartphone.org: 03morphis 07msmcomm * r36ccf1dae335 10/libmsmcomm/README: libmsmcomm: reformat README file Jun 09 17:12:01 freesmartphone.org: 03morphis 07msmcomm * r0b5cf09d6bee 10/libmsmcomm/msmcomm/ (messagedisassembler.vala pdsmmessagegroup.vala): libmsmcomm: activate pdsm messages group for disassembling Jun 09 17:12:01 freesmartphone.org: 03morphis 07msmcomm * r5d938164dfc8 10/libmsmcomm/ (4 files in 4 dirs): libmsmcomm: fix typo in pdsm structure definitions Jun 09 17:12:02 freesmartphone.org: 03morphis 07msmcomm * rbfaed9da4d87 10/libmsmcomm/msmcomm/ (messagetype.vala messageutil.vala pdsmmessage.vala): libmsmcomm: implement pdsm PD_EVENT message type Jun 09 17:12:02 freesmartphone.org: 03morphis 07msmcomm * r204618f1edb2 10/libmsmcomm/protocol/all_hci_messages_hp_veer.txt: libmsmcomm: add list of hci messages types used with webOS on the HP Veer device Jun 09 17:12:04 freesmartphone.org: 03morphis 07msmcomm * rd64930cdb305 10/scripts/hci-stat.py: Jun 09 17:12:04 freesmartphone.org: Add simple script to count HCI message types in binary strings list Jun 09 17:12:04 freesmartphone.org: It's usefull to dump all strings from the TelephonyInterfaceLayer binary to see if there Jun 09 17:12:04 freesmartphone.org: are new HCI messages types or if there is a difference between different versions of the Jun 09 17:12:04 freesmartphone.org: protocol. Jun 09 17:12:42 freesmartphone.org: 03morphis 07msmcomm * r87bc56e80523 10/libmsmrpc/ (31 files in 3 dirs): Jun 09 17:12:42 freesmartphone.org: libmsmrpc: initial import from the android open source project Jun 09 17:12:42 freesmartphone.org: This will be the starting point for experimentaions with the variant of the msmcomm Jun 09 17:12:42 freesmartphone.org: protocol used mainly on smartphones based completly on a system made by qualcomm. Both AP Jun 09 17:12:42 freesmartphone.org: and BP processors are made by Qualcomm in this systems so they communicates over a shared Jun 09 17:12:42 freesmartphone.org: memory interface. For the communication the oncrpc protocol is used. On top of this other Jun 09 17:12:43 freesmartphone.org: protocols like AT or msmcomm (sometimes even named QMI/HCI) can be used. Jun 09 17:12:43 freesmartphone.org: 03morphis 07msmcomm * re90e0d57bebb 10/libmsmrpc/msmrpc/msmrpc.h: libmsmrpc: add all necessary includes of header files to the common header file Jun 09 17:14:43 mrmoku, yeah, I'm scared of Vala. Jun 09 17:14:58 TAsn: welcome to the club ;-) Jun 09 17:15:11 mrmoku, though the reason mostly was: I don't have time for yet another "best ever" language. Jun 09 17:15:22 DocScrutinizer, thanks. When's the next club party? Jun 09 17:15:50 bah, it's so hot in here. Jun 09 17:16:21 facebook going another step ahead of BigBrother ;-P Jun 09 17:17:13 what now? Jun 09 17:17:17 next step: you don't even need to enter your personal data when opening an account - mere enabling of the flash webcam plugin will do that for you Jun 09 17:17:27 he's wasting his talent on facebook, he could have been the next george orwell. Jun 09 17:17:44 DocScrutinizer, lol. Jun 09 17:19:11 TAsn: wo's "he"? Zuckerberg? Jun 09 17:19:16 yeah. Jun 09 17:19:28 Suckerberg Jun 09 17:19:42 you can say a lot of things about him Jun 09 17:19:46 but one thing you can't Jun 09 17:19:49 he's not a sucker Jun 09 17:19:50 :) Jun 09 17:19:51 even Suckerborg Jun 09 17:21:38 the man made tons of money Jun 09 17:21:41 out of nothing Jun 09 17:21:49 he's a genius ;) Jun 09 17:24:18 DocScrutinizer: indeed... I tried with aplay and alsamixer... while aplay is still running alsamixer refuses to switch DAI mode Jun 09 17:24:22 it works before aplay and after Jun 09 17:24:35 does not seem to kill anything though Jun 09 17:24:37 just does not work Jun 09 17:25:02 yeah, might be another arcane bit of wolfson magic Jun 09 17:26:05 mrmoku: are you sure DAI switching is supposed to work while a stream is open? What use is in that? Jun 09 17:26:14 probably you mustn't switch DAI while it's occupied by a path as figured out by that obscure powersaving magic's notion of pathes Jun 09 17:27:07 PaulFertser: see? it's been just <1/2h when I said "will bite your arse sooner or kater" Jun 09 17:27:09 PaulFertser: on incoming call the ringtone is still playing and we want to switch to gsm Jun 09 17:27:33 kater, nice ;-D Jun 09 17:28:28 mrmoku: why not turning off the ringtone first? Jun 09 17:28:41 because it takes ages Jun 09 17:29:40 and voila: we got our asses bitten by a smartass driver "AI" Jun 09 17:29:55 PaulFertser: unfortunattely ringtone is still handled by oeventsd Jun 09 17:30:06 which is slow by definition Jun 09 17:30:16 I hate to be right always Jun 09 17:31:12 so we got this by upgrading kernel to 2.6.37 :/ Jun 09 17:31:13 DocScrutinizer: (right always) heh, i often had the same thought Jun 09 17:31:34 mrmoku: worth raising a question on alsa-devel ML i think. Jun 09 17:31:56 DocScrutinizer: and aci would fail the same way as we have to switch dai, right? Jun 09 17:32:15 PaulFertser: yeah Jun 09 17:33:32 mrmoku: right, this seems to be a bug in concept of wm8753 driver Jun 09 17:33:38 mrmoku: you can tell them about the usecase of PA constantly keeping the stream open i guess. Jun 09 17:34:04 (bug in concept) i wouldn't be too sure in that, it's a pretty straightforward driver for the ASoC framework. Jun 09 17:35:05 a driver mustn't lock some state transitions or actions in general, based on the driver devel's notion of what's a valid usecase Jun 09 17:35:32 so if it's really the driver that blocks DAI switching, then it's definitely a bug Jun 09 17:35:46 NFC if in concept or by accident Jun 09 17:36:53 well, maybe that's the driver's bugfix for the kernel-freeze_on_DAIswitching Jun 09 17:37:26 so it might be way more complicated than we assumed first Jun 09 17:38:17 [2011-06-09 18:51:16] kills the kernel Jun 09 17:39:16 the "correct" bugfix would be to tear down the PCM stream in a way that doesn't freeze kernel, on DAI mode switching Jun 09 17:39:48 should be feasible as it's all in one driver Jun 09 17:40:21 don't expect the usual "layering violation issues" blocking a clean approach Jun 09 17:40:36 maybe looking at git log for the driver scheds some light Jun 09 17:40:45 good idea Jun 09 17:41:38 might be an "old" patch though that's just rising its ugly head on new fso timing Jun 09 17:42:39 I don't think there've been plenty of patches to wm8753 driver lately, so it's easily spotted Jun 09 17:45:48 the dai issue has been properly fixed recently Jun 09 17:46:02 you can only change the dai mode if there is no pcm active Jun 09 17:46:18 so with 2.6.39 it would be fixed? Jun 09 17:46:25 yes Jun 09 17:47:43 no, it's exactly what I explained above, It's "fixed" in a way that causes a new bug Jun 09 17:48:58 i don't think so Jun 09 17:49:05 the intention of the fix been ok, the implementation is kinda suboptimal Jun 09 17:49:26 JaMa|Off: still around Jun 09 17:50:23 larsc: what about the "PA" usecase when it's constantly ready to produce some sound? Jun 09 17:50:34 it's kinda like removing the lightswitch to fix a short in the lamp mounted at ceiling Jun 09 17:51:03 i think we even discussed the patch here Jun 09 17:51:27 DocScrutinizer51: and you recommanded doing this way Jun 09 17:52:16 ouch, if that's true that it proves I'm not always constantly bright ;-) Jun 09 17:53:13 ~hail DocScrutinizer for being mortal ;) Jun 09 17:53:13 * apt bows down to DocScrutinizer for being mortal ;) and chants, "I'M NOT WORTHY!!" Jun 09 17:53:13 we can easily remove the check Jun 09 17:53:57 as mentioned above, the right fix is to tear down the PCM on DAI mode switching, not to forbid DAI mode switching while PCM is in use Jun 09 17:54:41 i guess that would cause pulse audio or whoever does playback to crash Jun 09 17:54:50 because of buffer overruns Jun 09 17:55:23 or, just maybe and if feasible, just fix the root issue and make PCM (driver/kernel) ) ignore DAI switching rather than freeze Jun 09 17:55:47 (crash) so be it Jun 09 17:55:58 it's what I'd expect to happen anyway Jun 09 17:56:29 "you asked for it, you get it" - please don't try to outsmart user of driver API Jun 09 17:58:17 look, a mere "cat /proc/kmem" can tear down my whole system. I asked for it, I got it Jun 09 17:59:04 there's nobody suggesting to forbid certain access patterns to /dev/kmem Jun 09 17:59:21 forbid inside driver* Jun 09 18:00:17 mrmoku: I said "*IF* that's true..." ;-) Jun 09 18:02:23 for sure it's a nogo to get a kernel freeze on a supposedly harmless audiocontrol switching. But the fix is to forbid/fix the freeze, not to forbid the switching Jun 09 18:05:47 hm Jun 09 18:06:09 don't have all the different state files the same dai mode anyway? Jun 09 18:06:34 mrmoku: does it fail trying to set the same mode as before? Jun 09 18:09:09 mrmoku: http://pastebin.com/VGB7jZgY Jun 09 18:09:18 should hopefully fix the issue Jun 09 18:10:42 hmm... it's when switching from pcm playback to gsm audio... let me check the scenarios Jun 09 18:11:10 root@om-gta02 /etc/freesmartphone/conf/openmoko_gta/alsa-2.6.34 # grep DAI gsmhandset Jun 09 18:11:13 50:'DAI Mode':1:0 Jun 09 18:11:15 root@om-gta02 /etc/freesmartphone/conf/openmoko_gta/alsa-2.6.34 # grep DAI stereoout Jun 09 18:11:18 50:'DAI Mode':1:0 Jun 09 18:11:21 larsc: yup, the mode does not change Jun 09 18:11:36 thx Jun 09 18:11:54 larsc: btw. there is another problem with the newer kernel you might have an idea for :) Jun 09 18:12:02 bq27x00 does not send any uevents Jun 09 18:12:39 none? Jun 09 18:12:52 it should query the battery in regular intervals Jun 09 18:13:05 and if a property changes it should send an uevent Jun 09 18:13:08 we don't get charging notification anymore Jun 09 18:15:32 could you insert a debug msg into bq27x00_update to see if it gets called? Jun 09 18:16:44 ok Jun 09 18:17:02 om-2.6.37 is the correct branch, right? Jun 09 18:17:34 yes Jun 09 18:17:50 or om-gta02-2.6.37 if you don't want gta01 support Jun 09 18:18:53 ok Jun 09 18:19:49 is it possible that there is some bug in your uevent listener? Jun 09 18:20:03 larsc: before calling power_supply_changed ? Jun 09 18:20:39 it get's all other uevents and nobody touched it... but yes all is possible Jun 09 18:22:29 mrmoku: one printk right at the beginning and one before power_supply_changed Jun 09 18:22:49 mrmoku: could you check with `/sbin/udevadm monitor` if there are any events Jun 09 18:23:00 remove the battery and wait a few seconds Jun 09 18:23:37 hmm... we don't have udev on gta02 Jun 09 18:23:48 will a cat on uevent do too? Jun 09 18:24:52 no Jun 09 18:25:14 root@om-gta02 /sys/devices/platform/s3c2440-i2c/i2c-0/0-0073/hdq/bq27000-battery.0/power_supply/battery # tail -f uevent Jun 09 18:25:17 POWER_SUPPLY_NAME=battery Jun 09 18:25:19 POWER_SUPPLY_PRESENT=0 Jun 09 18:26:12 this at least explains, why you don't receive any updates Jun 09 18:26:25 nah, that was when ripping out the battery :) Jun 09 18:26:31 and I got that in our log too Jun 09 18:26:32 2011-06-09T05:06:04.551420Z [INFO] fsodeviced : GLib : kobjectnotifier.vala:118: change@/devices/platform/s3c2440-i2c/i2c-0/0-0073/hdq/bq27000-battery.0/power_suppl Jun 09 18:26:36 y/battery Jun 09 18:26:56 so it works? Jun 09 18:27:03 but not for charging state Jun 09 18:27:22 hmm Jun 09 18:27:32 2011-06-09T05:06:04.554709Z [WARN] Kernel26AggregatePowerSupply : POWER_SUPPLY_TYPE not present, checking for POWER_SUPPLY_TECHNOLOGY... Jun 09 18:27:35 2011-06-09T05:06:04.555065Z [WARN] Kernel26AggregatePowerSupply : Not present; treating it like an AC adapter Jun 09 18:27:42 might be the reason... Jun 09 18:28:45 both should be present Jun 09 18:29:03 what is the content of uevent when the battery is insered? Jun 09 18:29:50 root@om-gta02 ~ # cat /sys/class/power_supply/battery/uevent Jun 09 18:29:50 root@om-gta02 ~ # Jun 09 18:29:54 it's empty Jun 09 18:30:37 hm Jun 09 18:31:18 echo $? Jun 09 18:31:21 `echo $?` Jun 09 18:32:39 root@om-gta02 ~ # cat /sys/class/power_supply/battery/uevent Jun 09 18:32:39 root@om-gta02 ~ # echo $? Jun 09 18:32:39 0 Jun 09 18:33:16 mrmoku, hey :) Jun 09 18:33:19 that shouldn't be possible Jun 09 18:33:46 either there is an error, or at least POWER_SUPPLY_NAME is present Jun 09 18:34:53 mrmoku, moving from headset to stereout doesn't work neither (as ins removing headsets while playing music on enjoy) Jun 09 18:35:13 larsc: strange Jun 09 18:35:36 [25509.880000] HDQ error: 1 Jun 09 18:35:36 [25570.100000] HDQ responds again Jun 09 18:35:51 dunno if that was when ripping the battery though :P Jun 09 18:36:12 likely Jun 09 18:36:14 yeah, nvm. does not happen on cat uevent Jun 09 18:37:13 building a kernel with the two printks now Jun 09 18:37:54 and your DAI patch Jun 09 18:38:41 pespin: you mean when pulling the plug? Jun 09 18:38:50 mrmoku: try adding a "#define DEBUG" before any includes in drivers/power/power_supply_sysfs.c Jun 09 18:38:58 mrmoku, yes Jun 09 18:39:06 larsc: ok Jun 09 18:41:49 mrmoku, player continues playing as if nothing happened, but no sound comes from stereout Jun 09 18:42:10 (and neither from headsets) Jun 09 18:42:16 * mrmoku fails to find his headset Jun 09 18:43:01 ahh..here we are :) Jun 09 18:43:49 pespin: ahh, right that will be solved too by the patch Jun 09 18:44:08 all scenario changes will fail while a pcm stream is active Jun 09 18:44:50 mrmoku, which patch? Jun 09 18:46:05 pespin: 20:08 < larsc> mrmoku: http://pastebin.com/VGB7jZgY Jun 09 18:46:30 pespin: current kernel refuses dai switching when a pcm stream is active Jun 09 18:46:45 pespin: with that patch it allows 'switching' to the same value Jun 09 18:47:11 which is all we need for switching between stereoout and gsmhandset Jun 09 18:47:36 (and headset) Jun 09 18:47:55 /etc/freesmartphone/conf/GTA02/alsa-default/capturehandset:50:'DAI Mode':1:2 Jun 09 18:47:58 /etc/freesmartphone/conf/GTA02/alsa-default/voiphandset:50:'DAI Mode':1:2 Jun 09 18:48:08 are the only ones with a different DAI mode we have Jun 09 18:48:30 what's DAI? Jun 09 18:50:16 digital access index? Jun 09 18:50:19 no idea Jun 09 18:50:26 digital audio interface Jun 09 18:50:31 ahh :) Jun 09 18:51:22 brb Jun 09 18:52:35 larsc, could you explain shortly what's that for human people? :P Jun 09 18:53:03 pespin: uhm, like your audio jack, just in digital form Jun 09 18:53:13 it's the bus over which the audio data is sent Jun 09 18:53:56 and it is demuxed to diferent outputs? (ie headsets jack, stereo speaker, etc.) Jun 09 18:54:07 no Jun 09 18:54:21 the wm8753 has 2 dais Jun 09 18:54:28 hifi and voice Jun 09 18:54:42 the voice dai is connected to the bluetooth chip Jun 09 18:54:50 and the hifi dai to the cpu Jun 09 18:55:28 but it also has different dai modes Jun 09 18:55:42 ok :) Jun 09 18:55:57 which basically allow to connect the bluetooth chip to the hifi dai Jun 09 18:56:00 see http://wiki.openmoko.org/wiki/Neo1973_audio_subsystem Jun 09 18:56:38 saved it, I'll look at it later, thanks ;) Jun 09 18:56:54 mrmoku, are you building kernel with patch now? Jun 09 19:06:20 pespin: yup, locally to try Jun 09 19:15:36 mrmoku, nice, once it works could you start an shr-lite-image build please? Jun 09 19:19:26 pespin: when it works... sure Jun 09 19:19:34 * mrmoku has some problem... investigating Jun 09 19:56:36 DocScrutinizer: any idea why amixer scontrols gives me only 90 controls... instead of 93 ? Jun 09 19:57:25 check --show-hidden or what it's called Jun 09 19:58:01 also scontrols don't show switches for volume-mute Jun 09 19:58:12 ahh, ok Jun 09 19:58:56 hmm... with the kernel I built including the patch from larsc fsodeviced aborts on startup Jun 09 19:59:18 fsodeviced: control.c:1589: snd_ctl_elem_list_get_id: Assertion `idx < obj->used' failed. Jun 09 20:00:09 which I understand as trying to access a control out of range Jun 09 20:00:43 which I understand as "RTFLine1589" :-P Jun 09 20:00:54 root@om-gta02 ~ # alsactl -f - store | grep name | wc -l Jun 09 20:00:54 93 Jun 09 20:01:27 DocScrutinizer: I don't have that line at hand Jun 09 20:01:30 it's inside libasound Jun 09 20:02:18 though I *might* actually have a local copy of libasound src, I'm sure it's not the right version Jun 09 20:02:59 DocScrutinizer: found the tarball Jun 09 20:03:06 (in the right version) Jun 09 20:03:31 snd_ctl_elem_list_get_id Jun 09 20:04:07 index ut of range? Jun 09 20:04:41 DocScrutinizer: nvm Jun 09 20:04:47 one of the scenarios had 94 Jun 09 20:04:56 eh? Jun 09 20:04:56 our Media phantom control :/ Jun 09 20:05:08 guess it's caused by our bogus asound.conf Jun 09 20:05:13 and how's all that related? Jun 09 20:05:15 ahh Jun 09 20:05:15 no Jun 09 20:05:44 DocScrutinizer: on start fsodeviced loads the scenarios... and on the one with 94 controls it goes boom in snd_ctl_elem_list_get_id Jun 09 20:05:56 haha Jun 09 20:06:16 heard it again... that funny word Jun 09 20:06:22 scenario Jun 09 20:06:25 ;-P Jun 09 20:07:19 now let's see if that works now Jun 09 20:07:40 on a general note about how the world works: there's always an unlimited number of fuzzy spec'ed scenarios Jun 09 20:08:11 matches our special audio universe quite precisely Jun 09 20:09:07 thinking "scenario" reduces your ability of dealing with things like they are Jun 09 20:09:28 in German it's called "Schubladendenken" Jun 09 20:15:11 there's exactly one well defined "scenario" we could use on mixer management: all_off Jun 09 20:15:31 aka reset or default state Jun 09 20:15:44 larsc: yay, works :) Jun 09 20:16:28 so what does it do now, on trying to switch DAI mode while ringtone still playing? Jun 09 20:16:44 mrmoku`, hi Jun 09 20:16:57 DocScrutinizer: it allows switching to the same DAI mode Jun 09 20:17:00 I really need a tester for calls Jun 09 20:17:11 a remote lied to me telling it was ok Jun 09 20:17:12 oh wow, it allows a NUL op Jun 09 20:17:15 :-) Jun 09 20:17:18 and it seem not ok Jun 09 20:17:23 no? Jun 09 20:17:29 as I said before Jun 09 20:17:35 I cannot test what the remote ear Jun 09 20:17:46 maybe someone could setup a cmtspeech loopback for me? Jun 09 20:18:10 GNUtoo: echo from you asterisk server? Jun 09 20:18:12 you should use a TAM, e.g on skype Jun 09 20:18:22 my asterisk is SIP only Jun 09 20:18:27 then leave a message to yourself Jun 09 20:18:33 ahh great Jun 09 20:18:37 leaving a message Jun 09 20:18:48 skype is proprietary Jun 09 20:19:06 but I could try to leave a message to myself or something like that Jun 09 20:19:13 or better Jun 09 20:19:18 record the message voice Jun 09 20:19:27 who cares? it has landline numbers to call in, and it has telephone answering machine Jun 09 20:19:42 my landline phone has some problems Jun 09 20:19:47 so that's why I cannot test Jun 09 20:20:21 GNUtoo: I can build and test... won't make that today though Jun 09 20:20:41 *sigh*, if you _really_ can't find a better solution, you're free to call _my_ TAM, and I'll forward the .wav to you Jun 09 20:20:41 hmm... thinking about it I'm not sure I can make it Jun 09 20:21:14 loopback is absolutely worthless Jun 09 20:21:22 we're leaving for italy on saturday and tomorrow at least half day I will be on a client's site... Jun 09 20:21:35 echo cancellation is ubiquitous Jun 09 20:21:43 ok Jun 09 20:22:39 you can't run a signal forth and back realtime and hope you get a meaningful result Jun 09 20:25:09 hmmm robot voice Jun 09 20:27:36 (I can record my voice) Jun 09 20:29:08 mrmoku, do you have the built package somewhere? I'd like to try it this night if posible (listening to music) ) Jun 09 20:30:24 mrmoku, is 3g supposed to work btw? Jun 09 20:31:00 because I've some issues with it Jun 09 20:31:03 when I activate Jun 09 20:31:07 maybe it segfault Jun 09 20:34:43 basically dbus get no response Jun 09 20:34:53 and I get a round instead of the bar Jun 09 20:34:56 when I activate Jun 09 20:36:28 GNUtoo: it worked at some point Jun 09 20:36:52 ok Jun 09 20:37:01 maybe it's because of wind Jun 09 20:37:09 with wind I've : Jun 09 20:37:13 None as operator Jun 09 20:37:15 in the top bar Jun 09 20:37:18 in illume Jun 09 20:37:23 that's because of the status: Jun 09 20:37:40 pespin|away: hmm... when do you need it? Jun 09 20:37:59 pespin|away: what I could do is scp the kernel image + the modules tarball and you install manually Jun 09 20:40:23 hi folks :) Jun 09 20:40:29 larsc: regarding bq27x00 it looks you're right and the problem is somehwere in our uevent handling... have to investigate Jun 09 20:40:32 larsc: http://pastebin.com/RewkeV1N Jun 09 20:40:34 hi mickeyl :) Jun 09 20:40:40 for those of you who didn't see it yet ... http://www.vanille-media.de/site/index.php/2011/06/09/the-eagle-has-landed/ Jun 09 20:40:44 or better daddy mickey? Jun 09 20:40:49 ahh :D Jun 09 20:41:01 congrats... and good luck ;) Jun 09 20:41:04 thanks a lot Jun 09 20:41:20 mickey|bigdaddy: CONGRATS! Jun 09 20:41:27 thanks :) Jun 09 20:41:33 it's so overwhelming... Jun 09 20:42:03 * DocScrutinizer hands mickey|bigdaddy a big cigar (you can take it, it's chocolate ;-P ) Jun 09 20:42:08 hehehe Jun 09 20:42:27 i would be in the mood for a whiskey if i had one at home Jun 09 20:44:46 mickey|bigdaddy: how's mum? Jun 09 20:45:45 DocScrutinizer: still weak, but OK. the cut is hurting, but she'll be alright in a couple of days. she's (irrational as women are...) somewhat disappointed that it didn't work without the section, but she's very lucky that's over in whatever way ;) Jun 09 20:45:46 mrmoku, nvm going out to pub now (finished univ course :P). Thanks anyway :) Jun 09 20:45:47 mickey|bigdaddy, nice end of the wait Hail Dad!! Jun 09 20:45:54 jluis: thanks :) Jun 09 20:46:04 mickey|bigdaddy, hey, congrats! :) Jun 09 20:46:07 pespin|away: merci Jun 09 20:46:10 pespin|away: ok, will see to get it out as soon as possible... can't promise for tonight though Jun 09 20:46:15 mickey|bigdaddy: good! \o/ Jun 09 20:46:33 mrmoku, np, take your time :) Jun 09 20:46:42 ok Jun 09 20:47:16 pespin|away, what are you doing here the tests have ended >;) Jun 09 20:48:07 jluis, yeah, time to run for some beer hehe Jun 09 20:48:13 see ya guys, have a good night too Jun 09 20:48:58 cu pespin|away Jun 09 20:51:06 I'll push Jun 09 20:51:19 I've newer version that seem a lot better Jun 09 20:51:30 I put the old version adding buffer underrun handling Jun 09 21:03:51 freesmartphone.org: 03GNUtoo 07cornucopia * ra52c4bf0eff1 10/fsoaudiod/src/plugins/gsmvoice_alsa_cmtspeechdata/cmthandler.vala: (log message trimmed) Jun 09 21:03:51 freesmartphone.org: fsoaudiod: gsmvoice_alsa_cmtspeechdata plugin: fix robot voice on remote side Jun 09 21:03:51 freesmartphone.org: The recording thread was removed, intead the sound is recorded Jun 09 21:03:51 freesmartphone.org: immediately, and the possible buffer overrun should be handled. Jun 09 21:03:51 freesmartphone.org: This was tested recording my own voice with the help of my carrier Jun 09 21:03:51 freesmartphone.org: Answering machine function(thanks DocScrutinizer (on the Jun 09 21:03:51 freesmartphone.org: #openmoko-cdevel IRC channel on the freenode server) for the idea) Jun 09 21:04:02 mickey|bigdaddy, finally it arrived.... Jun 09 21:04:08 congratulations Jun 09 21:05:00 GNUtoo: thanks a lot. it was tough to only be able to stand by and "support" while my wife had to do the job... Jun 09 21:06:50 ok Jun 09 21:07:37 best wishes to her for getting well soon Jun 09 21:07:43 mickey|bigdaddy: Jun 09 21:08:04 thanks a lot. will forward all your good wishes tomorrow Jun 09 21:08:15 ~praise for caring mothers and mothers in law Jun 09 21:08:16 All hail for caring mothers and mothers in law! Jun 09 21:08:22 or rather grand mums Jun 09 21:09:41 indeed Jun 09 21:09:45 they do all the efforts Jun 09 21:09:55 like support the baby during 9 month Jun 09 21:10:12 without taking some medecines,no alchool,no smoking Jun 09 21:10:31 then there is the time when the baby comes out, it's tough Jun 09 21:11:05 indeed. on days like these i'm quite thankful for being a man. although it _has_ it merits to be a girl, they have some really hard fates in life. Jun 09 21:11:06 beside all that....women are still discriminated in some places(for instance middle east) Jun 09 21:11:11 oh so ture. Jun 09 21:11:12 true Jun 09 21:11:34 oh. der igel heisst lennart? Jun 09 21:11:48 lennart??? Jun 09 21:11:53 zu Hilfe nein :) Jun 09 21:12:03 hehe. congrats Jun 09 21:12:15 that's an insider Jun 09 21:12:21 k Jun 09 21:12:35 the eagle has landed -> der igel heisst lennart Jun 09 21:12:37 ah Jun 09 21:12:40 now i understand Jun 09 21:12:50 i'm still somewhat tired Jun 09 21:12:56 but actually Jun 09 21:13:10 the women in the bed besides Sabine... her boy is really named Lennart Jun 09 21:13:19 and i couldn't help but think of the Pulseaudio guy Jun 09 21:13:21 :D Jun 09 21:13:48 hehe. yes Jun 09 21:13:51 4.41? Jun 09 21:13:58 yep Jun 09 21:14:02 in the _middle_ of the night Jun 09 21:14:12 pespin|away: build is running Jun 09 21:14:23 after 6 hours of the worst in our lifes... Jun 09 21:16:40 GNUtoo: I will try to build and install it tomorrow morning before going to the client to give it some testing Jun 09 21:17:24 * mickey|bigdaddy signs off to catch some sleep... cu soon guys Jun 09 21:17:27 now bedtime Jun 09 21:17:34 mickey|bigdaddy: enjoy the next three nights Jun 09 21:17:45 as they will be the last silent ones for some time ;) Jun 09 21:17:56 *nod* thanks for reminding :D Jun 09 21:18:00 :P Jun 09 21:18:06 it's worth it anyway :D Jun 09 21:18:15 for sure Jun 09 21:18:17 * mrmoku off too Jun 09 21:18:19 gnight all Jun 09 21:18:21 n8 Jun 09 21:18:23 larsc: and thx again Jun 09 21:18:56 mickey|daddy|zzZ: o/ Jun 09 21:19:17 mrmoku: night Jun 09 21:24:47 mrmoku, ok, it works a lot better now but it is not perfect Jun 09 21:33:27 GNUtoo: a stupid example: if you were to build a tank, and you go "I got two chains, so I mount one motor for each, to get something running quickly. Let's deal later with the poor ability of the whole thing to drive straight ahead" - this concept would probably give you instant success in the beginning and a never ending headache afterwords Jun 09 21:34:19 if you're going to deal with an inbound audio stream you need to sync to an outbound audio stream, the situation isn't really much different Jun 09 21:34:47 ok Jun 09 21:35:06 so what should I do roughly? Jun 09 21:35:16 basically the design of the app is the following Jun 09 21:35:30 when the modem has a buffer for us, we play it back Jun 09 21:35:47 when the modem request a buffer, we record the audio Jun 09 21:36:30 should I go the complicated way with 2 buffers etc... Jun 09 21:36:33 basically : Jun 09 21:36:48 I record in a separate thread Jun 09 21:36:55 in 2 buffers Jun 09 21:36:57 *I would Jun 09 21:37:08 when I record in one buffer Jun 09 21:37:14 I push the second one to cmt Jun 09 21:37:20 *other one Jun 09 21:37:34 and for playback, I would do the same thing Jun 09 21:37:44 sounds ok so far Jun 09 21:38:08 but then I would have to handle buffer underruns/overrun with all that Jun 09 21:38:14 that might start to be complex Jun 09 21:38:40 else I could use gstreamer Jun 09 21:38:45 nah Jun 09 21:38:46 with appsrc and appsink Jun 09 21:38:48 ok Jun 09 21:39:28 gstreamer has too much overhead? Jun 09 21:39:37 even with simple buffer/alsa playback? Jun 09 21:40:00 you got one buffer for readi(), one buffer for writei(), and one 'local' buffer that transfers the date from readi to writei Jun 09 21:40:04 I think felipec's test were done with media playing Jun 09 21:40:08 you get all this two times Jun 09 21:40:29 one time for upstream and one time for downstream Jun 09 21:40:39 yes Jun 09 21:40:59 the readi and writei buffers might be opaque to you Jun 09 21:41:07 depending on implementation Jun 09 21:41:28 I.E. I dunno who is creating those Jun 09 21:42:19 if you have to do and pass them to snd_pcm_open() and snd_pcm_writei(), or if this is handled by the vala bindings or something Jun 09 21:42:37 I think it's mostly opaque Jun 09 21:42:53 theses are buffers of memory Jun 09 21:43:03 then how vala represent it is not important Jun 09 21:43:07 you always need one datastructure created locally to pass the data from read to write subroutine Jun 09 21:43:15 (there are vala bugs, but that's another story) Jun 09 21:43:40 basically: Jun 09 21:43:48 download from modem->writei Jun 09 21:43:50 each of those two transmit buffers is segmented into at least 2 segments Jun 09 21:43:55 readi->send to modem Jun 09 21:44:11 so 2 buffers Jun 09 21:44:42 usually you create those datastructures as ringbuffers Jun 09 21:45:10 with a writepointer and a readpointer Jun 09 21:45:32 the segments are more or less virtual Jun 09 21:45:57 I know Jun 09 21:46:01 for the ring buffer Jun 09 21:46:17 but I should create 1 buffer for write and one for read Jun 09 21:46:20 right? Jun 09 21:46:26 with 2 segments each Jun 09 21:47:30 on wrting to ringbuffer you drop the data chunk if you find there's not enough space to write, i.e. when the distance from writeptr *ahead* to readptr is less than your datachunk Jun 09 21:48:31 I've some (bad ) experience with the htcdream alsa driver Jun 09 21:48:36 and they used some ring buffer Jun 09 21:48:41 with 2 segments Jun 09 21:49:21 then on the writei side - when you get an IRQ callback signalling your "playback" needs fresh data - you access same buffer and look if it has enough data from readptr *ahead* to writeptr to feed writei() with one chunk of data Jun 09 21:49:42 if not, you feed same old data to writei() once again Jun 09 21:49:53 or alternatively feed writei() with silence Jun 09 21:50:07 hmmm Jun 09 21:51:53 there are more sophisticated ways to handle xruns of that transfer buffer, like inserting a few samples to adapt for different speeds between both sides, but *that* is what you can fix later Jun 09 21:52:09 ok Jun 09 21:52:59 of course you are free to use a ringbuffer worth in size of 3 segments aka datachunks Jun 09 21:53:20 you even can use different chunk/segment sizes on write and on read side Jun 09 21:53:44 * GNUtoo is a bit lost and has difficulties to map theses with code: Jun 09 21:53:50 if will all not matter as long as the buffer is at least 2 times the size of your biggest chunk Jun 09 21:53:54 on wrting to ringbuffer ... Jun 09 21:54:00 then on the writei side ... Jun 09 22:00:24 it seem that I understand better pseudocode than words Jun 09 22:03:33 when readi() side calls callback function: if (readptr-writeptr) what is callback function? Jun 09 22:05:24 I understood the rest tough Jun 09 22:05:59 when writei() side calls callback function: if (writeptr-readptr) callback is the function you pass to snd_pcm_open() that gets called back (!) when the buffer needs service, I.E. when either a input/capture buffer has filled enough, or an output/play buffer has enough new free space Jun 09 22:08:43 oh, the vala implementation hide it Jun 09 22:10:14 show me your vala code Jun 09 22:10:50 http://git.freesmartphone.org/?p=cornucopia.git;a=blob;f=fsoaudiod/src/plugins/gsmvoice_alsa_cmtspeechdata/cmthandler.vala;h=697190a252173aa5324cb23dd1255de50b8cfec1;hb=a52c4bf0eff1d77aa2c8fd5c4de081dcc2cbe383 Jun 09 22:20:02 sorry, I can't find anything familiar in that vala implementation of ALSA access Jun 09 22:20:13 ok Jun 09 22:20:23 seems there's sth like a dataevent Jun 09 22:20:46 yes there are events from the modem Jun 09 22:20:58 when you can upload from the modem Jun 09 22:21:03 mrmoku: sort of Jun 09 22:21:04 but it's completely unclear to me how that even is associated to the read or write side, and how to tell them apart Jun 09 22:21:04 and when you can download from the modem Jun 09 22:21:19 basically it's very dirty Jun 09 22:21:31 when the modem has a buffer, we writei it Jun 09 22:21:46 so those are the callbacks for the modem side readi() and writei() Jun 09 22:21:49 when the modem request a buffer, we read it Jun 09 22:22:08 *readi Jun 09 22:22:15 basically: Jun 09 22:22:37 yes, that's ignoring the event driven nature of the readi / writei side Jun 09 22:22:38 modem buffer is ready => let's writei modem buffer Jun 09 22:22:42 yes Jun 09 22:22:59 or better: Jun 09 22:23:08 modem buffer is ready => let's writei to the alsa card the modem buffer Jun 09 22:23:16 which at best results in messed up audio Jun 09 22:23:34 modem wants a buffer -> let's readi from the alsa card in the modem buffer Jun 09 22:23:34 at worst makes ALSA writei() readi() break and fail Jun 09 22:23:38 yes Jun 09 22:23:53 I'll do something lower level and cleaner Jun 09 22:29:39 http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m.html#gb7eaaec6f27e4ca48cada9795cd2479b has no trace of a snd_pcm_open with a callback thing Jun 09 22:29:50 but I guess there is still a method to use callbacks Jun 09 22:29:52 I'll look Jun 09 22:30:27 (I already eared about that callback thing so it must exist) Jun 09 22:37:31 I'll read more about alsa and its api Jun 09 22:42:33 http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html ->Transfer methods in UNIX environments Jun 09 22:43:23 every method there that's waiting for readi / writei ready to take/deliver a new chunk of data is just fine Jun 09 22:44:58 you can use blocking readi()/writei() in an endless loop. You can wait for an event and on that event call your handler doing the readi()/writei() once Jun 09 22:45:30 ok Jun 09 22:47:32 or you use the async callback I mentioned above: http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m.html#g0d343597cdce35871a5010b6e6d5535b Jun 09 22:47:46 ok Jun 09 22:47:49 thanks a lot!!!! Jun 09 22:51:09 oh, it's late Jun 09 22:51:13 I've to go to sleep Jun 09 22:51:18 and thanks a lot!!!!! **** ENDING LOGGING AT Fri Jun 10 02:59:57 2011