Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1037774pxm; Wed, 23 Feb 2022 16:32:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJwrKlhEYk9mz7YayTBNlcXleUTwUEgqD+bSluPOS7P2rCZjZ3tF/OMThNXnEd2bavREDSFg X-Received: by 2002:a17:902:ce86:b0:14c:9139:5839 with SMTP id f6-20020a170902ce8600b0014c91395839mr39346plg.168.1645662739233; Wed, 23 Feb 2022 16:32:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645662739; cv=none; d=google.com; s=arc-20160816; b=Ie2hqW7Wg+qvfWv+ayX5CoIzxZ0GLl7pagW6xAIck3kuO2GopJb5kUms/YT/ueaYuQ 1OHQ8Nd4i9pAOPhD3Xv+f2YfaO7BOtu0thrtvp++/VAP9brGe3apVEvtO1zLTaaNDhUt o8s/iRlVaBH2NBdL5Pt9X42DcO82cyH7iNr5nrrFoJbF7eoexNBLfPtFQzbTgImd46Qp Ru++O/Rs18V3OAJBiu7xa65IjGYaDSQW/lYZHczdAhv9zOUlD3Yle6ygE4Uv9m91tdEp uXntku8DRfTd8bdkI6vLdfjO3BeEkdpysKVHF+zaTVtnpnlZvWqEfaueIwrFn1FMFf0+ NT3Q== 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=xDllAEF46R317WHwvyU/EeytzHdwGiWyww3otsuSb90=; b=zUyc5TKKbsF1Vu5Adhkn6weK7jBQAjdmFJgI6jp+fUUDwuJmw2FLSYNXgniA1PKKdn gLtLxXGG+P5LVEyno0TbgnqHnFS9iz6glbyWTRL4QXAwX4xplkqkEnegGyy8oLiAfGbR 3xWiAoBysnecgH7QEbZZMlpv6gTwI0NzQ3owkuNhOVVysEQhNO8E5o+4dNqN/vCCW4ZS fcUC9z7HxKptTYQLDdeTDMaggZTHwODqiCcVrMA/KXhIhVK8zIKb8YPGrzv4NUIJE14n mqvEru8JIROYgqxVdBq4FPUKbu2/EJN6xOeejwcu8bJ2sr6KmbU6r3Rvh5+CLV/08lSd rXRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=i9sYKv29; 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 bg25si1189669pgb.88.2022.02.23.16.32.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 16:32:19 -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=i9sYKv29; 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 7729839BA7; Wed, 23 Feb 2022 16:31:48 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240558AbiBWM4E (ORCPT + 99 others); Wed, 23 Feb 2022 07:56:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229729AbiBWM4E (ORCPT ); Wed, 23 Feb 2022 07:56:04 -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 CDF0697B96 for ; Wed, 23 Feb 2022 04:55:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1645620936; x=1677156936; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=xDllAEF46R317WHwvyU/EeytzHdwGiWyww3otsuSb90=; b=i9sYKv29c2wbSLjh3ho/6Ru/K0U9yLIzpItU8QrDaiEo+wOK8tGtwBSo I0D3e39ezPLuM3m0pjCaLW97epJuM+K62dhvAjOQ/uBfT5ndD2P7BWvZa J4OrKMrR7ln1OTXhDMjfH6DSYiPrR/PoFnLdonZOkzE0GEZ9hnlRGWqO4 M=; Received: from unknown (HELO ironmsg04-sd.qualcomm.com) ([10.53.140.144]) by alexa-out-sd-01.qualcomm.com with ESMTP; 23 Feb 2022 04:55:36 -0800 X-QCInternal: smtphost Received: from unknown (HELO nasanex01a.na.qualcomm.com) ([10.52.223.231]) by ironmsg04-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 04:55:37 -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; Wed, 23 Feb 2022 04:55:32 -0800 From: Raghu Bankapur To: 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: Wed, 23 Feb 2022 18:22:50 +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 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c index de514ec8c83d..48aa87d08bdc 100644 --- a/sound/core/compress_offload.c +++ b/sound/core/compress_offload.c @@ -31,7 +31,11 @@ #include #include #include -#include +#include ASoC: compress: propagate the error code from the compress framework + +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. /* struct snd_compr_codec_caps overflows the ioctl bit size for some * architectures, so we need to disable the relevant ioctls. @@ -166,9 +170,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