Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1733499pxm; Thu, 24 Feb 2022 08:23:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJzR5i1+jbma1c6LEbwSCzi4Efx4eFPQehvwVs/NMjJow/8yPe0x8IppuVupJSWx9auiup9a X-Received: by 2002:a17:902:ec88:b0:14f:d5fb:7a8c with SMTP id x8-20020a170902ec8800b0014fd5fb7a8cmr3236737plg.5.1645719803741; Thu, 24 Feb 2022 08:23:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645719803; cv=none; d=google.com; s=arc-20160816; b=VryY/E4uFThvtNq6SgeyxLCnWOXrp7ksR8E2dUOBrQGdyeRBuMipKziIrRIzWvIM5G OSz+AeZ6RX3ZWa/ZfbhrhxAiMEmWG7RMnJ3N8Xu/ksdmZsrYLsJC2unTnQHhqfk4QMdN iIajd3wRGAYx1f3RR7yZ5j0VS7e7zvNNWCfZZCLDeqXvmuNlrLrFgcGhblJmcTJsHSw0 JClSdARkPVi2qh3irhjQb4GgWxYd0MiZ26SvJA7J/XBR+vAVX+jvCNAMNEl3tr0OhuI6 MpXnWbN7tSwip6l1JnxiyXmKvGveEoiXhddJgbTNEyuSjitlebplLrpqM9jvVbfvDOMH +t8A== 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=PxV/N18yz0PnOF/IEfjW+y8GisGCplxOMpBz4EPrdQg=; b=O2fYD+2pWMbUe5GQwfRSFkZXYYjGhxt6nfiKhGgRMheAJo58+naAr9Dy+kzVz/IjLq wXE13E7EhOooGc7XG5qEu+6eoicu3Aldq2yr0Ew77zH95DskMne59J6KCH2qZebo5LHo NMzv9XxCrOH6cx5mTeUSg998+OXtcDBnzkQjp6ST8oTGdYgdtxVSdtkTJZG7Sa4QsW9O kMqOH7SRI61xVnTArCxaXLvh4gEvZ8s1YP6H51GdviiitRTTPLPND/HO4hzmAxxcRrbP Sl+5KIHohIbmrZuejfxO0bxSRT24tEy796KlAS544/Vvro3A0lCMxTCKvJnF+ezb6iqI zXZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=Qeqewdsi; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id v19si2811455pfu.239.2022.02.24.08.23.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Feb 2022 08:23:23 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=Qeqewdsi; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 49B161D2B5C; Thu, 24 Feb 2022 08:13:27 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234136AbiBXMTg (ORCPT + 99 others); Thu, 24 Feb 2022 07:19:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233418AbiBXMTe (ORCPT ); Thu, 24 Feb 2022 07:19:34 -0500 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 907AE145625 for ; Thu, 24 Feb 2022 04:19:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1645705145; x=1677241145; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=PxV/N18yz0PnOF/IEfjW+y8GisGCplxOMpBz4EPrdQg=; b=QeqewdsiibdDooDgh+xxqSrn7SvJplaNL01YZTtAG6vOsRlFLQdN9K4B C+KzOs6mhhSbQbMP8b8Z/HIY+CmvMMUAFLrasa7tY2opDKdVggSnc7Egj +exOlN2Fu/VArGMii/a4U6zZNOFH5ldQ4WS+FkIv0JoSa6m4IngRi4/hR o=; Received: from unknown (HELO ironmsg02-sd.qualcomm.com) ([10.53.140.142]) by alexa-out-sd-02.qualcomm.com with ESMTP; 24 Feb 2022 04:19:05 -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 04:19:05 -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 04:19:02 -0800 From: Raghu Bankapur To: Vinod Koul , Jaroslav Kysela , "Takashi Iwai" , , CC: Krishna Jha , Raghu Bankapur Subject: [PATCH V2 1/1] ASoC: compress: propagate the error code from the compress framework Date: Thu, 24 Feb 2022 17:48:33 +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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c index de514ec8c83d..1882b2de1a5a 100644 --- a/sound/core/compress_offload.c +++ b/sound/core/compress_offload.c @@ -166,9 +166,13 @@ 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; + 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