02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

07 Mar, 2016

1 commit


11 Jun, 2015

1 commit

  • The new HDA controllers from Intel support new capabilities like
    multilink, pipe processing, SPIB, GTS etc In order to use them we
    create an extended HDA bus which embed the hdac bus and contains the
    fields for extended configurations

    Signed-off-by: Jeeja KP
    Signed-off-by: Vinod Koul
    Signed-off-by: Takashi Iwai

    Jeeja KP
     

20 May, 2015

1 commit

  • The file is moved to hda core and renamed to hdac_i915.c, so can be used
    by both legacy HDA driver and new Skylake audio driver.

    - Add snd_hdac_ prefix to the public APIs.
    - The i915 audio component is moved to core bus and dynamically allocated.
    - A static pointer hdac_acomp is used to help bind/unbind callbacks to get
    this component, because the sound card's private_data is used by the azx
    chip pointer, which is a legacy structure. It could be removed if private
    _data changes to some core structure which can be extended to find the
    bus.
    - snd_hdac_get_display_clk() is added to get the display core clock for
    HSW/BDW.
    - haswell_set_bclk() is moved to hda_intel.c because it needs to write the
    controller registers EM4/EM5, and only legacy HD-A needs it for HSW/BDW.
    - Move definition of HSW/BDW-specific registers EM4/EM5 to hda_register.h
    and rename them to HSW_EM4/HSW_EM5, because other HD-A controllers have
    different layout for the extended mode registers.

    Signed-off-by: Mengdong Lin
    Signed-off-by: Takashi Iwai

    Mengdong Lin
     

16 Apr, 2015

1 commit

  • This patch adds the controller helper codes to hda-core library.
    The I/O access ops are added to the bus ops. The CORB/RIRB, the basic
    attributes like irq# and iomap address, some locks and the list of
    streams are added to the bus object, together with the stream object
    and its helpers.

    Currently the codes are just copied from the legacy driver, so you can
    find duplicated codes in both directories. Only constants are removed
    from the original hda_controller.h. More integration work will follow
    in the later patches.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

23 Mar, 2015

7 commits

  • This patch adds an infrastructure to support regmap-based verb
    accesses. Because o the asymmetric nature of HD-audio verbs,
    especially the amp verbs, we need to translate the verbs as a sort of
    pseudo registers to be mapped uniquely in regmap.

    In this patch, a pseudo register is built from the NID, the
    AC_VERB_GET_* and 8bit parameters, i.e. almost in the form to be sent
    to HD-audio bus but without codec address field. OTOH, for writing,
    the same pseudo register is translated to AC_VERB_SET_* automatically.
    The AC_VERB_SET_AMP_* verb is re-encoded from the corresponding
    AC_VERB_GET_AMP_* verb and parameter at writing.

    Some verbs has a single command for read but multiple for writes. A
    write for such a verb is split automatically to multiple verbs.

    The patch provides also a few handy helper functions. They are
    designed to be accessible even without regmap. When no regmap is set
    up (e.g. before the codec device instantiation), the direct hardware
    access is used. Also, it tries to avoid the unnecessary power-up.
    The power up/down sequence is performed only on demand.

    The codec driver needs to call snd_hdac_regmap_exit() and
    snd_hdac_regmap_exit() at probe and remove if it wants the regmap
    access.

    There is one flag added to hdac_device. When the flag lazy_cache is
    set, regmap helper ignores a write for a suspended device and returns
    as if it was actually written. It reduces the hardware access pretty
    much, e.g. when adjusting the mixer volume while in idle. This
    assumes that the driver will sync the cache later at resume properly,
    so use it carefully.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • This will be used by the regmap support.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Now let's take the basic tracepoints back to the HD-audio driver.
    The three bus tracepoints, hda_send_cmd, hda_get_response and
    hda_unsol_event are revived but in a slightly different form.
    Since we don't assign the card number there, print the bus device name
    instead.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • This patch changes the sysfs files assigned to the codec device on the
    bus which were formerly identical with hwdep sysfs files. Now it
    shows only a few core parameter, vendor_id, subsystem_id, revision_id,
    afg, mfg, vendor_name and chip_name.

    In addition, now a widget tree is added to the bus device sysfs
    directory for showing the widget topology and attributes. It's just a
    flat tree consisting of subdirectories named as the widget NID
    including various attributes like widget capability bits. The AFG
    (usually NID 0x01) is always found there, and it contains always
    amp_in_caps, amp_out_caps and power_caps files. Each of these
    attributes show a single value. The rest are the widget nodes
    belonging to that AFG. Note that the child node might not start from
    0x02 but from another value like 0x0a.

    Each child node may contain caps, pin_caps, amp_in_caps, amp_out_caps,
    power_caps and connections files. The caps (representing the widget
    capability bits) always contain a value. The rest may contain
    value(s) if the attribute exists on the node. Only connections file
    show multiple values while other attributes have zero or one single
    value.

    An example of ls -R output is like below:
    % ls -R /sys/bus/hdaudio/devices/hdaudioC0D0/
    /sys/bus/hdaudio/devices/hdaudioC0D0/widgets/:
    01/ 04/ 07/ 0a/ 0d/ 10/ 13/ 16/ 19/ 1c/ 1f/ 22/
    02/ 05/ 08/ 0b/ 0e/ 11/ 14/ 17/ 1a/ 1d/ 20/ 23/
    03/ 06/ 09/ 0c/ 0f/ 12/ 15/ 18/ 1b/ 1e/ 21/

    /sys/bus/hdaudio/devices/hdaudioC0D0/widgets/01:
    amp_in_caps amp_out_caps power_caps

    /sys/bus/hdaudio/devices/hdaudioC0D0/widgets/02:
    amp_in_caps amp_out_caps caps connections pin_caps pin_cfg
    power_caps

    /sys/bus/hdaudio/devices/hdaudioC0D0/widgets/03:
    .....

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Now some codes and functionalities of hda_codec struct are moved to
    hdac_device struct. A few basic attributes like the codec address,
    vendor ID number, FG numbers, etc are moved to hdac_device, and they
    are accessed like codec->core.addr. The basic verb exec functions are
    moved, too.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • A few basic codes for communicating over HD-audio bus are moved to
    struct hdac_bus now. It has only command and get_response ops in
    addition to the unsolicited event handling.

    Note that the codec-side tracing support is disabled temporarily
    during this transition due to the code shuffling. It will be
    re-enabled later once when all pieces are settled down.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Define the common hd-audio driver and device types to bind over
    snd_hda_bus_type publicly. This allows to implement other type of
    device and driver code over hd-audio bus.

    Now both struct hda_codec and struct hda_codec_driver inherit these
    new struct hdac_device and struct hdac_driver, respectively.

    The bus registration is done in subsys_initcall() to assure it
    before any other driver registrations.

    Signed-off-by: Takashi Iwai

    Takashi Iwai