Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3105728pxb; Mon, 18 Oct 2021 08:19:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIUT2BWyA4boUH+OZ5JN0WNDhp/vVj7T/hfZhaeBb1anBjIMaRUMjVylLGz6373fhlToqj X-Received: by 2002:a17:90b:4c4d:: with SMTP id np13mr48567355pjb.193.1634570385181; Mon, 18 Oct 2021 08:19:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634570385; cv=none; d=google.com; s=arc-20160816; b=NLQjYx+jSv4voQuT/+GpSX4Jzjf8qL+gGvYCuUZfa2Nzm+FHwbQaQZ/1YnmPC2bC3r fS/kAstUbJqp6ciG3cL6tfDw0uRp9FoSkVDlch/VDPfi4W7/beshnon7xqqjdrpUTuV8 Cp82QfDEdK71NCnPTXS2sJ2DJfRmasJxLUTzjofa71oGgDlTsHk5Ugn/9IWVCRm06PEM bUkzgqfe0eTEv0FCMC7twYofsK/RY6RGAZyo4HBhBeBOhcJ40V9CkycuZccNu11+Qbn8 XqyeSqMTbK2r6eL6f0RieLUYWw+q+LgeTOCLrRH64LPsGYWurHU09GLiJ1U7mtRPzc31 sNYQ== 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=9OSOUyabj6Qemxpfbu8S4rHOjA6E8nqlITMmmU6AjT0=; b=TKLX02WJ8t5x3tlXTdVpa6nmiVx1tBJyMv0R0NMGZGMSejc+tOk1xqda9lX2Z5dhN6 n/foU8Ega+yqnA1F4bXX7fS/7dI6iMzQ4ube9sgiZdJ0V5BEdc1awAKbEuRsmzonlBvZ s9R4XOlMu/48V4an+PYrKTHxQvHdpvbOVMWNrE1svCy/d0bT7NVR+YOLjqGtvZZVroH5 ZIs7hH/bK1dxXBnLIXZlKvUg7wMJKiRyN5td+j4uD98LOFfB6NRgj/FmqSFuFPRV+Dj5 WtBeFPKC8Uf2PN20wiz0JABLFvnpoJ48j8vz2Sl6P4VmZLDreto6HoEdt8Yfzk2MPxNE X/mA== 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 w13si13369109plp.74.2021.10.18.08.19.30; Mon, 18 Oct 2021 08:19:45 -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 S233233AbhJRPUK (ORCPT + 99 others); Mon, 18 Oct 2021 11:20:10 -0400 Received: from mga12.intel.com ([192.55.52.136]:57527 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232367AbhJRPUH (ORCPT ); Mon, 18 Oct 2021 11:20:07 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10141"; a="208372767" X-IronPort-AV: E=Sophos;i="5.85,382,1624345200"; d="scan'208";a="208372767" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2021 08:15:11 -0700 X-IronPort-AV: E=Sophos;i="5.85,382,1624345200"; d="scan'208";a="566102971" Received: from dsardana-mobl.amr.corp.intel.com (HELO [10.209.189.174]) ([10.209.189.174]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2021 08:15:11 -0700 Subject: Re: [PATCH] ASoC: Intel: sof_sdw: Initialize the sof_sdw_quirk with RT711_JD_NULL To: Chris Chiu Cc: Cezary Rojewski , alsa-devel@alsa-project.org, yang.jie@linux.intel.com, Takashi Iwai , Linux Kernel , liam.r.girdwood@linux.intel.com, broonie@kernel.org References: <20211015133424.494463-1-chris.chiu@canonical.com> From: Pierre-Louis Bossart Message-ID: <16370bb9-51d4-69ab-8de9-b0dc09377f1c@linux.intel.com> Date: Mon, 18 Oct 2021 10:15:08 -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/15/21 8:34 AM, Chris Chiu wrote: >>> The jd_src of RT711 which is initialized in rt711/rt711_sdca_init >>> will be overridden by rt711/rt711_sdca_add_codec_device_props when >>> the sof_sdw_quirk is not RT711_JD_NULL. It will force the JD mode >>> to RT711_JD1 and cause confusion while debugging the JD mode of >>> the boards without quirk. Initialize sof_sdw_quirk with RT711_JD_NULL >>> to honor the jd_src value in rt711/rt711_sdca init. >> >> Not able to follow what the "confusion while debugging the JD mode of >> the boards without quirk" is. You need a DMI quirk or need to override >> the default quirk with the kernel module parameter. >> > The JD mode will be set by rt711/rt711_sdca_init first (which is JD2 > as https://github.com/torvalds/linux/blob/master/sound/soc/codecs/rt711.c#L1209. > Then it will be overridden by rt711_add_codec_device_props() while doing > rt711_parse_dt(), which is now always JD1 since the current > sof_sdw_quirk init value. > I'm afraid that JD2 is a more preferable mode rather than JD1. Then we > will have to > maintain a bigger DMI quirk table for more and more coming alderlake machines. > > Given the rt711 codec has initialized the jd_src to JD2, The > sof_sdw_quirk should only > override it unless necessary? But now it's forced to override. Or can > we have a more > generic solution for it? I don't mind changing the default if the majority of devices uses JD2. But your patch doesn't do this cleanly, it breaks all usages of JD1 that relied on the previous default. Changing the default for jack detection also doesn't really decrease the need for quirks in itself, for this we would need to handle the RT715 quirk and also fix the amplifier link id, and also set the HDMI quirk depending on the platform setting. Bard's working on this, see https://github.com/thesofproject/linux/pull/3203