During experimenting with USB soundcard devices based on cm108 chips I discovered that a squelch signal on the GPIO inputs of the sound chip does trigger a keyboard event as if one pressed the “volume down” key. Depending on the system configuration that can lead to your default sound card being muted. In my case I was running UniPager as DAPNET client to the pager network in combination with a self made USB sound device with GPIO-controlled PTT.
If you just want to exlude the emulated volume down key press event you can remap this button press event from the emulated keyboard using an udev hwdb config directive. To achieve this you have to know the keyscan code of the button being emulated. This value can then be remapped or ignored.
To identify the scan code you can execute evtest (after installation):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
During the test I transmitted a test transmission in order to trigger the squelch which triggers a GPIO pin on the radio which itself is connected to one of the GPIOs of the CM108 chip. It shows that a scan code of c00ea is triggered.
Now let’s remap this emualted key press event. Edit a custom udev hwdb rule (e.g. /etc/udev/hwdb.d/50-cm108.hwdb) with the following content:
1 2 3
Afterward you just have to rebuild the hwdb using the command “udevadm hwdb –update” and then kick it “udevadm trigger” or restart udev. Now the emulated keypress events should be ignored.