The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
To: Bard Liao <yung-chuan.liao@linux.intel.com>,
	linux-sound@vger.kernel.org, vkoul@kernel.org
Cc: vinod.koul@linaro.org, linux-kernel@vger.kernel.org,
	peter.ujfalusi@linux.intel.com, bard.liao@intel.com
Subject: Re: [PATCH] soundwire: dmi-quirks: add a global ghost list
Date: Fri, 3 Jul 2026 11:32:08 +0200	[thread overview]
Message-ID: <69f7ae58-c8ee-4f13-aa7a-139eacb92fcb@linux.dev> (raw)
In-Reply-To: <20260703011656.2572959-1-yung-chuan.liao@linux.intel.com>

On 7/3/26 03:16, Bard Liao wrote:
> Not like other ghost devices, the 0x000000D010010500 ADR doesn't belong
> to any codec. We should disable it in all devices.

for the record the address is remapped to a zero value which is ignored by the existing core logic.

> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>

> ---
>  drivers/soundwire/dmi-quirks.c | 21 ++++++++++++++++++++-
>  1 file changed, 20 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/soundwire/dmi-quirks.c b/drivers/soundwire/dmi-quirks.c
> index 2a98fc8c104d..62cee6e2179d 100644
> --- a/drivers/soundwire/dmi-quirks.c
> +++ b/drivers/soundwire/dmi-quirks.c
> @@ -15,6 +15,14 @@ struct adr_remap {
>  	u64 remapped_adr;
>  };
>  
> +static const struct adr_remap global_ghost_adr[] = {
> +	{
> +		0x000000D010010500ull,
> +		0x0000000000000000ull
> +	},
> +	{}
> +};
> +
>  /*
>   * Some TigerLake devices based on an initial Intel BIOS do not expose
>   * the correct _ADR in the DSDT.
> @@ -212,6 +220,7 @@ static const struct dmi_system_id adr_remap_quirk_table[] = {
>  u64 sdw_dmi_override_adr(struct sdw_bus *bus, u64 addr)
>  {
>  	const struct dmi_system_id *dmi_id;
> +	int i;
>  
>  	/* check if any address remap quirk applies */
>  	dmi_id = dmi_first_match(adr_remap_quirk_table);
> @@ -223,10 +232,20 @@ u64 sdw_dmi_override_adr(struct sdw_bus *bus, u64 addr)
>  				dev_dbg(bus->dev, "remapped _ADR 0x%llx as 0x%llx\n",
>  					addr, map->remapped_adr);
>  				addr = map->remapped_adr;
> -				break;
> +				goto out;
>  			}
>  		}
>  	}
>  
> +	/* remap the ghost ADRs */
> +	for (i = 0; i < ARRAY_SIZE(global_ghost_adr); i++) {
> +		if (global_ghost_adr[i].adr == addr) {
> +			dev_dbg(bus->dev, "remapped _ADR 0x%llx as 0x%llx\n",
> +				addr, global_ghost_adr[i].remapped_adr);
> +			addr = global_ghost_adr[i].remapped_adr;
> +			break;
> +		}
> +	}
> +out:
>  	return addr;
>  }


      reply	other threads:[~2026-07-03  9:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-03  1:16 [PATCH] soundwire: dmi-quirks: add a global ghost list Bard Liao
2026-07-03  9:32 ` Pierre-Louis Bossart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=69f7ae58-c8ee-4f13-aa7a-139eacb92fcb@linux.dev \
    --to=pierre-louis.bossart@linux.dev \
    --cc=bard.liao@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=vinod.koul@linaro.org \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox