Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1536409pxb; Thu, 16 Sep 2021 09:26:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMS5EmRu6UxXJz8+0quOoHpRUX47TcINCsrlR/YqXcNtt5N/8rB5YHEGXM+aK9oWyasujs X-Received: by 2002:a17:906:3a57:: with SMTP id a23mr7179565ejf.469.1631809606105; Thu, 16 Sep 2021 09:26:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631809606; cv=none; d=google.com; s=arc-20160816; b=Oum7TIW08giYPUY2WX8YHh3lUvm5NjqHsiQBntPBq2Nv62KY/6TM1jAmTcbelRBRCx ssjgkezsrLTGLmz65ncvzBVAm85TNURthFYAZErv1QqZUlz9lZJCZsm+U05p/n1s0JKR dEjX6szo8unbQ6gEBV6dHeeaivrnkSMY+AJAT2dbKyzsrhlMEcKbPNORQBH7FhkhtirV LSlqosFJq3JOS5sH7FKwNsaet196mvZjTRCf7T1Eds7jXm+llYCkMrG9VTFxJP/CWmoh 9ign1OWHqAPeVzTlWK6l+WdbERdhbMYUy88CjUiNu5LL2n36758CgCXp28SCf+jGnJYZ 2spQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8gXnaYuFIUCvKDaWeet0h9nwudliULw0ry3TO+oqiXg=; b=JEb8jx/4kIPJFR/qfjLpRwD/V8dzsRcQPj7Gqf+9lBdDQWphN0lMIknrf8NuPHLr5q Zc5rZwTklQ3rBaExgGAaHASiJZUkybFcp7+a0cqAZnGCJY5YOZ6wAhuO5c/wvAwMq8pG LLlzs0ensra49zCGTXWVDiWTQ3wGli6dwiEwBdmnvgIzX47E4Ro51zchhp9VIKsePPKW 3wdkSWecGetv4oE+BEKhjqx0+VTIBpjQQvh+06bTQCsQqLwL2KEG0W5rWH6zJxpM2hxl Qz0TMYgFT4QhR2+je3Q+YtdLO7dfSMfPDa0Jk8ApjWdVJQ9LRMDcp+Uaczl34OyCLBq3 9cCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XsPeARcn; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hb44si3402278ejc.174.2021.09.16.09.26.17; Thu, 16 Sep 2021 09:26: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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XsPeARcn; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241674AbhIPQZl (ORCPT + 99 others); Thu, 16 Sep 2021 12:25:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:55110 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240849AbhIPQR2 (ORCPT ); Thu, 16 Sep 2021 12:17:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C677261374; Thu, 16 Sep 2021 16:12:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631808756; bh=GZ/gu4APEh9rZOKYqejC3pLIFSjaRRfjmwKlj7WFA9w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XsPeARcnJUwtZfkUkgVjMpfBzZZ8uqmQaYkVnll57FqqiOF0VmA3O1ASpJ8RP7COi 8pVwYdeGlOGdeGlM7Es0J22aCz3re4TXf0sTwCwehypO7EOeJTw1Mwc54m67f36MTR Z3yYNVjemrfHpli3tho/BUTLktsDnB/IexDzWkAM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pierre-Louis Bossart , Guennadi Liakhovetski , Mark Brown , Sasha Levin Subject: [PATCH 5.10 178/306] ASoC: Intel: update sof_pcm512x quirks Date: Thu, 16 Sep 2021 17:58:43 +0200 Message-Id: <20210916155800.157112876@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155753.903069397@linuxfoundation.org> References: <20210916155753.903069397@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pierre-Louis Bossart [ Upstream commit 22414cade8dfec25ab94df52b3a4f7aa8edb6120 ] The default SOF topology enables SSP capture and DMICs, even though both of these hardware capabilities are not always available in hardware (specific versions of HiFiberry and DMIC kit needed). For the SSP capture, this leads to annoying "SP5-Codec: ASoC: no backend capture" and "streamSSP5-Codec: ASoC: no users capture at close - state 0" errors. Update the quirks to match what the topology needs, which also allows for the ability to remove SSP capture and DMIC support. BugLink: https://github.com/thesofproject/linux/issues/3061 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20210802152151.15832-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/intel/boards/sof_pcm512x.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/sound/soc/intel/boards/sof_pcm512x.c b/sound/soc/intel/boards/sof_pcm512x.c index d2b0456236c7..bdd671f07659 100644 --- a/sound/soc/intel/boards/sof_pcm512x.c +++ b/sound/soc/intel/boards/sof_pcm512x.c @@ -26,11 +26,16 @@ #define SOF_PCM512X_SSP_CODEC(quirk) ((quirk) & GENMASK(3, 0)) #define SOF_PCM512X_SSP_CODEC_MASK (GENMASK(3, 0)) +#define SOF_PCM512X_ENABLE_SSP_CAPTURE BIT(4) +#define SOF_PCM512X_ENABLE_DMIC BIT(5) #define IDISP_CODEC_MASK 0x4 /* Default: SSP5 */ -static unsigned long sof_pcm512x_quirk = SOF_PCM512X_SSP_CODEC(5); +static unsigned long sof_pcm512x_quirk = + SOF_PCM512X_SSP_CODEC(5) | + SOF_PCM512X_ENABLE_SSP_CAPTURE | + SOF_PCM512X_ENABLE_DMIC; static bool is_legacy_cpu; @@ -245,8 +250,9 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, links[id].dpcm_playback = 1; /* * capture only supported with specific versions of the Hifiberry DAC+ - * links[id].dpcm_capture = 1; */ + if (sof_pcm512x_quirk & SOF_PCM512X_ENABLE_SSP_CAPTURE) + links[id].dpcm_capture = 1; links[id].no_pcm = 1; links[id].cpus = &cpus[id]; links[id].num_cpus = 1; @@ -381,6 +387,9 @@ static int sof_audio_probe(struct platform_device *pdev) ssp_codec = sof_pcm512x_quirk & SOF_PCM512X_SSP_CODEC_MASK; + if (!(sof_pcm512x_quirk & SOF_PCM512X_ENABLE_DMIC)) + dmic_be_num = 0; + /* compute number of dai links */ sof_audio_card_pcm512x.num_links = 1 + dmic_be_num + hdmi_num; -- 2.30.2