From patchwork Thu Feb 24 08:26:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raghu Ballappa Bankapur X-Patchwork-Id: 546465 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id CAD44C433F5 for ; Fri, 25 Feb 2022 13:19:52 +0000 (UTC) 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 EFBFF1B60; Fri, 25 Feb 2022 14:19:00 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EFBFF1B60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1645795191; bh=jhQw7/Pf0WEldEoWnvQGyFLv+FnZKFlSARHvpeyi+xQ=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=n1DBwVtODGubH/3XI/0F+585OfR+Y3FH0FTDPWTrfS0wJ4aekckf7NTvkiZc3jFUN n2yIHCdUBttK8YHa8qin4lgV5PavPFAAAI3TySrxa2MmYTuqLJElVuRhT90In90OFj 0TnpEQVY833FMmInAyLnaWo56V8YR2m9cz/x3L3I= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7F7EDF805E0; Fri, 25 Feb 2022 14:11:36 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2184FF8030F; Thu, 24 Feb 2022 09:27:37 +0100 (CET) Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8B119F800B6 for ; Thu, 24 Feb 2022 09:27:30 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8B119F800B6 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="iuE+FQxu" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1645691251; x=1677227251; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=/f7/5aXrj1VvkZohdg3wHcq2F85RKdCY94ltEOcCXyE=; b=iuE+FQxuE4omLi6NvJ+Ma9mfpsBhj68H9niUh41nzrd4OI11rcx1YRTu 2MvgvOqbcmvGONi7figfqkvVJyR9YfVBdOUwdzuTloOTrnoG3Lq8d5/K7 DLbOSnLEvUfA2l/8BWZ1k+cdJ2IJw3Fn6Pg7Go3St5t+N/RggSkwFzeMD s=; Received: from unknown (HELO ironmsg02-sd.qualcomm.com) ([10.53.140.142]) by alexa-out-sd-02.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" , , 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 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-Mailman-Approved-At: Fri, 25 Feb 2022 14:11:19 +0100 Cc: Krishna Jha , Raghu Bankapur 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" Message-ID: <20220224082654.4fICo_YldQy-iY4ZaOy2h5D0BMtGWOGWFVKFCRfJO7A@z> 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)