Re: [2008.12] Mediaplayer

2009-01-07 Thread Timo Jyrinki
2009/1/6 Giovanni pino.o...@gmail.com:
 can you share your python app for switching the profiles?

Actually no, since I've just extended the mokoservices.py from
freeyourphone.de forums
(http://freeyourphone.de/portal_v1/viewtopic.php?f=21t=295), and
there is no indication that the script would be public domain or free
software. So I can't distribute the changed version unless the author
has somewhere publicly stated that the script is indeed actually GPL'd
or public domain.

Anyway, I've basically just added a few GTK buttons to the script, for example:
---
# music profile

button = gtk.Button(music)
button.connect(clicked, self.musicprofile,musicprofile)
table.attach(button, 2, 3, 2, 3,xoptions=gtk.EXPAND, yoptions=gtk.EXPAND
)
button.show()
---
...with callbacks which simply call scripts in the home dir /home/root:
---
def musicprofile(self,button,data):
output=subprocess.Popen([sh,/home/root/m], stdout=subprocess.PIPE).c
ommunicate()[0]

def phoneprofile(self,button,data):
output=subprocess.Popen([sh,/home/root/p], stdout=subprocess.PIPE).c
ommunicate()[0]

def speakerprofile(self,button,data):
output=subprocess.Popen([sh,/home/root/s], stdout=subprocess.PIPE).c
ommunicate()[0]
---

The scripts are, in order, just:
m:
 alsactl -f /usr/share/openmoko/scenarios/headset.state restore
p:
 alsactl -f /usr/share/openmoko/scenarios/gsmhandset.state restore
s:
 alsactl -f /usr/share/openmoko/scenarios/stereoout.state restore

These huge efforts are in public domain on my behalf ;)

-Timo

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [2008.12] Mediaplayer

2009-01-07 Thread Marco Trevisan (Treviño)
Giovanni wrote:
 Dear Timo,
 
 can you share your python app for switching the profiles?

You can find also an implementation of automatic profile switching on
jack-insert here [1].

[1] http://forum.telefoninux.org/index.php/topic,927.msg9047.html#msg9047

Bye ;)

-- 
Treviño's World - Life and Linux
http://www.3v1n0.net/


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [2008.12] Mediaplayer

2009-01-06 Thread Timo Jyrinki
2009/1/6 Dylan Reilly drei...@atariland.net:
 To tell you the truth, I am not sure. I have always been running the
 testing distribution, but 2008.12 *should* be more or less the same as
 testing.

No. There were two types of testing image, one using the 2008.12-like
qtopia stuff and one using freesmartphone.org. 2008.12 is not using
frameworkd, but the qtopia daemons like qpe and qtopia-x11
messaging/dialing/etc. software.

2008.12 does not include the profile switching feature, but like said
there are scripts for it. I simply have a python app with a few
buttons I can use to switch between profiles for music playback
(phone, loudspeakers, headphones).

-Timo

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [2008.12] Mediaplayer

2009-01-06 Thread Giovanni
Dear Timo,

can you share your python app for switching the profiles?



On Tue, Jan 6, 2009 at 10:07 AM, Timo Jyrinki timo.jyri...@gmail.comwrote:

 2009/1/6 Dylan Reilly drei...@atariland.net:
  To tell you the truth, I am not sure. I have always been running the
  testing distribution, but 2008.12 *should* be more or less the same as
  testing.

 No. There were two types of testing image, one using the 2008.12-like
 qtopia stuff and one using freesmartphone.org. 2008.12 is not using
 frameworkd, but the qtopia daemons like qpe and qtopia-x11
 messaging/dialing/etc. software.

 2008.12 does not include the profile switching feature, but like said
 there are scripts for it. I simply have a python app with a few
 buttons I can use to switch between profiles for music playback
 (phone, loudspeakers, headphones).

 -Timo

 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [2008.12] Mediaplayer

2009-01-06 Thread Dylan Reilly
Well, FWIW, I have both running on my system concurrently: qtopia for
the phone-kit and frameworkd for all the system level stuff.

On Tue, Jan 6, 2009 at 4:07 AM, Timo Jyrinki timo.jyri...@gmail.com wrote:
 2009/1/6 Dylan Reilly drei...@atariland.net:
 To tell you the truth, I am not sure. I have always been running the
 testing distribution, but 2008.12 *should* be more or less the same as
 testing.

 No. There were two types of testing image, one using the 2008.12-like
 qtopia stuff and one using freesmartphone.org. 2008.12 is not using
 frameworkd, but the qtopia daemons like qpe and qtopia-x11
 messaging/dialing/etc. software.

 2008.12 does not include the profile switching feature, but like said
 there are scripts for it. I simply have a python app with a few
 buttons I can use to switch between profiles for music playback
 (phone, loudspeakers, headphones).

 -Timo

 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community




-- 
Dylan Maxwell Reilly

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [2008.12] Mediaplayer

2009-01-05 Thread Giovanni
Grazie, Marco

It works!

How can it be integrated so that configuration can be set automatically when
the jack is plugged/unplugged?



