TRRS Cable Build

Por wbahnassi

Rookie (31)

Imagen del wbahnassi

04-11-2019, 03:15

For this weekend, I built myself a cable between MSX data recorder port and 3.5mm TRRS jack that works with my Note9.

Picture:
https://www.msx.pics/image/Vc1FN

The cable works great for loading and saving from the MSX using standard Android software (e.g. voice recorder).

While I was building the cable, I tested the build while connected to the phone and I noticed that closing the mic line with gnd does certain things if done at certain times. For example, it triggers a Pause/Play command in the music player.. This got me to think about the phone headsets that have remote control buttons for volume/pause/mute and I wonder... is that done entirely via certain mic signals? But further more, can the remote line from the MSX be hooked up to trigger Android to start recording or loading as a regular data recorder? Or does that go beyond just line connections?

Cheers!

Login sesión o register para postear comentarios

Por Wild_Penguin

Hero (554)

Imagen del Wild_Penguin

04-11-2019, 19:51

I think the relay just "shorts" Rem+ to Rem- (not sure, and can not find the official documentation ATM - I believe the PPI register bit is directly connected to this relay? One could just check any MSX SM and see how it is connected there, or a real computer EDIT: seems like with the help of a transistor as a switch according to many SMs). It is up to the cassette player to determine if this connection is shorted (I believe, usually something like having Rem- tied to ground and Rem+ pulled up via a resistor). If the relay shorts, then the cassette player detects this and stops.

Now, I believe you could in theory connect Rem- to GND and Rem+ to CMT_OUT (i.e. mic-in on the phone side). However if you do that, every time the MSX relay activates, CMT_OUT will also be pulled down to GND. This is not supposed to happen per spec., and I'm not sure if the MSX is OK with that (it is possible it is OK, but...). Perhaps someone else can answer to that question?

EDIT: Also, I believe the phone would detect one "button press" for every two relay clicks:

  1. click: relay ON = playback should stop;
  2. click: relay OFF = playback should resume

This is not enough to control the software as is, and depending on the os of the device you have connected to the MSX, what the application can "see" (i.e. button events with "press" and "release", or "presses only"?) and how the application is programmed - this might not be possible at all, even with some appropriately coded software, without some additional circuitry in your cable.

EDIT2: Also, these might be of interest:
https://pinoutguide.com/HeadsetsHeadphones/omtp_headset_pino... and
https://pinoutguide.com/HeadsetsHeadphones/samsung_moment_pi...

EDIT3: This is an interesting thought - perhaps msx2cas (and others) could be modified to support this connection? I checked casduino for an example and there it has a dedicated GPIO pin for the REM signal, it seems (but this could be just to make sure and for correctness sake - here something could be used for something it was not intented for).

- Ville

Por TomXP411

Supporter (2)

Imagen del TomXP411

04-11-2019, 22:28

The last time I looked at this, the condenser microphone in a headset was connected through a capacitor. This results in no DC conductivity between the mic pin and the ground.

The button on a wired headset then grounds that pin (possibly through a resistor) to provide some DC conductivity. The phone senses this and does something (usually play/stop, but it could also take a picture, skip a track, or replay a track.)

If you don't have a DC blocking capacitor between the mic pin and the record output on the computer, this could cause the kinds of thing you are seeing - especially if the computer ties the mic pin to ground when the recording output is closed.

Por wbahnassi

Rookie (31)

Imagen del wbahnassi

06-11-2019, 13:57

I found those pages desceibing how Android expects signals.

From a software standpoint:
https://source.android.com/devices/accessories/headset/expec...

From a hardware standpoint:
https://source.android.com/devices/accessories/headset/plug-...

So the trick is to use different resistance values to specify the command while shorting mic to gnd. The idea of wiring Rem+ and Rem- to CMT_OUT and GND thus should work, but I agree sounds dodgy.

I think the toggle command is just enough. I haven't tested if it also triggers the standard voice recorder to start recording, but now I feel this functionality can become part of MSX2CAS. Namely, it can become able to record as well instead of just playback. And it accepts the Android play/pause trigger command for activating playback or recording depending on which mode you set the app to..

Sounds cool don't you think?

Por CASDuino

Expert (104)

Imagen del CASDuino

06-11-2019, 15:39

Wild_Penguin wrote:

EDIT3: This is an interesting thought - perhaps msx2cas (and others) could be modified to support this connection? I checked casduino for an example and there it has a dedicated GPIO pin for the REM signal, it seems (but this could be just to make sure and for correctness sake - here something could be used for something it was not intented for).

- Ville

CASDuino has full Remote Motor Control via the 2.5mm socket. Essential for some games E.g. Head Over Heels.