Notices


Reply
Thread Tools
Posts: 1,258 | Thanked: 672 times | Joined on Mar 2009
#31
my ad-54 gives audio from both earbuds for me, but obviously the buttons do nothing.
 
Bec's Avatar
Posts: 876 | Thanked: 396 times | Joined on Dec 2009
#32
d-bus tutorial... anyone???
__________________
 
OVK's Avatar
Posts: 559 | Thanked: 1,017 times | Joined on May 2008 @ Finland
#33
Originally Posted by Bec View Post
d-bus tutorial... anyone???
I am not an expert, this is just something that I found from the Google:
http://linux.die.net/man/1/dbus-monitor

So it seems that you just need to open xterm and type dbus-monitor (and you can also give some more specific attributes to this command). Works for me (although I don't know how to exit the dbus-monitor), I just don't understand most of the output... I also don't know if it would be better to run this as root.

Unfortunately I could not find my AD-54 for testing.
 
Bec's Avatar
Posts: 876 | Thanked: 396 times | Joined on Dec 2009
#34
I've done some tests with the music lpayer and the phone in the background:

Default headset:
Code:
                  string "group"
                  variant                      string "alarm"
               }
               struct {
                  string "limit"
                  variant                      int32 100
               }
            ]
            array [
               struct {
                  string "group"
                  variant                      string "event"
               }
               struct {
                  string "limit"
                  variant                      int32 100
               }
            ]
            array [
               struct {
                  string "group"
                  variant                      string "inputsound"
               }
               struct {
                  string "limit"
                  variant                      int32 0
               }
            ]
            array [
               struct {
                  string "group"
                  variant                      string "systemsound"
               }
               struct {
                  string "limit"
                  variant                      int32 0
               }
            ]
            array [
               struct {
                  string "group"
                  variant                      string "background"
               }
               struct {
                  string "limit"
                  variant                      int32 100
               }
            ]
            array [
               struct {
                  string "group"
                  variant                      string "idle"
               }
               struct {
                  string "limit"
                  variant                      int32 100
               }
            ]
         ]
      )
      dict entry(
         string "com.nokia.policy.context"
         array [
            array [
               struct {
                  string "variable"
                  variant                      string "call_audio_type"
               }
               struct {
                  string "value"
                  variant                      string "none"
               }
            ]
            array [
               struct {
                  string "variable"
                  variant                      string "call"
               }
               struct {
                  string "value"
                  variant                      string "inactive"
               }
            ]
            array [
               struct {
                  string "variable"
                  variant                      string "mode"
               }
               struct {
                  string "value"
                  variant                      string "media"
               }
            ]
         ]
      )
      dict entry(
         string "com.nokia.policy.audio_route"
         array [
            array [
               struct {
                  string "type"
                  variant                      string "sink"
               }
               struct {
                  string "device"
                  variant                      string "headset"
               }
               struct {
                  string "mode"
                  variant                      string "hs"
               }
               struct {
                  string "hwid"
                  variant                      string "na"
               }
            ]
            array [
               struct {
                  string "type"
                  variant                      string "source"
               }
               struct {
                  string "device"
                  variant                      string "headset"
               }
               struct {
                  string "mode"
                  variant                      string "na"
               }
               struct {
                  string "hwid"
                  variant                      string "na"
               }
            ]
         ]
      )
   ]
signal sender=:1.10 -> dest=(null destination) serial=5023 path=/org/freedesktop/Hal/Manager; interface=org.freedesktop.Hal.Manager; member=DeviceAdded
   string "/org/freedesktop/Hal/devices/computer_logicaldev_input_1"
