NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Working with hdaudio [PATCH]
On Tue, Sep 25, 2018 at 11:54:24AM +0000, Emmanuel Dreyfus wrote:
> I am trying to get sound output from the built-in speaker of
> a hdaudio system. The jack outputs sound, but so far I had
> no success with the speaker;
It was a bug in hdaudio: the code in hdafg_disable_unassoc()
has some special handling for pins of type COP_AWCAP_TYPE_PIN_COMPLEX
but they were disabled before it has an opportunity to run.
I will commit that fix:
--- src/sys/dev/hdaudio/hdafg.c.orig
+++ src/sys/dev/hdaudio/hdafg.c
@@ -2101,27 +2101,28 @@
struct hdaudio_widget *w, *cw;
struct hdaudio_control *ctl;
int i, j, k;
- /* Disable unassociated widgets */
for (i = sc->sc_startnode; i < sc->sc_endnode; i++) {
w = hdafg_widget_lookup(sc, i);
if (w == NULL || w->w_enable == false)
continue;
- if (w->w_bindas == -1) {
- w->w_enable = 0;
- hda_trace(sc, "disable %02X [unassociated]\n",
- w->w_nid);
+
+ /* Disable unassociated widgets */
+ if (w->w_type != COP_AWCAP_TYPE_PIN_COMPLEX) {
+ if (w->w_bindas == -1) {
+ w->w_enable = 0;
+ hda_trace(sc,
+ "XXX disable %02X [unassociated]\n",
+ w->w_nid);
+ }
+ continue;
}
- }
- /* Disable input connections on input pin and output on output */
- for (i = sc->sc_startnode; i < sc->sc_endnode; i++) {
- w = hdafg_widget_lookup(sc, i);
- if (w == NULL || w->w_enable == false)
- continue;
- if (w->w_type != COP_AWCAP_TYPE_PIN_COMPLEX)
- continue;
+ /*
+ * Disable input connections on input pin
+ * and output on output pin
+ */
if (w->w_bindas < 0)
continue;
if (as[w->w_bindas].as_dir == HDAUDIO_PINDIR_IN) {
hda_trace(sc, "disable %02X input connections\n",
--
Emmanuel Dreyfus
manu%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index