Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1800046pxb; Thu, 16 Sep 2021 16:14:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKsnbIl3GfFT/QjRJsQybHDES6UVjVSBWzM3GMfzNit0Ye27g/78m9GNmUR0fsX37rcMrf X-Received: by 2002:a17:906:a018:: with SMTP id p24mr8760628ejy.349.1631834091805; Thu, 16 Sep 2021 16:14:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631834091; cv=none; d=google.com; s=arc-20160816; b=mS2khzz9sWlSnfFvafmruQd0Xbt3ufte47EdO+01DBCQNyb9ya69qcqjI5B0TiodgU viqRd997kKImUDhFZAZkDURAn94sHJrUXKvgJLwt+y2IvXKB4VCA7c4qrL/hPq3wEAUM x6YsTjycxkMWh/4SOUKkBfJjO/4RailJ+IxKnOflUcX0VlMgFr88on68ew0zUSyb93dt YmRKl0dfEWMeu2CiW4/KPe9ZKuODQYFWGExG0Ce8suYIx2kO9ASaU3vDf7tiOXAqS10j ArjuI1hU/HHNtElpRq65rkyLybAkmbeeq1vcS8VmKkXWq+j5byil533hBxK1hRuEyFrd HdGw== 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=1CGYbQg68JZl6DPTOsD256XUTClAnCvGN1V3v0sfSiE=; b=lYdTC5stqHQ6dlsy5tw+DlGmMNjiQwIPIhjkMZI1WdHAcKOZ0nozxuAARMhfB4xqDJ KyFBXviKB5o9b6D3YI9T5Fa1AKUVeE/bOFw7GIk7DmhD7RcOUnx2xdK9GTQiP2yQPJZe V+4gtYNoQS39NKb51mKd2cisLiSVsocJ4w50hCC2/frDn6M8+EtkVrGaLpeFBJFofl0C 1q+GEVfOC2prXi8fjbuCzZSqaMC3a8dgg93JdaN5RC3tAElnAueboe+u98wdEFVz7LHD lXsMqDva0BeaGEQoPJEP2Rm6xqljoWiwvbFAX/RfKZrCGHc+ueJwX9+VJn92V3+J18HO 6D4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="KDKee3/h"; 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 h14si6178045eje.454.2021.09.16.16.14.28; Thu, 16 Sep 2021 16:14: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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="KDKee3/h"; 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 S1344196AbhIPQwn (ORCPT + 99 others); Thu, 16 Sep 2021 12:52:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:59000 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244868AbhIPQrw (ORCPT ); Thu, 16 Sep 2021 12:47:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B02BE61A71; Thu, 16 Sep 2021 16:27:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631809621; bh=i06AM4DVmRVPJBNARjGrF5thGGhhF9wFivOaNz4+sWI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KDKee3/hl+8Zhxbhjjyea8tBy3fGD6rsfqzEcChh/QYzz7sqIN4J6H0JlRFGpCmNB ABNtcvWaetLS8wR1iRHBkO9tbDMEreV2RdknK1VwH4K+tA6nHxZoxMXbI3xvgfV9NO VTN7sYbzOwLy7lyB+jxaYWNDkS6wu+Q95Bra/4lg= 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.13 222/380] ASoC: Intel: update sof_pcm512x quirks Date: Thu, 16 Sep 2021 17:59:39 +0200 Message-Id: <20210916155811.640407286@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155803.966362085@linuxfoundation.org> References: <20210916155803.966362085@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 8620d4f38493..335c212c1961 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