diff options
Diffstat (limited to 'Documentation/sound/alsa/HD-Audio.txt')
-rw-r--r-- | Documentation/sound/alsa/HD-Audio.txt | 55 |
1 files changed, 53 insertions, 2 deletions
diff --git a/Documentation/sound/alsa/HD-Audio.txt b/Documentation/sound/alsa/HD-Audio.txt index c82beb007634..03e2771ddeef 100644 --- a/Documentation/sound/alsa/HD-Audio.txt +++ b/Documentation/sound/alsa/HD-Audio.txt | |||
@@ -447,7 +447,10 @@ The file needs to have a line `[codec]`. The next line should contain | |||
447 | three numbers indicating the codec vendor-id (0x12345678 in the | 447 | three numbers indicating the codec vendor-id (0x12345678 in the |
448 | example), the codec subsystem-id (0xabcd1234) and the address (2) of | 448 | example), the codec subsystem-id (0xabcd1234) and the address (2) of |
449 | the codec. The rest patch entries are applied to this specified codec | 449 | the codec. The rest patch entries are applied to this specified codec |
450 | until another codec entry is given. | 450 | until another codec entry is given. Passing 0 or a negative number to |
451 | the first or the second value will make the check of the corresponding | ||
452 | field be skipped. It'll be useful for really broken devices that don't | ||
453 | initialize SSID properly. | ||
451 | 454 | ||
452 | The `[model]` line allows to change the model name of the each codec. | 455 | The `[model]` line allows to change the model name of the each codec. |
453 | In the example above, it will be changed to model=auto. | 456 | In the example above, it will be changed to model=auto. |
@@ -491,7 +494,7 @@ Also, the codec chip name can be rewritten via `[chip_name]` line. | |||
491 | The hd-audio driver reads the file via request_firmware(). Thus, | 494 | The hd-audio driver reads the file via request_firmware(). Thus, |
492 | a patch file has to be located on the appropriate firmware path, | 495 | a patch file has to be located on the appropriate firmware path, |
493 | typically, /lib/firmware. For example, when you pass the option | 496 | typically, /lib/firmware. For example, when you pass the option |
494 | `patch=hda-init.fw`, the file /lib/firmware/hda-init-fw must be | 497 | `patch=hda-init.fw`, the file /lib/firmware/hda-init.fw must be |
495 | present. | 498 | present. |
496 | 499 | ||
497 | The patch module option is specific to each card instance, and you | 500 | The patch module option is specific to each card instance, and you |
@@ -524,6 +527,54 @@ power-saving. See /sys/module/snd_hda_intel/parameters/power_save to | |||
524 | check the current value. If it's non-zero, the feature is turned on. | 527 | check the current value. If it's non-zero, the feature is turned on. |
525 | 528 | ||
526 | 529 | ||
530 | Tracepoints | ||
531 | ~~~~~~~~~~~ | ||
532 | The hd-audio driver gives a few basic tracepoints. | ||
533 | `hda:hda_send_cmd` traces each CORB write while `hda:hda_get_response` | ||
534 | traces the response from RIRB (only when read from the codec driver). | ||
535 | `hda:hda_bus_reset` traces the bus-reset due to fatal error, etc, | ||
536 | `hda:hda_unsol_event` traces the unsolicited events, and | ||
537 | `hda:hda_power_down` and `hda:hda_power_up` trace the power down/up | ||
538 | via power-saving behavior. | ||
539 | |||
540 | Enabling all tracepoints can be done like | ||
541 | ------------------------------------------------------------------------ | ||
542 | # echo 1 > /sys/kernel/debug/tracing/events/hda/enable | ||
543 | ------------------------------------------------------------------------ | ||
544 | then after some commands, you can traces from | ||
545 | /sys/kernel/debug/tracing/trace file. For example, when you want to | ||
546 | trace what codec command is sent, enable the tracepoint like: | ||
547 | ------------------------------------------------------------------------ | ||
548 | # cat /sys/kernel/debug/tracing/trace | ||
549 | # tracer: nop | ||
550 | # | ||
551 | # TASK-PID CPU# TIMESTAMP FUNCTION | ||
552 | # | | | | | | ||
553 | <...>-7807 [002] 105147.774889: hda_send_cmd: [0:0] val=e3a019 | ||
554 | <...>-7807 [002] 105147.774893: hda_send_cmd: [0:0] val=e39019 | ||
555 | <...>-7807 [002] 105147.999542: hda_send_cmd: [0:0] val=e3a01a | ||
556 | <...>-7807 [002] 105147.999543: hda_send_cmd: [0:0] val=e3901a | ||
557 | <...>-26764 [001] 349222.837143: hda_send_cmd: [0:0] val=e3a019 | ||
558 | <...>-26764 [001] 349222.837148: hda_send_cmd: [0:0] val=e39019 | ||
559 | <...>-26764 [001] 349223.058539: hda_send_cmd: [0:0] val=e3a01a | ||
560 | <...>-26764 [001] 349223.058541: hda_send_cmd: [0:0] val=e3901a | ||
561 | ------------------------------------------------------------------------ | ||
562 | Here `[0:0]` indicates the card number and the codec address, and | ||
563 | `val` shows the value sent to the codec, respectively. The value is | ||
564 | a packed value, and you can decode it via hda-decode-verb program | ||
565 | included in hda-emu package below. For example, the value e3a019 is | ||
566 | to set the left output-amp value to 25. | ||
567 | ------------------------------------------------------------------------ | ||
568 | % hda-decode-verb 0xe3a019 | ||
569 | raw value = 0x00e3a019 | ||
570 | cid = 0, nid = 0x0e, verb = 0x3a0, parm = 0x19 | ||
571 | raw value: verb = 0x3a0, parm = 0x19 | ||
572 | verbname = set_amp_gain_mute | ||
573 | amp raw val = 0xa019 | ||
574 | output, left, idx=0, mute=0, val=25 | ||
575 | ------------------------------------------------------------------------ | ||
576 | |||
577 | |||
527 | Development Tree | 578 | Development Tree |
528 | ~~~~~~~~~~~~~~~~ | 579 | ~~~~~~~~~~~~~~~~ |
529 | The latest development codes for HD-audio are found on sound git tree: | 580 | The latest development codes for HD-audio are found on sound git tree: |