aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/sound/alsa/HD-Audio.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/sound/alsa/HD-Audio.txt')
-rw-r--r--Documentation/sound/alsa/HD-Audio.txt55
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
447three numbers indicating the codec vendor-id (0x12345678 in the 447three numbers indicating the codec vendor-id (0x12345678 in the
448example), the codec subsystem-id (0xabcd1234) and the address (2) of 448example), the codec subsystem-id (0xabcd1234) and the address (2) of
449the codec. The rest patch entries are applied to this specified codec 449the codec. The rest patch entries are applied to this specified codec
450until another codec entry is given. 450until another codec entry is given. Passing 0 or a negative number to
451the first or the second value will make the check of the corresponding
452field be skipped. It'll be useful for really broken devices that don't
453initialize SSID properly.
451 454
452The `[model]` line allows to change the model name of the each codec. 455The `[model]` line allows to change the model name of the each codec.
453In the example above, it will be changed to model=auto. 456In 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.
491The hd-audio driver reads the file via request_firmware(). Thus, 494The hd-audio driver reads the file via request_firmware(). Thus,
492a patch file has to be located on the appropriate firmware path, 495a patch file has to be located on the appropriate firmware path,
493typically, /lib/firmware. For example, when you pass the option 496typically, /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
495present. 498present.
496 499
497The patch module option is specific to each card instance, and you 500The 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
524check the current value. If it's non-zero, the feature is turned on. 527check the current value. If it's non-zero, the feature is turned on.
525 528
526 529
530Tracepoints
531~~~~~~~~~~~
532The hd-audio driver gives a few basic tracepoints.
533`hda:hda_send_cmd` traces each CORB write while `hda:hda_get_response`
534traces 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
538via power-saving behavior.
539
540Enabling all tracepoints can be done like
541------------------------------------------------------------------------
542 # echo 1 > /sys/kernel/debug/tracing/events/hda/enable
543------------------------------------------------------------------------
544then after some commands, you can traces from
545/sys/kernel/debug/tracing/trace file. For example, when you want to
546trace 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------------------------------------------------------------------------
562Here `[0:0]` indicates the card number and the codec address, and
563`val` shows the value sent to the codec, respectively. The value is
564a packed value, and you can decode it via hda-decode-verb program
565included in hda-emu package below. For example, the value e3a019 is
566to 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
527Development Tree 578Development Tree
528~~~~~~~~~~~~~~~~ 579~~~~~~~~~~~~~~~~
529The latest development codes for HD-audio are found on sound git tree: 580The latest development codes for HD-audio are found on sound git tree: