Adding modes to *_set_device()

Steffen Klupsch (steffen@vlsi.informatik.tu-darmstadt.de)
Thu, 24 Jun 1999 17:33:16 +0200


Vandoorselaere Yoann wrote:
> So please here is the following question :
> 1: How about adding SPEAKER_PHONE_MODE to *_set_device() ?
>         ( Am i wrong or speaker phone mode is the same thing as local handset ?
> ).

voice.h defines the following modes:
#define NO_DEVICE           (0x0001)
#define DIALUP_LINE         (0x0002)
#define EXTERNAL_MICROPHONE (0x0003)
#define INTERNAL_MICROPHONE (0x0004)
#define EXTERNAL_SPEAKER    (0x0005)
#define INTERNAL_SPEAKER    (0x0006)
#define LOCAL_HANDSET       (0x0007)

I'd like to open a discussion about 'which entry means what' and 
'what else could be needed'.

Here my interpretation :-)

Assumption: there is an external phone line - called telco line
This telco line is connected to the modem.
The modem uses a 4 wire connector - the local telephone (local handset)
is connected to the modem. :-) Everything as the german telekom wants
it.


telephone   -------------|  |----------- local 
company     ------------||  ||---------- telephone
                        modem

NO_DEVICE: 
     The modem can not use any in/output devices.
     This should be called just before the modem is supposed to
go 	             on-hook. (e.g. just before a 'ATH')
     (This should not be called befor switching to fax or data mode.)

DIALUP_LINE: 
     The modem sends/receives its voice stream to/from the telco line.
     This is supposed to be a 'silent' operation. No modem speaker is
working, 
     no microphone is used.
EXTERNAL_MICROPHONE:
     The modem receives its voice stream from an external microphone.
     No modem speaker is working, the telco line is NOT in use.
     -If the modem doesn't support external microphones the mode 
      INTERNAL_MICROPHONE should be automatic fallback.
INTERNAL_MICROPHONE:
     The modem receives its voice stream from an internal microphone.
     No modem speaker is working, the telco line is NOT in use.
     -If the modem has no internal microphone the  the mode 
      EXTERNAL_MICROPHONE should be automatic fallback.
EXTERNAL_SPEAKER:
     The modem  sends its voice stream to an external speaker.
     No microphone is working, the telco line is NOT in use.
     -If the modem has no external speaker the mode INTERNAL_SPEAKER
      should be automatic fallback.
INTERNAL_SPEAKER:
     The modem  sends its voice stream to an internal speaker.
     No microphone is working, the telco line is NOT in use.
     -If the modem has no internal speaker the mode EXTERNAL_SPEAKER
      should be automatic fallback.
LOCAL_HANDSET:
     The modem sends/receives its voice stream to/from the local phone.
     This is supposed to be a 'silent' operation. No modem speaker is
working, 
     no microphone is used, the telco line is NOT in use.

I suggest to extend the possible device_modes with the following
#define DIALUP_WITH_EXT_SPEAKER              (0x0008)
#define DIALUP_WITH_INT_SPEAKER              (0x0009)
#define DIALUP_WITH_LOCAL_HANDSET            (0x000A)
#define DIALUP_WITH_EXTERNAL_MIC_AND_SPEAKER (0x000B)
#define DIALUP_WITH_INTERNAL_MIC_AND_SPEAKER (0x000C)


Definition:

DIALUP_WITH_EXT_SPEAKER:            
     The modem sends/receives its voice stream to/from the telco line.
     The external speaker is used to echo the voice stream.
     No microphone is used.
     -If the modem has no external speaker the mode
DIALUP_WITH_INT_SPEAKER 
      should be automatic fallback. If both is not possible the mode
      DIALUP_LINE should be fallback.
DIALUP_WITH_INT_SPEAKER:
     The modem sends/receives its voice stream to/from the telco line.
     The internal speaker is used to echo the voice stream.
     No microphone is used.
     -If the modem has no internal speaker the mode
DIALUP_WITH_EXT_SPEAKER 
      should be automatic fallback. If both is not possible the mode
      DIALUP_LINE should be fallback.
DIALUP_WITH_LOCAL_HANDSET:
     The modem sends/receives its voice stream to/from the telco line.
     There is a shortcut between telco line and the local telephone, so
anybody
     can hear the voice stream in the local phone and can add additional
noise 
     using the telephone microphone :-)
     -If the modem has no such 'speakerphone mode' the mode DIALUP_LINE
should
     be fallback.
     (There is a hardware solution to achive dialup_with_local_handset -
even 
      when the modem does not support it: a 2-wire connection to the
modem.
 
         telephone   --------------|----------- local 
         company     ------------|-|---------- telephone
                                 | |
                                modem
      )
DIALUP_WITH_EXTERNAL_MIC_AND_SPEAKER:
     The modem sends/receives its voice stream to/from the telco line.
     There is a shortcut between telco line and the external microphone
and 
     speaker, so anybody can hear the voice stream in the external
speaker
     and can add additional noise using the external microphone.
     -If the modem has no such 'speakerphone mode' the mode 
      DIALUP_WITH_LOCAL_HANDSET should be fallback. If both is not
possible
      DIALUP_LINE should be fallback.
DIALUP_WITH_INTERNAL_MIC_AND_SPEAKER:
     The modem sends/receives its voice stream to/from the telco line.
     There is a shortcut between telco line and the internal microphone
and 
     speaker, so anybody can hear the voice stream in the internal
speaker
     and can add additional noise using the internal microphone.
     -If the modem has no such 'speakerphone mode' the mode 
      DIALUP_WITH_LOCAL_HANDSET should be fallback. If both is not
possible
      DIALUP_LINE should be fallback.


Please send comments.
Steffen