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=-13.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 2330EC433DF for ; Mon, 27 Jul 2020 09:43:14 +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 9CA76206D7 for ; Mon, 27 Jul 2020 09:43:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="A545iy1r"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="UPva6lbH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9CA76206D7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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 00160168D; Mon, 27 Jul 2020 11:42:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 00160168D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1595842992; bh=YDBp0EnwWA4Kih/7O3bfccMPrnj7Rxbjm6CXwW9FWPU=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=A545iy1rcKzEj2s7ndTwJBakr6esck5/RojLmjCidGtcXyhjXqPUH67lCBbI3xPiV 01Pl2XHo6xPtvVCKMfeMAy/jKJYbDDdc5gw7WosvcFXgFXA87S1kFkABFjelQhPES6 uIyndkoaSKLnCDBypB2T27cgy6KpzMevORnLahok= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3465DF802F7; Mon, 27 Jul 2020 11:38:37 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1C64FF802DC; Mon, 27 Jul 2020 11:38:31 +0200 (CEST) Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E51E0F800DE for ; Mon, 27 Jul 2020 11:38:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E51E0F800DE Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="UPva6lbH" Received: by mail-wr1-x443.google.com with SMTP id z18so10597165wrm.12 for ; Mon, 27 Jul 2020 02:38:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Oaaxr1XrWDeHaCTc5ZRFtudk1Q+YHJL7mwPY5QYLst4=; b=UPva6lbHnT6aJkApbjzdPclDHZuqy7Fdq/YKotY/LvbsW8sTVfwaiVi0Cly0mwUbvV hda1HFrFJQIZxeo6gR+A/JbyE5jTxkMQBt5M+RSl7XQ5qgTGjTuARTV47LarnuuF9z0i meKGo7QHKoIs9YT1CAQuL1fak1xUY5XbDpspq9OJwOOoYXGDmT0OYc3SYsqxBMio/mVQ w7u36cc0Wp01tHAWOGOL+WORHfcQmr2o1E3YAPPHFirKgd9qErfUmlaN7Ui5kMEiuIs3 QGk3fhi8BTquSsy2xjuU8pCRjE4FPm/NZiSPWOxC80vD0EFfUCWjoUoY/2qsE27XjkfZ aFNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Oaaxr1XrWDeHaCTc5ZRFtudk1Q+YHJL7mwPY5QYLst4=; b=JN8kf0xAXG8DLgPESfRC9HlBfRAOYS8wx5cXx4x46WYp2hictSHfQ7QSAaLZBh0cng rvwVtTnlQjE1D8eV7Yr0GCPPzr0jezjWpVeyhmTBytjJF2ZwE/iGpYYvBIEg45KRxHSr jknXKvtkthuyh33qkYNVxC4ayRzrZCUkISmYA5/UaQgP4vyeX1jB6v1nXRK8NBgUtd7h uEmamrnnP5CA/vD2IZT94nLQ64FhvOwgG0tF1Pq0UavuhE+VKvH6wSRe24YIoQtMWxPb poqDgXvn97oOKYIRap9zXkAHOxLELxtcZV6Cnmy78eKQb3rpg4WxYLZiCMEsUetCo7P6 Jnlg== X-Gm-Message-State: AOAM532RUzzgawiaXkrci/aWaBtlfD/oup1ftvkfEl+fLyTboYY+stMY SbP/SxGWvtiMa9mwWZHuPMiJJA== X-Google-Smtp-Source: ABdhPJwYDrPNX+3ZAENAGl9buZdCJ8GBfodGVnw8Ziwk0v7h4XS004nimyMPlTK611g7EmJW5ZpZnw== X-Received: by 2002:a5d:43c4:: with SMTP id v4mr18194825wrr.426.1595842701525; Mon, 27 Jul 2020 02:38:21 -0700 (PDT) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id y189sm20566099wmd.27.2020.07.27.02.38.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 02:38:20 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org Subject: [PATCH v3 06/10] ASoC: q6asm: add support to gapless flag in q6asm open Date: Mon, 27 Jul 2020 10:38:02 +0100 Message-Id: <20200727093806.17089-7-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200727093806.17089-1-srinivas.kandagatla@linaro.org> References: <20200727093806.17089-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: pierre-louis.bossart@linux.intel.com, alsa-devel@alsa-project.org, ckeepax@opensource.cirrus.com, tiwai@suse.com, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, vkoul@kernel.org, Srinivas Kandagatla 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" This patch adds support to gapless flag to q6asm_open_write(). Signed-off-by: Srinivas Kandagatla --- sound/soc/qcom/qdsp6/q6asm-dai.c | 4 ++-- sound/soc/qcom/qdsp6/q6asm.c | 4 +++- sound/soc/qcom/qdsp6/q6asm.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/qcom/qdsp6/q6asm-dai.c b/sound/soc/qcom/qdsp6/q6asm-dai.c index 5f0e36e23ef3..4652c78d57c5 100644 --- a/sound/soc/qcom/qdsp6/q6asm-dai.c +++ b/sound/soc/qcom/qdsp6/q6asm-dai.c @@ -258,7 +258,7 @@ static int q6asm_dai_prepare(struct snd_soc_component *component, if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { ret = q6asm_open_write(prtd->audio_client, prtd->stream_id, FORMAT_LINEAR_PCM, - 0, prtd->bits_per_sample); + 0, prtd->bits_per_sample, false); } else if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { ret = q6asm_open_read(prtd->audio_client, prtd->stream_id, FORMAT_LINEAR_PCM, @@ -685,7 +685,7 @@ static int q6asm_dai_compr_set_params(struct snd_soc_component *component, if (dir == SND_COMPRESS_PLAYBACK) { ret = q6asm_open_write(prtd->audio_client, prtd->stream_id, params->codec.id, params->codec.profile, - prtd->bits_per_sample); + prtd->bits_per_sample, true); if (ret < 0) { dev_err(dev, "q6asm_open_write failed\n"); diff --git a/sound/soc/qcom/qdsp6/q6asm.c b/sound/soc/qcom/qdsp6/q6asm.c index 14ec7dad5b65..22ac99029e56 100644 --- a/sound/soc/qcom/qdsp6/q6asm.c +++ b/sound/soc/qcom/qdsp6/q6asm.c @@ -923,7 +923,7 @@ static int q6asm_ac_send_cmd_sync(struct audio_client *ac, struct apr_pkt *pkt) */ int q6asm_open_write(struct audio_client *ac, uint32_t stream_id, uint32_t format, u32 codec_profile, - uint16_t bits_per_sample) + uint16_t bits_per_sample, bool is_gapless) { struct asm_stream_cmd_open_write_v3 *open; struct apr_pkt *pkt; @@ -943,6 +943,8 @@ int q6asm_open_write(struct audio_client *ac, uint32_t stream_id, pkt->hdr.opcode = ASM_STREAM_CMD_OPEN_WRITE_V3; open->mode_flags = 0x00; open->mode_flags |= ASM_LEGACY_STREAM_SESSION; + if (is_gapless) + open->mode_flags |= BIT(ASM_SHIFT_GAPLESS_MODE_FLAG); /* source endpoint : matrix */ open->sink_endpointype = ASM_END_POINT_DEVICE_MATRIX; diff --git a/sound/soc/qcom/qdsp6/q6asm.h b/sound/soc/qcom/qdsp6/q6asm.h index 2acfc2274069..f20e1441988f 100644 --- a/sound/soc/qcom/qdsp6/q6asm.h +++ b/sound/soc/qcom/qdsp6/q6asm.h @@ -99,7 +99,7 @@ int q6asm_write_async(struct audio_client *ac, uint32_t stream_id, uint32_t len, uint32_t msw_ts, uint32_t lsw_ts, uint32_t flags); int q6asm_open_write(struct audio_client *ac, uint32_t stream_id, uint32_t format, u32 codec_profile, - uint16_t bits_per_sample); + uint16_t bits_per_sample, bool is_gapless); int q6asm_open_read(struct audio_client *ac, uint32_t stream_id, uint32_t format, uint16_t bits_per_sample); -- 2.21.0