alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Dylan Reid <dgreid@chromium.org>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, Dylan Reid <dgreid@chromium.org>, zonque@gmail.com
Subject: [PATCH 0/3] Allow suspend/resume with USB audio.
Date: Mon, 17 Sep 2012 13:11:36 -0700	[thread overview]
Message-ID: <1347912699-9969-1-git-send-email-dgreid@chromium.org> (raw)

Problem being addressed:
shell one$ aplay -Dhw:<usbcard> 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.

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

             reply	other threads:[~2012-09-17 20:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-17 20:11 Dylan Reid [this message]
2012-09-17 20:11 ` [PATCH 1/3] ALSA: usb-audio: set period_bytes in substream Dylan Reid
2012-09-17 20:11 ` [PATCH 2/3] ALSA: usb-audio: Don't require hw_params in endpoint Dylan Reid
2012-09-17 20:11 ` [PATCH 3/3] ALSA: usb-audio: Move configuration to prepare Dylan Reid
2012-09-18  8:20   ` Takashi Iwai
2012-09-18 12:59     ` Takashi Iwai
2012-09-18 16:42       ` Dylan Reid
2012-09-18 12:47   ` Takashi Iwai
2012-09-18 16:41     ` Dylan Reid

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1347912699-9969-1-git-send-email-dgreid@chromium.org \
    --to=dgreid@chromium.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    --cc=zonque@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).