Message ID | CALw8SCV8penDHKxTjrg0Z7k6dTFxEq79G8fK74iPz+3vix1fcQ@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org> 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 3627A603ED for <patchwork-linux-rockchip@patchwork.kernel.org>; Wed, 17 Jan 2018 14:08:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2698728583 for <patchwork-linux-rockchip@patchwork.kernel.org>; Wed, 17 Jan 2018 14:08:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1AFC328591; Wed, 17 Jan 2018 14:08:49 +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.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9779528583 for <patchwork-linux-rockchip@patchwork.kernel.org>; Wed, 17 Jan 2018 14:08:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: References:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2nFmN/vR9BuAr+uvwZJlNdO7hGWPe2RlFXsDeP3JIL8=; b=Oou0JS+IgwVA3Z Lx1MDLJe7VMrA2/9vnoh0Tqd9adeQuAksmH1whrEx3tWsTHfq+tCdGzaQcmWqd27Q2Bds1DLQVLXT s4KZ6P2ho+J1T1dxuhCmV+IzRSO3znOCs0idWEff1Lcv1P6TgVVjD7YqlUmLQQ5t234elX4xcZ6qy yO9vz+JlsLoCC0gZf+MUO9PYVBYGE+d4X7kb1nAQKfdNw4VJi7h77djlIp3OhQSREEK0lqCKhvlww mB+9gSu+tyNLXenJFkq4bOYVWfckY8tA9u5nElVWUy4rgyVN0zqYFD6eoHRbtOOMht0d4gswrmA2g lvI6Yj/FURL3xyhdRLpQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eboOV-0002bI-2I; Wed, 17 Jan 2018 14:08:47 +0000 Received: from mail-qt0-x241.google.com ([2607:f8b0:400d:c0d::241]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eboOO-0002aP-KL for linux-rockchip@lists.infradead.org; Wed, 17 Jan 2018 14:08:46 +0000 Received: by mail-qt0-x241.google.com with SMTP id m59so22644175qte.11 for <linux-rockchip@lists.infradead.org>; Wed, 17 Jan 2018 06:08:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=L0jMCiyU1OvpSbOQ6EgXeqM+jSmyQ+6iqAz0DVxmxRI=; b=q+yxR7t4lVvDuJtW0MPPd2EHZjZ4skTjwj+KkSboR8GHTQKGncFJg9I/VPCe8B79Ll zA4800ZB0cQMN0pQohL0id5kjLsF0qPVg3L+5n6XsIiz+I9kN2vKZpvG69BDRX57hl7U 0denwlNZQOOwvo61Y9k799PJAzI8XZBLLeXe4BLpJzRtu8UICkU1zMJzfLY/8InIeEHu FPaA6o50D0Pro/IXJk0r35wCb+InbhBI5N/zPruJ1RAWWgAFx1EGoiPsCBAuA4gXd3AN RkZACiqEOrEC7f6wEQYUuIAF6HqtVSruo2VKSfdPRQSHHdkV1p2dFuCEM224fY+FnR2F Jd8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=L0jMCiyU1OvpSbOQ6EgXeqM+jSmyQ+6iqAz0DVxmxRI=; b=MiteZNWiOlo7AEgFUAbvxDiPX9fcdjcNC03AbsOmO1bHvds0c22iWJ48hDakt544E0 n9GcWJuvR8joxIAMxYxcmn229qkRXvygBuEY7YDnoxYySO9iIPJ3mYA423ATjfeVMt3s +Istmi2lbe5CyQcbwlqpvwAQL/Jo62bwm1fi1fv7UOaBZe3OoT/ALv2M7hL7Qge8jS2f lj7hegeQLsY/3rtVaamywekjllNCtl82loEgETDdIfO8hF+MQDHNgWt+pykWvrOOJM2E QHTzmhzMo7VWCjovt8zN0X/862ix7XyiNB3HhXsmGzhJTa9M0GUHVAYohjQyeYv9Ly07 8mrg== X-Gm-Message-State: AKwxyteN4hdPz713Wlf3wEXV/cPqHnjz7aw5AEJFpY/PkWQ7m7A+Po6/ gmvMRoQ7k9NQM5sQzEih8KLmfS6swYrJOmaqG7AVXQ== X-Google-Smtp-Source: ACJfBosFC1NefT7v6GmNp6KsmslK3w22rb+ncklS+fnZPy0fXNp2aimvNxTwKIJnoKgzarmoqCHFZLbCoJAYbGGbDpQ= X-Received: by 10.237.39.213 with SMTP id m21mr19761785qtg.303.1516198107632; Wed, 17 Jan 2018 06:08:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.200.63.14 with HTTP; Wed, 17 Jan 2018 06:08:27 -0800 (PST) In-Reply-To: <s5hwp0ndkcm.wl-tiwai@suse.de> References: <CALw8SCXUpeUv8433Rd9is6eNd9ztd6soEOoDMkVSLue6qT6wKg@mail.gmail.com> <s5h7esnpe3z.wl-tiwai@suse.de> <CALw8SCX8XmVeLncD3GNHtt32MW26EGW=XFG=2iuK7vvREzj8Dw@mail.gmail.com> <s5hwp0ndkcm.wl-tiwai@suse.de> From: Mirza Krak <mirza.krak@gmail.com> Date: Wed, 17 Jan 2018 15:08:27 +0100 Message-ID: <CALw8SCV8penDHKxTjrg0Z7k6dTFxEq79G8fK74iPz+3vix1fcQ@mail.gmail.com> Subject: Re: [alsa-devel] Bad PCM stream after a suspend/resume cycle To: Takashi Iwai <tiwai@suse.de> X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms <linux-rockchip.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-rockchip>, <mailto:linux-rockchip-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-rockchip/> List-Post: <mailto:linux-rockchip@lists.infradead.org> List-Help: <mailto:linux-rockchip-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-rockchip>, <mailto:linux-rockchip-request@lists.infradead.org?subject=subscribe> Cc: linux-rockchip@lists.infradead.org, alsa-devel@alsa-project.org, =?UTF-8?Q?Heiko_St=C3=BCbner?= <heiko@sntech.de> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "Linux-rockchip" <linux-rockchip-bounces@lists.infradead.org> Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/aplay/aplay.c b/aplay/aplay.c index f793c82..040cec1 100644 --- a/aplay/aplay.c +++ b/aplay/aplay.c @@ -2020,6 +2020,8 @@ static ssize_t pcm_write(u_char *data, size_t count) if (test_position) do_test_position(); if (r == -EAGAIN || (r >= 0 && (size_t)r < count)) { + if (snd_pcm_state(handle) == SND_PCM_STATE_SUSPENDED) + suspend(); if (!test_nowait) snd_pcm_wait(handle, 100); } else if (r == -EPIPE) {