# HG changeset patch # User Mychaela Falconia # Date 1649139770 0 # Node ID e1878231dbcd496e8ce73bd63934b2fff608b785 # Parent e9c1f6d656545d13e05dfb4e801d206e2c525090 aud-c139: preliminary version diff -r e9c1f6d65654 -r e1878231dbcd Makefile --- a/Makefile Mon Apr 04 18:15:52 2022 +0000 +++ b/Makefile Tue Apr 05 06:22:50 2022 +0000 @@ -1,4 +1,4 @@ -SUBDIR= aud-caramel aud-fcdev3b batteries charging +SUBDIR= aud-c139 aud-caramel aud-fcdev3b batteries charging all: ${SUBDIR} diff -r e9c1f6d65654 -r e1878231dbcd aud-c139/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/aud-c139/Makefile Tue Apr 05 06:22:50 2022 +0000 @@ -0,0 +1,23 @@ +BINFILES= handheld.cfg handheld.vol headset.cfg headset.vol +INSTDIR= /opt/freecalypso/aud-c139 + +all: ${BINFILES} + +handheld.cfg: handheld.src + tiaud-compile $< $@ + +handheld.vol: Makefile + tiaud-mkvol 150 $@ + +headset.cfg: headset.src + tiaud-compile $< $@ + +headset.vol: Makefile + tiaud-mkvol 150 $@ + +install: ${BINFILES} + mkdir -p ${INSTDIR} + install -c -m 644 ${BINFILES} ${INSTDIR} + +clean: + rm -f *.cfg *.vol diff -r e9c1f6d65654 -r e1878231dbcd aud-c139/handheld.src --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/aud-c139/handheld.src Tue Apr 05 06:22:50 2022 +0000 @@ -0,0 +1,18 @@ +# C139 handheld audio mode, currently based on the register readings +# provided by Das Signal in 2021-11. + +mic default { + gain 2 # value reported by DS for the active call state + output-bias 0 # C139 uses 2.0V +} + +# We are going to configure downlink FIR and PGA when we get a better +# test setup - run with safe defaults for now. +speaker ear { + gain 0 +} + +sidetone -23 + +# C139 AEC config for handheld mode +aec-new 2 1 0x14 0x4CCC 0x59AD 0x7500 0 0x1000 0x1000 0 4 0x40 diff -r e9c1f6d65654 -r e1878231dbcd aud-c139/headset.src --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/aud-c139/headset.src Tue Apr 05 06:22:50 2022 +0000 @@ -0,0 +1,24 @@ +# C139 headset audio mode, reconstructed from register readings +# collected in freecalypso-reveng repository, compal/audio directory + +mic headset { + gain 9 # read out via omr in active call state + output-bias 0 # C139 uses 2.0V +} + +# C139 fw applies complex volume control: it messes with PGA settings, +# and in headset mode it also applies a FIR filter that produces a 6 dB +# digital gain without any frequency curve transformation. +# +# For FreeCalypso, given how far we are from actually using the headset jack +# on C139 for its headset function (as opposed to the serial port), +# we are going to start with PGA at 0 and no weird FIR. + +speaker headset { + gain 0 +} + +sidetone -23 # readout of VBUCTRL from official fw + +# C139 AEC config for headset mode +aec-new 2 1 0x14 0x4CCC 0x59AD 0x7500 0 0x1000 0x1000 0 4 0x20