All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: James Courtier-Dutton <James@superbug.demon.co.uk>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: USB disconnect/connect messages
Date: Mon, 21 Jul 2003 17:25:46 +0200	[thread overview]
Message-ID: <s5hoeznj405.wl@alsa2.suse.de> (raw)
In-Reply-To: <3F1B2870.3070505@superbug.demon.co.uk>

At Mon, 21 Jul 2003 00:40:32 +0100,
James Courtier-Dutton wrote:
> 
> Hi,
> 
> Is there any way to tell if a USB sound card has been disconnected or not?
 
IIRC, this is not notified to the application.
the app simply would get an error at the further access.
it sounds not bad to notify the status change to the application by
some way.
perhaps we can add a new control element for this purpose.
and after disconnection, only this element survives to communicate
with the application...


> I would like my application to play sound to a usb sound card, and if 
> the usb cable is unplugged, the application pauses, and if the usb cable 
> is plugged in again, the application continues.
> 
> Example: -
> Some in car stereo systems have usb ports.
> I could plug a PC into the usb port, and play sound from the PC to the 
> car speaker system. If the driver switches off the car stereo (e.g. 
> Receives a mobile phone call) I want the PC to pause playback, but when 
> the car stereo switches on again, I want the PC to continue playback.
> The car stereo switching off looks to the PC as though the usb cable has 
> been unplugged.

from the driver side, i see it's difficult to "resume" from the
disconnection to the disconnection state.  you won't get the same
usb_device record after re-plugging.
of course, it would be possible to handle this in the application side
(or possibly in alsa-lib) "as if" it's reconnected, though.


Takashi


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0

  reply	other threads:[~2003-07-21 15:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-20 23:40 USB disconnect/connect messages James Courtier-Dutton
2003-07-21 15:25 ` Takashi Iwai [this message]
2003-07-21 18:03   ` James Courtier-Dutton
2003-07-21 18:23     ` Takashi Iwai

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=s5hoeznj405.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=James@superbug.demon.co.uk \
    --cc=alsa-devel@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.