Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1331529pxm; Thu, 24 Feb 2022 00:38:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJxrwbdEIOZOfRztPNY4BGIvKAr0eAl8olRT1yeD+1EJqqa82CffjLk9vTvA7fs0i1Zw8qfZ X-Received: by 2002:a17:90b:250f:b0:1b8:f257:c39 with SMTP id ns15-20020a17090b250f00b001b8f2570c39mr1683016pjb.135.1645691935317; Thu, 24 Feb 2022 00:38:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645691935; cv=none; d=google.com; s=arc-20160816; b=YbbOXPnqIlG6MK0Knug8ZUahMat2SMSeIo+ouhM7Q8kvFtc7WvXRNhWc84cLNshphI 5Xw77Y0rpeBHWlbQ1qB3cDfmPg2V3qUFYR6Rc6s9OdTiG5ya5okJi+KC6f5B/L25Dn4w tgpev/Pgj8i6L7qt+Ghw4a0uZHqTrRTDfuPB+EV1rD7u2AsYQtbOGVdG9BvX8UWNWqYn 0w114n9szo0oCfQzMojLqo/pJPJoUqXxOQ9HvJbBScpHkX1VT5kuIJTP5p66pCBYnS/+ MGlMj3rqFxjc/I8M36CvVqUu0Yu3IsFOW4HWuDsO88UCQ3w8Wg+43+HzEdh2vTfewy5/ lJzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=/f7/5aXrj1VvkZohdg3wHcq2F85RKdCY94ltEOcCXyE=; b=FgeAq0lr28rT5r3mryS9SvlDVhD4iRozbCal2aPIuGt4ZSVBT4FOLoi2u+ElR7ilBN QhUa7fLfgHr6GqI6TrdUNfpGSdOnGpuglIiOMuQFRlCWrziJutyE5Fxc2n6uxFF0SVUL YAHDHAO1MR4HmskkYOhwtPBhKtWenNTx3SmB61//oSHYGviv50pIpDwDAoehFos7gkuC IkpVACDJNJ4vh2TDUelVEWO2VRmLHejeF8ljle9Lm4MYFe6dY9qGcqb2Cht5LJG49pR5 Dwnzq43ATVMDl8Sk/RfH7GHh2PavCZt2yUl/Va54aTyH1q6xZ8bbC0hOr248Uy862iS1 WDpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=YyENxWVU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i2si1776854pgk.260.2022.02.24.00.38.39; Thu, 24 Feb 2022 00:38:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=YyENxWVU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231937AbiBXI2J (ORCPT + 99 others); Thu, 24 Feb 2022 03:28:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231954AbiBXI16 (ORCPT ); Thu, 24 Feb 2022 03:27:58 -0500 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74D13276D4E for ; Thu, 24 Feb 2022 00:27:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1645691248; x=1677227248; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=/f7/5aXrj1VvkZohdg3wHcq2F85RKdCY94ltEOcCXyE=; b=YyENxWVUZwLBcAgfD6nyKzeXjD05/TkMfpU3bI6kctJEc9e/JV/j9Hmj 46YVCJf3cvld90gq8XlZfRjTwkoHJ9wbwiqXQHGxPKjS9p73ZI4irFEzO 9TwErws5XYooAiTJv26e6HHWUHsFbAVXdWQgVwbdrAyDNBRpyAM7WFU06 s=; Received: from unknown (HELO ironmsg02-sd.qualcomm.com) ([10.53.140.142]) by alexa-out-sd-01.qualcomm.com with ESMTP; 24 Feb 2022 00:27:28 -0800 X-QCInternal: smtphost Received: from unknown (HELO nasanex01a.na.qualcomm.com) ([10.52.223.231]) by ironmsg02-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2022 00:27:28 -0800 Received: from hu-rbankapu-blr.qualcomm.com (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Thu, 24 Feb 2022 00:27:25 -0800 From: Raghu Bankapur To: Vinod Koul , Jaroslav Kysela , "Takashi Iwai" , , CC: Krishna Jha , Raghu Bankapur Subject: [PATCH V1 1/1] ASoC: compress: propagate the error code from the compress framework Date: Thu, 24 Feb 2022 13:56:54 +0530 Message-ID: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01a.na.qualcomm.com (10.52.223.231) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Propagate the error code from the compress framework for the timestamp query. This error code will be used by the client to handle the error case scenarios gracefully. Signed-off-by: Raghu Bankapur --- sound/core/compress_offload.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c index de514ec8c83d..b89adbf666b1 100644 --- a/sound/core/compress_offload.c +++ b/sound/core/compress_offload.c @@ -166,9 +166,12 @@ static int snd_compr_free(struct inode *inode, struct file *f) static int snd_compr_update_tstamp(struct snd_compr_stream *stream, struct snd_compr_tstamp *tstamp) { + int ret = 0; if (!stream->ops->pointer) return -ENOTSUPP; - stream->ops->pointer(stream, tstamp); + ret = stream->ops->pointer(stream, tstamp); + if (ret) + return ret; pr_debug("dsp consumed till %d total %d bytes\n", tstamp->byte_offset, tstamp->copied_total); if (stream->direction == SND_COMPRESS_PLAYBACK) -- 2.17.1