# HG changeset patch # User Mychaela Falconia # Date 1636778946 0 # Node ID 9336a48746d955e838d21ac07d8a2f87d02789be # Parent 5f9dd4056420c9c5790139fcb538bc434d35159c audio-tones: experimental tools and findings diff -r 5f9dd4056420 -r 9336a48746d9 audio-tones/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/audio-tones/README Sat Nov 13 04:49:06 2021 +0000 @@ -0,0 +1,25 @@ +As of 2021-11, we are still far away from being able to clean up the +implementation of audio tones in our handset UI fw: before we can clean up the +implementation of audio tones, we will first need to detangle the wrong-minded +coupling between these audio tones and the buzzer, and that detangling will +require a development platform with a working buzzer, which means FC Venus. + +However, we can apply a band-aid fix to the current misdesigned Condat audio +driver that would allow keybeep tones to be re-enabled on FC Luna with FC-HDS4 +without being brutal on the developer-operator's ears: we can change the dBfs +amplitudes baked into F_xxx defined constants, and we can conditionalize this +change on CONFIG_TARGET_LUNA. With this method we are constrained to picking +just one amplitude for the 3 different tones based on F_425 (busy, CW and +ringing) and likewise the same amplitude between the half-tone of keybeep and +the low tone of DTMF - but we are not seeking fully optimal tuning here, only a +band-aid fix to protect the developer-operator's hearing. + +The set of shell scripts contained in this directory was put together to +facilitate easier experimentation with different amplitudes, easier than +entering full AT@TONE commands manually. + +Amplitude selections being made for now: + +Keybeep-half and DTMF-low: -26 dBfs +DTMF-high: -24 dBfs +F_425 tones: -21 dBfs diff -r 5f9dd4056420 -r 9336a48746d9 audio-tones/busy --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/audio-tones/busy Sat Nov 13 04:49:06 2021 +0000 @@ -0,0 +1,11 @@ +#!/bin/sh + +# play a busy tone, amplitude set on the command line + +if [ $# != 1 ] +then + echo "usage: $0 ampl" 1>&2 + exit 1 +fi + +exec fc-shell "at@tone=0,500,425,$1,0,500,0,0,0,500,0,0,500,500,1000,4" diff -r 5f9dd4056420 -r 9336a48746d9 audio-tones/cw --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/audio-tones/cw Sat Nov 13 04:49:06 2021 +0000 @@ -0,0 +1,11 @@ +#!/bin/sh + +# play a calling waiting tone, amplitude set on the command line + +if [ $# != 1 ] +then + echo "usage: $0 ampl" 1>&2 + exit 1 +fi + +exec fc-shell "at@tone=0,200,425,$1,800,1000,425,$1,0,200,0,0,1000,1000,4000,65535" diff -r 5f9dd4056420 -r 9336a48746d9 audio-tones/dtmf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/audio-tones/dtmf Sat Nov 13 04:49:06 2021 +0000 @@ -0,0 +1,11 @@ +#!/bin/sh + +# generate a DTMF '#' keybeep, low and high ampl set on the command line + +if [ $# != 2 ] +then + echo "usage: $0 low-ampl high-ampl" 1>&2 + exit 1 +fi + +exec fc-shell "at@tone=0,100,941,$1,0,100,1477,$2,0,100,0,0,100,100,100,1" diff -r 5f9dd4056420 -r 9336a48746d9 audio-tones/keybeep --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/audio-tones/keybeep Sat Nov 13 04:49:06 2021 +0000 @@ -0,0 +1,11 @@ +#!/bin/sh + +# generate a plain keybeep, amplitude set on the command line + +if [ $# != 1 ] +then + echo "usage: $0 ampl" 1>&2 + exit 1 +fi + +exec fc-shell "at@tone=0,120,697,$1,0,120,697,$1,0,120,0,0,120,120,120,1" diff -r 5f9dd4056420 -r 9336a48746d9 audio-tones/ringing --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/audio-tones/ringing Sat Nov 13 04:49:06 2021 +0000 @@ -0,0 +1,11 @@ +#!/bin/sh + +# play a ringing tone, amplitude set on the command line + +if [ $# != 1 ] +then + echo "usage: $0 ampl" 1>&2 + exit 1 +fi + +exec fc-shell "at@tone=0,1000,425,$1,0,1000,0,0,0,1000,0,0,1000,1000,5000,65535" diff -r 5f9dd4056420 -r 9336a48746d9 audio-tones/tstop --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/audio-tones/tstop Sat Nov 13 04:49:06 2021 +0000 @@ -0,0 +1,5 @@ +#!/bin/sh + +# stop previously started tone + +exec fc-shell at@tstop