HS-43
Code:
                  string "limit"
                  variant                      int32 0
               }
            ]
            array [
               struct {
                  string "group"
                  variant                      string "fmradio"
               }
               struct {
                  string "limit"
                  variant                      int32 0
               }
            ]
            array [
               struct {
                  string "group"
                  variant                      string "othermedia"
               }
               struct {
                  string "limit"
                  variant                      int32 0
               }
            ]
            array [
               struct {
                  string "group"
                  variant                      string "alarm"
               }
               struct {
                  string "limit"
                  variant                      int32 100
               }
            ]
            array [
               struct {
                  string "group"
                  variant                      string "event"
               }
               struct {
                  string "limit"
                  variant                      int32 100
               }
            ]
            array [
               struct {
                  string "group"
                  variant                      string "inputsound"
               }
               struct {
                  string "limit"
                  variant                      int32 0
               }
            ]
            array [
               struct {
                  string "group"
                  variant                      string "systemsound"
               }
               struct {
                  string "limit"
                  variant                      int32 0
               }
            ]
            array [
               struct {
                  string "group"
                  variant                      string "background"
               }
               struct {
                  string "limit"
                  variant                      int32 100
               }
            ]
            array [
               struct {
                  string "group"
                  variant                      string "idle"
               }
               struct {
                  string "limit"
                  variant                      int32 100
               }
            ]
         ]
      )
      dict entry(
         string "com.nokia.policy.context"
         array [
            array [
               struct {
                  string "variable"
                  variant                      string "call_audio_type"
               }
               struct {
                  string "value"
                  variant                      string "none"
               }
            ]
            array [
               struct {
                  string "variable"
                  variant                      string "call"
               }
               struct {
                  string "value"
                  variant                      string "inactive"
               }
            ]
            array [
               struct {
                  string "variable"
                  variant                      string "mode"
               }
               struct {
                  string "value"
                  variant                      string "media"
               }
            ]
         ]
      )
      dict entry(
         string "com.nokia.policy.audio_route"
         array [
            array [
               struct {
                  string "type"
                  variant                      string "sink"
               }
               struct {
                  string "device"
                  variant                      string "headset"
               }
               struct {
                  string "mode"
                  variant                      string "hs"
               }
               struct {
                  string "hwid"
                  variant                      string "na"
               }
            ]
            array [
               struct {
                  string "type"
                  variant                      string "source"
               }
               struct {
                  string "device"
                  variant                      string "headset"
               }
               struct {
                  string "mode"
                  variant                      string "na"
               }
               struct {
                  string "hwid"
                  variant                      string "na"
               }
            ]
         ]
      )
   ]
signal sender=:1.10 -> dest=(null destination) serial=5135 path=/org/freedesktop/Hal/Manager; interface=org.freedesktop.Hal.Manager; member=DeviceAdded
   string "/org/freedesktop/Hal/devices/computer_logicaldev_input_1"

And shutting down a call with the default headset:
Code:
signal sender=:1.9 -> dest=(null destination) serial=745 path=/com/nokia/mce/signal; interface=com.nokia.mce.signal; member=sig_call_state_ind
   string "none"
   string "normal"
signal sender=:1.16 -> dest=(null destination) serial=21 path=/com/nokia/policy/decision; interface=com.nokia.policy; member=status
   uint32 37
   uint32 1
signal sender=:1.22 -> dest=(null destination) serial=57 path=/com/nokia/policy/decision; interface=com.nokia.policy; member=status
   uint32 37
   uint32 1
signal sender=:1.10 -> dest=(null destination) serial=5234 path=/org/freedesktop/Hal/devices/bme; interface=org.freedesktop.Hal.Device; member=PropertyModified
   int32 2
   array [
      struct {
         string "battery.voltage.current"
         boolean false
         boolean false
      }
      struct {
         string "battery.reporting.current"
         boolean false
         boolean false
      }
   ]
signal sender=:1.17 -> dest=(null destination) serial=1006 path=/com/nokia/phone/net; interface=Phone.Net; member=registration_status_change
   byte 0
   uint16 1610
   uint32 1015399
   uint32 10
   uint32 226
   byte 0
   byte 3
signal sender=:1.17 -> dest=(null destination) serial=1007 path=/com/nokia/phone/net; interface=Phone.Net; member=operator_name_change
   byte 0
   string "RO ORANGE"
   string ""
   uint32 10
   uint32 226
