Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp675116pxb; Wed, 6 Oct 2021 12:59:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeDnCQWC2JaPWapuEuPWu58MmXWosqF4Nco7Vjpo9KP5A55jJ7Vw4XPl0y4XOXvuSqnBm4 X-Received: by 2002:a17:90b:17d0:: with SMTP id me16mr749419pjb.152.1633550391272; Wed, 06 Oct 2021 12:59:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633550391; cv=none; d=google.com; s=arc-20160816; b=A+oEU88FwNMn+LsL3/1eIZMtyyzHCg0BMSpwdFAhhobWi+P8HNJd9HYrObslFHKGq2 gMJZz8w26TvOKLMfPiBn/kODOa6FzjEfGYpQCSfREVPZUo4rBEWajEDmhxi+3aduwvh0 2a1jv4DrdEZ1CYZollYjjY1jLuGBVy1my07UdOT2prpRU9Ty8THgn0Ae5X6S+PLpaigY K5Yx4m3WiW2Q4wa2lJNcBfeyHTfP4rc0mdhgFMgzGagVyMjD5QCRy6WQxSp3SfFLTnE/ fGYsPUAF76N0ctv90HoBS+hyYj0aHwUWRCfMB2rGs4QVel+6bGi5BwgtBd7AIxBnKqXO curw== 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=mGWjQ6ppesawIxxawIf9TfVQlVK960C0WqV2Wbp77BQ=; b=elbJc1cntjMRvs385fl/XjWkSQpb8ZHOcZJCofP7fXLtnrz+jfnYBWSqW0IgbtElX7 xChfCbiXbkLmrqntw8z4seOftvbwdsUbamhzbCHK9Kr9lAeU85Jwlq7MVKHzZcsvbhlm WVflzzlEODHKmlaPTUClqeq0u4AugMhivT+1MuWkoOavTBAR70XFQUoo3US6qWY8iAQA 4j+b58ZsgoN/sq9KEMFcl2ufltRsE3vMWKBpXdHamdgUAr/d57WCa8cZwemrQGojFypN yakCNCB+2v5KHSA8Mg+3j7UVbDULs3XiG7V3RmZPBeDTUgv9kknp00ppb860VKq0ctRw nXsA== 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 17si12395678pgl.243.2021.10.06.12.59.35; Wed, 06 Oct 2021 12:59:51 -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 S229971AbhJFUA0 (ORCPT + 99 others); Wed, 6 Oct 2021 16:00:26 -0400 Received: from mga17.intel.com ([192.55.52.151]:46092 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229761AbhJFUA0 (ORCPT ); Wed, 6 Oct 2021 16:00:26 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10129"; a="206903327" X-IronPort-AV: E=Sophos;i="5.85,352,1624345200"; d="scan'208";a="206903327" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2021 12:58:24 -0700 X-IronPort-AV: E=Sophos;i="5.85,352,1624345200"; d="scan'208";a="439247446" 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 12:58:21 -0700 Subject: Re: [PATCH 3/3] ASoC: Intel: sof_rt5682: use id_alt to enumerate rt5682s To: Curtis Malainey Cc: Brent Lu , 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> <0482534d-46c4-5cee-25bd-8739e80a00f0@linux.intel.com> From: Pierre-Louis Bossart Message-ID: Date: Wed, 6 Oct 2021 14:58:19 -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 > I don't see an issue with still using a struct since we are using the > same list across multiple machines, but this makes me wonder if maybe > we should refactor this into another layer, having the ids at a top > structure and then the speaker matches a layer down. E.g. > > struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { > { > .drv_name = "adl_mx98373_rt5682", > .machine_quirk = snd_soc_acpi_codec_list, > .quirk_data = &adl_max98373_amp, > }, > { > .drv_name = "adl_mx98357_rt5682", > .machine_quirk = snd_soc_acpi_codec_list, > .quirk_data = &adl_max98357a_amp, > }, > { > .drv_name = "adl_mx98360_rt5682", > .machine_quirk = snd_soc_acpi_codec_list, > .quirk_data = &adl_max98360a_amp, > } > } > > struct machine_driver adl_rt5682_driver_match { > .id = { "10EC5682", "RTL5682" } > .instances = &adl_rt5682_machines > } We probably need to experiment various options, on one hand the proposal removes duplication but in a lot of cases outside of Chromebooks/rt5640 there is none, so that table rework adds an indirection with no real benefit.