- 
                Notifications
    You must be signed in to change notification settings 
- Fork 125
Reverse Engineering Hardware
You can use a tool called RtHDDump to dump your codecs. You will want to get a dump with and without your headphones plugged in to see what changes under these conditions. You can download the tool here.
To dump your codecs that are being used in Linux you will want to run these commands 
echo 1 |sudo tee /sys/module/snd_hda_codec/parameters/dump_coef 
cat /proc/asound/card0/codec#0 > lin_codec-dump 
The card number will change based on how your device is configured so be sure to identify that your target device is the correct one.
To dump your current pin setup you will want to install the alsa-tools package and run alsa-info.sh which will be located at /usr/bin/alsa-info.sh
Example on how to set what register to read and what to set to write. In this instance we are looking at address 0x10 and writing value 8a20 
hda-verb /dev/snd/hwC0D0 0x20 0x500 0x10 
hda-verb /dev/snd/hwC0D0 0x20 0x400 0x8a20 
0x500 is the read command and 0x400 is the write command. 0x20 is the node, as far as I know this is always the node that will will want to get the coeffs from.