All of lore.kernel.org
 help / color / mirror / Atom feed
* devices/subdevices, hw:/plughw:
@ 2002-09-20 16:24 Florian Bomers
  2002-09-20 17:27 ` Patrick Shirkey
  0 siblings, 1 reply; 4+ messages in thread
From: Florian Bomers @ 2002-09-20 16:24 UTC (permalink / raw)
  To: alsa-devel

(I initially posted this to alsa-user without answers. Hope to get more lucky
here...)

Hi,

sorry for those general questions, but I wasn't able to find anything on the
archives or in the ALSA documentation.

What is the meaning of devices vs. subdevices ? What is an example where a
device would have several subdevices, as opposed to the card having several
devices ? I want to display a list of available "ports" where the user can send
the audio generated by the program. If a device has several subdevices, would I
include them in the list, or just list the devices for each card ?

My program successfully lists the cards with their devices and subdevices for
hw: (i.e. snd_ctl_open("hw:0") ). However, this does not work for the plughw:
way, although from what I understood, I want to use plughw: (as it is supposed 
to support automatic sample rate conversion). How do I iterate all available 
plughw: "cards", devices, and subdevices? Or can I assume that if hw:0,0 exists, 
that plughw:0,0 is the same card/device - and I just can't iterate available 
plughw:'s directly ?

Thanks!
Florian


-- 
Florian Bomers
Java Sound
Java Software/Sun Microsystems, Inc.
http://java.sun.com/products/java-media/sound/


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

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

* Re: devices/subdevices, hw:/plughw:
  2002-09-20 16:24 devices/subdevices, hw:/plughw: Florian Bomers
@ 2002-09-20 17:27 ` Patrick Shirkey
  2002-09-20 18:02   ` Florian Bomers
  2002-09-21  5:44   ` Jaroslav Kysela
  0 siblings, 2 replies; 4+ messages in thread
From: Patrick Shirkey @ 2002-09-20 17:27 UTC (permalink / raw)
  To: Florian Bomers; +Cc: alsa-devel

Florian Bomers wrote:
> (I initially posted this to alsa-user without answers. Hope to get more lucky
> here...)
> 
> Hi,
> 
> sorry for those general questions, but I wasn't able to find anything on the
> archives or in the ALSA documentation.
> 
> What is the meaning of devices vs. subdevices ? What is an example where a
> device would have several subdevices, as opposed to the card having several
> devices ? 

A card is a device. The available pcm channels are sub devices.


>I want to display a list of available "ports" where the user can send
> the audio generated by the program. If a device has several subdevices, would I
> include them in the list, or just list the devices for each card ?
> 

You should include the sub devices.

> My program successfully lists the cards with their devices and subdevices for
> hw: (i.e. snd_ctl_open("hw:0") ). However, this does not work for the plughw:
> way, although from what I understood, I want to use plughw: (as it is supposed 
> to support automatic sample rate conversion). How do I iterate all available 
> plughw: "cards", devices, and subdevices? Or can I assume that if hw:0,0 exists, 
> that plughw:0,0 is the same card/device - and I just can't iterate available 
> plughw:'s directly ?
> 

yes plughw:0,0 is the same as hw:0,0 but with automatic sample rate 
conversion.


> Thanks!
> Florian
> 
> 


-- 
Patrick Shirkey - Boost Hardware Ltd.
For the discerning hardware connoisseur
Http://www.boosthardware.com
Http://www.boosthardware.com/LAU/guide/
========================================

"Um...symbol_get and symbol_put... They're
kindof like does anyone remember like get_symbol
and put_symbol I think we used to have..."
- Rusty Russell in his talk on the module subsystem



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

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

