Skip to content

[BUG] Soundwire Regression introduced for WARN ON check for codec conf #5620

@vijendarmukunda

Description

@vijendarmukunda

Hello,

We are testing on our CRB connecting TI codecs(4 AMPS) on SW0 instance & RT712-VB codec is connected on SW1 instance.
Using recent kernel version V6.18-rc7 version, we hit with WARN_ON codec check for codec conf as mentioned below.
'WARN_ON(codec_conf != card->codec_conf + card->num_configs);'

Further checking dmesg logs, we got below findings.

It appears that the RT712 SDCA advertises multiple functions: UAJ type 0, SmartMic type 2, and HID type 10. The legacy AMD SoundWire machine driver explicitly skips DAI type 1 for SDCA devices.

According to the dmesg logs, we observe that two RT712 endpoints are retained while one is skipped and four TAS2783 smart-amps being present. This leads to a total of six actual codec_conf entries, whereas we initially expected seven based on the endpoints. Consequently, the post-build pointer check triggers the WARN_ON for codec_conf mismatch.

As per our analysis, below patch is missing the case where endpoint doesn't exist in the DisCo table

https://lore.kernel.org/all/20251127163426.2500633-4-ckeepax@opensource.cirrus.com/

Fail_logs_RTK_1112.txt

As per @shumingfan , this issue is reproducible on Intel platforms too.

@charleskeepax : Could you please help to comment?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions