From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40944C433E1 for ; Wed, 22 Jul 2020 15:41:16 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id BC26F2065F for ; Wed, 22 Jul 2020 15:41:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="FhWogAXh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BC26F2065F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 3BEB915F2; Wed, 22 Jul 2020 17:40:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3BEB915F2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1595432474; bh=rcgm2+RrOJHjCcOwGXEleCMUQo5MyZY+BrlE4maj6lk=; h=Subject:To:References:From:Date:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=FhWogAXhmRxhXrj/R4oGvsqYmHxmZjRgg0fqHarY9yCCmD0FJzzGbWCzx2D/clrzm dNzubt8kIQhjAQDE1NFzxQ0M04GSZv13IUeN2lK8WzAUefDLkgiV7aAvjkwW6a7oFj hqmKqyeYw8sRKP+/dBAF7ejbEVvfnPbym5Mf3LgE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 61DD1F8015A; Wed, 22 Jul 2020 17:39:35 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D3BE1F8015A; Wed, 22 Jul 2020 17:39:33 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (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 9E046F80150 for ; Wed, 22 Jul 2020 17:39:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9E046F80150 IronPort-SDR: A84gpGxG1KXx3qTdgZ6f45KXv7OgBGhvj5gBEB3N2XZvrHqwPaOmFlO+RAj99dnePzo/KsPoLv 3Ty+T2lR4HpA== X-IronPort-AV: E=McAfee;i="6000,8403,9690"; a="129920850" X-IronPort-AV: E=Sophos;i="5.75,383,1589266800"; d="scan'208";a="129920850" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jul 2020 08:39:23 -0700 IronPort-SDR: MsNqFHz8q1bHKMvZOTP2vEUpscZSheDN/J+yc70nwRaOKUgxioD6xzDP091iR7B1Lx0PSL6GGL RlIS4wosbJoQ== X-IronPort-AV: E=Sophos;i="5.75,383,1589266800"; d="scan'208";a="272042508" Received: from asinghi-mobl2.amr.corp.intel.com (HELO [10.255.231.54]) ([10.255.231.54]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jul 2020 08:39:22 -0700 Subject: Re: [PATCH v2 8/9] ASoC: qdsp6-dai: add gapless support To: Srinivas Kandagatla , broonie@kernel.org References: <20200721165306.29082-1-srinivas.kandagatla@linaro.org> <20200721165306.29082-9-srinivas.kandagatla@linaro.org> <868d9768-a4c4-71c1-28fd-ca0e2f6564bf@linux.intel.com> From: Pierre-Louis Bossart Message-ID: Date: Wed, 22 Jul 2020 10:31:54 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Cc: alsa-devel@alsa-project.org, ckeepax@opensource.cirrus.com, linux-kernel@vger.kernel.org, tiwai@suse.com, lgirdwood@gmail.com, vkoul@kernel.org 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" >>> @@ -917,6 +1018,14 @@ static int q6asm_dai_compr_trigger(struct >>> snd_soc_component *component, >>>           ret = q6asm_cmd_nowait(prtd->audio_client, prtd->stream_id, >>>                          CMD_PAUSE); >>>           break; >>> +    case SND_COMPR_TRIGGER_NEXT_TRACK: >>> +        prtd->next_track = true; >>> +        prtd->next_track_stream_id = (prtd->stream_id == 1 ? 2 : 1); >> >> it's rather odd, the initialization above uses next_track_stream_id = 0? > > Vaild stream ids start from 1, So we are toggling this between 1 and 2. > So when we set next_track_stream_id to 0, that means we have opened the > new next stream id and is set to prtd->stream_id. This logic is to > ensure that we are not going to open next stream id twice! ok, adding a comment would be good to show this was intentional and not a mistake.