From patchwork Thu Mar 10 17:16:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 550522 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E975EC433EF for ; Thu, 10 Mar 2022 17:24:17 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 17C301A16; Thu, 10 Mar 2022 18:23:26 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 17C301A16 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1646933056; bh=Zjcu60bEs3gtPOUHEmKDTPwRP3guWqrCKQaDTCC54BU=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=eCh0O8Unchy69vBDJsgvlhjR9jZuGQYx6HNLyyi/atCcnFznmrBqQbC3rGhRjCt60 YphWulXZab4VBUGFQvPBPd6pi+z5s1vr9RWByU0WswWttzU5VhHHFqgAJjKhOMp305 KfkROSP8ZcZNtTbKJ8pbCxD5AnJQ9jV4Py4xzPV8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9A5BCF800D2; Thu, 10 Mar 2022 18:22:55 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 625D9F804CA; Thu, 10 Mar 2022 18:22:53 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E012AF800D2 for ; Thu, 10 Mar 2022 18:22:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E012AF800D2 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="CbPmwnVy" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646932968; x=1678468968; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Zjcu60bEs3gtPOUHEmKDTPwRP3guWqrCKQaDTCC54BU=; b=CbPmwnVyLDxVn23a7R8yKOZvhqvP1+LXvIvzdOD0bWnsPlKsI79nHF2B jvf8v8ci88z0q2Du3tUSXMqeGSgzwqitxteAnc1YjuxMMQpMpdyxl49kX 6SXkdjXLTkNE3jA3C1CzXLausKWaT9VFLFnV3glPnFE3DFkaO8+77VG0j 0rpM8FUTyFdtu4kRjR3pxiWbAcORgQm8gT1d1RXpWCm17bUhAsKhncRbf iwnPRyu8nPBdA9oZZqlPQ8cJWs61LIZA+MX4/l6smvbc+QIMc3JyVGiku /P1MLCfw1xv7IYQtYnBg8safPdtpUGpebrtET7vKrT6TtyLP1ySMcjh0S w==; X-IronPort-AV: E=McAfee;i="6200,9189,10282"; a="235918911" X-IronPort-AV: E=Sophos;i="5.90,171,1643702400"; d="scan'208";a="235918911" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2022 09:22:39 -0800 X-IronPort-AV: E=Sophos;i="5.90,171,1643702400"; d="scan'208";a="554738625" Received: from maxdorn-mobl.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.209.77.185]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2022 09:22:39 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 1/5] ASoC: SOF: Intel: enable DMI L1 for playback streams Date: Thu, 10 Mar 2022 11:16:47 -0600 Message-Id: <20220310171651.249385-2-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220310171651.249385-1-pierre-louis.bossart@linux.intel.com> References: <20220310171651.249385-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Kai Vehmanen , tiwai@suse.de, Ranjani Sridharan , Pierre-Louis Bossart , broonie@kernel.org, =?utf-8?q?P=C3=A9ter_Ujfalusi?= X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Kai Vehmanen Add back logic to mark all playback streams as L1 compatible. Fixes: 246dd4287dfb ("ASoC: SOF: Intel: make DMI L1 selection more robust") Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/intel/hda-pcm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/sof/intel/hda-pcm.c b/sound/soc/sof/intel/hda-pcm.c index eec83ca557a1..3e77a2352b98 100644 --- a/sound/soc/sof/intel/hda-pcm.c +++ b/sound/soc/sof/intel/hda-pcm.c @@ -315,6 +315,7 @@ int hda_dsp_pcm_open(struct snd_sof_dev *sdev, runtime->hw.info &= ~SNDRV_PCM_INFO_PAUSE; if (hda_always_enable_dmi_l1 || + direction == SNDRV_PCM_STREAM_PLAYBACK || spcm->stream[substream->stream].d0i3_compatible) flags |= SOF_HDA_STREAM_DMI_L1_COMPATIBLE; From patchwork Thu Mar 10 17:16:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 550142 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5155CC433EF for ; Thu, 10 Mar 2022 17:25:13 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 870C81A43; Thu, 10 Mar 2022 18:24:21 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 870C81A43 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1646933111; bh=rsrszBNXIHKThz7WnSay2HgMCC7X1jzxQRdCmwjGv3A=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=MI4iJzajjFeuCn0QSHpTxk7+Owy1UEVl9qKPeBI/Srk2eH+jknML4eocfFCFQvxOR RfdypBbeC/68LLfkgu5Ope+q5Yqbg2fZ9vWo3xOiwcg2zTiG0ns83S5zJbmcK1kpmR SNoAwNjQgWdmQRd4P/rL9ZzsWTsAAolYa5UeF0Nw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 524D8F80524; Thu, 10 Mar 2022 18:23:00 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D10F7F8051B; Thu, 10 Mar 2022 18:22:56 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4007FF80137 for ; Thu, 10 Mar 2022 18:22:48 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4007FF80137 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="AuJ1kfFY" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646932969; x=1678468969; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=rsrszBNXIHKThz7WnSay2HgMCC7X1jzxQRdCmwjGv3A=; b=AuJ1kfFY2E4CKbPMguNzgWiMwF1kJUvniFfdaGZJuG9eT7mGKh2z7q1V yocwLTJT6UW7bezy9c+9MQThT/4ylM5RkttfU55T38IV5Jx/PiA1GQSST Pt26NTAiDOx7axt3Q8JzxTm0qqUi635kAXpDcCQkuzENnXteBlHPE56td g9VmMKEt6M3OZOGJNSBL9g66YBQs7+JixVjLxvCf33RDaxXo8euulDR1Y X1FkV8a3dIKHSD5JUdkeq3Niay4ivAT/XJfQ7UQcLa3UqXhIJm4WAUwwU DKrhOJMjZOuC+kJCghEsUFSPKI/kJmUkPsEpS1sZN2DvQAt3fMGLtzbE5 w==; X-IronPort-AV: E=McAfee;i="6200,9189,10282"; a="235918914" X-IronPort-AV: E=Sophos;i="5.90,171,1643702400"; d="scan'208";a="235918914" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2022 09:22:40 -0800 X-IronPort-AV: E=Sophos;i="5.90,171,1643702400"; d="scan'208";a="554738628" Received: from maxdorn-mobl.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.209.77.185]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2022 09:22:39 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 2/5] ASoC: SOF: compress: fix null check after dereference Date: Thu, 10 Mar 2022 11:16:48 -0600 Message-Id: <20220310171651.249385-3-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220310171651.249385-1-pierre-louis.bossart@linux.intel.com> References: <20220310171651.249385-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: Weiguo Li , tiwai@suse.de, =?utf-8?q?P=C3=A9ter_Ujfa?= =?utf-8?q?lusi?= , Ranjani Sridharan , Pierre-Louis Bossart , broonie@kernel.org, Daniel Baluta X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Weiguo Li "cstream" is dereferenced but null checked later. Swap their positions to avoid potential null dereference. Reviewed-by: Ranjani Sridharan Reviewed-by: Daniel Baluta Reviewed-by: Péter Ujfalusi Signed-off-by: Weiguo Li Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/compress.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/soc/sof/compress.c b/sound/soc/sof/compress.c index 2af8d75204e9..a8e908e50101 100644 --- a/sound/soc/sof/compress.c +++ b/sound/soc/sof/compress.c @@ -46,8 +46,8 @@ void snd_sof_compr_init_elapsed_work(struct work_struct *work) */ void snd_sof_compr_fragment_elapsed(struct snd_compr_stream *cstream) { - struct snd_soc_pcm_runtime *rtd = cstream->private_data; - struct snd_compr_runtime *crtd = cstream->runtime; + struct snd_soc_pcm_runtime *rtd; + struct snd_compr_runtime *crtd; struct snd_soc_component *component; struct snd_compr_tstamp *tstamp; struct snd_sof_pcm *spcm; @@ -55,6 +55,8 @@ void snd_sof_compr_fragment_elapsed(struct snd_compr_stream *cstream) if (!cstream) return; + rtd = cstream->private_data; + crtd = cstream->runtime; tstamp = crtd->private_data; component = snd_soc_rtdcom_lookup(rtd, SOF_AUDIO_PCM_DRV_NAME); From patchwork Thu Mar 10 17:16:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 550143 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B6174C433FE for ; Thu, 10 Mar 2022 17:24:36 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E9D8B1A29; Thu, 10 Mar 2022 18:23:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E9D8B1A29 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1646933075; bh=5HUB0S/yA+cIcdUK0g898VTcm+oN/CC8sQ4wpRDHOF8=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=HLxbAJhkgGgrcO3gZCXbXwSp4w71p6np0P5BJ5XCy4x5iotMRPv8wwnrXvfMa5VKe 6QoHzwR7UWlaOIs68CVTommgUxq9kPn8sgohSKhjZ+BAPSeMQmsUIyflCt+QC17C1j XcGs39yKOG3cfgbj2XttQJrRCpdg9nTgbohPEwOM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0E154F8051A; Thu, 10 Mar 2022 18:22:59 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C1E72F80516; Thu, 10 Mar 2022 18:22:55 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id F3D20F8012C for ; Thu, 10 Mar 2022 18:22:48 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F3D20F8012C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="KR7PRLCH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646932970; x=1678468970; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5HUB0S/yA+cIcdUK0g898VTcm+oN/CC8sQ4wpRDHOF8=; b=KR7PRLCHUgahqIF1r8FkAM4069lGHaHOsr0f1wGTzv+ggZ/PR5SoM6bM YcsfrswalSVKL0rFFwfCiA9vrdZxb5PnKNRufhBWBsTJIMzwCab9n2X/h gpByOsvU+Os9TAWVJauQEoxmMeldY4lcu7keOE+rcmZzWEjWZoEQxJngG M1rAStJF6EM7owSaKECT9jWqYn8WCnDs3JpbNcwSEqgLa7Fq09EUwUB8H FO9Tr5Yp3rbtvfhbfBOkP0cAZX7pmfCWqG0IJ6lfT34BYzJljPLL3k/Kw XF5SF/5zBvqVmqKuO53aQrxMhSfHK+FojGncnKm5TiRfLygnCMXGWL6l5 A==; X-IronPort-AV: E=McAfee;i="6200,9189,10282"; a="235918917" X-IronPort-AV: E=Sophos;i="5.90,171,1643702400"; d="scan'208";a="235918917" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2022 09:22:41 -0800 X-IronPort-AV: E=Sophos;i="5.90,171,1643702400"; d="scan'208";a="554738635" Received: from maxdorn-mobl.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.209.77.185]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2022 09:22:40 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 3/5] ASoC: SOF: trace: Use proper DMA direction for the trace data buffer Date: Thu, 10 Mar 2022 11:16:49 -0600 Message-Id: <20220310171651.249385-4-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220310171651.249385-1-pierre-louis.bossart@linux.intel.com> References: <20220310171651.249385-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, broonie@kernel.org, Peter Ujfalusi , Ranjani Sridharan , Pierre-Louis Bossart X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Peter Ujfalusi Buffers allocated with snd_dma_alloc_pages() will have DMA direction DMA_BIDIRECTIONAL. The trace data memory is only used for one DMA direction: DMA_FROM_DEVICE, DMA only writes there, never reads. We also need to do a sync before accessing (reading with CPU) from the trace data buffer to copy it to user space. Note: snd_dma_buffer_sync() is also used for normal playback and capture streams to make sure that the data is available for the DMA or CPU. Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/trace.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sound/soc/sof/trace.c b/sound/soc/sof/trace.c index 104388c551cb..ea8e4506d02e 100644 --- a/sound/soc/sof/trace.c +++ b/sound/soc/sof/trace.c @@ -320,6 +320,13 @@ static ssize_t sof_dfsentry_trace_read(struct file *file, char __user *buffer, if (count > avail) count = avail; + /* + * make sure that all trace data is available for the CPU as the trace + * data buffer might be allocated from non consistent memory. + * Note: snd_dma_buffer_sync() is called for normal audio playback and + * capture streams also. + */ + snd_dma_buffer_sync(&sdev->dmatb, SNDRV_DMA_SYNC_CPU); /* copy available trace data to debugfs */ rem = copy_to_user(buffer, ((u8 *)(dfse->buf) + lpos), count); if (rem) @@ -464,8 +471,9 @@ int snd_sof_init_trace(struct snd_sof_dev *sdev) } /* allocate trace data buffer */ - ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV_SG, sdev->dev, - DMA_BUF_SIZE_FOR_TRACE, &sdev->dmatb); + ret = snd_dma_alloc_dir_pages(SNDRV_DMA_TYPE_DEV_SG, sdev->dev, + DMA_FROM_DEVICE, DMA_BUF_SIZE_FOR_TRACE, + &sdev->dmatb); if (ret < 0) { dev_err(sdev->dev, "error: can't alloc buffer for trace %d\n", ret); From patchwork Thu Mar 10 17:16:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 550521 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ABBA4C433EF for ; Thu, 10 Mar 2022 17:24:42 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EE0651A44; Thu, 10 Mar 2022 18:23:50 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EE0651A44 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1646933081; bh=7q9SFFHjgpd0WCJxCU800TajoFnfeRyyNZZQtay4rec=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=jSoZBIq7b5kM2S1CKutOMpyejSFC+aZtqy00ZB9Hzg66BpEzUrwg3uQ/zZLVAML1a 6PdcH4sQiuACTwCd3jaPsZJMFJu1SlF8BCH5Gj9rWqFOx4fjqVU/XB/GayNIFzgM+l CwmBbYN2/eQuI1V41YQG1SlUPrXOafnAic9A4a6I= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id BE28DF8051C; Thu, 10 Mar 2022 18:22:59 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2F8A9F80518; Thu, 10 Mar 2022 18:22:56 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 87E28F8015B for ; Thu, 10 Mar 2022 18:22:49 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 87E28F8015B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Jb53b4wo" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646932971; x=1678468971; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7q9SFFHjgpd0WCJxCU800TajoFnfeRyyNZZQtay4rec=; b=Jb53b4woeTA7OlA7iGVYcNwHL5LG5sC6Pr/BHhB+TDqHKrAicXtMHNlu TAt7lhL4T79ft2+6i9TEXET32G8ib4M8iyKmfqVhI2S3GeutEAn9ptSVB 4R1fHaoq5RuIpeRQAyDrnQwNZX4BLZbjgPn5oVXmAQHtIHenTgNEfLjxc uS0K0RZE6SrB74uEUAy9Tm2AJ385tPhUIETp8t2UGDqVnWHTl9FyLVaGx 3c+TETYAISw9DzFYKtLW0dPAHpCemF2V/FeHe5VUUxJ88+W9/JtFy9a5f orG0ua0A24BPb/RoKjISBJw3rVT0wEN8fIJYpNCCDDL8oNQOcmUGlK6V4 w==; X-IronPort-AV: E=McAfee;i="6200,9189,10282"; a="235918920" X-IronPort-AV: E=Sophos;i="5.90,171,1643702400"; d="scan'208";a="235918920" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2022 09:22:41 -0800 X-IronPort-AV: E=Sophos;i="5.90,171,1643702400"; d="scan'208";a="554738644" Received: from maxdorn-mobl.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.209.77.185]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2022 09:22:41 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 4/5] ASoC: SOF: Intel: add topology overwrite for Taniks Date: Thu, 10 Mar 2022 11:16:50 -0600 Message-Id: <20220310171651.249385-5-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220310171651.249385-1-pierre-louis.bossart@linux.intel.com> References: <20220310171651.249385-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, broonie@kernel.org, Bard Liao , Brent Lu , Pierre-Louis Bossart X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Brent Lu Taniks has four max98357a on SSP2 with Demux and EQ in topology to implement a 2-way speaker system. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/sof-pci-dev.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c index 61f2afd54c3e..4c9596742844 100644 --- a/sound/soc/sof/sof-pci-dev.c +++ b/sound/soc/sof/sof-pci-dev.c @@ -75,6 +75,14 @@ static const struct dmi_system_id sof_tplg_table[] = { }, .driver_data = "sof-adl-max98360a-rt5682-2way.tplg", }, + { + .callback = sof_tplg_cb, + .matches = { + DMI_MATCH(DMI_PRODUCT_FAMILY, "Google_Brya"), + DMI_MATCH(DMI_OEM_STRING, "AUDIO-AUDIO_MAX98357_ALC5682I_I2S_2WAY"), + }, + .driver_data = "sof-adl-max98357a-rt5682-2way.tplg", + }, {} }; From patchwork Thu Mar 10 17:16:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 550520 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 533C5C433F5 for ; Thu, 10 Mar 2022 17:25:27 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 6FF031A4D; Thu, 10 Mar 2022 18:24:35 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6FF031A4D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1646933125; bh=17dMKMpGWFKh9fHXrqAUix47ZJF5Rmo5OBIssjvwsWM=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=n9HEfzI0pXZDITlF56BUE45oQwGvdZoDaYP/hdtiUOS1RtGCPCg+Z6jg4B5tpH+Gp q5AlI3EayAl70uT4pPWrKvsveXMfCPCZ/Fv03yQq9HyVMzyQCSn06EHvoW46eR87qv CZJ2ntAb8Cog01sbEeMfnx4KP4Mj0xkfiPlUwrCo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0C902F80528; Thu, 10 Mar 2022 18:23:05 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 50FA6F8051D; Thu, 10 Mar 2022 18:22:59 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 54845F8013C for ; Thu, 10 Mar 2022 18:22:50 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 54845F8013C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ZkY3ThfE" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646932971; x=1678468971; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=17dMKMpGWFKh9fHXrqAUix47ZJF5Rmo5OBIssjvwsWM=; b=ZkY3ThfE5rwPWLdk3i93eD3AtC0VfV7NDiKc+KzS39UMFudwN+HC742f uxlELjR5qagAQq8mSo1dyYqpsMEcM9kbyOwAAmcJo0S43aQ/CGP21ygyr dyatmNB9bnghXcyBEfKt1DTd4bV/tdlggZFvXhCYw6Slr7Xsw1Ddba2gt mEf4GlIF7ACja9BraUI52geTitXf0XYamsgRurL3cdbWudjFZj6USEWSY +QGPrieSkf4jQB4wwSW4JqWz5jfU8W+vmW3gmmam92KjQQhG0wHlD6X9/ ivVcEi8MY4mYHgVjeDer9B4pTbCvguuvBkGc5rj8MJDOpq+61D3wVCU9n A==; X-IronPort-AV: E=McAfee;i="6200,9189,10282"; a="235918923" X-IronPort-AV: E=Sophos;i="5.90,171,1643702400"; d="scan'208";a="235918923" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2022 09:22:42 -0800 X-IronPort-AV: E=Sophos;i="5.90,171,1643702400"; d="scan'208";a="554738649" Received: from maxdorn-mobl.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.209.77.185]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2022 09:22:41 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 5/5] ASoC: Intel: soc-acpi: Add entry for rt711-sdca-sdw in ADL match table Date: Thu, 10 Mar 2022 11:16:51 -0600 Message-Id: <20220310171651.249385-6-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220310171651.249385-1-pierre-louis.bossart@linux.intel.com> References: <20220310171651.249385-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, Bard Liao , broonie@kernel.org, Muralidhar Reddy , Pierre-Louis Bossart X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Muralidhar Reddy RT711 sdca sdw is added with SDW0 link for ADL-PS platform. Reviewed-by: Bard Liao Signed-off-by: Muralidhar Reddy Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/common/soc-acpi-intel-adl-match.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sound/soc/intel/common/soc-acpi-intel-adl-match.c b/sound/soc/intel/common/soc-acpi-intel-adl-match.c index 7c89a974b59f..8bfe7070b84a 100644 --- a/sound/soc/intel/common/soc-acpi-intel-adl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-adl-match.c @@ -359,6 +359,15 @@ static const struct snd_soc_acpi_link_adr adl_rvp[] = { {} }; +static const struct snd_soc_acpi_link_adr adlps_rvp[] = { + { + .mask = BIT(0), + .num_adr = ARRAY_SIZE(rt711_sdca_0_adr), + .adr_d = rt711_sdca_0_adr, + }, + {} +}; + static const struct snd_soc_acpi_link_adr adl_chromebook_base[] = { { .mask = BIT(0), @@ -529,6 +538,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[] = { .drv_name = "sof_sdw", .sof_tplg_filename = "sof-adl-rt711.tplg", }, + { + .link_mask = 0x1, /* link0 required */ + .links = adlps_rvp, + .drv_name = "sof_sdw", + .sof_tplg_filename = "sof-adl-rt711.tplg", + }, { .link_mask = 0x5, /* rt5682 on link0 & 2xmax98373 on link 2 */ .links = adl_chromebook_base,