From patchwork Wed Nov 8 17:24:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 10048881 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 378E460247 for ; Wed, 8 Nov 2017 17:24:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A0B62A6B0 for ; Wed, 8 Nov 2017 17:24:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F0982A7BF; Wed, 8 Nov 2017 17:24:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C87AF2A6B0 for ; Wed, 8 Nov 2017 17:24:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 27E196E736; Wed, 8 Nov 2017 17:24:19 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt0-x244.google.com (mail-qt0-x244.google.com [IPv6:2607:f8b0:400d:c0d::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1744A6E72A; Wed, 8 Nov 2017 17:24:17 +0000 (UTC) Received: by mail-qt0-x244.google.com with SMTP id d9so4282277qtd.7; Wed, 08 Nov 2017 09:24:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=caUqIIqHnsGmx1ZB76MMro54aKLuvbMeqKbHbDuR+Gk=; b=lbTRRkMwN/2yBh+FTY1U7NeFTq9gp6oSz3AJTJjR3S5kL8qmvGXdyO2I/88d4Jcpz9 KNitbY4TKgYC8MjVS6vpI/YLVgCwaIgZFHg41w4fiNKQ+Tvo55BnKtgkrT/rMMRXVfkj feQ6ryAg/0qqCHviK5H9s5QjKsbWfdAPzn6PWnnhSDzNgIlpvJi3hOKk6cPdrmC1XHkX aTBCGBi62sS3x2CGqo1j9oTnurlliQJtA4dQBye2Oev4G8UF6VcesUVVEgw/8Cs6Fcve UpABKukxepOtonNjGXv6K7MIzTRFSbwpyEW9kkqCFt8qexjj36NE3bwdPDkS5aVnhlkD Nl5w== 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:in-reply-to :references; bh=caUqIIqHnsGmx1ZB76MMro54aKLuvbMeqKbHbDuR+Gk=; b=rNG+MyeUwA24qWbS/7rFmiDP1EmlbyjdMv8RyrYSwln6TNV5iFB24WXMFR5Znb9QmL OUuBEjnj8PLZWX69O9k2e0a0RtnqjpmAhtA1CyHxmTzIX5aIhOpPRV0Xbp4dUxPVXD3f P6sIIcfu1zxRZO4AX9ZuM18BC6s9ZeyMBiEigtOj83k6aYigJoz1PbLJCMMoroQjA1pi IpxKIRqeiWR5dE/H964yThj1nFq7hlKMx+CNso9M6Us4VjUzDZX9BMDp9QbW13VCwE7i xpuFCnI1SnsyTHw0c/pVVWsqzRItoOUqTbOrRtIJx5UpRIhAYtToeQPdj5mEvJ27RI9k V7Cg== X-Gm-Message-State: AJaThX4QEyrBI5diBUNZ9gdhP5dTlRrACTwToJrfu+GK9QnEX71GGF7Y Tt2iTGmA81HTKuYuzj1FDbVJLQ== X-Google-Smtp-Source: ABhQp+REI1BrkqPNA21vkyTnCfG3+2vILhZkA5z1cOiufk5slE9a3FDW4hyHROvhAHTtZyxbHRYh3Q== X-Received: by 10.200.8.239 with SMTP id y44mr1906836qth.245.1510161857067; Wed, 08 Nov 2017 09:24:17 -0800 (PST) Received: from localhost.localdomain (va-67-233-122-109.dhcp.embarqhsd.net. [67.233.122.109]) by smtp.gmail.com with ESMTPSA id k43sm3151324qtc.75.2017.11.08.09.24.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Nov 2017 09:24:16 -0800 (PST) From: Alex Deucher X-Google-Original-From: Alex Deucher To: amd-gfx@lists.freedesktop.org, alsa-devel@alsa-project.org, dri-devel@lists.freedesktop.org, broonie@kernel.org, Vijendar.Mukunda@amd.com Subject: [PATCH 3/3] FIXUP: FROMLIST: ASoC: amd: Report accurate hw_ptr during dma Date: Wed, 8 Nov 2017 12:24:04 -0500 Message-Id: <20171108172404.19118-4-alexander.deucher@amd.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171108172404.19118-1-alexander.deucher@amd.com> References: <20171108172404.19118-1-alexander.deucher@amd.com> Cc: Guenter Roeck , Alex Deucher , lgirdwood@gmail.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Guenter Roeck ERROR: "__aeabi_uldivmod" [sound/soc/amd/snd-soc-acp-pcm.ko] undefined! 64-bit divides require special operations to avoid build errors on 32-bit systems. BUG=b:63121716 TEST="Build i386:allmodconfig" Signed-off-by: Guenter Roeck Reviewed-on: https://chromium-review.googlesource.com/678919 Reviewed-by: Jason Clinton (cherry picked from commit 7ca726e80f21abdbaed9a5a70def1c33a26f8533) Reviewed-on: https://chromium-review.googlesource.com/681618 Signed-off-by: Alex Deucher --- sound/soc/amd/acp-pcm-dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c index 13d040a4d26f..ef7e98ad960c 100644 --- a/sound/soc/amd/acp-pcm-dma.c +++ b/sound/soc/amd/acp-pcm-dma.c @@ -856,12 +856,11 @@ static snd_pcm_uframes_t acp_dma_pointer(struct snd_pcm_substream *substream) if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { if (bytescount > rtd->renderbytescount) bytescount = bytescount - rtd->renderbytescount; - pos = bytescount % buffersize; } else { if (bytescount > rtd->capturebytescount) bytescount = bytescount - rtd->capturebytescount; - pos = bytescount % buffersize; } + pos = do_div(bytescount, buffersize); return bytes_to_frames(runtime, pos); }