Home | History | Annotate | Download | only in hdaudio

Lines Matching defs:as

19  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
49 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
630 /* treat line-out as speaker, unless connection type is RCA */
702 * beeper as a beep generator
793 struct hdaudio_assoc *as, enum hdaudio_pindir dir)
800 if (as->as_enable == false || as->as_dir != dir)
806 if (as->as_dacs[i])
807 dacmap[as->as_dacs[i]] = 1;
824 hdafg_assoc_type_string(struct hdaudio_assoc *as)
826 switch (as->as_digital) {
828 return as->as_dir == HDAUDIO_PINDIR_IN ?
831 return as->as_dir == HDAUDIO_PINDIR_IN ?
834 return as->as_dir == HDAUDIO_PINDIR_IN ?
837 return as->as_dir == HDAUDIO_PINDIR_IN ?
840 return as->as_dir == HDAUDIO_PINDIR_IN ?
846 hdafg_assoc_dump_dd(struct hdafg_softc *sc, struct hdaudio_assoc *as, int pin,
857 w = hdafg_widget_lookup(sc, as->as_pins[pin]);
860 (*cmd)(sc->sc_codec, as->as_pins[pin],
863 res = (*cmd)(sc->sc_codec, as->as_pins[pin],
867 hda_print(sc, "Display Device, pin=%02X\n", as->as_pins[pin]);
877 res = (*cmd)(sc->sc_codec, as->as_pins[pin],
883 res = (*cmd)(sc->sc_codec, as->as_pins[pin],
996 struct hdaudio_assoc *as = sc->sc_assocs;
1007 if (as[i].as_enable == false)
1011 hdafg_assoc_type_string(&as[i]), i);
1013 nchan = hdafg_assoc_count_channels(sc, &as[i],
1014 as[i].as_dir);
1018 if (as[i].as_dacs[j] == 0)
1020 w = hdafg_widget_lookup(sc, as[i].as_pins[j]);
1047 if (as[i].as_dacs[j] == 0)
1051 as[i].as_pins[j]);
1068 if (as[i].as_dacs[j] == 0)
1072 as[i].as_pins[j]);
1099 if (as[i].as_pins[j] == 0)
1101 hdafg_dump_dst_nid(sc, as[i].as_pins[j], 0);
1104 if (as[i].as_displaydev == true) {
1106 if (as[i].as_pins[j] == 0)
1108 hdafg_assoc_dump_dd(sc, &as[i], j, 1);
1117 struct hdaudio_assoc *as;
1147 as = kmem_zalloc(maxassocs * sizeof(*as), KM_SLEEP);
1149 as[i].as_hpredir = -1;
1150 /* as[i].as_chan = NULL; */
1151 as[i].as_digital = HDAFG_AS_SPDIF;
1154 hda_debug(sc, " scan associations, skipping as=0\n");
1155 /* Scan associations skipping as=0 */
1186 if (as
1187 as[cnt].as_enable = true;
1188 as[cnt].as_activated = true;
1189 as[cnt].as_index = j;
1190 as[cnt].as_dir = dir;
1195 if (as[cnt].as_pins[seq] != 0) {
1197 as[cnt].as_enable = false;
1199 if (dir != as[cnt].as_dir) {
1203 as[cnt].as_enable = false;
1206 as[cnt].as_digital = HDAFG_AS_ANALOG;
1208 as[cnt].as_displaydev = true;
1210 as[cnt].as_digital = HDAFG_AS_HDMI;
1212 as[cnt].as_digital = HDAFG_AS_DISPLAYPORT;
1216 as[cnt].as_pins[seq] = w->w_nid;
1217 as[cnt].as_pincnt++;
1221 if (j != 15 && cnt < maxassocs && as[cnt].as_pincnt > 0) {
1222 if (hpredir && as[cnt].as_pincnt > 1)
1223 as[cnt].as_hpredir = first;
1229 sc->sc_assocs = as;
1562 hdafg_assoc_trace_undo(struct hdafg_softc *sc, int as, int seq)
1571 if (w->w_bindas != as)
1588 hdafg_assoc_trace_dac(struct hdafg_softc *sc, int as, int seq,
1601 if (w->w_bindas >= 0 && w->w_bindas != as) {
1629 sc->sc_assocs[as].as_dacs[dupseq]))
1642 ret = hdafg_assoc_trace_dac(sc, as, seq,
1660 w->w_bindas = as;
1671 hdafg_assoc_trace_out(struct hdafg_softc *sc, int as, int seq)
1678 for (i = seq; i < HDAUDIO_MAXPINS && assocs[as].as_pins[i] == 0; i++)
1684 hpredir = (i == 15 && assocs[as].as_fakeredir == 0) ?
1685 assocs[as].as_hpredir : -1;
1689 res = hdafg_assoc_trace_dac(sc, as, i,
1690 assocs[as].as_pins[i], hpredir, minassoc, 0, 0);
1693 hda_trace(sc, " trace failed as=%d seq=%d pin=%02X "
1695 as, seq, assocs[as].as_pins[i], hpredir, minassoc);
1699 hdafg_assoc_trace_dac(sc, as, i,
1700 assocs[as].as_pins[i], hpredir, minassoc, res, 0);
1701 assocs[as].as_dacs[i] = res;
1703 if (hdafg_assoc_trace_out(sc, as, i + 1))
1706 hdafg_assoc_trace_undo(sc, as, i);
1707 assocs[as].as_dacs[i] = 0;
1772 struct hdaudio_assoc *as = sc->sc_assocs;
1787 if (as[assoc].as_pins[i] == 0)
1791 as[assoc].as_pins[i], j, 0) == 0) {
1794 as[assoc].as_dacs[k] = 0;
1797 as[assoc].as_dacs[i] = j;
1808 struct hdaudio_assoc *as = sc->sc_assocs;
1822 as[w->w_bindas].as_dir == HDAUDIO_PINDIR_OUT) {
1868 struct hdaudio_assoc *as = sc->sc_assocs;
1884 as[w->w_bindas].as_dir != HDAUDIO_PINDIR_IN)
1909 struct hdaudio_assoc *as = sc->sc_assocs;
1916 if (as[j].as_enable == false)
1918 if (as[j].as_dir != HDAUDIO_PINDIR_OUT)
1922 if (res == 0 && as[j].as_hpredir >= 0 &&
1923 as[j].as_fakeredir == 0) {
1928 as[j].as_fakeredir = 1;
1933 j, as[j].as_index);
1935 if (as[j].as_pins[i] == 0)
1938 as[j].as_pins[i]);
1941 if (as[j].as_dacs[i] == 0)
1944 as[j].as_dacs[i]);
1947 as[j].as_enable = false;
1953 if (as[j].as_enable == false)
1955 if (as[j].as_dir != HDAUDIO_PINDIR_IN)
1960 j, as[j].as_index);
1962 if (as[j].as_pins[i] == 0)
1965 as[j].as_pins[i]);
1968 if (as[j].as_dacs[i] == 0)
1971 as[j].as_dacs[i]);
1974 as[j].as_enable = false;
1985 struct hdaudio_assoc *as = sc->sc_assocs;
2010 w->w_bindas < 0 || as[w->w_bindas].as_enable == false) {
2021 as[w->w_bindas].as_enable : -1);
2026 } else if (as[w->w_bindas].as_dir == HDAUDIO_PINDIR_IN) {
2106 struct hdaudio_assoc *as = sc->sc_assocs;
2132 if (as[w->w_bindas].as_dir == HDAUDIO_PINDIR_IN) {
2190 struct hdaudio_assoc *as = sc->sc_assocs;
2204 as[w->w_bindas].as_dir == HDAUDIO_PINDIR_IN)
2372 const struct hdaudio_assoc *as = sc->sc_assocs;
2386 if (as[w->w_bindas].as_dir == HDAUDIO_PINDIR_OUT)
2443 struct hdaudio_assoc *as = sc->sc_assocs;
2473 if (as[w->w_bindas].as_dir == HDAUDIO_PINDIR_OUT)
2532 if (as[w->w_bindas].as_dir == HDAUDIO_PINDIR_OUT)
2573 if (as[w->w_bindas].as_dir == HDAUDIO_PINDIR_OUT)
2681 struct hdaudio_assoc *as = sc->sc_assocs;
2715 as[w->w_bindas].as_hpredir < 0 ||
2716 as[w->w_bindas].as_fakeredir ||
2758 struct hdaudio_assoc *as = sc->sc_assocs;
2771 as[w->w_bindas].as_dir == HDAUDIO_PINDIR_IN)) {
2782 as source, try to control it as dest */
2790 as[w->w_bindas].as_dir == HDAUDIO_PINDIR_OUT) {
2795 /* Treat unrequired as possible */
3099 hdafg_stream_connect_hdmi(struct hdafg_softc *sc, struct hdaudio_assoc *as,
3124 if (as->as_digital == HDAFG_AS_HDMI) {
3157 struct hdaudio_assoc *as = sc->sc_assocs;
3177 if (as[i].as_enable == false)
3180 if (mode == AUMODE_PLAY && as[i].as_dir != HDAUDIO_PINDIR_OUT)
3182 if (mode == AUMODE_RECORD && as[i].as_dir != HDAUDIO_PINDIR_IN)
3186 if (as[i].as_dir == HDAUDIO_PINDIR_OUT &&
3191 } else if (as[i].as_dir == HDAUDIO_PINDIR_IN &&
3198 if (as[i].as_dir == HDAUDIO_PINDIR_OUT) {
3209 if (as[i].as_dacs[j] == 0)
3211 w = hdafg_widget_lookup(sc, as[i].as_dacs[j]);
3214 if (as[i].as_hpredir >= 0 && i == as[i].as_pincnt)
3220 if (as[i].as_activated == false)
3268 if (as[i].as_pins[j] == 0)
3270 w = hdafg_widget_lookup(sc, as[i].as_pins[j]);
3274 hdafg_stream_connect_hdmi(sc, &as[i],
3426 struct hdaudio_assoc *as = sc->sc_assocs;
3435 nchan = hdafg_assoc_count_channels(sc, &as[i],
3441 nchan = hdafg_assoc_count_channels(sc, &as[i],
3524 struct hdaudio_assoc *as = sc->sc_assocs;
3536 if (as[i].as_digital != HDAFG_AS_ANALOG &&
3537 as[i].as_digital != HDAFG_AS_SPDIF)
3540 if (as[i].as_pins[j] == 0)
3542 w = hdafg_widget_lookup(sc, as[i].as_pins[j]);
3550 res |= hdaudio_command(sc->sc_codec, as[i].as_pins[j],
3557 if (as[i].as_digital != HDAFG_AS_ANALOG &&
3558 as[i].as_digital != HDAFG_AS_SPDIF)
3561 if (as[i].as_pins[j] == 0)
3563 w = hdafg_widget_lookup(sc, as[i].as_pins[j]);
3619 struct hdaudio_assoc *as = sc->sc_assocs;
3626 if (as[i].as_hpredir < 0 && as[i].as_displaydev == false)
3628 if (as[i].as_displaydev == false)
3629 w = hdafg_widget_lookup(sc, as[i].as_pins[15]);
3633 if (as[i].as_pins[j] == 0)
3635 w = hdafg_widget_lookup(sc, as
3861 struct hdaudio_assoc *as = sc->sc_assocs;
3896 if (as)
3897 kmem_free(as, sc->sc_nassocs * sizeof(*as));
4068 struct hdaudio_assoc *as = ad->ad_sc->sc_assocs;
4075 if (as[i].as_enable == false)
4077 if (as[i].as_dir != HDAUDIO_PINDIR_OUT)
4080 if (as[i].as_dacs[j] == 0)
4082 w = hdafg_widget_lookup(sc, as[i].as_dacs[j]);
4374 struct hdaudio_assoc *as = sc->sc_assocs;
4383 if (as[i].as_displaydev == false)
4386 if (as[i].as_pins[j] == 0)
4388 hdafg_assoc_dump_dd(sc, &as[i], j, 0);
4535 * ALC231 that identifies as an ALC269.