Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp620042pxb; Wed, 6 Oct 2021 11:44:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsMkiOlLxiweWYkoa4EX3PvibTHeuoiBwp7JY5zDCrlakRU12T/6K03eB0XPdeFhU6DHxO X-Received: by 2002:a17:90b:d91:: with SMTP id bg17mr380769pjb.114.1633545886584; Wed, 06 Oct 2021 11:44:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633545886; cv=none; d=google.com; s=arc-20160816; b=f0dLJqN6Pzn0tqOpN+e6SB+eCDLYSXyXTCcjPISBGlDj1/5SluXVoZiHtTEy7c9rJO SU6zeEfBPWy2amXPUDS4wjNwQT4W4Y2LwKxtcZaqgeDqvq6kuUQ9QC2RiqRnHfcOu/or PdoX8K23h6phvS5aAAJSMSESjE7Ydkzt9IBVqM4Y7d+edpiVd6f/mbdVZOmT/UnzEGp8 MAuieHlYDFWMVmQvcaMPhEfNirmkiz8SLMM7FbuK8DWFukWFJKbIa8Y2emkR+nHcRW08 i6XDSWTgYmMIp6pHtxCmjhsk6dvaoPbAtOLYq1p4vv8IZmXsrdwJubk95AIAUM/JYfM6 XKAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=uf3XJCDHANDHlcbxl2YlTJ9gdW1GhkHdnEPgwz2UviA=; b=fcs2Az+nhQdYm1vbcFgO0+q2iS2HW32RfOlLppPdbU5NBSncyWGfpg5eFg55XkUT4f 4maOzs0CKBTRlDAFzNpYkfDo+XV2gvSoVJWKbecIoTyoy/ZF9Vo965hylv4Ohh+wlr62 KTnfXWIRlFlfFukzxBYlvd1Ez080awQU36JxCIYCBNk4yEqAb70MN37fapJwSxXjqbJI ZQJsK0AaQYKRZ4CY+qQDz3vIu2/3ZZzDMFRRSMMGEAPFgVlKTdZlVUCPqvbz+W8SlkM5 IepQTVIA+pxG/CzDuKEqRBO96E9M23+kbRKxxGVJyZGtrE9fSeuS91Wo2tlZQQ/5waq9 vBHA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c24si7957122pgb.283.2021.10.06.11.44.33; Wed, 06 Oct 2021 11:44:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238458AbhJFSpG (ORCPT + 99 others); Wed, 6 Oct 2021 14:45:06 -0400 Received: from mga03.intel.com ([134.134.136.65]:21358 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229564AbhJFSpF (ORCPT ); Wed, 6 Oct 2021 14:45:05 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10129"; a="226025792" X-IronPort-AV: E=Sophos;i="5.85,352,1624345200"; d="scan'208";a="226025792" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2021 11:43:12 -0700 X-IronPort-AV: E=Sophos;i="5.85,352,1624345200"; d="scan'208";a="439225258" Received: from nbasa-mobl2.amr.corp.intel.com (HELO [10.213.170.135]) ([10.213.170.135]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2021 11:43:10 -0700 Subject: Re: [PATCH 3/3] ASoC: Intel: sof_rt5682: use id_alt to enumerate rt5682s To: Curtis Malainey , Brent Lu Cc: ALSA development , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Cezary Rojewski , Jie Yang , Kai Vehmanen , Guennadi Liakhovetski , Yong Zhi , Vamshi Krishna Gopal , Linux Kernel Mailing List , Rander Wang , Bard Liao , Malik_Hsu , Libin Yang , Hans de Goede , Charles Keepax , Paul Olaru , Curtis Malainey , Mac Chiang , Gongjun Song References: <20211006161805.938950-1-brent.lu@intel.com> <20211006161805.938950-4-brent.lu@intel.com> From: Pierre-Louis Bossart Message-ID: <0482534d-46c4-5cee-25bd-8739e80a00f0@linux.intel.com> Date: Wed, 6 Oct 2021 13:43:07 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/6/21 1:34 PM, Curtis Malainey wrote: >> }; >> >> +static struct snd_soc_acpi_codecs adl_rt5682s_hp = { >> + .num_codecs = 1, >> + .codecs = {"RTL5682"} >> +}; >> + >> struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { >> { >> .id = "10EC5682", >> + .id_alt = &adl_rt5682s_hp, >> .drv_name = "adl_mx98373_rt5682", >> .machine_quirk = snd_soc_acpi_codec_list, >> .quirk_data = &adl_max98373_amp, >> @@ -296,6 +302,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { >> }, >> { >> .id = "10EC5682", >> + .id_alt = &adl_rt5682s_hp, >> .drv_name = "adl_mx98357_rt5682", >> .machine_quirk = snd_soc_acpi_codec_list, >> .quirk_data = &adl_max98357a_amp, >> @@ -304,6 +311,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { >> }, >> { >> .id = "10EC5682", >> + .id_alt = &adl_rt5682s_hp, >> .drv_name = "adl_mx98360_rt5682", >> .machine_quirk = snd_soc_acpi_codec_list, >> .quirk_data = &adl_max98360a_amp, > > Is there any way we can collapse this and the primary id into a single > list to avoid having 2 locations to track for the IDs? I was thinking about that too, but in that case we would want to have a list of strings, rather than the address of a structure which adds one layer of indirection. Something like .id = { "10EC5682", "RTL5682" } and the .num_codecs removed and some termination added.