From patchwork Wed Jul 3 15:10:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keyon Jie X-Patchwork-Id: 11029705 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 4B50B13A4 for ; Wed, 3 Jul 2019 15:06:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A10F26E56 for ; Wed, 3 Jul 2019 15:06:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E38228689; Wed, 3 Jul 2019 15:06:13 +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 8AE7526E56 for ; Wed, 3 Jul 2019 15:06:12 +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 8A24E169F; Wed, 3 Jul 2019 17:05:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8A24E169F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1562166370; bh=JofTWrrq6zd3ivqJ5PjjgGYpbqHWw1ExiX2UDsaB88E=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=i6iI1LyUVMjQ+WyPhG1X3UWTTSVyrd4JUO3meX0tijFW6ZkeiwNu/F1HHlfXM5LTQ G50uw7Em0+kOvm+duBt6QEPNsamRooBstENvdNw3vkwz82qTacr2+Z7HFFoRCltdXP nakqoeos9UQo7ugY1TwzIYdPWjHnAI5N99oZNwEE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0D4A9F800EA; Wed, 3 Jul 2019 17:05:20 +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 03A45F800E8; Wed, 3 Jul 2019 17:05:18 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 7D5DFF800E8 for ; Wed, 3 Jul 2019 17:05:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7D5DFF800E8 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jul 2019 08:05:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,446,1557212400"; d="scan'208";a="172161460" Received: from keyon-x299.sh.intel.com ([10.239.159.75]) by FMSMGA003.fm.intel.com with ESMTP; 03 Jul 2019 08:05:12 -0700 From: Keyon Jie To: alsa-devel@alsa-project.org Date: Wed, 3 Jul 2019 23:10:22 +0800 Message-Id: <20190703151023.30313-1-yang.jie@linux.intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Cc: Keyon Jie , ranjani.sridharan@linux.intel.com, Marcin Rajwa , pierre-louis.bossart@linux.intel.com Subject: [alsa-devel] [PATCH v2 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 use the host_period_bytes even no position update ipc reqiured from driver, here add another flag for position update, and preserve host_period_bytes for FW to use. This might require corresponding FW change and ABI alignment. Signed-off-by: Marcin Rajwa Signed-off-by: Keyon Jie --- 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..44acfa62fa69 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; + uint16_t no_period_irq; /* 1 means period IRQ mode OFF */ - uint32_t reserved[2]; + uint16_t reserved[3]; uint16_t chmap[SOF_IPC_MAX_CHANNELS]; /**< channel map - SOF_CHMAP_ */ } __packed; From patchwork Wed Jul 3 15:10:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keyon Jie X-Patchwork-Id: 11029707 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 CA8E513A4 for ; Wed, 3 Jul 2019 15:07:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B99A6286E0 for ; Wed, 3 Jul 2019 15:07:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD0132873B; Wed, 3 Jul 2019 15:07:07 +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 18002286E0 for ; Wed, 3 Jul 2019 15:07:07 +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 56E5916B1; Wed, 3 Jul 2019 17:06:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 56E5916B1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1562166425; bh=mtZv9B1fMV12B4Ur4khSFQrHJnqqv4m1mUAdtJqkYgk=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=HjJV90W6HLyJBNv3mDDrV/aO/KNzmEXZp8il0l2NOtzgFKMFKdsiCjyYslGhvxaxK zMV7LaVPSHm3YYoUzKqU1XpIos4gTCvl6tU9rXMntpEmG7jtTgbzEQJa88BegvwzTr vZ+beZWKXPrLBKAEayqLdSeJa1I90Jqlr6WsT4Yc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1482DF800F4; Wed, 3 Jul 2019 17:05:21 +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 4EFFFF800F3; Wed, 3 Jul 2019 17:05:20 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 7458CF800C5 for ; Wed, 3 Jul 2019 17:05:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7458CF800C5 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jul 2019 08:05:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,446,1557212400"; d="scan'208";a="172161469" Received: from keyon-x299.sh.intel.com ([10.239.159.75]) by FMSMGA003.fm.intel.com with ESMTP; 03 Jul 2019 08:05:13 -0700 From: Keyon Jie To: alsa-devel@alsa-project.org Date: Wed, 3 Jul 2019 23:10:23 +0800 Message-Id: <20190703151023.30313-2-yang.jie@linux.intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190703151023.30313-1-yang.jie@linux.intel.com> References: <20190703151023.30313-1-yang.jie@linux.intel.com> MIME-Version: 1.0 Cc: Keyon Jie , ranjani.sridharan@linux.intel.com, Marcin Rajwa , pierre-louis.bossart@linux.intel.com Subject: [alsa-devel] [PATCH v2 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 period_irq. 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..c7022346aba0 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_period_irq flag for ipc params */ if (hda && hda->no_ipc_position) - ipc_params->host_period_bytes = 0; + ipc_params->no_period_irq = 1; ipc_params->stream_tag = hstream->stream_tag;