Lines Matching +full:0 +full:x00020004
41 #define INTEL_VENDORID 0x8086
43 #define HDA_CODEC_SUBSYSTEM_ID ((INTEL_VENDORID << 16) | 0x01)
44 #define HDA_CODEC_ROOT_NID 0x00
45 #define HDA_CODEC_FG_NID 0x01
46 #define HDA_CODEC_AUDIO_OUTPUT_NID 0x02
47 #define HDA_CODEC_PIN_OUTPUT_NID 0x03
48 #define HDA_CODEC_AUDIO_INPUT_NID 0x04
49 #define HDA_CODEC_PIN_INPUT_NID 0x05
51 #define HDA_CODEC_STREAMS_COUNT 0x02
52 #define HDA_CODEC_STREAM_OUTPUT 0x00
53 #define HDA_CODEC_STREAM_INPUT 0x01
55 #define HDA_CODEC_PARAMS_COUNT 0x14
56 #define HDA_CODEC_CONN_LIST_COUNT 0x01
57 #define HDA_CODEC_RESPONSE_EX_UNSOL 0x10
58 #define HDA_CODEC_RESPONSE_EX_SOL 0x00
59 #define HDA_CODEC_AMP_NUMSTEPS 0x4a
64 #define HDA_CODEC_FMT_BASE_MASK (0x01 << 14)
66 #define HDA_CODEC_FMT_MULT_MASK (0x07 << 11)
67 #define HDA_CODEC_FMT_MULT_2 (0x01 << 11)
68 #define HDA_CODEC_FMT_MULT_3 (0x02 << 11)
69 #define HDA_CODEC_FMT_MULT_4 (0x03 << 11)
71 #define HDA_CODEC_FMT_DIV_MASK 0x07
74 #define HDA_CODEC_FMT_BITS_MASK (0x07 << 4)
75 #define HDA_CODEC_FMT_BITS_8 (0x00 << 4)
76 #define HDA_CODEC_FMT_BITS_16 (0x01 << 4)
77 #define HDA_CODEC_FMT_BITS_24 (0x03 << 4)
78 #define HDA_CODEC_FMT_BITS_32 (0x04 << 4)
80 #define HDA_CODEC_FMT_CHAN_MASK (0x0f << 0)
83 (0x00 << HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_SHIFT)
85 (0x01 << HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_SHIFT)
87 (0x04 << HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_SHIFT)
111 (0x03 << HDA_PARAM_OUTPUT_AMP_CAP_STEPSIZE_SHIFT)
117 #define HDA_CODEC_SET_AMP_GAIN_MUTE_MUTE 0x80
118 #define HDA_CODEC_SET_AMP_GAIN_MUTE_GAIN_MASK 0x7f
127 (0x01 << HDA_CONFIG_DEFAULTCONF_COLOR_SHIFT)
129 (0x05 << HDA_CONFIG_DEFAULTCONF_COLOR_SHIFT)
133 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
233 [HDA_PARAM_REVISION_ID] = 0xffff, \
235 [HDA_PARAM_SUB_NODE_COUNT] = 0x00010001, \
241 [HDA_PARAM_SUPP_PCM_SIZE_RATE] = (0x1f << 16) | 0x7ff, \
243 [HDA_PARAM_INPUT_AMP_CAP] = 0x00, /* None */ \
244 [HDA_PARAM_OUTPUT_AMP_CAP] = 0x00, /* None */ \
245 [HDA_PARAM_GPIO_COUNT] = 0x00, \
250 [HDA_PARAM_SUB_NODE_COUNT] = 0x00020002, \
257 [HDA_PARAM_SUB_NODE_COUNT] = 0x00040002, \
264 [HDA_PARAM_SUB_NODE_COUNT] = 0x00020004, \
277 [HDA_PARAM_SUPP_PCM_SIZE_RATE] = (0x02 << 16) | 0x7fc, \
280 [HDA_PARAM_INPUT_AMP_CAP] = 0x00, /* None */ \
281 [HDA_PARAM_CONN_LIST_LENGTH] = 0x00, \
295 [HDA_PARAM_INPUT_AMP_CAP] = 0x00, /* None */ \
296 [HDA_PARAM_CONN_LIST_LENGTH] = 0x01, \
297 [HDA_PARAM_OUTPUT_AMP_CAP] = 0x00, /* None */ \
310 [HDA_PARAM_SUPP_PCM_SIZE_RATE] = (0x02 << 16) | 0x7fc, \
313 [HDA_PARAM_OUTPUT_AMP_CAP] = 0x00, /* None */ \
314 [HDA_PARAM_CONN_LIST_LENGTH] = 0x01, \
327 [HDA_PARAM_INPUT_AMP_CAP] = 0x00, /* None */ \
328 [HDA_PARAM_OUTPUT_AMP_CAP] = 0x00, /* None */ \
367 (0x01 << HDA_CONFIG_DEFAULTCONF_ASSOCIATION_SHIFT),
371 (0x02 << HDA_CONFIG_DEFAULTCONF_ASSOCIATION_SHIFT),
450 st->aud = audio_init(rec, 0); in hda_codec_init()
460 return (0); in hda_codec_init()
479 for (i = 0; i < HDA_CODEC_STREAMS_COUNT; i++) { in hda_codec_reset()
487 DPRINTF("cad: 0x%x", hci->cad); in hda_codec_reset()
503 uint8_t cad = 0, nid = 0; in hda_codec_command()
504 uint16_t verb = 0, payload = 0; in hda_codec_command()
505 uint32_t res = 0; in hda_codec_command()
508 cad = (cmd_data >> HDA_CMD_CAD_SHIFT) & 0x0f; in hda_codec_command()
510 nid = (cmd_data >> HDA_CMD_NID_SHIFT) & 0xff; in hda_codec_command()
512 if ((cmd_data & 0x70000) == 0x70000) { in hda_codec_command()
514 verb = (cmd_data >> HDA_CMD_VERB_12BIT_SHIFT) & 0x0fff; in hda_codec_command()
516 payload = cmd_data & 0xff; in hda_codec_command()
519 verb = (cmd_data >> HDA_CMD_VERB_4BIT_SHIFT) & 0x0f; in hda_codec_command()
521 payload = cmd_data & 0xffff; in hda_codec_command()
549 res = sc->conn_list[nid][0]; in hda_codec_command()
568 DPRINTF("Unknown VERB: 0x%x", verb); in hda_codec_command()
572 DPRINTF("cad: 0x%x nid: 0x%x verb: 0x%x payload: 0x%x response: 0x%x", in hda_codec_command()
597 DPRINTF("run: %d, stream: 0x%x, st->stream: 0x%x dir: %d", in hda_codec_notify()
602 return (0); in hda_codec_notify()
618 uint8_t div = 0; in hda_codec_parse_format()
655 DPRINTF("Unknown format bits: 0x%x", in hda_codec_parse_format()
663 return (0); in hda_codec_parse_format()
721 DPRINTF("rate: %d, channels: %d, format: 0x%x", in hda_codec_audio_output_do_setup()
761 hops->transfer(hci, st->stream, 0, st->buf, sizeof(st->buf)); in hda_codec_audio_input_do_transfer()
780 DPRINTF("rate: %d, channels: %d, format: 0x%x", in hda_codec_audio_input_do_setup()
790 uint32_t res = 0; in hda_codec_audio_inout_nid()
791 uint8_t mute = 0; in hda_codec_audio_inout_nid()
792 uint8_t gain = 0; in hda_codec_audio_inout_nid()
794 DPRINTF("%s verb: 0x%x, payload, 0x%x", st->actx.name, verb, payload); in hda_codec_audio_inout_nid()
806 DPRINTF("GET_AMP_GAIN_MUTE_LEFT: 0x%x", res); in hda_codec_audio_inout_nid()
809 DPRINTF("GET_AMP_GAIN_MUTE_RIGHT: 0x%x", res); in hda_codec_audio_inout_nid()
820 mute: 0x%x gain: 0x%x", mute, gain); in hda_codec_audio_inout_nid()
827 mute: 0x%x gain: 0x%x", mute, gain); in hda_codec_audio_inout_nid()
834 st->channel = payload & 0x0f; in hda_codec_audio_inout_nid()
835 st->stream = (payload >> 4) & 0x0f; in hda_codec_audio_inout_nid()
836 DPRINTF("st->channel: 0x%x st->stream: 0x%x", in hda_codec_audio_inout_nid()
842 DPRINTF("Unknown VERB: 0x%x", verb); in hda_codec_audio_inout_nid()
894 memset(actx, 0, sizeof(*actx)); in hda_audio_ctxt_init()
896 actx->run = 0; in hda_audio_ctxt_init()
918 return (0); in hda_audio_ctxt_init()
924 int err = 0; in hda_audio_ctxt_start()
947 actx->run = 0; in hda_audio_ctxt_stop()
948 return (0); in hda_audio_ctxt_stop()