Documentation/sound/hd-audio/realtek-pc-beep.rst

Source file repositories/reference/linux-study-clean/Documentation/sound/hd-audio/realtek-pc-beep.rst

File Facts

System
Linux kernel
Corpus path
Documentation/sound/hd-audio/realtek-pc-beep.rst
Extension
.rst
Size
6482 bytes
Lines
130
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

===============================
Realtek PC Beep Hidden Register
===============================

This file documents the "PC Beep Hidden Register", which is present in certain
Realtek HDA codecs and controls a muxer and pair of passthrough mixers that can
route audio between pins but aren't themselves exposed as HDA widgets. As far
as I can tell, these hidden routes are designed to allow flexible PC Beep output
for codecs that don't have mixer widgets in their output paths. Why it's easier
to hide a mixer behind an undocumented vendor register than to just expose it
as a widget, I have no idea.

Register Description
====================

The register is accessed via processing coefficient 0x36 on NID 20h. Bits not
identified below have no discernible effect on my machine, a Dell XPS 13 9350::

  MSB                           LSB
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  | |h|S|L|         | B |R|       | Known bits
  +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  |0|0|1|1|  0x7  |0|0x0|1|  0x7  | Reset value
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

1Ah input select (B): 2 bits
  When zero, expose the PC Beep line (from the internal beep generator, when
  enabled with the Set Beep Generation verb on NID 01h, or else from the
  external PCBEEP pin) on the 1Ah pin node. When nonzero, expose the headphone
  jack (or possibly Line In on some machines) input instead. If PC Beep is
  selected, the 1Ah boost control has no effect.

Amplify 1Ah loopback, left (L): 1 bit
  Amplify the left channel of 1Ah before mixing it into outputs as specified
  by h and S bits. Does not affect the level of 1Ah exposed to other widgets.

Amplify 1Ah loopback, right (R): 1 bit
  Amplify the right channel of 1Ah before mixing it into outputs as specified
  by h and S bits. Does not affect the level of 1Ah exposed to other widgets.

Loopback 1Ah to 21h [active low] (h): 1 bit
  When zero, mix 1Ah (possibly with amplification, depending on L and R bits)
  into 21h (headphone jack on my machine). Mixed signal respects the mute
  setting on 21h.

Loopback 1Ah to 14h (S): 1 bit
  When one, mix 1Ah (possibly with amplification, depending on L and R bits)
  into 14h (internal speaker on my machine). Mixed signal **ignores** the mute
  setting on 14h and is present whenever 14h is configured as an output.

Path diagrams
=============

1Ah input selection (DIV is the PC Beep divider set on NID 01h)::

  <Beep generator>   <PCBEEP pin>    <Headphone jack>
          |                |                |
          +--DIV--+--!DIV--+       {1Ah boost control}
                  |                         |
                  +--(b == 0)--+--(b != 0)--+
                               |
               >1Ah (Beep/Headphone Mic/Line In)<

Loopback of 1Ah to 21h/14h::

               <1Ah (Beep/Headphone Mic/Line In)>
                               |
                        {amplify if L/R}
                               |
                  +-----!h-----+-----S-----+

Annotation

Implementation Notes