sound_card_init: extract common DSM calibration logic

1. Extract common DSM calibration logic to `dsm` crate to reduce
   the code duplication of deciding the calibration values.
2. Define `Amp` and `AmpBuilder` in `amp` crate to reduce the similar
   code of Amp creation.
3. Rewrite Max98390 by using the `dsm` and `amp` crate.

BUG=b:157210111
TEST=/usr/bin/sound_card_init --id=sofcmlmax98390d
TEST=tast run ${DUT_IP} soundcardinit.Max98390.*

Cq-Depend: chromium:2598521
Change-Id: I6a85bcf36f3b60da7328a5e6266c358c295955e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/2595661
Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org>
Reviewed-by: Judy Hsiao <judyhsiao@chromium.org>
Tested-by: Judy Hsiao <judyhsiao@chromium.org>
Commit-Queue: Judy Hsiao <judyhsiao@chromium.org>
21 files changed