# HG changeset patch # User Mychaela Falconia # Date 1649058838 0 # Node ID 6ef2edd7ab6d51dcfe2ad27a0e91aa222afef413 aud-caramel, aud-fcdev3b: import from fc-audio-config repository diff -r 000000000000 -r 6ef2edd7ab6d .hgignore --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgignore Mon Apr 04 07:53:58 2022 +0000 @@ -0,0 +1,4 @@ +syntax: regexp + +^aud-.*\.cfg$ +^aud-.*\.vol$ diff -r 000000000000 -r 6ef2edd7ab6d aud-caramel/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/aud-caramel/Makefile Mon Apr 04 07:53:58 2022 +0000 @@ -0,0 +1,23 @@ +BINFILES= handheld.cfg handheld.vol hds4.cfg hds4.vol +INSTDIR= /opt/freecalypso/aud-caramel + +all: ${BINFILES} + +handheld.cfg: hds4.src + tiaud-compile $< $@ + +handheld.vol: Makefile + tiaud-mkvol 150 $@ + +hds4.cfg: hds4.src + tiaud-compile $< $@ + +hds4.vol: Makefile + tiaud-mkvol 150 $@ + +install: ${BINFILES} + mkdir -p ${INSTDIR} + install -c -m 644 ${BINFILES} ${INSTDIR} + +clean: + rm -f *.cfg *.vol diff -r 000000000000 -r 6ef2edd7ab6d aud-caramel/hds4.src --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/aud-caramel/hds4.src Mon Apr 04 07:53:58 2022 +0000 @@ -0,0 +1,22 @@ +# This audio mode config is for the FC-HDS4 headset plugged into the +# main (EAR/MIC) audio jack on Caramel (iWOW DSK) or FC Caramel2 +# development boards. + +mic default { + gain 8 # tuned empirically for far end subjective perception + output-bias 1 # FC-HDS4 microphone needs 2.5V +# Mic appears to have flat frequency response, thus no FIR needed +} + +speaker ear { + gain 0 # left at default for now +# We do have frequency response data, but no flattening FIR filter design +# has been attempted yet +} + +sidetone -17 # sounds reasonable + +# Let's try using Pirelli's non-loudspeaker (handheld/headset) +# AEC config. + +aec-new 2 1 0x14 0xCCC 0x59AD 0x4000 0x32 0x1000 0x1000 0 4 0 diff -r 000000000000 -r 6ef2edd7ab6d aud-fcdev3b/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/aud-fcdev3b/Makefile Mon Apr 04 07:53:58 2022 +0000 @@ -0,0 +1,17 @@ +BINFILES= spkr0.cfg spkr0.vol +INSTDIR= /opt/freecalypso/aud-fcdev3b + +all: ${BINFILES} + +spkr0.cfg: spkr0.src + tiaud-compile $< $@ + +spkr0.vol: Makefile + tiaud-mkvol 150 $@ + +install: ${BINFILES} + mkdir -p ${INSTDIR} + install -c -m 644 ${BINFILES} ${INSTDIR} + +clean: + rm -f *.cfg *.vol diff -r 000000000000 -r 6ef2edd7ab6d aud-fcdev3b/spkr0.src --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/aud-fcdev3b/spkr0.src Mon Apr 04 07:53:58 2022 +0000 @@ -0,0 +1,42 @@ +# The official voice call kit for FCDEV3B consists of a SparkFun COM-09151 +# loudspeaker and a CUI CMC-9745-130T microphone. The present audio mode +# config has been tuned as follows: +# +# 1) AEC is enabled as needed for all not-held-to-ear loudspeaker setups; +# +# 2) The microphone gain has been tuned to provide the most natural +# voice levels to parties on the far end of the call, matching standard +# phones; +# +# 3) The sidetone level has been turned down: the default -5 dB is too loud +# and causes singing effects with the raised microphone gain. + +mic default { + gain 8 # tuned for CMC-9745-130T and FCDEV3B mic input circuit + output-bias 0 # 2.0V appears to be correct for CMC-9745-130T +# Mic has very flat frequency response, thus no FIR needed +} + +# We don't have a FIR filter for our SparkFun COM-09151 loudspeaker. There is +# no datasheet for this speaker on SparkFun website, thus we don't know its +# frequency response curve, and even if we got the needed data, the work to +# create a flattening filter would probably be more than we can justify. + +speaker ear { + gain 0 # left at default for now +} + +# The canon seems to be to disable the sidetone altogether in loudspeaker +# setups, but we set it to the lowest level instead, so we keep exercising +# this chipset feature - our FCDEV3B is unusual in that the loudspeaker +# is the only way to exercise voice calls. + +sidetone -23 + +# The AEC configuration has been copied from Pirelli DP-L10, or more +# specifically, Pirelli's loudspeaker mode AEC config. Unfortunately +# we lack sufficient Calypso DSP documentation to even understand most +# of these tunable settings, let alone actually tune them, hence +# copying Pirelli's config is the best we can do at the moment. + +aec-new 2 1 0x14 0xCCC 0xFFF 0x4000 0x32 0x1000 0x1000 0 4 0x60