Date: Sat, 6 Aug 2016 13:36:24 GMT From: iateaca@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r307277 - soc2016/iateaca/bhyve-hda-head/usr.sbin/bhyve Message-ID: <201608061336.u76DaOrr069930@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: iateaca Date: Sat Aug 6 13:36:23 2016 New Revision: 307277 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=307277 Log: add output, input and duplex configuration M hda_codec.c Modified: soc2016/iateaca/bhyve-hda-head/usr.sbin/bhyve/hda_codec.c Modified: soc2016/iateaca/bhyve-hda-head/usr.sbin/bhyve/hda_codec.c ============================================================================== --- soc2016/iateaca/bhyve-hda-head/usr.sbin/bhyve/hda_codec.c Sat Aug 6 13:01:50 2016 (r307276) +++ soc2016/iateaca/bhyve-hda-head/usr.sbin/bhyve/hda_codec.c Sat Aug 6 13:36:23 2016 (r307277) @@ -200,6 +200,24 @@ [HDA_PARAM_OUTPUT_AMP_CAP] = 0x00, /* None */ \ [HDA_PARAM_GPIO_COUNT] = 0x00, \ +#define HDA_CODEC_FG_NONE_DESC \ + [HDA_CODEC_FG_NID] = { \ + [HDA_PARAM_SUB_NODE_COUNT] = 0x00000000, /* 0 Subnodes, StartNid = 0 */ \ + HDA_CODEC_FG_COMMON_DESC \ + }, \ + +#define HDA_CODEC_FG_OUTPUT_DESC \ + [HDA_CODEC_FG_NID] = { \ + [HDA_PARAM_SUB_NODE_COUNT] = 0x00020002, /* 2 Subnodes, StartNid = 2 */ \ + HDA_CODEC_FG_COMMON_DESC \ + }, \ + +#define HDA_CODEC_FG_INPUT_DESC \ + [HDA_CODEC_FG_NID] = { \ + [HDA_PARAM_SUB_NODE_COUNT] = 0x00040002, /* 2 Subnodes, StartNid = 4 */ \ + HDA_CODEC_FG_COMMON_DESC \ + }, \ + #define HDA_CODEC_FG_DUPLEX_DESC \ [HDA_CODEC_FG_NID] = { \ [HDA_PARAM_SUB_NODE_COUNT] = 0x00020004, /* 4 Subnodes, StartNid = 2 */ \ @@ -259,14 +277,31 @@ [HDA_PARAM_OUTPUT_AMP_CAP] = 0x00, /* None */ \ }, \ -static const uint32_t hda_codec_parameters[][HDA_CODEC_PARAMS_COUNT] = { +static const uint32_t hda_codec_none_parameters[][HDA_CODEC_PARAMS_COUNT] = { + HDA_CODEC_ROOT_DESC + HDA_CODEC_FG_NONE_DESC +}; + +static const uint32_t hda_codec_output_parameters[][HDA_CODEC_PARAMS_COUNT] = { + HDA_CODEC_ROOT_DESC + HDA_CODEC_FG_OUTPUT_DESC + HDA_CODEC_OUTPUT_DESC +}; + +static const uint32_t hda_codec_input_parameters[][HDA_CODEC_PARAMS_COUNT] = { + HDA_CODEC_ROOT_DESC + HDA_CODEC_FG_INPUT_DESC + HDA_CODEC_INPUT_DESC +}; + +static const uint32_t hda_codec_duplex_parameters[][HDA_CODEC_PARAMS_COUNT] = { HDA_CODEC_ROOT_DESC HDA_CODEC_FG_DUPLEX_DESC HDA_CODEC_OUTPUT_DESC HDA_CODEC_INPUT_DESC }; -#define HDA_CODEC_NODES_COUNT (ARRAY_SIZE(hda_codec_parameters)) +#define HDA_CODEC_NODES_COUNT (ARRAY_SIZE(hda_codec_duplex_parameters)) static const uint8_t hda_codec_conn_list[HDA_CODEC_NODES_COUNT][HDA_CODEC_CONN_LIST_COUNT] = { [HDA_CODEC_PIN_OUTPUT_NID] = {HDA_CODEC_AUDIO_OUTPUT_NID}, @@ -313,7 +348,7 @@ sc->subsystem_id = HDA_CODEC_SUBSYSTEM_ID; sc->no_nodes = HDA_CODEC_NODES_COUNT; - sc->get_parameters = hda_codec_parameters; + sc->get_parameters = hda_codec_duplex_parameters; sc->conn_list = hda_codec_conn_list; sc->conf_default = hda_codec_conf_default; sc->pin_ctrl_default = hda_codec_pin_ctrl_default;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608061336.u76DaOrr069930>