[pulseaudio-tickets] [Bug 68286] Support toggling speaker and headphone port output, whilst keeping headphones plugged in

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Oct 15 18:13:52 PDT 2013


https://bugs.freedesktop.org/show_bug.cgi?id=68286

--- Comment #7 from Raymond <superquad.vortex2 at gmail.com> ---
how did you add the hint ?

use early patching 

or

hda_generic.c


int snd_hda_gen_parse_auto_config(struct hda_codec *codec,
                  struct auto_pin_cfg *cfg)
{
    struct hda_gen_spec *spec = codec->spec;
    int err;
+
+       /* for HDA codecs support 7.1+2  */
+       if ((cfg->line_outs == 4) && (cfg->hp_outs == 1))
+             spec->indep_hp = 1;

    parse_user_hints(codec);




http://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/plain/Documentation/sound/alsa/HD-Audio.txt



Early Patching
~~~~~~~~~~~~~~
When CONFIG_SND_HDA_PATCH_LOADER=y is set, you can pass a "patch" as a
firmware file for modifying the HD-audio setup before initializing the
codec.  This can work basically like the reconfiguration via sysfs in
the above, but it does it before the first codec configuration.

A patch file is a plain text file which looks like below:

------------------------------------------------------------------------
  [codec]
  0x12345678 0xabcd1234 2

  [model]
  auto

  [hint]
  indep_hp = true
------------------------------------------------------------------------

The file needs to have a line `[codec]`.  The next line should contain
three numbers indicating the codec vendor-id (0x12345678 in the
example), the codec subsystem-id (0xabcd1234) and the address (2) of
the codec.  The rest patch entries are applied to this specified codec
until another codec entry is given.  Passing 0 or a negative number to
the first or the second value will make the check of the corresponding
field be skipped.  It'll be useful for really broken devices that don't
initialize SSID properly.

The `[model]` line allows to change the model name of the each codec.
In the example above, it will be changed to model=auto.
Note that this overrides the module option.


The hd-audio driver reads the file via request_firmware().  Thus,
a patch file has to be located on the appropriate firmware path,
typically, /lib/firmware.  For example, when you pass the option
`patch=hda-init.fw`, the file /lib/firmware/hda-init.fw must be
present.

The patch module option is specific to each card instance, and you
need to give one file name for each instance, separated by commas.
For example, if you have two cards, one for an on-board analog and one 
for an HDMI video board, you may pass patch option like below:
------------------------------------------------------------------------
    options snd-hda-intel patch=on-board-patch,hdmi-patch
------------------------------------------------------------------------

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20131016/7e3806c3/attachment.html>


More information about the pulseaudio-bugs mailing list