From patchwork Fri Mar 13 10:07:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 193285 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=-10.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, 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 427A0C4CECE for ; Fri, 13 Mar 2020 10:10:11 +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 EEE1120724 for ; Fri, 13 Mar 2020 10:10:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="JSGFm3Ps"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="orzFoz3I" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EEE1120724 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.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 52DF517BE; Fri, 13 Mar 2020 11:09:19 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 52DF517BE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1584094209; bh=rfa/ArgLgaz92yJLGY97fFpfRcmpI+tJU0aLfsmPz08=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=JSGFm3PsGOnt9evtLCNsrODmZ/jc+2ErjsLW5Lc8cRc0vNxM46pXiMfGETFvYal5R QuZjhPpkk+MbcnfctoPI3eK+PZG9XNdAd9ZDheCeDb1HoV0msBJ86sG00eJKBRF5GF GCxytiqiOm86pEQUTL4yKLNK3AbxzW+rlOq9i0Ag= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1DF07F8028B; Fri, 13 Mar 2020 11:07:47 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id F22E8F8023E; Fri, 13 Mar 2020 11:07:40 +0100 (CET) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C3C39F801F7 for ; Fri, 13 Mar 2020 11:07:36 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C3C39F801F7 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="orzFoz3I" Received: from localhost.localdomain (unknown [171.76.107.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6F83E206E7; Fri, 13 Mar 2020 10:07:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584094055; bh=rfa/ArgLgaz92yJLGY97fFpfRcmpI+tJU0aLfsmPz08=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=orzFoz3IOnxjtAKW/JfWPEcKHRVqqVCnv53FFhjJluJxZFpSnwHucgC+lR8f0W2tA iaJqEyrV7pr94OUCd4B8Sh/dBWL5AG24pVuNvzM4c1s4hxgV+m9TuwDpKYHZwZu8AJ cDepT9MmoCLLHLd3m3AYLQSXkqGhV1K939q5vHkg= From: Vinod Koul To: Mark Brown , Takashi Iwai Subject: [PATCH v2 3/9] ASoC: qcom: q6asm: pass codec profile to q6asm_open_write Date: Fri, 13 Mar 2020 15:37:02 +0530 Message-Id: <20200313100708.1558658-4-vkoul@kernel.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200313095318.1555163-2-vkoul@kernel.org> References: <20200313095318.1555163-2-vkoul@kernel.org> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, Banajit Goswami , linux-arm-msm@vger.kernel.org, Patrick Lai , Liam Girdwood , Bjorn Andersson , Vinod Koul , Srinivas Kandagatla , linux-kernel@vger.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" Codec profile is required to be passed for WMA codecs so that we know the codec profile present and tell DSP accordingly, so update this API to pass the codec profile as argument Signed-off-by: Vinod Koul --- sound/soc/qcom/qdsp6/q6asm-dai.c | 4 ++-- sound/soc/qcom/qdsp6/q6asm.c | 2 +- sound/soc/qcom/qdsp6/q6asm.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/qcom/qdsp6/q6asm-dai.c b/sound/soc/qcom/qdsp6/q6asm-dai.c index c0d422d0ab94..8f245d03b6f5 100644 --- a/sound/soc/qcom/qdsp6/q6asm-dai.c +++ b/sound/soc/qcom/qdsp6/q6asm-dai.c @@ -250,7 +250,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, FORMAT_LINEAR_PCM, - prtd->bits_per_sample); + 0, prtd->bits_per_sample); } else if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { ret = q6asm_open_read(prtd->audio_client, FORMAT_LINEAR_PCM, prtd->bits_per_sample); @@ -652,7 +652,7 @@ static int q6asm_dai_compr_set_params(struct snd_compr_stream *stream, prtd->bits_per_sample = 16; if (dir == SND_COMPRESS_PLAYBACK) { ret = q6asm_open_write(prtd->audio_client, params->codec.id, - prtd->bits_per_sample); + params->codec.profile, prtd->bits_per_sample); 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 36e0eab13a98..64eb7b6ba305 100644 --- a/sound/soc/qcom/qdsp6/q6asm.c +++ b/sound/soc/qcom/qdsp6/q6asm.c @@ -858,7 +858,7 @@ static int q6asm_ac_send_cmd_sync(struct audio_client *ac, struct apr_pkt *pkt) * Return: Will be an negative value on error or zero on success */ int q6asm_open_write(struct audio_client *ac, uint32_t format, - uint16_t bits_per_sample) + u32 codec_profile, uint16_t bits_per_sample) { struct asm_stream_cmd_open_write_v3 *open; struct apr_pkt *pkt; diff --git a/sound/soc/qcom/qdsp6/q6asm.h b/sound/soc/qcom/qdsp6/q6asm.h index 6764f55f7078..1cff7f68b95d 100644 --- a/sound/soc/qcom/qdsp6/q6asm.h +++ b/sound/soc/qcom/qdsp6/q6asm.h @@ -55,7 +55,7 @@ void q6asm_audio_client_free(struct audio_client *ac); int q6asm_write_async(struct audio_client *ac, uint32_t len, uint32_t msw_ts, uint32_t lsw_ts, uint32_t flags); int q6asm_open_write(struct audio_client *ac, uint32_t format, - uint16_t bits_per_sample); + u32 codec_profile, uint16_t bits_per_sample); int q6asm_open_read(struct audio_client *ac, uint32_t format, uint16_t bits_per_sample);