Re: Recording from headset when pressing headset button

2009-06-09 Thread Timo Jyrinki
2009/6/8 Luca Capello l...@pca.it:
  http://git.openmoko.org/?p=kernel.git;a=commitdiff;h=23b564c9d22cc5e442361e632626d5f131c40752

The last commit from four hours ago regarding GPS power management
seems pretty neat, and could be included unless you have already
everything ready for an upload with the previous commit.

Looking at the Debian's packaging git, do you plan to do a -3 release
first out of the old snapshot, and after that upgrade to latest git,
or...?

-Timo

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: Recording from headset when pressing headset button

2009-06-09 Thread Luca Capello
Hi Timo!

On Tue, 09 Jun 2009 18:11:36 +0200, Timo Jyrinki wrote:
 2009/6/8 Luca Capello l...@pca.it:
  http://git.openmoko.org/?p=kernel.git;a=commitdiff;h=23b564c9d22cc5e442361e632626d5f131c40752

 The last commit from four hours ago regarding GPS power management
 seems pretty neat, and could be included unless you have already
 everything ready for an upload with the previous commit.

Nothing is ready, because I need to tag the upstream version as well.

 Looking at the Debian's packaging git, do you plan to do a -3 release
 first out of the old snapshot, and after that upgrade to latest git,
 or...?

My plan is to wait until something has been decided about the headset
button:

  http://thread.gmane.org/gmane.comp.handhelds.openmoko.kernel/9913

Thx, bye,
Gismo / Luca


pgphmfs7w4WPt.pgp
Description: PGP signature
___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: Recording from headset when pressing headset button

2009-06-08 Thread Enrico Zini
On Mon, Jun 08, 2009 at 10:40:36AM +0400, Paul Fertser wrote:
 Enrico Zini enr...@enricozini.org writes:
  [here I press it]
  18:12:48.971987: EV_KEY KEY_PAUSE released
  18:12:48.972274: EV_SYN code=0 value=0
 
  [here I release it]
  18:12:51.817171: EV_KEY KEY_PAUSE pressed
  18:12:51.817396: EV_SYN code=0 value=0
 
 Do you think it should be fixed in kernel right now before it's too
 late?

It should probably be fixed in the kernel right now because it has been
noticed, if it's a trivial fix.  I don't know how many applications are
going to appear that make use of the button, now that it is clear how to
activate it:

amixer set DAPM Headset Mic unmute
amixer set Left Mixer Sidetone Playback Sw unmute
amixer set ALC Mixer Mic1 cap
input-events 4  (or xev)

Ciao,

Enrico

-- 
GPG key: 4096R/E7AD5568 2009-05-08 Enrico Zini enr...@enricozini.org


signature.asc
Description: Digital signature
___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: Recording from headset when pressing headset button

2009-06-08 Thread Paul Fertser
Hi,

On Mon, Jun 08, 2009 at 07:39:43PM +0200, Luca Capello wrote:
 Note that in that case it is no more consistent with the KEY_PAUSE
 behavior: when you press the headset button, you want to PLAY, thus you
 release PAUSE, which is exactly the behavior we have now.  Thus I think
 the best would be to have the headset button reporting KEY_PLAY instead.

Agreed.
 
 I would like to update to a more recent snapshot and I have already
 successfully tested the last andy-tracking checkout:
 
   
 http://git.openmoko.org/?p=kernel.git;a=commitdiff;h=23b564c9d22cc5e442361e632626d5f131c40752
 
 Should I go directly with the above one or do you think that the headset
 button behavior will be fixed soon?  I would prefer to wait for that, it
 this means a short time...

A trivial fix will invert KEY_PLUS and KEY_MINUS for GTA03. I don't know if
anyone cares though. I will send a trivial one right now and a more
sophisticated a bit later, and wait for comments.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: Recording from headset when pressing headset button

2009-06-08 Thread Luca Capello
Hi Enrico!

