FSO5 dbus Releasing Resource Display leads to no dimming / blanking and crash on incoming call

c_c cchandel at yahoo.com
Wed Feb 11 03:46:13 CET 2009


Hi,
  Well, I'm nearing a new release of guitar tuner and have incorporated dbus
signals/methods to prevent blanking of the screen and suspend by requesting
resource CPU and Display like so :-

    char *resource = "CPU";
    proxy = dbus_g_proxy_new_for_name (connection,
                                     "org.freesmartphone.ousaged",
                                     "/org/freesmartphone/Usage",
                                     "org.freesmartphone.Usage");
	call = dbus_g_proxy_begin_call (proxy, "RequestResource", NULL, NULL, NULL,
G_TYPE_STRING,
                                                resource, G_TYPE_INVALID);
	dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID);

    then I change the value of resource to "Display" and repeat the call. In
the log I get :-

Feb 11 07:44:20 om-gta02 user.info frameworkd.resource INFO     setting
resource status for CPU from disabled to enabling
Feb 11 07:44:20 om-gta02 user.info frameworkd.resource INFO     setting
resource status for CPU from enabling to enabled
Feb 11 07:44:20 om-gta02 user.info ousaged  INFO     Enabled CPU in 0.1
seconds
Feb 11 07:44:20 om-gta02 user.info oeventsd.action INFO     signal
RequestResource responded : ()

and

Feb 11 07:44:45 om-gta02 user.info frameworkd.resource INFO     setting
resource status for Display from disabled to enabling
Feb 11 07:44:45 om-gta02 user.info frameworkd.resource INFO     setting
resource status for Display from enabling to enabled
Feb 11 07:44:45 om-gta02 user.info ousaged  INFO     Enabled Display in 0.1
seconds
Feb 11 07:44:47 om-gta02 user.info oeventsd.action INFO     signal
SetBrightness responded : ()


    On quitting the program I release the resources using similar code
except for changing the method to ReleaseResource. The log shows :-

Feb 11 07:46:39 om-gta02 user.info frameworkd.resource INFO     setting
resource status for Display from enabled to disabling
Feb 11 07:46:39 om-gta02 user.info odeviced.idlenotifier INFO    
odeviced.idlenotifier state change to busy
Feb 11 07:46:39 om-gta02 user.info frameworkd.resource INFO     setting
resource status for Display from disabling to disabled

  I'm assuming that the resource CPU was not released since the freerunner
was connected to my laptop and charging (and I'm using the following
additional rule in rules.yaml) :-
    while: PowerStatus()
    filters: Not(HasAttr(status, "discharging"))
    actions: OccupyResource(CPU)

    However, after this cycle, my freerunner does not blank any more or
suspend automatically. 

   In addition, if I get a call while the program is running, I get a kernel
oops like so :-

Feb 11 07:45:46 om-gta02 user.info oeventsd INFO     Receive CallStatus,
status = incoming
Feb 11 07:45:46 om-gta02 user.info oeventsd INFO     Receive CallStatus,
status = incoming
Feb 11 07:45:47 om-gta02 user.info odeviced.idlenotifier INFO    
odeviced.idlenotifier state change to busy
Feb 11 07:45:47 om-gta02 user.info oeventsd.action INFO     DebugAction :
dbus trigger test
Feb 11 07:45:47 om-gta02 user.info oeventsd INFO     Receive IdleState,
status = busy
Feb 11 07:45:47 om-gta02 user.info oeventsd.action INFO     call dbus signal
/org/freesmartphone/Device/Display/0 SetBrightness((90,))
Feb 11 07:45:47 om-gta02 user.info oeventsd INFO     Receive IdleState,
status = busy
Feb 11 07:45:47 om-gta02 user.info oeventsd INFO     Receive IdleState,
status = busy
Feb 11 07:45:47 om-gta02 user.info oeventsd INFO     Receive IdleState,
status = busy
Feb 11 07:45:48 om-gta02 user.err kernel: [21474829.680000] asoc: WM8753
HiFi <-> s3c24xx-i2s No matching rates
Feb 11 07:45:48 om-gta02 user.emerg kernel: [21474829.680000]
snd_pcm_hw_constraints_complete failed
Feb 11 07:45:48 om-gta02 user.alert kernel: [21474829.680000] Unable to
handle kernel NULL pointer dereference at virtual address 00000000
Feb 11 07:45:48 om-gta02 user.alert kernel: [21474829.680000] pgd = c70e0000
Feb 11 07:45:48 om-gta02 user.alert kernel: [21474829.680000] [00000000]
*pgd=37bbb031, *pte=00000000, *ppte=00000000
Feb 11 07:45:48 om-gta02 user.emerg kernel: [21474829.680000] Internal
error: Oops: 0 [#1] PREEMPT
Feb 11 07:45:48 om-gta02 user.emerg kernel: [21474829.680000] Modules linked
in: bnep sco snd_soc_neo1973_gta02_wm8753 snd_soc_s3c24xx_i2s
snd_soc_s3c24xx snd_soc_wm8753 snd_soc_core snd_pcm snd_timer snd_page_alloc
snd rfcomm ipv6 hidp l2cap g_ether btusb ar6000 bluetoot
Feb 11 07:45:48 om-gta02 user.emerg kernel: [21474829.680000] CPU: 0    Not
tainted  (2.6.29-GTA02_mystable-mokodev #5)


  I've added a listener for the incoming call signal (to quit the program
and change the alsa state), but it seems like the framework changes the alsa
state before I do.

  How do I solve these problems? Am I doing something wrong? Or is this a
bug('s)?


-- 
View this message in context: http://n2.nabble.com/FSO5-dbus-Releasing-Resource-Display-leads-to-no-dimming---blanking-and-crash-on-incoming-call-tp2306515p2306515.html
Sent from the Openmoko Devel mailing list archive at Nabble.com.




More information about the devel mailing list