[cdi-devel] [PATCH 7/9] hdaudio: Power up audio function and all widgets
Kevin Wolf ·
Widgets that aren't fully powered stay silent. So power them up. Signed-off-by: Kevin Wolf <kevin at tyndur.org> --- hdaudio/device.h | 2 ++ hdaudio/main.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/hdaudio/device.h b/hdaudio/device.h index c9fc3d1..2697da0 100644 --- a/hdaudio/device.h +++ b/hdaudio/device.h @@ -186,6 +186,8 @@ enum codec_verbs { VERB_GET_PIN_CONTROL = 0xf0700, VERB_SET_PIN_CONTROL = 0x70700, VERB_GET_EAPD_BTL = 0xf0c00, + VERB_GET_POWER_STATE = 0xf0500, + VERB_SET_POWER_STATE = 0x70500, }; enum codec_parameters { diff --git a/hdaudio/main.c b/hdaudio/main.c index 98e2a8a..4d0b02f 100644 --- a/hdaudio/main.c +++ b/hdaudio/main.c @@ -347,6 +347,10 @@ static void widget_init(struct hda_device* hda, int codec, int nid) default: return; } + + if (widget_cap & WIDGET_CAP_POWER_CNTRL) { + codec_query(hda, codec, nid, VERB_SET_POWER_STATE | 0x0); + } } static int codec_enumerate_widgets(struct hda_device* hda, int codec) @@ -381,6 +385,8 @@ static int codec_enumerate_widgets(struct hda_device* hda, int codec) continue; } + codec_query(hda, codec, fg_start + i, VERB_SET_POWER_STATE | 0x0); + for (j = 0; j < num_widgets; j++) { widget_init(hda, codec, widgets_start + j); } -- 2.1.4