6 Oct
2014
6 Oct
'14
4:56 p.m.
I previously had a small python script doing the same thing, but it depended on hda-analyzer, which always breaks when something new is added to the codec proc file.
I got tired and rewrote it as a small C program instead, which I hope will be a useful addition to alsa-tools.
+static gboolean should_check_pin(pin_configs_t *pin) +{
unsigned long defcfg = actual_pin_config(pin);
if (try_all_pins)
return TRUE;
if (get_port_conn(defcfg) != 0)
return FALSE; // Not a jack
if (defcfg & (1 << 8)) // Jack has NO_PRESENCE set
return FALSE;
return TRUE;
+}
The pincap of the pin complex must support DETECT even when you specify try_all_pins