This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TS3A227E: TS3A227E switch headset mode

Part Number: TS3A227E

Like in my previous post I want to switch between different headset modes regardless off what is connected to the device. For example:

  • Take a 4-pole CTIA standard headset
  • Configure the TS3A227E in a specific way
  • plug CTIA standard headset into the audio jack that is connected to the TS3A227E
  • the CTIA standard headset gets detected as OMTP headset
  • the internal switch settings are also set to 4-pole OMTP
  • the headset will no longer work properly

I tried to the method we figured out in this post

But it only worked until I reboot my device. So I might still miss something. My current script looks something like this:

SWITCH_CONTROL_1=0x14
SWITCH_CONTROL_2=0x09

# no headset inserted

# setup for MANUAL SWITCH CONTROL
i2cset -y -f 1 0x3b 0x04 0x80     # reset
sleep 0.1
i2cset -y -f 1 0x3b 0x04 0x27     # increase INSERTION TIME to 2 seconds
sleep 0.1
i2cset -y -f 1 0x3b 0x04 0x67     # enable MANUAL SWITCH CONTROL
sleep 0.1

# set switches to OMTP or CTIA settings
i2cset -y -f 1 0x3b 0x07 $SWITCH_CONTROL_1     # write to SWITCH CONTROL 1
sleep 0.1
i2cset -y -f 1 0x3b 0x08 $SWITCH_CONTROL_2     # write to SWITCH CONTROL 2
sleep 0.1

# insert OMTP headset

i2cget -y -f 1 0x3b 0x0B          # reads 0x0c which is (CTIA) wrong since we setup for OMTP

What do I miss here?

Regards, Thorben

  • Thorben,

    If you reboot the TS3A227E all register settings will go back to their defaults.

    • Take a 4-pole CTIA standard headset

    • Configure the TS3A227E in a specific way

    The configuration will be lost once the detection sequence is run


    • plug CTIA standard headset into the audio jack that is connected to the TS3A227E

    The configuration sequence will be begin if DET_TRIGGER pins is toggled or manually initiate detection sequence through I2C commands


    • the CTIA standard headset gets detected as OMTP headset

    This doesn't make sense to me.  The CTIA headset that is in the jack should be detected as a CTIA headset.  Is this the problem you are having that it is not detecting properly?


    • the internal switch settings are also set to 4-pole OMTP

    This doesn't make sense to me.  The CTIA headset that is in the jack should be detected as a CTIA headset.  Is this the problem you are having that it is not detecting properly? )

     

    • the headset will no longer work properly

    This is expected if the TS3A227E is configured to support an OMTP device but a CTIA headset is inserted into the audio jack.  You will need to match the TS3A227E internal switch matrix to support the type of headset that is inserted into the jack.  

     

     

    SWITCH_CONTROL_1=0x14
    SWITCH_CONTROL_2=0x09

    I think you have the bits flipped for OMTP  configuration 




    # no headset inserted

    # setup for MANUAL SWITCH CONTROL
    i2cset -y -f 1 0x3b 0x04 0x80     # reset (OK)
    sleep 0.1
    i2cset -y -f 1 0x3b 0x04 0x27     # increase INSERTION TIME to 2 seconds (OK)
    sleep 0.1
    i2cset -y -f 1 0x3b 0x04 0x67     # enable MANUAL SWITCH CONTROL(OK)
    sleep 0.1

    # set switches to OMTP or CTIA settings
    i2cset -y -f 1 0x3b 0x07 $SWITCH_CONTROL_1     # write to SWITCH CONTROL 1 (see above comment on bit flip)
    sleep 0.1
    i2cset -y -f 1 0x3b 0x08 $SWITCH_CONTROL_2     # write to SWITCH CONTROL 2 (see above comment on bit flip)
    sleep 0.1

    # insert OMTP headset (In your comments above you state that you insert a CTIA headset in your procedure not an OMTP headset)

    i2cget -y -f 1 0x3b 0x0B          # reads 0x0c which is (CTIA) wrong since we setup for OMTP

     

    Thank you,

    Adam

  • Dear Adam,

    Thank you for your answer. Your absolutely right, I mixed up OMTP and CTIA settings. Let me put this again into the right context.

    What I'm trying to do is to connect a CTIA headset to the TS3A227E as an OMTP headset so that it doesn't work anymore (I know, it doesn't make a lot of sense). The steps I was expecting to take in order to archive this goal should look like the following:

    1. Take a 4-pole CTIA standard headset
    2. Configure the TS3A227E in a specific way that I don't know yet (see script below)
    3. plug CTIA standard headset into the audio jack that is connected to the TS3A227E
    4. the CTIA standard headset gets detected as OMTP headset
    5. the headset will no longer work properly

    I tried to the method we figured out in this post

    But it only worked until I reboot my device. So I might still miss something. My current script for step 3 (mentioned above) looks something like this:

    SWITCH_CONTROL_1=0x28
    SWITCH_CONTROL_2=0x06
    
    # no headset inserted
    
    # setup for MANUAL SWITCH CONTROL
    i2cset -y -f 1 0x3b 0x04 0x80     # reset
    sleep 0.1
    i2cset -y -f 1 0x3b 0x04 0x27     # increase INSERTION TIME to 2 seconds
    sleep 0.1
    i2cset -y -f 1 0x3b 0x04 0x67     # enable MANUAL SWITCH CONTROL
    sleep 0.1
    
    # set switches to OMTP settings
    i2cset -y -f 1 0x3b 0x07 $SWITCH_CONTROL_1     # write to SWITCH CONTROL 1
    sleep 0.1
    i2cset -y -f 1 0x3b 0x08 $SWITCH_CONTROL_2     # write to SWITCH CONTROL 2
    sleep 0.1
    
    # insert OMTP headset
    
    i2cget -y -f 1 0x3b 0x0B          # reads 0x0c which is (CTIA) wrong since we setup for OMTP

    What do I miss here? Is this the correct order? TS3A227E manual states that you should set the switches before enabling Manual Switch Control.

    Regards, Thorben

  • Thorben,

    I think the issue in this order in which you are running the experiment. Because you have automatic detection enabled, Any time you insert a headset into the audio jack it will run a detection and reconfigure its switch matrix to support the headset it detected even if you already set the switch matrix manually. You will need to either disable automatic detection or configure the switch matrix manually after you have inserted the headset.

    Adam