Skip to content

[Deepin-Kernel-SIG] [linux 6.18-y] [Deepin] ALSA: hda: Add FTHD0001 match for Phytium#1565

Merged
opsiff merged 1 commit intodeepin-community:linux-6.18.yfrom
opsiff:linux-6.18.y-2026-03-13-ft
Mar 16, 2026
Merged

[Deepin-Kernel-SIG] [linux 6.18-y] [Deepin] ALSA: hda: Add FTHD0001 match for Phytium#1565
opsiff merged 1 commit intodeepin-community:linux-6.18.yfrom
opsiff:linux-6.18.y-2026-03-13-ft

Conversation

@opsiff
Copy link
Member

@opsiff opsiff commented Mar 16, 2026

Some Phytium ALSA HDA devices declare their ID as FTHD0001 instead of PHYT0006 (following Phytium's deprecated older ACPI specification).

Add the old ID to the ACPI match list so that the audio driver for these devices can be loaded correctly.

Similar to ("ALSA: hda: Resolving the issue of the ALC662 sound card failing to load.") in openKylin tree.

Link: https://gitee.com/openkylin/linux/commit/6ad24efc4daecb54c99e31862d3cc0220e5d8a72
Codeveloped-by: wangdicheng wangdicheng@kylinos.cn

(cherry picked from commit 555481f)

Summary by Sourcery

Bug Fixes:

  • Allow Phytium HDA audio devices advertising the deprecated FTHD0001 ACPI ID to be recognized and handled by the existing ALSA HDA Phytium driver.

Some Phytium ALSA HDA devices declare their ID as FTHD0001 instead
of PHYT0006 (following Phytium's deprecated older ACPI specification).

Add the old ID to the ACPI match list so that the audio driver for
these devices can be loaded correctly.

Similar to ("ALSA: hda: Resolving the issue of the ALC662 sound card
failing to load.") in openKylin tree.

Link: https://gitee.com/openkylin/linux/commit/6ad24efc4daecb54c99e31862d3cc0220e5d8a72
Codeveloped-by: wangdicheng <wangdicheng@kylinos.cn>
Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>
Signed-off-by: WangYuli <wangyuli@uniontech.com>
(cherry picked from commit 555481f)
@sourcery-ai
Copy link

sourcery-ai bot commented Mar 16, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds support for an additional legacy ACPI ID (FTHD0001) for Phytium HDA controllers so the ALSA HDA driver correctly binds to devices using the older identifier.

Sequence diagram for ACPI HDA device matching with legacy FTHD0001 ID

sequenceDiagram
    actor Firmware
    participant ACPI
    participant Kernel_PCI_subsystem
    participant ACPI_bus
    participant snd_hda_phytium_driver

    Firmware->>ACPI: Expose HDA controller with HID PHYT0006 or FTHD0001
    Kernel_PCI_subsystem->>ACPI_bus: Enumerate ACPI devices
    ACPI_bus->>ACPI_bus: Compare HID against hda_ft_acpi_match

    alt HID is PHYT0006 or FTHD0001
        ACPI_bus->>snd_hda_phytium_driver: Bind and call probe
        snd_hda_phytium_driver-->>ACPI_bus: Initialize HDA controller
    else HID does not match
        ACPI_bus-->>Firmware: HDA controller remains without driver
    end
Loading

Flow diagram for Phytium HDA ACPI ID resolution including FTHD0001

flowchart LR
    A[ACPI firmware exposes Phytium HDA controller] --> B{ACPI HID value}
    B -->|PHYT0006| C[Match entry PHYT0006 in hda_ft_acpi_match]
    B -->|FTHD0001| D[Match new entry FTHD0001 in hda_ft_acpi_match]
    B -->|Other ID| F[No match in hda_ft_acpi_match]

    C --> E[Bind Phytium HDA driver]
    D --> E
    F --> G[HDA driver not loaded]
Loading

File-Level Changes

Change Details Files
Extend Phytium HDA ACPI device match table to include the legacy FTHD0001 ID so audio is initialized on devices using the older ACPI spec.
  • Add a new entry with .id = "FTHD0001" to the hda_ft_acpi_match ACPI device ID table
  • Keep existing PHYT0006 entry as-is and preserve table termination
sound/hda/controllers/phytium.c

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from opsiff. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Avenger-285714
Copy link
Member

/approve

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves compatibility for Phytium HDA audio on ACPI-based systems by adding support for an older, deprecated ACPI hardware ID so the existing Phytium ALSA HDA controller driver can bind correctly.

Changes:

  • Add FTHD0001 to the Phytium HDA ACPI match table alongside the existing PHYT0006 entry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@opsiff opsiff merged commit 405f8cd into deepin-community:linux-6.18.y Mar 16, 2026
9 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants