Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1436964pxx; Fri, 30 Oct 2020 09:56:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPlL+LVS3IC9tSzVVCLZ3ry8DYYOjiEGQ2hT708xp6NnUA7HxHfrQ+WWooqNrFXsY5Qlr3 X-Received: by 2002:a50:f0d4:: with SMTP id a20mr3473945edm.303.1604076983361; Fri, 30 Oct 2020 09:56:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604076983; cv=none; d=google.com; s=arc-20160816; b=ItjqT2xQf/M7VhFTHRpGdV2PwgVLbMAugZrfDn3MBwDhv7uxhL8ecrhNBuDSTgWpHr HFdRKoYaq5+xW37yTj6zJmlf8GEBll/WVLdEAmqOQKfbKi8zfxsjX5nVT3F1SkQVoF/q w508V8+zVNTN2nOyZf7JNmnOu8UKAQ4qCPglEOiq+TBNLu7AOOajI1SCB0886TbEXmCo R6aNezTt5Le45Csz54QlbUm4KLfhB+6tyJhvDUoSm3YXtPU/X18NIHqwC+bOy145HTEo IC/kkL+DyZ1zpu2ZcwSSliN9xup6lHKXgITveltw/3zRCYvmNqn0Mo6S5nU/fI9IJlK4 DK4g== 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:ironport-sdr:ironport-sdr; bh=4br3voKItR0DXTWKgFr7OMYQU7xq0u9mIW1EeO3iM8Q=; b=yLnIwQnS7Cck/XvG6+zOdOqEgm4O6OsxurCbaoyAuFpUNtjT/6gv+0A7EsJ809PuN8 to4UgSG7qAevBqtAhNzhbo35LRkgHMEI1I2ygyB5s2y+BsSCgqVSsseTENjA9E8jgnlK oIE+V9mLe0OgiRnloRyozuNgVtamSKc7HsXhdWhAXgXV/V0OZkDoGHd9F0Z9fh1ZcOgt u3VsYSwHznn/ZuRT/E9d2xK9BYjONhoUepmOFeGqO76wU80lv5Aut66rNVo1x5P18PiJ T40VD8toQCHgIz1gKBJs/IXEnAd6lbnw4hB+pGGnVlTQlP5F8MjRCnecns3V2W37Lc3Y 6KsQ== 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 g17si5806183ejr.134.2020.10.30.09.56.00; Fri, 30 Oct 2020 09:56:23 -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 S1726482AbgJ3Qyg (ORCPT + 99 others); Fri, 30 Oct 2020 12:54:36 -0400 Received: from mga05.intel.com ([192.55.52.43]:9998 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726058AbgJ3Qyg (ORCPT ); Fri, 30 Oct 2020 12:54:36 -0400 IronPort-SDR: nGyGXZK18pW6S2W6un9df1JturJ9PoFNlHIbOnKZ6/kHGlXCjJXVGc61TzYysTL1JTJ8H/30ny VScsMeqsELuA== X-IronPort-AV: E=McAfee;i="6000,8403,9790"; a="253342504" X-IronPort-AV: E=Sophos;i="5.77,434,1596524400"; d="scan'208";a="253342504" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2020 09:54:36 -0700 IronPort-SDR: PLekFtLEEY6YTiYO9pHHlQ2RtiqVwr2QLS6Dk/6e85wc5VXor0qhwFoEcmpxbknRBx5PX/4SMx bENMMqlCIQ5w== X-IronPort-AV: E=Sophos;i="5.77,434,1596524400"; d="scan'208";a="469577604" Received: from rdchavez-mobl2.amr.corp.intel.com (HELO [10.212.91.180]) ([10.212.91.180]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2020 09:54:34 -0700 Subject: Re: [PATCH 2/2] ASoC: intel: sof_rt5682: Add quirk for Dooly To: "Lu, Brent" , "alsa-devel@alsa-project.org" Cc: Guennadi Liakhovetski , "Rojewski, Cezary" , Kuninori Morimoto , Kai Vehmanen , Jason Yan , "linux-kernel@vger.kernel.org" , Takashi Iwai , Jie Yang , Liam Girdwood , Mark Brown , "Nujella, Sathyanarayana" , Fred Oh , "Wang, Rander" , Bard Liao , "Zhi, Yong" References: <20201030063654.25877-1-brent.lu@intel.com> <20201030063654.25877-3-brent.lu@intel.com> From: Pierre-Louis Bossart Message-ID: <95b8d2f7-3b8d-ee61-c99f-a62fce165618@linux.intel.com> Date: Fri, 30 Oct 2020 11:54:33 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/30/20 11:44 AM, Lu, Brent wrote: > , Brent Lu wrote: >>> This DMI product family string of this board is "Google_Hatch" so the >>> DMI quirk will take place. However, this board is using rt1015 speaker >>> amp instead of max98357a specified in the quirk. Therefore, we need an >>> new DMI quirk for this board. >> >> Do you actually need a DMI quirk for this platform? >> >> the .driver_data below uses the exact same settings as what you would use >> with the generic solution based on ACPI IDs, see below. >> >> Wondering if patch1 would be enough? >> > > Dooly has DMI family string " Google_Hatch" so the DMI quirk will overwrite the > driver_data. I asked google but they prefer not removing this string so it seems to > me that one extra DMI quirk is needed. I find this pretty funny. The PRODUCT_FAMILY was added to reduce the number of quirks, but of course there's a variant that has nothing to do with this 'FAMILY'. You should add a comment on this, to make sure this information remains in the code and we don't lose it during code cleanups. > > { > .callback = sof_rt5682_quirk_cb, > .matches = { > DMI_MATCH(DMI_PRODUCT_FAMILY, "Google_Hatch"), > }, > .driver_data = (void *)(SOF_RT5682_MCLK_EN | > SOF_RT5682_MCLK_24MHZ | > SOF_RT5682_SSP_CODEC(0) | > SOF_SPEAKER_AMP_PRESENT | > SOF_RT5682_SSP_AMP(1)), > }, > > The other way is using acpi_dev_present() in probe to update the quirk with correct > codec setting. Which one do you think is better? The DMI quirk you added is probably better for now, I don't know if the odds of getting things right with acpi_dev_present() are that high or if we are going to get even more variants on top of this variant (e.g. tweeter/booster cases...). If we get too many quirks we'll see later if we can simplify. So if you don't mind adding a comment on the 'Dooly' quirk in a v3 that series is good to go. Thank you!