signal sender=:1.17 -> dest=(null destination) serial=1008 path=/com/nokia/phone/net; interface=Phone.Net; member=cell_info_change
   byte 2
   uint16 1610
   uint32 1015399
   uint32 10
   uint32 226
   byte 0
   byte 0
On my previous Nokia there were two input reader programs (eg.magickey) that were allowing you to change the action of a specific key either on a global profile, for the entire device, or for certain applications, chosen by you.

However none of these programs could "sniff out" the headset input.
The only guys to almost master this function were the guys at mobifactor.ru - 4 out of 5 buttons.
CorePlayer could recognize one aswell... but those are ol' symbian times
__________________

Last edited by Bec; 2010-01-19 at 10:26.
 

The Following User Says Thank You to Bec For This Useful Post:
OVK's Avatar
Posts: 559 | Thanked: 1,017 times | Joined on May 2008 @ Finland
#35
Originally Posted by Bec View Post
I also ran it but I had no Idea what to do once it started... didn't seem like it was reading or waiting for signals...
It does show at least some signals. Try plugging in a headset, it definatively makes an effect.
 
andrei1089's Avatar
Posts: 81 | Thanked: 109 times | Joined on Apr 2009 @ Brasov/Cluj, Romania
#36
Originally Posted by OVK View Post
I am not an expert, this is just something that I found from the Google:
http://linux.die.net/man/1/dbus-monitor

So it seems that you just need to open xterm and type dbus-monitor (and you can also give some more specific attributes to this command). Works for me (although I don't know how to exit the dbus-monitor), I just don't understand most of the output... I also don't know if it would be better to run this as root.

Unfortunately I could not find my AD-54 for testing.
you can exit dbus-monitor with Ctrl+C
 

The Following User Says Thank You to andrei1089 For This Useful Post:
mankir's Avatar
Posts: 276 | Thanked: 224 times | Joined on Dec 2009 @ Frankfurt, Germany
#37
AD-54 is recognized as a headset, when plugged in. dmesg gives a message, input: headset button as /class/input/inputX. When i plug out and in again, the Number X is increased by 1. I think this is a bug...

Would be nice to get the other buttons working!
 

The Following 2 Users Say Thank You to mankir For This Useful Post:
Bec's Avatar
Posts: 876 | Thanked: 396 times | Joined on Dec 2009
#38
Edited my previous post, added headset behaviors.
__________________
 
OVK's Avatar
Posts: 559 | Thanked: 1,017 times | Joined on May 2008 @ Finland
#39
Originally Posted by Bec View Post
On my previous Nokia there were two input reader programs (eg.magickey) that were allowing you to change the action of a specific key either on a global profile, for the entire device, or for certain applications, chosen by you.

However none of these programs could "sniff out" the headset input.
The only guys to almost master this function were the guys at mobifactor.ru - 4 out of 5 buttons.
CorePlayer could recognize one aswell... but those are ol' symbian times
What do you think, could it be possible to use the headphoned-app as a base for building this functionality in Maemo 5?

I mean this one: http://talk.maemo.org/showthread.php?t=33215

It sends a pause command to Mediaplayer when the headphones are unplugged. I think it could probably be useful to install the headphoned and test if/how the dbus-monitor output changes compared to your previous trials. Also the code is open so it could give a hint on how to make this type of functionality.
 
Bec's Avatar
Posts: 876 | Thanked: 396 times | Joined on Dec 2009
#40
Honestly, no. What was working in symbian programs like "MagicKey" was probably the dependency on a dbus-like feature in symbian.

Simply expecting an input in dbus doesn't work without a special application, like in our case the phone application.

But the most authorized person on this matter, is obviously qwerty12 (see first post) so you should ask him.
__________________
 
Reply

Tags
ad-54/hs-45, headset button

Thread Tools

 
Forum Jump


All times are GMT. The time now is 18:45.