Re: FR audio subsystem: gsmhandset ... files

2012-04-12 Thread Matthias Apitz
El día Wednesday, April 11, 2012 a las 08:39:52PM +0200, Simon Busch escribió:

  1. How this is done exactly (in SHR) and by which piece of software?
 
 It's done by fsodeviced (the router_alsa plugi) or fsoaudiod and is
 initiated by libphone-ui.
 
  2. The SHR GUI while calling (see http://www.unixarea.de/Screenshot-7.png)
 has some sliders for Volume and Mic; and to enable the Speaker or
 mute the Mic... how do they work? Do they change 'gsmhandset' file?
 
 No. The SHR UI directly adjusts the mixer settings of the ALSA sound
 card here. In /etc/phonefsod.conf or /etc/phoneuid.conf is written down
 which name this control have.

I made a call to my desk  phone and moved the slider for Volume; the
gsmhandset file changed:

before call:

root@om-gta02 ~ # ls -l 
/etc/freesmartphone/conf/openmoko_gta/alsa-2.6.29/gsmhandset
-r--r--r--1 root root 2906 Apr 11 12:18 
/etc/freesmartphone/conf/openmoko_gta/alsa-2.6.29/gsmhandset

after call:

root@om-gta02 ~ # ls -l 
/etc/freesmartphone/conf/openmoko_gta/alsa-2.6.29/gsmhandset
-r--r--r--1 root root 2906 Apr 12 14:20 
/etc/freesmartphone/conf/openmoko_gta/alsa-2.6.29/gsmhandset

diff shows:

-4:'Speaker Playback Volume':2:106,106
+4:'Speaker Playback Volume':2:115,115

Thanks

matthias

-- 
Matthias Apitz
e g...@unixarea.de - w http://www.unixarea.de/
UNIX since V7 on PDP-11, UNIX on mainframe since ESER 1055 (IBM /370)
UNIX on x86 since SVR4.2 UnixWare 2.1.2, FreeBSD since 2.2.5

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


FR audio subsystem: gsmhandset ... files

2012-04-11 Thread Matthias Apitz

Hello,

Is there still someone out here in the Openmoko list who could explain
and/or discuss my questions concerning the FR audio subsystem?
See also

http://wiki.openmoko.org/wiki/Neo1973_audio_subsystem
http://hnet.endofinternet.net/elektro/Freerunner/ALSA/sound_setting.html

I'd like to have a general understanding and in detail how the
gsmhandset (...) files are used in the FR, for example in the SHR
distribution.

Thanks in advance

matthias
-- 
Matthias Apitz
e g...@unixarea.de - w http://www.unixarea.de/
UNIX since V7 on PDP-11, UNIX on mainframe since ESER 1055 (IBM /370)
UNIX on x86 since SVR4.2 UnixWare 2.1.2, FreeBSD since 2.2.5

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


Re: FR audio subsystem: gsmhandset ... files

2012-04-11 Thread Radek Polak
On Wednesday 11 April 2012 14:35:46 Matthias Apitz wrote:

 Hello,
 
 Is there still someone out here in the Openmoko list who could explain
 and/or discuss my questions concerning the FR audio subsystem?
 See also
 
 http://wiki.openmoko.org/wiki/Neo1973_audio_subsystem
 http://hnet.endofinternet.net/elektro/Freerunner/ALSA/sound_setting.html
 
 I'd like to have a general understanding and in detail how the
 gsmhandset (...) files are used in the FR, for example in the SHR
 distribution.

Before you answer or make a call you do:

alsactl -f gsmheadset.state restore

and after hanging up do:

alsactl -f stereoout.state restore

I don't think there's any magic involved there...

Regards

Radek

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


Re: FR audio subsystem: gsmhandset ... files

2012-04-11 Thread Matthias Apitz
El día Wednesday, April 11, 2012 a las 02:47:34PM +0200, Radek Polak escribió:

  http://wiki.openmoko.org/wiki/Neo1973_audio_subsystem
  http://hnet.endofinternet.net/elektro/Freerunner/ALSA/sound_setting.html
  
  I'd like to have a general understanding and in detail how the
  gsmhandset (...) files are used in the FR, for example in the SHR
  distribution.
 
 Before you answer or make a call you do:
 
   alsactl -f gsmheadset.state restore
 
 and after hanging up do:
 
   alsactl -f stereoout.state restore
 
 I don't think there's any magic involved there...

In theory I was thinking the same; I even renamed alsactl to
alsactl.orig and created a shell wrapper /usr/sbin/alsactl which should
log the args and call alsactl.orig to do the work; nothing appeared in
my log file while doing a call

1. How this is done exactly (in SHR) and by which piece of software?
2. The SHR GUI while calling (see http://www.unixarea.de/Screenshot-7.png)
   has some sliders for Volume and Mic; and to enable the Speaker or
   mute the Mic... how do they work? Do they change 'gsmhandset' file?

Thanks for your reply in any case!

matthias
-- 
Matthias Apitz
e g...@unixarea.de - w http://www.unixarea.de/
UNIX since V7 on PDP-11, UNIX on mainframe since ESER 1055 (IBM /370)
UNIX on x86 since SVR4.2 UnixWare 2.1.2, FreeBSD since 2.2.5

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


Re: FR audio subsystem: gsmhandset ... files

2012-04-11 Thread Simon Busch
On 11.04.2012 15:09, Matthias Apitz wrote:
 El día Wednesday, April 11, 2012 a las 02:47:34PM +0200, Radek Polak escribió:
 
 http://wiki.openmoko.org/wiki/Neo1973_audio_subsystem
 http://hnet.endofinternet.net/elektro/Freerunner/ALSA/sound_setting.html

 I'd like to have a general understanding and in detail how the
 gsmhandset (...) files are used in the FR, for example in the SHR
 distribution.

 Before you answer or make a call you do:

  alsactl -f gsmheadset.state restore

 and after hanging up do:

  alsactl -f stereoout.state restore

 I don't think there's any magic involved there...
 
 In theory I was thinking the same; I even renamed alsactl to
 alsactl.orig and created a shell wrapper /usr/sbin/alsactl which should
 log the args and call alsactl.orig to do the work; nothing appeared in
 my log file while doing a call
 
 1. How this is done exactly (in SHR) and by which piece of software?

It's done by fsodeviced (the router_alsa plugi) or fsoaudiod and is
initiated by libphone-ui.

 2. The SHR GUI while calling (see http://www.unixarea.de/Screenshot-7.png)
has some sliders for Volume and Mic; and to enable the Speaker or
mute the Mic... how do they work? Do they change 'gsmhandset' file?

No. The SHR UI directly adjusts the mixer settings of the ALSA sound
card here. In /etc/phonefsod.conf or /etc/phoneuid.conf is written down
which name this control have.

regards,
Simon

-- 
Simon Busch - http://mm.gravedo.de/blog/

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


Re: FR audio subsystem: gsmhandset ... files

2012-04-11 Thread Radek Polak
On Wednesday 11 April 2012 13:09:03 Matthias Apitz wrote:

 In theory I was thinking the same; I even renamed alsactl to
 alsactl.orig and created a shell wrapper /usr/sbin/alsactl which should
 log the args and call alsactl.orig to do the work; nothing appeared in
 my log file while doing a call
 
 1. How this is done exactly (in SHR) and by which piece of software?
 2. The SHR GUI while calling (see http://www.unixarea.de/Screenshot-7.png)
has some sliders for Volume and Mic; and to enable the Speaker or
mute the Mic... how do they work? Do they change 'gsmhandset' file?

I guess they are not using alsactl but they call the alsa api from c/vala to 
do it. You might check FSO (cornucopia) git. Maybe FSO guys will tell you 
more.

Regards

Radek

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


Re: FR audio subsystem: gsmhandset ... files

2012-04-11 Thread Matthias Apitz
El día Wednesday, April 11, 2012 a las 08:39:52PM +0200, Simon Busch escribió:

  1. How this is done exactly (in SHR) and by which piece of software?
 
 It's done by fsodeviced (the router_alsa plugi) or fsoaudiod and is
 initiated by libphone-ui.

Thanks; I will checkout the sources and have a look into;

  2. The SHR GUI while calling (see http://www.unixarea.de/Screenshot-7.png)
 has some sliders for Volume and Mic; and to enable the Speaker or
 mute the Mic... how do they work? Do they change 'gsmhandset' file?
 
 No. The SHR UI directly adjusts the mixer settings of the ALSA sound
 card here. In /etc/phonefsod.conf or /etc/phoneuid.conf is written down
 which name this control have.

none of the two files in my SHR has any entry which could have todo with
audio or alsa (which explains somewhat that the sliders have no impact
during a call); any idea why?

(should we move this thread to shr-devel?)

Thanks

matthias
-- 
Matthias Apitz
e g...@unixarea.de - w http://www.unixarea.de/
UNIX since V7 on PDP-11, UNIX on mainframe since ESER 1055 (IBM /370)
UNIX on x86 since SVR4.2 UnixWare 2.1.2, FreeBSD since 2.2.5

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


Re: FR audio subsystem: gsmhandset ... files

2012-04-11 Thread Simon Busch
On 11.04.2012 21:19, Matthias Apitz wrote:
 El día Wednesday, April 11, 2012 a las 08:39:52PM +0200, Simon Busch escribió:
 
 1. How this is done exactly (in SHR) and by which piece of software?

 It's done by fsodeviced (the router_alsa plugi) or fsoaudiod and is
 initiated by libphone-ui.
 
 Thanks; I will checkout the sources and have a look into;
 
 2. The SHR GUI while calling (see http://www.unixarea.de/Screenshot-7.png)
has some sliders for Volume and Mic; and to enable the Speaker or
mute the Mic... how do they work? Do they change 'gsmhandset' file?

 No. The SHR UI directly adjusts the mixer settings of the ALSA sound
 card here. In /etc/phonefsod.conf or /etc/phoneuid.conf is written down
 which name this control have.
 
 none of the two files in my SHR has any entry which could have todo with
 audio or alsa (which explains somewhat that the sliders have no impact
 during a call); any idea why?
 
 (should we move this thread to shr-devel?)

Sorry I meant ibphoneui.conf. There you will find for the GTA02:

[alsa_control_speaker]
speaker = Headphone Playback Volume
microphone = Mono Playback Volume
microphone_mute = Mono Mixer Sidetone Playback Switch

This are the three controls which libphone-ui will adjust for
speaker/microphone volume and muting the microphone (you will also find
them with alsamixer).

regards,
Simon

-- 
Simon Busch - http://mm.gravedo.de/blog/

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