All of lore.kernel.org
 help / color / mirror / Atom feed
* Default device with fallback
@ 2007-02-16  1:49 Lee Revell
  2007-02-16 10:01 ` Jean-Michel Pouré
  0 siblings, 1 reply; 3+ messages in thread
From: Lee Revell @ 2007-02-16  1:49 UTC (permalink / raw)
  To: Alsa Dev

Hey,

Lately there's been a lot of discussion on linux audio lists about the
best way to handle the default device, in the face of multiple cards
some of which could be hot-pluggable and might even be identical.

Module indices can help in a pinch but are no solution - they require
root access and can't change the default device without requiring all
sound apps to be restarted.

gnome-sound-properties comes closest to solving the problem - it
creates an .asoundrc that defines the "default" device for each user
(compare KDE which does not even try).  But if the default device is
defined to a USB audio interface, when the device is unplugged apps
will fail rather than falling back to the next available device.

How hard would it be to extend ALSA to allow defining a default PCM
that automatically falls back to the first device present if
unplugged?

As far as I can tell this would solve the ALSA device selection
problem completely (ignoring OSS emulation which is increasingly
irrelevant with the new Flash and Skype releases).

Lee

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Default device with fallback
  2007-02-16  1:49 Default device with fallback Lee Revell
@ 2007-02-16 10:01 ` Jean-Michel Pouré
  2007-02-16 19:25   ` Lee Revell
  0 siblings, 1 reply; 3+ messages in thread
From: Jean-Michel Pouré @ 2007-02-16 10:01 UTC (permalink / raw)
  To: Lee Revell; +Cc: Alsa Dev

Dear Lee,

I am really new to Alsa, so my opinion may not matter:

I have three sound card : one Edirol UA-25 and two Terratec Aureon USB
MK2. The problem is that when unplugin one or several devices, the
plughw:x,y number may change. This is the main problem.

In the best approach, I would prefer to be able to set plughw:x,y
numbers once for all. I hope this can be done using Udev, but I am not
sure.

Would it be possible to address devices using product IDs directly. I
know this sounds incredible, but each device usually has a unique ID
somewhere.

So in place of writing plughw:x,y, we would write productid:xyzzer. This
would allow plughw:x,y to continue to behave like today. The only
difference is that users would really have a unique way of naming
hotplugable devices.

Kind regards,
Jean-Michel


> Lately there's been a lot of discussion on linux audio lists about the
> best way to handle the default device, in the face of multiple cards
> some of which could be hot-pluggable and might even be identical.
> 
> Module indices can help in a pinch but are no solution - they require
> root access and can't change the default device without requiring all
> sound apps to be restarted.
> 
> gnome-sound-properties comes closest to solving the problem - it
> creates an .asoundrc that defines the "default" device for each user
> (compare KDE which does not even try).  But if the default device is
> defined to a USB audio interface, when the device is unplugged apps
> will fail rather than falling back to the next available device.
> 
> How hard would it be to extend ALSA to allow defining a default PCM
> that automatically falls back to the first device present if
> unplugged?
> 
> As far as I can tell this would solve the ALSA device selection
> problem completely (ignoring OSS emulation which is increasingly
> irrelevant with the new Flash and Skype releases).


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Default device with fallback
  2007-02-16 10:01 ` Jean-Michel Pouré
@ 2007-02-16 19:25   ` Lee Revell
  0 siblings, 0 replies; 3+ messages in thread
From: Lee Revell @ 2007-02-16 19:25 UTC (permalink / raw)
  To: Jean-Michel Pouré; +Cc: Alsa Dev

On 2/16/07, Jean-Michel Pouré <jmpoure@free.fr> wrote:
> Would it be possible to address devices using product IDs directly. I
> know this sounds incredible, but each device usually has a unique ID
> somewhere.
>
> So in place of writing plughw:x,y, we would write productid:xyzzer. This
> would allow plughw:x,y to continue to behave like today. The only
> difference is that users would really have a unique way of naming
> hotplugable devices.

Yes - cards are already addressable by name.  So if /proc/asound/cards contains:

 0 [Audigy2        ]: Audigy2 - Audigy 2 ZS [SB0350]
                      Audigy 2 ZS [SB0350] (rev.4, serial:0x20021102)
at 0xe800, irq 10

You would use "plughw:Audigy2" rather than "plughw:x,y".

I believe USB devices have a hardware GUID that the other OS uses to
distinguish multiple devices of the same type.  If ALSA were to expose
this in the card name then persistent device naming should be
possible.

Lee

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-02-16 19:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-16  1:49 Default device with fallback Lee Revell
2007-02-16 10:01 ` Jean-Michel Pouré
2007-02-16 19:25   ` Lee Revell

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.