From: Takashi Iwai <tiwai@suse.de>
To: Joshua Haberman <joshua@haberman.com>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: questions about card detection
Date: Fri, 29 Aug 2003 11:37:29 +0200 [thread overview]
Message-ID: <s5hk78wyfc6.wl@alsa2.suse.de> (raw)
In-Reply-To: <1062147863.5596.15.camel@trimble1dhcp30.ups.edu>
At 29 Aug 2003 02:04:24 -0700,
Joshua Haberman wrote:
>
> Two questions.
>
> First: Is it possible to determine the maximum number of channels for a
> sound card that is in use by another application? My method for
> detecting the number of channels is:
>
> - open the pcm
> - use the hw_params API to determine the number of channels
>
> But if another application has the sound card open, it cannot be opened
> again and therefore the hw_params API cannot be used!
hmm, i think there is no "safe" way about this.
maybe it would be nice to have a read-only query functions.
> Second question: what is the meaning and intended use of the
> card,device,subdevice design of ALSA? I thought this would become clear
> to be once I bought a multichannel card, but now I own an Audiophile
> 2496 and it's still a mystery.
>
> "Card" I understand -- I can hold a card in my hand. But what is a
> "device" and a "subdevice?" When are they ever used, and how?
"device" corresponds to a gate-way to access to the card.
in the driver level, each device has a device file (pcmCxDx[pc]).
usually each device reprenents different type of PCM streams.
a device contains one or more subdevices.
"sub-device" is the lowest level of PCM abstration.
an actual PCM stream is always assigned to a sub-stream.
the sub-device is introduced to represent the cases like
multi-playback function. for example, SB Live can play 32 stereo
streams at the same time. in the ALSA, the driver assigns 32
sub-devices (sub-streams) to a playback device.
in the case of envy24, there are only one subdevice, because it's a
multi-channel card but not a multi-stream card.
Takashi
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
next prev parent reply other threads:[~2003-08-29 9:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-29 9:04 questions about card detection Joshua Haberman
2003-08-29 9:37 ` Takashi Iwai [this message]
2003-08-29 10:31 ` holborn
2003-08-29 11:13 ` 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=s5hk78wyfc6.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@lists.sourceforge.net \
--cc=joshua@haberman.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 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.