Index: uspace/drv/audio/hdaudio/codec.c
===================================================================
--- uspace/drv/audio/hdaudio/codec.c	(revision f3831afcf933f2b3baefc871e81f1735fa29f5a9)
+++ uspace/drv/audio/hdaudio/codec.c	(revision fff4f210c7226cb6fc673764a98c4ed46b3884d3)
@@ -66,6 +66,6 @@
 	}
 	int rc = hda_cmd(codec->hda, verb, resp);
-
-/*	if (resp != NULL) {
+/*
+	if (resp != NULL) {
 		ddf_msg(LVL_NOTE, "verb 0x%" PRIx32 " -> 0x%" PRIx32, verb,
 		    *resp);
@@ -173,4 +173,22 @@
 	ctl = (stream << cctl_stream_l) | (channel << cctl_channel_l);
 	return hda_ccmd(codec, node, hda_converter_ctl_set, ctl, NULL);
+}
+
+static int hda_set_pin_ctl(hda_codec_t *codec, int node, uint8_t pctl)
+{
+	return hda_ccmd(codec, node, hda_pin_ctl_set, pctl, NULL);
+}
+
+static int hda_get_pin_ctl(hda_codec_t *codec, int node, uint8_t *pctl)
+{
+	int rc;
+	uint32_t resp;
+
+	rc = hda_ccmd(codec, node, hda_pin_ctl_get, 0, &resp);
+	if (rc != EOK)
+		return rc;
+
+	*pctl = resp;
+	return EOK;
 }
 
@@ -225,4 +243,10 @@
 //	    node, payload, *resp);
 	return rc;
+}
+
+/** Get GP I/O Count */
+static int hda_get_gpio_cnt(hda_codec_t *codec, int node, uint32_t *resp)
+{
+	return hda_get_parameter(codec, node, hda_gpio_cnt, resp);
 }
 
@@ -375,4 +399,5 @@
 	uint32_t pcaps;
 	uint32_t eapd;
+	uint8_t pctl;
 
 	rc = hda_get_cfg_def(codec, aw, &cfgdef);
@@ -405,4 +430,32 @@
 		ddf_msg(LVL_NOTE, "PIN %d now has EAPD value=0x%x", aw, eapd);
 	}
+
+	pctl = 0;
+	if ((pcaps & BIT_V(uint32_t, pwc_output)) != 0) {
+		ddf_msg(LVL_NOTE, "PIN %d will enable output", aw);
+	    	pctl = pctl | BIT_V(uint8_t, pctl_out_enable);
+	}
+
+	if ((pcaps & BIT_V(uint32_t, pwc_hpd)) != 0) {
+		ddf_msg(LVL_NOTE, "PIN %d will enable headphone drive", aw);
+	    	pctl = pctl | BIT_V(uint8_t, pctl_hpd_enable);
+	}
+
+/*	if ((pcaps & BIT_V(uint32_t, pwc_input)) != 0) {
+		ddf_msg(LVL_NOTE, "PIN %d will enable input");
+	    	pctl = pctl | BIT_V(uint8_t, pctl_input_enable);
+	}
+*/
+	ddf_msg(LVL_NOTE, "Setting PIN %d ctl to 0x%x", aw, pctl);
+	rc = hda_set_pin_ctl(codec, aw, pctl);
+	if (rc != EOK)
+		goto error;
+
+	pctl = 0;
+	rc = hda_get_pin_ctl(codec, aw, &pctl);
+	if (rc != EOK)
+		goto error;
+
+	ddf_msg(LVL_NOTE, "PIN %d ctl reads as 0x%x", aw, pctl);
 
 	return EOK;
@@ -442,4 +495,5 @@
 	uint32_t rates;
 	uint32_t formats;
+	uint32_t gpio;
 
 	codec = calloc(1, sizeof(hda_codec_t));
@@ -466,4 +520,15 @@
 		ddf_msg(LVL_NOTE, "hda_get_fgrp_type -> %d", rc);
 		ddf_msg(LVL_NOTE, "unsol: %d, grptype: %d", unsol, grptype);
+
+		rc = hda_get_gpio_cnt(codec, fg, &gpio);
+		if (rc != EOK)
+			goto error;
+
+		ddf_msg(LVL_NOTE, "GPIO: wake=%d unsol=%d gpis=%d gpos=%d gpios=%d",
+		    (gpio & BIT_V(uint32_t, 31)) != 0,
+		    (gpio & BIT_V(uint32_t, 30)) != 0,
+		    BIT_RANGE_EXTRACT(uint32_t, 23, 16, gpio),
+		    BIT_RANGE_EXTRACT(uint32_t, 15, 8, gpio),
+		    BIT_RANGE_EXTRACT(uint32_t, 7, 0, gpio));
 
 		rc = hda_power_ctl_init(codec, fg);
Index: uspace/drv/audio/hdaudio/spec/codec.h
===================================================================
--- uspace/drv/audio/hdaudio/spec/codec.h	(revision f3831afcf933f2b3baefc871e81f1735fa29f5a9)
+++ uspace/drv/audio/hdaudio/spec/codec.h	(revision fff4f210c7226cb6fc673764a98c4ed46b3884d3)
@@ -87,8 +87,8 @@
 	/** SDI Select / Set */
 	hda_sdi_select_set = 0x704,
-	/** Enable VRef / Get */
-	hda_enable_vref_get = 0xf07,
-	/** Enable VRef / Set */
-	hda_enable_vref_set = 0x707,
+	/** Pin Control / Get */
+	hda_pin_ctl_get = 0xf07,
+	/** Pin Control / Set */
+	hda_pin_ctl_set = 0x707,
 	/** Unsolicited Response Control / Get */
 	hda_unsol_resp_get = 0xf08,
@@ -324,4 +324,5 @@
 } hda_awidget_caps_bits_t;
 
+/** Pin Capabilities */
 typedef enum {
 	/** High Bit Rate */
@@ -387,4 +388,22 @@
 } hda_converter_ctl_bits_t;
 
+/** Pin Widget Control bits */
+typedef enum {
+	/** Headphone Drive Enable */
+	pctl_hpd_enable = 7,
+	/** Out Enable */
+	pctl_out_enable = 6,
+	/** In Enable */
+	pctl_in_enable = 5,
+	/** Voltage Reference Enable (H) */
+	pctl_vref_enable_h = 2,
+	/** Voltage Reference Enable (L) */
+	pctl_vref_enable_l = 0,
+	/** Encoded Packet Type (H) */
+	pctl_ept_h = 1,
+	/** Encoded Packet Type (L) */
+	pctl_ept_l = 0
+} hda_pin_ctl_bits_t;
+
 #endif
 
Index: uspace/drv/audio/hdaudio/stream.c
===================================================================
--- uspace/drv/audio/hdaudio/stream.c	(revision f3831afcf933f2b3baefc871e81f1735fa29f5a9)
+++ uspace/drv/audio/hdaudio/stream.c	(revision fff4f210c7226cb6fc673764a98c4ed46b3884d3)
@@ -198,9 +198,9 @@
 	async_usleep(100 * 1000);
 
-//	ctl = hda_reg8_read(&sdregs->ctl1);
-//	ctl = ctl & ~BIT_V(uint8_t, sdctl1_srst);
-//	hda_reg8_write(&sdregs->ctl1, ctl);
-
-//	async_usleep(100 * 1000);
+	ctl = hda_reg8_read(&sdregs->ctl1);
+	ctl = ctl & ~BIT_V(uint8_t, sdctl1_srst);
+	hda_reg8_write(&sdregs->ctl1, ctl);
+
+	async_usleep(100 * 1000);
 }
 