On Mon, 08 Jun 2009 21:44:09 +0200, Enrico Zini wrote:
 On Mon, Jun 08, 2009 at 07:39:43PM +0200, Luca Capello wrote:

 Should I go directly with the above one or do you think that the headset
 button behavior will be fixed soon?  I would prefer to wait for that, it
 this means a short time...

 At the xev level I don't mind. At the /dev/input level, it is quite
 weird that a button is reported pressed when it's not, and vice-versa.

 My gut feeling is that the input driver should report it properly
 (pressed when it is pressed) and then whatever generates xev events
 can choose to reverse it.

In that case, I agree, I did not think about the input level, sorry.

Thx, bye,
Gismo / Luca


pgpzVOJZXGjye.pgp
Description: PGP signature
___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: Recording from headset when pressing headset button

2009-06-07 Thread Luca Capello
Hi Enrico!

I started to investigate a bit more and I found out to use it, for both
GTA01 and GTA02 :-D

On Sun, 07 Jun 2009 03:09:41 +0200, Enrico Zini wrote:
 On Fri, Jun 05, 2009 at 06:36:45PM +0200, Enrico Zini wrote:

 Of course nothing shows up in xev when pressing the button.
 
 I also tried to see if any widget changed in alsamixer when pressing the
 button: nope.
 
 Other options?

 For example this one could be an option:
 https://docs.openmoko.org/trac/ticket/695

 The bug has been closed as WORKSFORME. The explanation however is
 extremely obscure, and doesn't even try to help other people making it
 WORKFORTHEM as well: worked here but not sure what other settings have
 to be enabled there is not a way to close a bug. And anyway, how do I
 enable MICBIAS?

 And even then, that bug seems to be about GTA01Bv4. Does that obscure
 explanation make any sense for GTA02 at all?

As you, I am lost with that explanation, but further investigation
revealed a probably better one:

  http://thread.gmane.org/gmane.comp.handhelds.openmoko.devel/964

Here the mixer settings you need to change (values in brackets):

- Playback
(GTA01) Neo Mode [GSM Handset | GSM Headset]
(GTA02) DAPM Headset Mic Switch [ON]
(both) one of
 Left Mixer Sidetone Playback Sw [ON]
 Right Mixer Sidetone Playback S [ON]

- Capture
(both) ALC Mixer Mic 1 [ON]

With this configuration, however, the problem is that xev reports the
following event if the headset button is not pressed:

  KeyRelease event, serial 30, synthetic NO, window 0x101,
  root 0x3d, subw 0x0, time 1856476, (236,274), root:(240,320),
  state 0x0, keycode 127 (keysym 0xff13, Pause), same_screen YES,
  XLookupString gives 0 bytes:
  XFilterEvent returns: False

Should not be the contrary, i.e. reporting a Play event when the button
is kept pressed?  Anyway, I think I would stop here and go back to other
issues, now ;-)

Thx, bye,
Gismo / Luca


pgpmxGiXkOTgb.pgp
Description: PGP signature
___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: Recording from headset when pressing headset button

2009-06-05 Thread Joachim Breitner
Hi Enrico,

Am Freitag, den 05.06.2009, 10:08 +0200 schrieb Enrico Zini:
 I had the idea of writing a simple tool to complement tangogps when
 doing OSM mapping. The idea is to write a little application that sits
 in the background, and when I hold down the headset button, it will
 record audio from the headset microphone. Josm is then able to import
 those audio files and show them as playable audio waypoints, yay!
 
 In theory, it would be a trivial thing to do. In practice:
 
  - I have not found a way to detect headset button actions
  - I have not found a way to record from the headset microphone: I did
not find an alsa scenario among the ones in /usr/share/openmoko that
would allow you to do that, and I cannot make sense of the huge
amount of mixer settings
 
 Can these two things be done, and if so, how?

without answering your question: Make sure you check out
http://wiki.openmoko.org/wiki/Dictator, it might already do some of the
stuff you need.

Greetings,
Joachim

-- 
Joachim nomeata Breitner
Debian Developer
  nome...@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland