From patchwork Tue Jul 21 17:00:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 11676259 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8C5CF13B1 for ; Tue, 21 Jul 2020 17:02:57 +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 227C82073A for ; Tue, 21 Jul 2020 17:02:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="XKolwYP/"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="PVIhzoPM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 227C82073A 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 A71441678; Tue, 21 Jul 2020 19:02:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A71441678 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1595350975; bh=zHtjEMOkxtUP/lYNqNvvBlSCRoRZRejH3l9nj0Gk1dU=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=XKolwYP/PMOWzeftHeuklWIVyKCId6dLQdrSasGt8DZMZgt8HfdaLDZL0Svn4xnK2 uuQ9wtWQurLjI5weljb96WRKOl2NXZD+OC6sv7OQL5O5ZFiz70Jf1nE8WejEm8EKjt fZsDkvfBb3ddj5a8L6Yl+jFTLfGD6HO1tGf/Wyd4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B257EF802D2; Tue, 21 Jul 2020 19:00:34 +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 08564F802D2; Tue, 21 Jul 2020 19:00:31 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.0 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) (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 05CA4F80274 for ; Tue, 21 Jul 2020 19:00:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 05CA4F80274 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="PVIhzoPM" Received: by mail-wm1-x333.google.com with SMTP id w3so3586282wmi.4 for ; Tue, 21 Jul 2020 10:00:14 -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:mime-version :content-transfer-encoding; bh=3xJrlFMWKxatZWph59ICW46ox2+7HmmvvIn3EeO3FeI=; b=PVIhzoPM3gEKKNEvTDPU2WIGtUhV/u/A5vb8GkfStZQGTn5fcZQkHF6bSvbbjOFuHE PNG8+7cf3SGbqoCPqe/L8csJj60z6FNPKmFUdUwcrqda34gCifbx293ULH1RaGg9ckO4 Eu60QSn4tK2vo6FgCVTTnenXJbXQfJ65WcIAC0yGHxPc0FNte+6/QtoFx9rQj33rZhMO hiz1AFhtgOSevd/zk7EZopgPPPMW16xbfBtwwUXW4ehgOHzRqLHcnfauSatP+DALT6Vj RHSSmYa+I43Xew+DutleOWZYfiNZqnpDUecTJ9nAz+VAlBB/770ICyBDps78iz5cstTF /swA== 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:mime-version :content-transfer-encoding; bh=3xJrlFMWKxatZWph59ICW46ox2+7HmmvvIn3EeO3FeI=; b=BfO/gDtaIYfcd44amhWCYqqXbLRvNO1U8uDGdE7F2z80VPE7CyPyw7CjsX/adCdBc1 Y4sc9/gU5Df7dkSuYgna/pcyx+9vBZg5Z6fhuPkFOJP/2vc3mwWGRbsuZ09dvMIm6lim 5BbkyK1+u99xnQ6u1zSCLkyLUDk4ngDAii9o2vxxJFjydnHQbCN2jBnRY51UPDLp37G0 MPiLRN907b8dhzHJOKOq1rD3ujTLEohO7/P+DfPRBSQuY04U23hidWRjedDuVBR/S1ZD e7L+xz27j1iJ9IjlC3F/f+oH3GSk2kdcpfcyeQ1vOPvGQn7ECVIwau3/IXIGE0ZTK8mP Zovw== X-Gm-Message-State: AOAM531XGfQX+bENnJApKZZKtAAQNze7QAbh5apGNGQ2EgNteTseGf1+ AkucJVdKM9YgmefP/Q64dVjD9Q== X-Google-Smtp-Source: ABdhPJyYZBuQBKApyeCyxRx1114Gjkuf5aLBbKXX19WAtdt2tYwrr6tlGYAxkvYG3bw+HoqMbUAAAQ== X-Received: by 2002:a1c:7311:: with SMTP id d17mr4798367wmb.60.1595350812765; Tue, 21 Jul 2020 10:00:12 -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 h11sm15526327wrb.68.2020.07.21.10.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2020 10:00:11 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org Subject: [RFC PATCH v2 0/6] ALSA: compress: add support to change codec profile in gapless playback Date: Tue, 21 Jul 2020 18:00:01 +0100 Message-Id: <20200721170007.4554-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Cc: 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" For gapless playback it is possible that each track can have different codec profile with same decoder, for example we have WMA album, we may have different tracks as WMA v9, WMA v10 and so on Or if DSP's like QDSP have abililty to switch decoders on single stream for each track, then this call could be used to set new codec parameters. Existing code does not allow to change this profile while doing gapless playback. This patchset adds new SNDRV_COMPRESS_SET_CODEC_PARAMS IOCTL along with flags in capablity structure to allow userspace to set this new parameters required which switching codec profile, either for gapless or cross fade usecase. thanks, srini Changes since v1: - split patch into smaller chuncks, - bump up the version - added flags in compress capablity structure - added user for this new functionality. - add this new call in Documentation. Srinivas Kandagatla (6): ALSA: compress: move codec parameter check to a function ALSA: compress: add new ioctl for setting codec parameters ALSA: compress: add flags to snd_compr_caps to expose dsp caps ASoC: compress: add snd_soc_dai_compr_set_codec_params() ALSA: compress: bump the version ASoC: q6asm-dai: add support to set_codec_params .../sound/designs/compress-offload.rst | 6 ++ include/sound/compress_driver.h | 5 ++ include/sound/soc-component.h | 3 + include/sound/soc-dai.h | 5 ++ include/uapi/sound/compress_offload.h | 10 ++- sound/core/compress_offload.c | 72 +++++++++++++++++-- sound/soc/qcom/qdsp6/q6asm-dai.c | 33 +++++++++ sound/soc/soc-compress.c | 30 ++++++++ sound/soc/soc-dai.c | 14 ++++ 9 files changed, 170 insertions(+), 8 deletions(-)