On Mon, Jan 5, 2009 at 1:39 AM, Marco Trevisan (Treviño)
m...@3v1n0.netwrote:

 Giovanni wrote:
  Great !!!
 
  It works!
 
  Unfortunately, if I plug the earphones, I can still listen to the sound
  from the loud speakers.
 
  Do you know how to solve this problem?

 Simply use alsactl -f restore to load the headset.state scenario file...

 --
 Treviño's World - Life and Linux
 http://www.3v1n0.net/


 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [2008.12] Mediaplayer

2009-01-05 Thread Giovanni
On my Neo with 2008.12 stable, I don't have the /etc/freesmartphone
directory!

Is it normal?

Do I have to install something?



On Mon, Jan 5, 2009 at 4:01 PM, Dylan Reilly drei...@atariland.net wrote:

 2008.12 should automatically handle this for you by listening to dbus
 messages. If you look in

 /etc/freesmartphone/oevents/rules.yaml

 you should notice an entry that executes amixer with the appropriate
 arguments to disable the external speakers.

 On Mon, Jan 5, 2009 at 4:31 AM, Giovanni pino.o...@gmail.com wrote:
  Grazie, Marco
 
  It works!
 
  How can it be integrated so that configuration can be set automatically
 when
  the jack is plugged/unplugged?
 
 
 
  On Mon, Jan 5, 2009 at 1:39 AM, Marco Trevisan (Treviño) 
 m...@3v1n0.net
  wrote:
 
  Giovanni wrote:
   Great !!!
  
   It works!
  
   Unfortunately, if I plug the earphones, I can still listen to the
 sound
   from the loud speakers.
  
   Do you know how to solve this problem?
 
  Simply use alsactl -f restore to load the headset.state scenario
 file...
 
  --
  Treviño's World - Life and Linux
  http://www.3v1n0.net/
 
 
  ___
  Openmoko community mailing list
  community@lists.openmoko.org
  http://lists.openmoko.org/mailman/listinfo/community
 
 
  ___
  Openmoko community mailing list
  community@lists.openmoko.org
  http://lists.openmoko.org/mailman/listinfo/community
 
 



 --
 Dylan Maxwell Reilly

 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [2008.12] Mediaplayer

2009-01-05 Thread Dylan Reilly
2008.12 should automatically handle this for you by listening to dbus
messages. If you look in

/etc/freesmartphone/oevents/rules.yaml

you should notice an entry that executes amixer with the appropriate
arguments to disable the external speakers.

On Mon, Jan 5, 2009 at 4:31 AM, Giovanni pino.o...@gmail.com wrote:
 Grazie, Marco

 It works!

 How can it be integrated so that configuration can be set automatically when
 the jack is plugged/unplugged?



 On Mon, Jan 5, 2009 at 1:39 AM, Marco Trevisan (Treviño) m...@3v1n0.net
 wrote:

 Giovanni wrote:
  Great !!!
 
  It works!
 
  Unfortunately, if I plug the earphones, I can still listen to the sound
  from the loud speakers.
 
  Do you know how to solve this problem?

 Simply use alsactl -f restore to load the headset.state scenario file...

 --
 Treviño's World - Life and Linux
 http://www.3v1n0.net/


 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community


 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community





-- 
Dylan Maxwell Reilly

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [2008.12] Mediaplayer

2009-01-05 Thread Dylan Reilly
To tell you the truth, I am not sure. I have always been running the
testing distribution, but 2008.12 *should* be more or less the same as
testing.

The aforementioned rules file is part of the frameworkd package. Make
sure you have that installed. If not, you can try playing around with
testing [1] because it is definitely in there.

[1] http://downloads.openmoko.org/repository/testing/

On Mon, Jan 5, 2009 at 1:15 PM, Giovanni pino.o...@gmail.com wrote:
 On my Neo with 2008.12 stable, I don't have the /etc/freesmartphone
 directory!

 Is it normal?

 Do I have to install something?



 On Mon, Jan 5, 2009 at 4:01 PM, Dylan Reilly drei...@atariland.net wrote:

 2008.12 should automatically handle this for you by listening to dbus
 messages. If you look in

 /etc/freesmartphone/oevents/rules.yaml

 you should notice an entry that executes amixer with the appropriate
 arguments to disable the external speakers.

 On Mon, Jan 5, 2009 at 4:31 AM, Giovanni pino.o...@gmail.com wrote:
  Grazie, Marco
 
  It works!
 
  How can it be integrated so that configuration can be set automatically
  when
  the jack is plugged/unplugged?
 
 
 
  On Mon, Jan 5, 2009 at 1:39 AM, Marco Trevisan (Treviño)
  m...@3v1n0.net
  wrote:
 
  Giovanni wrote:
   Great !!!
  
   It works!
  
   Unfortunately, if I plug the earphones, I can still listen to the
   sound
   from the loud speakers.
  
   Do you know how to solve this problem?
 
  Simply use alsactl -f restore to load the headset.state scenario
  file...
 
  --
  Treviño's World - Life and Linux
  http://www.3v1n0.net/
 
 
  ___
  Openmoko community mailing list
  community@lists.openmoko.org
  http://lists.openmoko.org/mailman/listinfo/community
 
 
  ___
  Openmoko community mailing list
  community@lists.openmoko.org
  http://lists.openmoko.org/mailman/listinfo/community
 
 



 --
 Dylan Maxwell Reilly

 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community


 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community





