Hi Jessie,
finally found some time to cookup a patch which works for me on top of 5.1-rc3
Here is link to the patch: srinivas.kandagatla/linux.git - srini kernel working tree
Here are mixer setting or steps to test sidetone from DMIC to Headphone via IIR1:
#Step 1 Setup IIR Path
#Select DEC1 as in IIR1 Mux Input path
root@linaro-alip:~# amixer -c 0 cset iface=MIXER,name=‘IIR1 INP1 MUX’ ‘DEC1’
#Increase Volume of Mix Input 1 path
root@linaro-alip:~# amixer -c 0 cset iface=MIXER,name=‘IIR1 INP1 Volume’ 127
#set IIR filter coefficients for 5 Bands
root@linaro-alip:~# amixer cset iface=MIXER,name=‘IIR1 Band1’ 0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
root@linaro-alip:~# amixer cset iface=MIXER,name=‘IIR1 Band2’ 0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
root@linaro-alip:~# amixer cset iface=MIXER,name=‘IIR1 Band3’ 0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
root@linaro-alip:~# amixer cset iface=MIXER,name=‘IIR1 Band4’ 0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
root@linaro-alip:~# amixer cset iface=MIXER,name=‘IIR1 Band5’ 0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
#Enable all the 5 IIR bands
root@linaro-alip:~# amixer -c 0 cset iface=MIXER,name=‘IIR1 Enable Band1’ 1
root@linaro-alip:~# amixer -c 0 cset iface=MIXER,name=‘IIR1 Enable Band2’ 1
root@linaro-alip:~# amixer -c 0 cset iface=MIXER,name=‘IIR1 Enable Band3’ 1
root@linaro-alip:~# amixer -c 0 cset iface=MIXER,name=‘IIR1 Enable Band4’ 1
root@linaro-alip:~# amixer -c 0 cset iface=MIXER,name=‘IIR1 Enable Band5’ 1
#Select IIR1 as feedback path to RX Left and Right.
root@linaro-alip:~# amixer -c 0 cset iface=MIXER,name=‘RX1 MIX1 INP2’ ‘IIR1’
root@linaro-alip:~# amixer -c 0 cset iface=MIXER,name=‘RX2 MIX1 INP2’ ‘IIR1’
#Step 2 Start DMIC:
root@linaro-alip:~# amixer cset iface=MIXER,name=‘DEC1 MUX’ ‘DMIC1’
root@linaro-alip:~# amixer cset iface=MIXER,name=‘CIC1 MUX’ ‘DMIC’
root@linaro-alip:~# arecord -D plughw:0,1 -r 48000 -f S16_LE /tmp/f-48000.wav &
#Step 3 Playback silence for testing purpose:
root@linaro-alip:~# amixer -c 0 cset iface=MIXER,name=‘RX1 MIX1 INP1’ ‘RX1’
root@linaro-alip:~# amixer -c 0 cset iface=MIXER,name=‘RX2 MIX1 INP1’ ‘RX2’
root@linaro-alip:~# amixer -c 0 cset iface=MIXER,name=‘RDAC2 MUX’ ‘RX2’
root@linaro-alip:~# amixer -c 0 cset iface=MIXER,name=‘HPHL’ 1
root@linaro-alip:~# amixer -c 0 cset iface=MIXER,name=‘HPHR’ 1
root@linaro-alip:~# amixer -c 0 cset iface=MIXER,name=‘RX1 Digital Volume’ 127
root@linaro-alip:~# amixer -c 0 cset iface=MIXER,name=‘RX2 Digital Volume’ 127
root@linaro-alip:~# aplay -D plughw:0,0 silence.wav
Thanks,
srini