From patchwork Thu Jul 18 03:11:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keyon Jie X-Patchwork-Id: 11048479 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1BEF7138B for ; Thu, 18 Jul 2019 03:32:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0899F28485 for ; Thu, 18 Jul 2019 03:32:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F0874287A5; Thu, 18 Jul 2019 03:32:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0DC2B286E6 for ; Thu, 18 Jul 2019 03:32:04 +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 5E45A166F; Thu, 18 Jul 2019 05:06:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5E45A166F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1563419213; bh=2xtXUnTy/lzTH2kDfYBq0Yjq4PlQ+Op0WQ6hrsRk4bY=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=TIQQCI1C1YqVpgHnB12WvU3wIr+hD91+ljARy0cdbtiQ+Qt42KTsOB2nh+IcZ4r4w 6JMaKIjG9zA2lMS1cCr1x7qxqdYNHmqOXFNh0MbC8DOM6Nm95udVPurl5l2PNARg7C eclTShvpAGNZNQaIPCUqM7Zeno7Dmzq6gbCigwoQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B92F2F8015B; Thu, 18 Jul 2019 05:06:02 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 46C1FF80376; Thu, 18 Jul 2019 05:05:58 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 E4A3DF802BC for ; Thu, 18 Jul 2019 05:05:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E4A3DF802BC X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jul 2019 20:05:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,276,1559545200"; d="scan'208";a="158654230" Received: from keyon-x299.sh.intel.com ([10.239.159.75]) by orsmga007.jf.intel.com with ESMTP; 17 Jul 2019 20:05:46 -0700 From: Keyon Jie To: alsa-devel@alsa-project.org Date: Thu, 18 Jul 2019 11:11:12 +0800 Message-Id: <20190718031113.25040-1-yang.jie@linux.intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Cc: kai.vehmanen@linux.intel.com, Marcin Rajwa , marcin.rajwa@intel.com, Keyon Jie , ranjani.sridharan@linux.intel.com, pierre-louis.bossart@linux.intel.com Subject: [alsa-devel] [PATCH v3 1/2] ASoC: SOF: add flag for position update ipc 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" X-Virus-Scanned: ClamAV using ClamSMTP From: Marcin Rajwa In some cases, FW might need to use the host_period_bytes field to synchronize the DMA copying (with host side) but the driver does not need any position information returned over the IPC channel by the firmware. The current IPC definition prevents this capability, so add new field. Signed-off-by: Marcin Rajwa Signed-off-by: Keyon Jie Reviewed-by: Ranjani Sridharan --- include/sound/sof/stream.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sound/sof/stream.h b/include/sound/sof/stream.h index 643f175cb479..06af4ecb2584 100644 --- a/include/sound/sof/stream.h +++ b/include/sound/sof/stream.h @@ -83,10 +83,10 @@ struct sof_ipc_stream_params { uint16_t sample_valid_bytes; uint16_t sample_container_bytes; - /* for notifying host period has completed - 0 means no period IRQ */ uint32_t host_period_bytes; + uint32_t no_position_ipc; /* 1 means no IPC for position upadte */ - uint32_t reserved[2]; + uint16_t reserved[3]; uint16_t chmap[SOF_IPC_MAX_CHANNELS]; /**< channel map - SOF_CHMAP_ */ } __packed; From patchwork Thu Jul 18 03:11:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keyon Jie X-Patchwork-Id: 11048477 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 12C8A138B for ; Thu, 18 Jul 2019 03:32:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F171128485 for ; Thu, 18 Jul 2019 03:32:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E221C287AA; Thu, 18 Jul 2019 03:32:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F25A828485 for ; Thu, 18 Jul 2019 03:32:04 +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 6A8AD167A; Thu, 18 Jul 2019 05:06:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6A8AD167A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1563419269; bh=u0dZpy/4VyqUT4c5y5Pq45LFOVzY3MCW8zSaXxKMCXI=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=h+6Dyd1anNkfW9wVPmWhce+e0X1YoaybVmiOZjj9Uim2oYRgxRanuyM2QlpYHmAxc yLNJcOGofM52VS8YBo5e4xB6zQBmH+aEekrbIDpbS3NXPeXkQs9Ml5QflIuC6paiBe 0W/5+pO3kOsq235dfG2VnyC7zaAap0Pt0j35oAJc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 73312F80390; Thu, 18 Jul 2019 05:06:08 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 224F2F80362; Thu, 18 Jul 2019 05:06:02 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 E16E0F800C4 for ; Thu, 18 Jul 2019 05:05:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E16E0F800C4 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jul 2019 20:05:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,276,1559545200"; d="scan'208";a="158654248" Received: from keyon-x299.sh.intel.com ([10.239.159.75]) by orsmga007.jf.intel.com with ESMTP; 17 Jul 2019 20:05:49 -0700 From: Keyon Jie To: alsa-devel@alsa-project.org Date: Thu, 18 Jul 2019 11:11:13 +0800 Message-Id: <20190718031113.25040-2-yang.jie@linux.intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190718031113.25040-1-yang.jie@linux.intel.com> References: <20190718031113.25040-1-yang.jie@linux.intel.com> MIME-Version: 1.0 Cc: kai.vehmanen@linux.intel.com, Marcin Rajwa , marcin.rajwa@intel.com, Keyon Jie , ranjani.sridharan@linux.intel.com, pierre-louis.bossart@linux.intel.com Subject: [alsa-devel] [PATCH v3 2/2] ASoC: SOF: Intel: fix reset of host_period_bytes 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" X-Virus-Scanned: ClamAV using ClamSMTP From: Marcin Rajwa This patch prevents the reset of host period bytes. The parameter has been used to keep information about completion of period copy. Right now we keep this information in no_position_ipc. Signed-off-by: Marcin Rajwa Signed-off-by: Keyon Jie Reviewed-by: Ranjani Sridharan Reviewed-by: Kai Vehmanen --- sound/soc/sof/intel/hda-pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/sof/intel/hda-pcm.c b/sound/soc/sof/intel/hda-pcm.c index 9b730f183529..956407cf59ea 100644 --- a/sound/soc/sof/intel/hda-pcm.c +++ b/sound/soc/sof/intel/hda-pcm.c @@ -116,9 +116,9 @@ int hda_dsp_pcm_hw_params(struct snd_sof_dev *sdev, /* disable SPIB, to enable buffer wrap for stream */ hda_dsp_stream_spib_config(sdev, stream, HDA_DSP_SPIB_DISABLE, 0); - /* set host_period_bytes to 0 if no IPC position */ + /* update no_position_ipc flag for ipc params */ if (hda && hda->no_ipc_position) - ipc_params->host_period_bytes = 0; + ipc_params->no_position_ipc = 1; ipc_params->stream_tag = hstream->stream_tag;