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