hda-verb参数详表

hda-verb参数详表

hda-verb的由来
hda-verb是linux下面的alsa-project的一条命令,它的作用是发送HD-audio命令。

命令格式:

  • linux:
    • % hda-verb /dev/snd/hwC0D0 0x12 0x701 2
  • Mac:
    • $ hda-verb 0x12 0x701 2

输入命令:

1
hda-verb

输出信息:

1
2
3
4
hda-verb for CodecCommander (based on alsa-tools hda-verb)
usage: hda-verb [option] hwdep-device nid verb param
-l List known verbs and parameters
-L List known verbs and parameters (one per line)
参数数值
GET_STREAM_FORMAT0x0a00
GET_AMP_GAIN_MUTE0x0b00
GET_PROC_COEF0x0c00
GET_COEF_INDEX0x0d00
PARAMETERS0x0f00
GET_CONNECT_SEL0x0f01
GET_CONNECT_LIST0x0f02
GET_PROC_STATE0x0f03
GET_SDI_SELECT0x0f04
GET_POWER_STATE0x0f05
GET_CONV0x0f06
GET_PIN_WIDGET_CONTROL0x0f07
GET_UNSOLICITED_RESPONSE0x0f08
GET_PIN_SENSE0x0f09
GET_BEEP_CONTROL0x0f0a
GET_EAPD_BTLENABLE0x0f0c
GET_DIGI_CONVERT_10x0f0d
GET_DIGI_CONVERT_20x0f0e
GET_VOLUME_KNOB_CONTROL0x0f0f
GET_GPIO_DATA0x0f15
GET_GPIO_MASK0x0f16
GET_GPIO_DIRECTION0x0f17
GET_GPIO_WAKE_MASK0x0f18
GET_GPIO_UNSOLICITED_RSP_MASK0x0f19
GET_GPIO_STICKY_MASK0x0f1a
GET_CONFIG_DEFAULT0x0f1c
GET_SUBSYSTEM_ID0x0f20
SET_STREAM_FORMAT0x200
SET_AMP_GAIN_MUTE0x300
SET_PROC_COEF0x400
SET_COEF_INDEX0x500
SET_CONNECT_SEL0x701
SET_PROC_STATE0x703
SET_SDI_SELECT0x704
SET_POWER_STATE0x705
SET_CHANNEL_STREAMID0x706
SET_PIN_WIDGET_CONTROL0x707
SET_UNSOLICITED_ENABLE0x708
SET_PIN_SENSE0x709
SET_BEEP_CONTROL0x70a
SET_EAPD_BTLENABLE0x70c
SET_DIGI_CONVERT_10x70d
SET_DIGI_CONVERT_20x70e
SET_VOLUME_KNOB_CONTROL0x70f
SET_GPIO_DATA0x715
SET_GPIO_MASK0x716
SET_GPIO_DIRECTION0x717
SET_GPIO_WAKE_MASK0x718
SET_GPIO_UNSOLICITED_RSP_MASK0x719
SET_GPIO_STICKY_MASK0x71a
SET_CONFIG_DEFAULT_BYTES_00x71c
SET_CONFIG_DEFAULT_BYTES_10x71d
SET_CONFIG_DEFAULT_BYTES_20x71e
SET_CONFIG_DEFAULT_BYTES_30x71f
SET_CODEC_RESET0x7ff

已知参数:

参数数值
VENDOR_ID0x00
SUBSYSTEM_ID0x01
REV_ID0x02
NODE_COUNT0x04
FUNCTION_TYPE0x05
AUDIO_FG_CAP0x08
AUDIO_WIDGET_CAP0x09
PCM0x0a
STREAM0x0b
PIN_CAP0x0c
AMP_IN_CAP0x0d
CONNLIST_LEN0x0e
POWER_STATE0x0f
PROC_CAP0x10
GPIO_CAP0x11
AMP_OUT_CAP0x12
VOL_KNB_CAP0x13

例子:

设置节点0x19参数为SET_PIN_WIDGET_CONTROL,值为0x24

1
2
3
4
$ hda-verb 0x19 SET_PIN_WIDGET_CONTROL 0x24

nid = 0x19, verb = 0x707, param = 0x24
command 0x01970724 --> result = 0x00000000

也可以写成:

1
2
3
4
$ hda-verb 0x19 0x707 0x24

nid = 0x19, verb = 0x707, param = 0x24
command 0x01970724 --> result = 0x00000000

CodecCommander经常使用的命令:

1
2
$ hda-verb 0x19 SET_PIN_WIDGET_CONTROL 0x25
$ hda-verb 0x21 SET_UNSOLICITED_ENABLE 0x83

备注:

字符串不区分大小写
此外,它不一定是完整的字符串,但只能是唯一的
例如 parPARAMETER的参数是相同的
set_a就足以代替SET_AMP_GAIN_MUTE

关于打赏

您的支持就是我更新的动力!
如果不希望看到博主停更的话,请点击下方的 打赏 支持一下,有钱的捧个钱场,没钱的捧个人场,谢谢大家!

黑果小兵 wechat
微信扫一扫,订阅/直达【黑果小兵的部落阁】
更新日期更新日期2020-09-122020-09-12
-------------本文结束感谢您的阅读-------------
如果文章对您有帮助,就请站长喝杯咖啡吧 ´◡`
0%