From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dylan Reid Subject: [PATCH v2 0/3] Allow suspend/resume with USB audio. Date: Tue, 18 Sep 2012 09:49:45 -0700 Message-ID: <1347986988-11382-1-git-send-email-dgreid@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-vb0-f73.google.com (mail-vb0-f73.google.com [209.85.212.73]) by alsa0.perex.cz (Postfix) with ESMTP id 48B3C2650D2 for ; Tue, 18 Sep 2012 18:49:53 +0200 (CEST) Received: by vbbfs19 with SMTP id fs19so6653vbb.2 for ; Tue, 18 Sep 2012 09:49:52 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: alsa-devel@alsa-project.org Cc: tiwai@suse.de, Dylan Reid , zonque@gmail.com List-Id: alsa-devel@alsa-project.org Problem being addressed: shell one$ aplay -Dhw: file.wav shell two$ echo mem > /sys/power/state After resume, aplay attempts resume, then restart, then after a timeout gets a write error and no audio will be played until it is restarted. During suspend/resume, if the USB port remains powered the audio device will still be present upon resume. The interface and endpoint have to be reconfigured however. These patches move the configuration from hw_params to prepare causing re-configuration during resume. Is this the right way to fix this? Or is there an easier way I am missing? Thanks for looking. v2: fix unused variable warnings. Dylan Reid (3): ALSA: usb-audio: set period_bytes in substream. ALSA: usb-audio: Don't require hw_params in endpoint. ALSA: usb-audio: Move configuration to prepare. sound/usb/card.h | 2 + sound/usb/endpoint.c | 29 +++++++----- sound/usb/endpoint.h | 5 ++- sound/usb/pcm.c | 121 +++++++++++++++++++++++++++++++-------------------- 4 files changed, 97 insertions(+), 60 deletions(-) -- 1.7.12.146.g16d26b1