* Re: devices/subdevices, hw:/plughw:
  2002-09-20 17:27 ` Patrick Shirkey
@ 2002-09-20 18:02   ` Florian Bomers
  2002-09-21  5:44   ` Jaroslav Kysela
  1 sibling, 0 replies; 4+ messages in thread
From: Florian Bomers @ 2002-09-20 18:02 UTC (permalink / raw)
  To: alsa-devel

Thanks that explains.
Florian

Patrick Shirkey wrote:
> 
> Florian Bomers wrote:
> > (I initially posted this to alsa-user without answers. Hope to get more lucky
> > here...)
> >
> > Hi,
> >
> > sorry for those general questions, but I wasn't able to find anything on the
> > archives or in the ALSA documentation.
> >
> > What is the meaning of devices vs. subdevices ? What is an example where a
> > device would have several subdevices, as opposed to the card having several
> > devices ?
> 
> A card is a device. The available pcm channels are sub devices.
> 
> >I want to display a list of available "ports" where the user can send
> > the audio generated by the program. If a device has several subdevices, would I
> > include them in the list, or just list the devices for each card ?
> >
> 
> You should include the sub devices.
> 
> > My program successfully lists the cards with their devices and subdevices for
> > hw: (i.e. snd_ctl_open("hw:0") ). However, this does not work for the plughw:
> > way, although from what I understood, I want to use plughw: (as it is supposed
> > to support automatic sample rate conversion). How do I iterate all available
> > plughw: "cards", devices, and subdevices? Or can I assume that if hw:0,0 exists,
> > that plughw:0,0 is the same card/device - and I just can't iterate available
> > plughw:'s directly ?
> >
> 
> yes plughw:0,0 is the same as hw:0,0 but with automatic sample rate
> conversion.
> 
> > Thanks!
> > Florian
> >
> >
> 
> --
> Patrick Shirkey - Boost Hardware Ltd.
> For the discerning hardware connoisseur
> Http://www.boosthardware.com
> Http://www.boosthardware.com/LAU/guide/
> ========================================
> 
> "Um...symbol_get and symbol_put... They're
> kindof like does anyone remember like get_symbol
> and put_symbol I think we used to have..."
> - Rusty Russell in his talk on the module subsystem

-- 
Florian Bomers
Java Sound
Java Software/Sun Microsystems, Inc.
http://java.sun.com/products/java-media/sound/


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

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

* Re: devices/subdevices, hw:/plughw:
  2002-09-20 17:27 ` Patrick Shirkey
  2002-09-20 18:02   ` Florian Bomers
@ 2002-09-21  5:44   ` Jaroslav Kysela
  1 sibling, 0 replies; 4+ messages in thread
From: Jaroslav Kysela @ 2002-09-21  5:44 UTC (permalink / raw)
  To: Patrick Shirkey; +Cc: Florian Bomers, alsa-devel@lists.sourceforge.net

On Sat, 21 Sep 2002, Patrick Shirkey wrote:

> Florian Bomers wrote:
> > (I initially posted this to alsa-user without answers. Hope to get more lucky
> > here...)
> > 
> > Hi,
> > 
> > sorry for those general questions, but I wasn't able to find anything on the
> > archives or in the ALSA documentation.
> > 
> > What is the meaning of devices vs. subdevices ? What is an example where a
> > device would have several subdevices, as opposed to the card having several
> > devices ? 
> 
> A card is a device. The available pcm channels are sub devices.

Not really. A card can have several PCM devices. Each PCM device can have 
1-N PCM subdevices (where N is not limited). Note that each subdevices 
should have same parameters. Mostly, subdevices are used for cards 
allowing multi-open (hardware sample mixing).

> yes plughw:0,0 is the same as hw:0,0 but with automatic sample rate 
> conversion.

Right.

						Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project  http://www.alsa-project.org
SuSE Linux    http://www.suse.com



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

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

end of thread, other threads:[~2002-09-21  5:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-20 16:24 devices/subdevices, hw:/plughw: Florian Bomers
2002-09-20 17:27 ` Patrick Shirkey
2002-09-20 18:02   ` Florian Bomers
2002-09-21  5:44   ` Jaroslav Kysela

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.