-- 
Dylan Maxwell Reilly

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [2008.12] Mediaplayer

2009-01-04 Thread Giovanni
Great !!!

It works!

Unfortunately, if I plug the earphones, I can still listen to the sound from
the loud speakers.

Do you know how to solve this problem?




On Mon, Dec 29, 2008 at 4:27 AM, Glen Ogilvie n...@linuxsolutions.co.nzwrote:


 On Sun, 28 Dec 2008 21:17:50 +0100, Giovanni pino.o...@gmail.com wrote:
  I installed both the media players (Om and Qtopia).
  I'm not able to use any of them.
 

 I managed to get pythm working on om2008.12 by doing the following.

 Download from Angstrom Repository

 http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv4t/base/libmad0_0.15.1b-r4.1_armv4t.ipk

 http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv4t/base/libmp3lame0_3.96.1-r4.1_armv4t.ipk

 http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv4t/base/libsdl-1.2-0_1.2.11-r7.1_armv4t.ipk

 http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv4t/base/libxv1_1.0.4-r1.1_armv4t.ipk

 http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv4t/base/mplayer-common_0.0.1-r0.1_armv4t.ipk

 http://www.angstrom-distribution.org/feeds/2008/ipk/glibc/armv4t/base/mplayer_0.0+1.0rc2-r12.1_armv4t.ipk

 Download

 http://downloads.tuxfamily.org/3v1deb/openmoko/python-mokoui2_0.1.0+svnr4342_armv4t.ipk
 http://projects.openmoko.org/frs/download.php/471/pythm_0.5.1_armv4t.ipk

 Install using following commands.

 opkg install libmad0_0.15.1b-r4.1_armv4t.ipk
 opkg install libmp3lame0_3.96.1-r4.1_armv4t.ipk
 opkg install libsdl-1.2-0_1.2.11-r7.1_armv4t.ipk
 opkg install libxv1_1.0.4-r1.1_armv4t.ipk
 opkg install mplayer-common_0.0.1-r0.1_armv4t.ipk
 opkg install -nodeps mplayer_0.0+1.0rc2-r12.1_armv4t.ipk


 opkg install python-mokoui2_0.1.0+svnr4342_armv4t.ipk
 opkg install pythm_0.5.1_armv4t.ipk


 # Change the priority for mplayer

 cat /etc/pythm.conf | sed -e s/^renice.*/renice=-19/  pythm.conf
 cp pythm.conf /etc/


 Note, do not add the Angstrom repository as a feed to opkg, because it will
 upgrade libpng. After doing this, enlightenment won't start, so your phone
 will not be very useful until you revert libpng or reinstall.  I did this
 the first time and had to start again.

 This will play both ogg and mp3 files.

 Regards
 Glen Ogilvie


 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [2008.12] Mediaplayer

2009-01-04 Thread Tim Dobson
Giovanni wrote:
 Great !!!
 
 It works!
 
 Unfortunately, if I plug the earphones, I can still listen to the sound 
 from the loud speakers.
 
 Do you know how to solve this problem?

Not persoanlly but there are daemons/scripts that do this properly...

search headphone script openmoko 2008 or something...?

I know FDOM testing includes the script to do this.

Tim

-- 
www.tdobson.net

If each of us have one object, and we exchange them, then each of us
still has one object.
If each of us have one idea, and we exchange them, then each of us now
has two ideas.   -  George Bernard Shaw

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [2008.12] Mediaplayer

2009-01-04 Thread Marco Trevisan (Treviño)
Giovanni wrote:
 Great !!!
 
 It works!
 
 Unfortunately, if I plug the earphones, I can still listen to the sound
 from the loud speakers.
 
 Do you know how to solve this problem?

Simply use alsactl -f restore to load the headset.state scenario file...

-- 
Treviño's World - Life and Linux
http://www.3v1n0.net/


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [2008.12] Mediaplayer

2008-12-28 Thread Tim Dobson
Giovanni wrote:
 I installed both the media players (Om and Qtopia).
 
 I'm not able to use any of them.

Try playing a .ogg instead of .mp3?

Have you bee trying .mp3s?

Tim

--
www.tdobson.net

If each of us have one object, and we exchange them, then each of us
still has one object.
If each of us have one idea, and we exchange them, then each of us now
has two ideas.   -  George Bernard Shaw

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [2008.12] Mediaplayer

2008-12-28 Thread Giovanni
On Sun, Dec 28, 2008 at 9:23 PM, Tim Dobson li...@tdobson.net wrote:

 Giovanni wrote:
  I installed both the media players (Om and Qtopia).
 
  I'm not able to use any of them.

 Try playing a .ogg instead of .mp3?

 Have you bee trying .mp3s?


The first time the Om media player started, but it gave me an error about
the codec not available.
I understood that I have to use .ogg files. But, when I try to start again
the player, I always get an application execution error and the
application is not even starting.
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community