From 82a48949c5bb779c6b9965a10f5b958f68a03264 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 27 Apr 2009 01:18:37 +0200 Subject: add README --- README | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 0000000..f43333d --- /dev/null +++ b/README @@ -0,0 +1,53 @@ +This tool will help you to determine the volume scaling factors of your sound +card. If your sound card/chip manufacturer did not provide you with +documentation to which attenuation specific volume settings belong this tool +can help you to measure them. + +What you need: + +a) A sound card where input and output are synchronous + +b) A feedback cable that allows you to feed sound card output back into the input + +c) Some time + +In this is how you do it: + +1) You plug in your feedback cable in the line out and line in of your soundcard + +2) You open the low-level ALSA mixer and mute/set to 0 everything you can +mute/set to 0, except what is necessary to get a PCM signal out of your machine +and back into the machine. The slider you want to measure you set the highest +possible value. The other sliders that are in our pipeline you set to some +'sensible' value, in the middle of its range somewhere. What does 'sensible' +mean? Something where neither clipping happens nor where the signal is too +faint. In 'alsamixer -c0' those points are usually near 0dB or a bit lower. If +you are not sure what to pick don't despair, our little tool will tell you if +you picked a good value. 'Inner' sliders should always be kept near to 0dB. + +3) You run our little tool like this: + + make && ./dbmeasure plughw:0 log.csv + +This will now measure a few things and then ask you to lower the volume one +step. Please comply and press return. It will now measure a little bit more, +and ask again and so on. When you went through all volume levels successfully +press C-D instead of return. + +If the volume levels mentioned in step 2 were not set up correctly the tool will +fail and ask you to adjust them a little. Then repeat step 3. + +The first argument to the tool is the device to use. It will be opened for both +capturing and playback. The second argument is the filename of a CSV file where +the tool will place its results. The first column of that file is the numer of +the volume step we are looking at. Starting with the highest one. The last +column is the attenuation in dB relative to the highest volume level (and hence +is always at 0dB on the first line). You can then load the CSV output into +Gnumeric to draw pretty graphs. + +If you want to use the output of this tool in low-level drivers, keep in mind +that there volume level 0 is usally the lowest one, while in our CSV it is the +highest. You might hence want to invert the order of the CSV file before you +make use of it. + +Lennart Poettering, 2009 -- cgit